From 56dd32b2f0c70dbce58519056088a08cfcbc6903 Mon Sep 17 00:00:00 2001 From: Ruben Fiszel Date: Tue, 7 Feb 2023 19:13:56 +0100 Subject: [PATCH] iife --- frontend/dist/appviewer.iife.js | 1778 +++++++++++++++++ .../dist/assets/editor.worker-538bdbfd.js | 6 + frontend/dist/assets/json.worker-f6623cfe.js | 37 + frontend/dist/assets/yaml.worker-e51d7246.js | 454 +++++ frontend/dist/style.css | 1 + frontend/index.html | 840 ++++++++ frontend/package-lock.json | 710 ++++++- frontend/package.json | 15 +- frontend/rollup.config.js | 42 + frontend/src/embed.js | 9 + frontend/src/lib/components/ArgInfo.svelte | 2 - frontend/src/lib/components/Editor.svelte | 17 +- .../lib/components/InputTransformForm.svelte | 6 +- .../lib/components/JavascriptEditor.svelte | 212 ++ frontend/src/lib/components/SchemaForm.svelte | 26 +- .../lib/components/SchemaFormTransform.svelte | 120 ++ .../src/lib/components/SimpleEditor.svelte | 45 +- .../components/apps/editor/AppPreview.svelte | 23 +- .../inputEditor/EvalInputEditor.svelte | 4 +- .../components/common/button/Button.svelte | 6 +- .../content/BranchPredicateEditor.svelte | 6 +- .../flows/content/FlowConstants.svelte | 13 +- .../components/flows/content/FlowLoop.svelte | 6 +- .../flows/content/FlowModuleComponent.svelte | 5 +- .../flows/content/FlowModuleEarlyStop.svelte | 6 +- frontend/src/lib/fakesvelte.js | 12 + frontend/src/lib/utils.ts | 2 +- frontend/vite.config.js | 34 +- 28 files changed, 4299 insertions(+), 138 deletions(-) create mode 100644 frontend/dist/appviewer.iife.js create mode 100644 frontend/dist/assets/editor.worker-538bdbfd.js create mode 100644 frontend/dist/assets/json.worker-f6623cfe.js create mode 100644 frontend/dist/assets/yaml.worker-e51d7246.js create mode 100644 frontend/dist/style.css create mode 100644 frontend/index.html create mode 100644 frontend/rollup.config.js create mode 100644 frontend/src/embed.js create mode 100644 frontend/src/lib/components/JavascriptEditor.svelte create mode 100644 frontend/src/lib/components/SchemaFormTransform.svelte create mode 100644 frontend/src/lib/fakesvelte.js diff --git a/frontend/dist/appviewer.iife.js b/frontend/dist/appviewer.iife.js new file mode 100644 index 0000000000..cc0c39ec65 --- /dev/null +++ b/frontend/dist/appviewer.iife.js @@ -0,0 +1,1778 @@ +var kgt=Object.defineProperty;var Egt=(fe,Ra,Qe)=>Ra in fe?kgt(fe,Ra,{enumerable:!0,configurable:!0,writable:!0,value:Qe}):fe[Ra]=Qe;var Dt=(fe,Ra,Qe)=>(Egt(fe,typeof Ra!="symbol"?Ra+"":Ra,Qe),Qe);(function(){var bgt;"use strict";function fe(){}const Ra=i=>i;function Qe(i,e){for(const t in e)i[t]=e[t];return i}function VF(i){return i()}function RL(){return Object.create(null)}function pn(i){i.forEach(VF)}function xr(i){return typeof i=="function"}function Ve(i,e){return i!=i?e==e:i!==e||i&&typeof i=="object"||typeof i=="function"}let H2;function Zu(i,e){return H2||(H2=document.createElement("a")),H2.href=e,i===H2.href}function Oue(i){return Object.keys(i).length===0}function cg(i,...e){if(i==null)return fe;const t=i.subscribe(...e);return t.unsubscribe?()=>t.unsubscribe():t}function WF(i){let e;return cg(i,t=>e=t)(),e}function zt(i,e,t){i.$$.on_destroy.push(cg(e,t))}function Ut(i,e,t,n){if(i){const r=HF(i,e,t,n);return i[0](r)}}function HF(i,e,t,n){return i[1]&&n?Qe(t.ctx.slice(),i[1](n(e))):t.ctx}function jt(i,e,t,n){if(i[2]&&n){const r=i[2](n(t));if(e.dirty===void 0)return r;if(typeof r=="object"){const s=[],o=Math.max(e.dirty.length,r.length);for(let a=0;a32){const e=[],t=i.ctx.length/32;for(let n=0;nwindow.performance.now():()=>Date.now(),ML=$F?i=>requestAnimationFrame(i):fe;const Gm=new Set;function UF(i){Gm.forEach(e=>{e.c(i)||(Gm.delete(e),e.f())}),Gm.size!==0&&ML(UF)}function $2(i){let e;return Gm.size===0&&ML(UF),{promise:new Promise(t=>{Gm.add(e={c:i,f:t})}),abort(){Gm.delete(e)}}}let U2=!1;function Mue(){U2=!0}function Pue(){U2=!1}function Fue(i,e,t,n){for(;i>1);t(r)<=n?i=r+1:e=r}return i}function Bue(i){if(i.hydrate_init)return;i.hydrate_init=!0;let e=i.childNodes;if(i.nodeName==="HEAD"){const l=[];for(let c=0;c0&&e[t[r]].claim_order<=c?r+1:Fue(1,r,h=>e[t[h]].claim_order,c))-1;n[l]=t[u]+1;const d=u+1;t[d]=l,r=Math.max(d,r)}const s=[],o=[];let a=e.length-1;for(let l=t[r]+1;l!=0;l=n[l-1]){for(s.push(e[l-1]);a>=l;a--)o.push(e[a]);a--}for(;a>=0;a--)o.push(e[a]);s.reverse(),o.sort((l,c)=>l.claim_order-c.claim_order);for(let l=0,c=0;l=s[c].claim_order;)c++;const u=ci.removeEventListener(e,t,n)}function $s(i){return function(e){return e.preventDefault(),i.call(this,e)}}function is(i){return function(e){return e.stopPropagation(),i.call(this,e)}}function y(i,e,t){t==null?i.removeAttribute(e):i.getAttribute(e)!==t&&i.setAttribute(e,t)}function co(i,e){const t=Object.getOwnPropertyDescriptors(i.__proto__);for(const n in e)e[n]==null?i.removeAttribute(n):n==="style"?i.style.cssText=e[n]:n==="__value"?i.value=i[n]=e[n]:t[n]&&t[n].set?i[n]=e[n]:y(i,n,e[n])}function th(i,e){for(const t in e)y(i,t,e[t])}function Km(i,e){Object.keys(e).forEach(t=>{zue(i,t,e[t])})}function zue(i,e,t){e in i?i[e]=typeof i[e]=="boolean"&&t===""?!0:t:y(i,e,t)}function nh(i){return i===""?null:+i}function M(i){return Array.from(i.childNodes)}function GF(i){i.claim_info===void 0&&(i.claim_info={last_index:0,total_claimed:0})}function KF(i,e,t,n,r=!1){GF(i);const s=(()=>{for(let o=i.claim_info.last_index;o=0;o--){const a=i[o];if(e(a)){const l=t(a);return l===void 0?i.splice(o,1):i[o]=l,r?l===void 0&&i.claim_info.last_index--:i.claim_info.last_index=o,a}}return n()})();return s.claim_order=i.claim_info.total_claimed,i.claim_info.total_claimed+=1,s}function YF(i,e,t,n){return KF(i,r=>r.nodeName===e,r=>{const s=[];for(let o=0;or.removeAttribute(o))},()=>n(e))}function W(i,e,t){return YF(i,e,t,V)}function xe(i,e,t){return YF(i,e,t,Ee)}function _e(i,e){return KF(i,t=>t.nodeType===3,t=>{const n=""+e;if(t.data.startsWith(n)){if(t.data.length!==n.length)return t.splitText(n.length)}else t.data=n},()=>me(e),!0)}function le(i){return _e(i," ")}function ZF(i,e,t){for(let n=t;n{o.source===n.contentWindow&&e()})):(n.src="about:blank",n.onload=()=>{s=Pe(n.contentWindow,"resize",e)}),jF(i,n),()=>{(r||s&&n.contentWindow)&&s(),S(n)}}function vt(i,e,t){i.classList[t?"add":"remove"](e)}function XF(i,e,{bubbles:t=!1,cancelable:n=!1}={}){const r=document.createEvent("CustomEvent");return r.initCustomEvent(i,t,n,e),r}function Uue(i,e){const t=[];let n=0;for(const r of e.childNodes)if(r.nodeType===8){const s=r.textContent.trim();s===`HEAD_${i}_END`?(n-=1,t.push(r)):s===`HEAD_${i}_START`&&(n+=1,t.push(r))}else n>0&&t.push(r);return t}class jue{constructor(e=!1){this.is_svg=!1,this.is_svg=e,this.e=this.n=null}c(e){this.h(e)}m(e,t,n=null){this.e||(this.is_svg?this.e=Ee(t.nodeName):this.e=V(t.nodeName),this.t=t,this.c(e)),this.i(n)}h(e){this.e.innerHTML=e,this.n=Array.from(this.e.childNodes)}i(e){for(let t=0;t>>0}function Gue(i,e){const t={stylesheet:Vue(e),rules:{}};return G2.set(i,t),t}function K0(i,e,t,n,r,s,o,a=0){const l=16.666/n;let c=`{ +`;for(let m=0;m<=1;m+=l){const _=e+(t-e)*s(m);c+=m*100+`%{${o(_,1-_)}} +`}const u=c+`100% {${o(t,1-t)}} +}`,d=`__svelte_${que(u)}_${a}`,h=qF(i),{stylesheet:f,rules:g}=G2.get(h)||Gue(h,i);g[d]||(g[d]=!0,f.insertRule(`@keyframes ${d} ${u}`,f.cssRules.length));const p=i.style.animation||"";return i.style.animation=`${p?`${p}, `:""}${d} ${n}ms linear ${r}ms 1 both`,K2+=1,d}function Y0(i,e){const t=(i.style.animation||"").split(", "),n=t.filter(e?s=>s.indexOf(e)<0:s=>s.indexOf("__svelte")===-1),r=t.length-n.length;r&&(i.style.animation=n.join(", "),K2-=r,K2||Kue())}function Kue(){ML(()=>{K2||(G2.forEach(i=>{const{ownerNode:e}=i.stylesheet;e&&S(e)}),G2.clear())})}function Yue(i,e,t,n){if(!e)return fe;const r=i.getBoundingClientRect();if(e.left===r.left&&e.right===r.right&&e.top===r.top&&e.bottom===r.bottom)return fe;const{delay:s=0,duration:o=300,easing:a=Ra,start:l=z2()+s,end:c=l+o,tick:u=fe,css:d}=t(i,{from:e,to:r},n);let h=!0,f=!1,g;function p(){d&&(g=K0(i,0,1,o,s,a,d)),s||(f=!0)}function m(){d&&Y0(i,g),h=!1}return $2(_=>{if(!f&&_>=l&&(f=!0),f&&_>=c&&(u(1,0),m()),!h)return!1;if(f){const b=_-l,v=0+1*a(b/o);u(v,1-v)}return!0}),p(),u(0,1),m}function Zue(i){const e=getComputedStyle(i);if(e.position!=="absolute"&&e.position!=="fixed"){const{width:t,height:n}=e,r=i.getBoundingClientRect();i.style.position="absolute",i.style.width=t,i.style.height=n,QF(i,r)}}function QF(i,e){const t=i.getBoundingClientRect();if(e.left!==t.left||e.top!==t.top){const n=getComputedStyle(i),r=n.transform==="none"?"":n.transform;i.style.transform=`${r} translate(${e.left-t.left}px, ${e.top-t.top}px)`}}let dg;function hg(i){dg=i}function fg(){if(!dg)throw new Error("Function called outside component initialization");return dg}function Xue(i){fg().$$.before_update.push(i)}function Oo(i){fg().$$.on_mount.push(i)}function Y2(i){fg().$$.after_update.push(i)}function Zm(i){fg().$$.on_destroy.push(i)}function dr(){const i=fg();return(e,t,{cancelable:n=!1}={})=>{const r=i.$$.callbacks[e];if(r){const s=XF(e,t,{cancelable:n});return r.slice().forEach(o=>{o.call(i,s)}),!s.defaultPrevented}return!0}}function JF(i,e){return fg().$$.context.set(i,e),e}function jr(i){return fg().$$.context.get(i)}function hr(i,e){const t=i.$$.callbacks[e.type];t&&t.slice().forEach(n=>n.call(this,e))}const Xm=[],ve=[],Z2=[],PL=[],eB=Promise.resolve();let FL=!1;function tB(){FL||(FL=!0,eB.then(nB))}function Que(){return tB(),eB}function qr(i){Z2.push(i)}function Le(i){PL.push(i)}const BL=new Set;let Qm=0;function nB(){if(Qm!==0)return;const i=dg;do{try{for(;Qm{Z0=null})),Z0}function gg(i,e,t){i.dispatchEvent(XF(`${e?"intro":"outro"}${t}`))}const X2=new Set;let Fc;function Fe(){Fc={r:0,c:[],p:Fc}}function Be(){Fc.r||pn(Fc.c),Fc=Fc.p}function D(i,e){i&&i.i&&(X2.delete(i),i.i(e))}function A(i,e,t,n){if(i&&i.o){if(X2.has(i))return;X2.add(i),Fc.c.push(()=>{X2.delete(i),n&&(t&&i.d(1),n())}),i.o(e)}else n&&n()}const WL={duration:0};function iB(i,e,t){const n={direction:"in"};let r=e(i,t,n),s=!1,o,a,l=0;function c(){o&&Y0(i,o)}function u(){const{delay:h=0,duration:f=300,easing:g=Ra,tick:p=fe,css:m}=r||WL;m&&(o=K0(i,0,1,f,h,g,m,l++)),p(0,1);const _=z2()+h,b=_+f;a&&a.abort(),s=!0,qr(()=>gg(i,!0,"start")),a=$2(v=>{if(s){if(v>=b)return p(1,0),gg(i,!0,"end"),c(),s=!1;if(v>=_){const w=g((v-_)/f);p(w,1-w)}}return s})}let d=!1;return{start(){d||(d=!0,Y0(i),xr(r)?(r=r(n),VL().then(u)):u())},invalidate(){d=!1},end(){s&&(c(),s=!1)}}}function rB(i,e,t){const n={direction:"out"};let r=e(i,t,n),s=!0,o;const a=Fc;a.r+=1;function l(){const{delay:c=0,duration:u=300,easing:d=Ra,tick:h=fe,css:f}=r||WL;f&&(o=K0(i,1,0,u,c,d,f));const g=z2()+c,p=g+u;qr(()=>gg(i,!1,"start")),$2(m=>{if(s){if(m>=p)return h(0,1),gg(i,!1,"end"),--a.r||pn(a.c),!1;if(m>=g){const _=d((m-g)/u);h(1-_,_)}}return s})}return xr(r)?VL().then(()=>{r=r(n),l()}):l(),{end(c){c&&r.tick&&r.tick(1,0),s&&(o&&Y0(i,o),s=!1)}}}function ih(i,e,t,n){const r={direction:"both"};let s=e(i,t,r),o=n?0:1,a=null,l=null,c=null;function u(){c&&Y0(i,c)}function d(f,g){const p=f.b-o;return g*=Math.abs(p),{a:o,b:f.b,d:p,duration:g,start:f.start,end:f.start+g,group:f.group}}function h(f){const{delay:g=0,duration:p=300,easing:m=Ra,tick:_=fe,css:b}=s||WL,v={start:z2()+g,b:f};f||(v.group=Fc,Fc.r+=1),a||l?l=v:(b&&(u(),c=K0(i,o,f,p,g,m,b)),f&&_(0,1),a=d(v,p),qr(()=>gg(i,f,"start")),$2(w=>{if(l&&w>l.start&&(a=d(l,p),l=null,gg(i,a.b,"start"),b&&(u(),c=K0(i,o,a.b,a.duration,0,m,s.css))),a){if(w>=a.end)_(o=a.b,1-o),gg(i,a.b,"end"),l||(a.b?u():--a.group.r||pn(a.group.c)),a=null;else if(w>=a.start){const E=w-a.start;o=a.a+a.d*m(E/a.duration),_(o,1-o)}}return!!(a||l)}))}return{run(f){xr(s)?VL().then(()=>{s=s(r),h(f)}):h(f)},end(){u(),a=l=null}}}const sB=typeof window<"u"?window:typeof globalThis<"u"?globalThis:global;function pg(i,e){A(i,1,1,()=>{e.delete(i.key)})}function ede(i,e){i.f(),pg(i,e)}function mg(i,e,t,n,r,s,o,a,l,c,u,d){let h=i.length,f=s.length,g=h;const p={};for(;g--;)p[i[g].key]=g;const m=[],_=new Map,b=new Map;for(g=f;g--;){const I=d(r,s,g),x=t(I);let T=o.get(x);T?n&&T.p(I,e):(T=c(x,I),T.c()),_.set(x,m[g]=T),x in p&&b.set(x,Math.abs(g-p[x]))}const v=new Set,w=new Set;function E(I){D(I,1),I.m(a,u),o.set(I.key,I),u=I.first,f--}for(;h&&f;){const I=m[f-1],x=i[h-1],T=I.key,L=x.key;I===x?(u=I.first,h--,f--):_.has(L)?!o.has(T)||v.has(T)?E(I):w.has(L)?h--:b.get(T)>b.get(L)?(w.add(T),E(I)):(v.add(L),h--):(l(x,o),h--)}for(;h--;){const I=i[h];_.has(I.key)||l(I,o)}for(;f;)E(m[f-1]);return m}function dn(i,e){const t={},n={},r={$$scope:1};let s=i.length;for(;s--;){const o=i[s],a=e[s];if(a){for(const l in o)l in a||(n[l]=1);for(const l in a)r[l]||(t[l]=a[l],r[l]=1);i[s]=a}else for(const l in o)r[l]=1}for(const o in n)o in t||(t[o]=void 0);return t}function zn(i){return typeof i=="object"&&i!==null?i:{}}const tde=/[&"]/g,nde=/[&<]/g;function ide(i,e=!1){const t=String(i),n=e?tde:nde;n.lastIndex=0;let r="",s=0;for(;n.test(t);){const o=n.lastIndex-1,a=t[o];r+=t.substring(s,o)+(a==="&"?"&":a==='"'?""":"<"),s=o+1}return r+t.substring(s)}function rde(i,e){if(!i||!i.$$render)throw e==="svelte:component"&&(e+=" this={...}"),new Error(`<${e}> is not a valid SSR component. You may need to review your build config to ensure that dependencies are compiled, rather than imported as pre-compiled modules. Otherwise you may need to fix a <${e}>.`);return i}let HL;function oB(i){function e(t,n,r,s,o){const a=dg,l={on_destroy:HL,context:new Map(o||(a?a.$$.context:[])),on_mount:[],before_update:[],after_update:[],callbacks:RL()};hg({$$:l});const c=i(t,n,r,s);return hg(a),c}return{render:(t={},{$$slots:n={},context:r=new Map}={})=>{HL=[];const s={title:"",head:"",css:new Set},o=e(s,t,{},n,r);return pn(HL),{html:o,css:{code:Array.from(s.css).map(a=>a.code).join(` +`),map:null},head:s.title+s.head}},$$render:e}}function Te(i,e,t){const n=i.$$.props[e];n!==void 0&&(i.$$.bound[n]=t,t(i.$$.ctx[n]))}function Q(i){i&&i.c()}function J(i,e){i&&i.l(e)}function Z(i,e,t,n){const{fragment:r,after_update:s}=i.$$;r&&r.m(e,t),n||qr(()=>{const o=i.$$.on_mount.map(VF).filter(xr);i.$$.on_destroy?i.$$.on_destroy.push(...o):pn(o),i.$$.on_mount=[]}),s.forEach(qr)}function X(i,e){const t=i.$$;t.fragment!==null&&(pn(t.on_destroy),t.fragment&&t.fragment.d(e),t.on_destroy=t.fragment=null,t.ctx=[])}function sde(i,e){i.$$.dirty[0]===-1&&(Xm.push(i),tB(),i.$$.dirty.fill(0)),i.$$.dirty[e/31|0]|=1<{const g=f.length?f[0]:h;return c.ctx&&r(c.ctx[d],c.ctx[d]=g)&&(!c.skip_bound&&c.bound[d]&&c.bound[d](g),u&&sde(i,d)),h}):[],c.update(),u=!0,pn(c.before_update),c.fragment=n?n(c.ctx):!1,e.target){if(e.hydrate){Mue();const d=M(e.target);c.fragment&&c.fragment.l(d),d.forEach(S)}else c.fragment&&c.fragment.c();e.intro&&D(i.$$.fragment),Z(i,e.target,e.anchor,e.customElement),Pue(),nB()}hg(l)}class Ue{$destroy(){X(this,1),this.$destroy=fe}$on(e,t){if(!xr(t))return fe;const n=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return n.push(t),()=>{const r=n.indexOf(t);r!==-1&&n.splice(r,1)}}$set(e){this.$$set&&!Oue(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}function X0(i){const e=i-1;return e*e*e+1}function rh(i,{delay:e=0,duration:t=400,easing:n=Ra}={}){const r=+getComputedStyle(i).opacity;return{delay:e,duration:t,easing:n,css:s=>`opacity: ${s*r}`}}function ode(i,{delay:e=0,duration:t=400,easing:n=X0,x:r=0,y:s=0,opacity:o=0}={}){const a=getComputedStyle(i),l=+a.opacity,c=a.transform==="none"?"":a.transform,u=l*(1-o);return{delay:e,duration:t,easing:n,css:(d,h)=>` + transform: ${c} translate(${(1-d)*r}px, ${(1-d)*s}px); + opacity: ${l-u*h}`}}function aB(i,{delay:e=0,duration:t=400,easing:n=X0}={}){const r=getComputedStyle(i),s=+r.opacity,o=parseFloat(r.height),a=parseFloat(r.paddingTop),l=parseFloat(r.paddingBottom),c=parseFloat(r.marginTop),u=parseFloat(r.marginBottom),d=parseFloat(r.borderTopWidth),h=parseFloat(r.borderBottomWidth);return{delay:e,duration:t,easing:n,css:f=>`overflow: hidden;opacity: ${Math.min(f*20,1)*s};height: ${f*o}px;padding-top: ${f*a}px;padding-bottom: ${f*l}px;margin-top: ${f*c}px;margin-bottom: ${f*u}px;border-top-width: ${f*d}px;border-bottom-width: ${f*h}px;`}}const Jm=[];function Q2(i,e){return{subscribe:er(i,e).subscribe}}function er(i,e=fe){let t;const n=new Set;function r(a){if(Ve(i,a)&&(i=a,t)){const l=!Jm.length;for(const c of n)c[1](),Jm.push(c,i);if(l){for(let c=0;c{n.delete(c),n.size===0&&(t(),t=null)}}return{set:r,update:s,subscribe:o}}function lB(i,e,t){const n=!Array.isArray(i),r=n?[i]:i,s=e.length<2;return Q2(t,o=>{let a=!1;const l=[];let c=0,u=fe;const d=()=>{if(c)return;u();const f=e(n?l[0]:l,o);s?o(f):u=xr(f)?f:fe},h=r.map((f,g)=>cg(f,p=>{l[g]=p,c&=~(1<{c|=1<[l,n.newOutput("ctx",l,r,c)]))};for(const[l,c]of Object.entries(i)){s[l]={};for(const u of c)s[l][u]=n.newOutput(l,u,r,(a=(o=e==null?void 0:e.outputsById[l])==null?void 0:o[u])==null?void 0:a.peak())}return r.update(l=>l+1),{outputsById:s,connect:n.connect,state:r}}function lde(){const i={};function e(n,r){if(n.type==="static")return{peak:()=>n.value,next:()=>{}};if(n.type==="connected"){const s=cde(r),o=n.connection;if(!o)return{peak:()=>{},next:()=>{}};const{componentId:a,path:l}=o,[c]=l?l.split(".")[0].split("["):[void 0];let u=i[`${a}.${c}`];return u?(u.subscribe(s),s.next(u.peak()),s):(console.warn("Observable at "+a+"."+c+" not found"),{peak:()=>{},next:()=>{}})}else{if(n.type==="user")return{peak:()=>n.value,next:()=>{}};throw Error("Unknown input type "+n)}}function t(n,r,s,o){const a=ude(s,o);return i[`${n}.${r}`]=a,a}return{connect:e,newOutput:t}}function cde(i){let e;function t(){return e}function n(r){e=r,i(r)}return{peak:t,next:n}}function ude(i,e){let t=e;const n=[];function r(a){n.includes(a)||(n.push(a),t!==void 0&&a.next(t))}function s(a,l=!1){(t!=a||l)&&(i.update(c=>c+1),t=a,n.forEach(c=>c.next(t)))}function o(){return t}return{subscribe:r,set:s,peak:o}}function cB(i,e){let t=0;return function(...n){let r=new Date;r-t>=e&&(i(...n),t=r)}}function sh(i,e){const t=i.map(n=>{const r=n[e];return(r&&r.y)+(r&&r.h)||0});return Math.max(...t,1)}const dde=(i,e)=>{const t=e.slice().sort((r,s)=>r[0]-s[0]),n=t.find(r=>{const[s]=r;return i<=s});return n?n[1]:t[t.length-1][1]};function hde(i,e,t){return sh(i,t)*e}const uB=(i,e)=>Array.from(Array(i),()=>new Array(e));function dB(i,e,t){let n=uB(e,t);for(var r=0;rd.id&&d.id!==t.id&&d.id).filter(Boolean)]}return[...new Set(l)]}function Q0(i,e,t,n){let r=uB(t,n);for(var s=0;si.indexOf(t.id)!==-1)}function zL(i,e){return e.find(t=>t.id===i)}function $L(i,e){const t=i[0].length,n=Math.min(t,e.w);let r=t-n,s=i.length;for(var o=0;od===void 0)&&i.slice(o,o+e.h).every(h=>h.slice(a,a+n).every(f=>f===void 0)))return{y:o,x:a}}return{y:s,x:0}}const hB=(i,e)=>({...i[e],id:i.id}),J2=(i,e,t,n)=>i.map(r=>r.id===e.id?{...r,[n]:{...r[n],...t}}:r);function pde(i,e,t,n){const r=hB(i,t),s=e.map(d=>d.id).filter(d=>d!==r.id),o=e.filter(d=>d.id!==r.id);let a=J2(e,i,r,t),l=Q0(a,s,sh(a,t),t),c=a,u=[];return o.forEach(d=>{let h=$L(l,d[t]);u.push(d.id),c=J2(c,d,h,t);let f=s.filter(g=>u.indexOf(g)===-1);l=Q0(c,f,sh(c,t),t)}),c}function mde(i,e,t,n){const r=hB(i,t);let s=Q0(e,[r.id],sh(e,t),t);const o=fde(e,s,r);let a=gde(o,e);if(a.find(h=>h[t].fixed))return e;e=J2(e,i,r,t),s=Q0(e,o,sh(e,t),t);let c=e,u=o,d=[];return a.forEach(h=>{let f=$L(s,h[t]);d.push(h.id),c=J2(c,h,f,t);let g=u.filter(p=>d.indexOf(p)===-1);s=Q0(c,g,sh(c,t),t)}),c}function _de(i,e,t){return i.map(n=>{if(!n[e])return n.id}).filter(Boolean)}function bde(i,e,t,n){return n.map(([r,s])=>e[s]&&s).filter(Boolean).reduce(function(r,s){return Math.abs(s-t){const a=i.find(d=>d.id===o),l=bde(i,a,e,t),c=$L(n,a[l]),u={...a,[e]:{...a[l],...c}};s=s.map(d=>d.id===o?u:d),n=dB(s,sh(s,e),e)}),s}const xgt="",vde=i=>({}),gB=i=>({movePointerDown:i[18],resizePointerDown:i[19]});function pB(i){let e,t,n;return{c(){e=V("div"),this.h()},l(r){e=W(r,"DIV",{class:!0}),M(e).forEach(S),this.h()},h(){y(e,"class","svlt-grid-resizer svelte-klyzmu")},m(r,s){F(r,e,s),t||(n=Pe(e,"pointerdown",i[19]),t=!0)},p:fe,d(r){r&&S(e),t=!1,n()}}}function mB(i){let e;return{c(){e=V("div"),this.h()},l(t){e=W(t,"DIV",{class:!0,style:!0}),M(e).forEach(S),this.h()},h(){y(e,"class","svlt-grid-shadow shadow-active svelte-klyzmu"),Ye(e,"width",i[12].w*i[6]-i[8]*2+"px"),Ye(e,"height",i[12].h*i[7]-i[9]*2+"px"),Ye(e,"transform","translate("+(i[12].x*i[6]+i[8])+"px, "+(i[12].y*i[7]+i[9])+"px)")},m(t,n){F(t,e,n),i[29](e)},p(t,n){n[0]&4416&&Ye(e,"width",t[12].w*t[6]-t[8]*2+"px"),n[0]&4736&&Ye(e,"height",t[12].h*t[7]-t[9]*2+"px"),n[0]&5056&&Ye(e,"transform","translate("+(t[12].x*t[6]+t[8])+"px, "+(t[12].y*t[7]+t[9])+"px)")},d(t){t&&S(e),i[29](null)}}}function wde(i){let e,t,n,r,s,o,a,l;const c=i[28].default,u=Ut(c,i,i[27],gB);let d=i[4]&&!i[10].customResizer&&pB(i),h=(i[13]||i[16])&&mB(i);return{c(){e=V("div"),u&&u.c(),t=ae(),d&&d.c(),r=ae(),h&&h.c(),s=Me(),this.h()},l(f){e=W(f,"DIV",{draggable:!0,class:!0,style:!0});var g=M(e);u&&u.l(g),t=le(g),d&&d.l(g),g.forEach(S),r=le(f),h&&h.l(f),s=Me(),this.h()},h(){y(e,"draggable",!1),y(e,"class","svlt-grid-item svelte-klyzmu"),y(e,"style",n="width: "+(i[13]?i[15].width:i[0])+"px; height:"+(i[13]?i[15].height:i[1])+"px; "+(i[13]?`transform: translate(${i[14].x}px, ${i[14].y}px);top:${i[17].top}px;left:${i[17].left}px;`:i[16]?`transform: translate(${i[14].x}px, ${i[14].y}px); position:absolute; transition: width 0.2s, height 0.2s;`:`transition: transform 0.2s, opacity 0.2s; transform: translate(${i[2]}px, ${i[3]}px); `)),vt(e,"svlt-grid-active",i[13]||i[16]&&i[17])},m(f,g){F(f,e,g),u&&u.m(e,null),R(e,t),d&&d.m(e,null),F(f,r,g),h&&h.m(f,g),F(f,s,g),o=!0,a||(l=Pe(e,"pointerdown",function(){xr(i[10]&&i[10].customDragger?null:i[5]&&i[18])&&(i[10]&&i[10].customDragger?null:i[5]&&i[18]).apply(this,arguments)}),a=!0)},p(f,g){i=f,u&&u.p&&(!o||g[0]&134217728)&&qt(u,c,i,i[27],o?jt(c,i[27],g,vde):Gt(i[27]),gB),i[4]&&!i[10].customResizer?d?d.p(i,g):(d=pB(i),d.c(),d.m(e,null)):d&&(d.d(1),d=null),(!o||g[0]&253967&&n!==(n="width: "+(i[13]?i[15].width:i[0])+"px; height:"+(i[13]?i[15].height:i[1])+"px; "+(i[13]?`transform: translate(${i[14].x}px, ${i[14].y}px);top:${i[17].top}px;left:${i[17].left}px;`:i[16]?`transform: translate(${i[14].x}px, ${i[14].y}px); position:absolute; transition: width 0.2s, height 0.2s;`:`transition: transform 0.2s, opacity 0.2s; transform: translate(${i[2]}px, ${i[3]}px); `)))&&y(e,"style",n),(!o||g[0]&204800)&&vt(e,"svlt-grid-active",i[13]||i[16]&&i[17]),i[13]||i[16]?h?h.p(i,g):(h=mB(i),h.c(),h.m(s.parentNode,s)):h&&(h.d(1),h=null)},i(f){o||(D(u,f),o=!0)},o(f){A(u,f),o=!1},d(f){f&&S(e),u&&u.d(f),d&&d.d(),f&&S(r),h&&h.d(f),f&&S(s),a=!1,l()}}}function Cde(i,e,t){let{$$slots:n={},$$scope:r}=e;const s=dr();let{sensor:o}=e,{width:a}=e,{height:l}=e,{left:c}=e,{top:u}=e,{resizable:d}=e,{draggable:h}=e,{id:f}=e,{container:g}=e,{xPerPx:p}=e,{yPerPx:m}=e,{gapX:_}=e,{gapY:b}=e,{item:v}=e,{max:w}=e,{min:E}=e,{cols:I}=e,{nativeContainer:x}=e,T,L={},O=!1,N,P,$={x:0,y:0},ne={x:0,y:0},z={width:a,height:l},K=!1,ce;const re=()=>{const G=T.getBoundingClientRect(),ge=ke.left+ne.x,pe=ke.top+ne.y;t(14,ne.x=L.x*p+_-(G.x-ge),ne),t(14,ne.y=L.y*m+b-(G.y-pe),ne),t(13,O=!1),t(16,K=!0),clearTimeout(ce),ce=setTimeout(()=>{t(16,K=!1)},100),s("pointerup",{id:f})};let B=(G,ge)=>{s("repaint",{id:f,shadow:L,isPointerUp:ge,onUpdate:G})},Ae=0,we,ke,ue;const De=G=>{if(G===document.documentElement||!G){const{height:ge,top:pe,right:q,bottom:ee,left:te}=x.getBoundingClientRect();return{top:Math.max(0,pe),bottom:Math.min(window.innerHeight,ee)}}return G.getBoundingClientRect()},Ge=G=>G||document.documentElement,lt=({clientX:G,clientY:ge,target:pe})=>{N=G,P=ge,$={x:c,y:u},t(12,L={x:v.x,y:v.y,w:v.w,h:v.h}),t(15,z={width:a,height:l}),we=De(g),ue=Ge(g),t(14,ne={x:0,y:0}),t(17,ke=pe.closest(".svlt-grid-item").getBoundingClientRect()),t(13,O=!0),t(16,K=!1),Ae=ue.scrollTop,window.addEventListener("pointermove",un),window.addEventListener("pointerup",Lt)};let Et={x:0,y:0},xt={x:0,y:0},at=0;const Rt=()=>{clearInterval(at),at=!1,Et={x:0,y:0},xt={x:0,y:0}},bt=()=>{const G=ue.scrollTop-Ae,ge=$.x+ne.x,pe=$.y+(ne.y+G);let q=Math.round(ge/p),ee=Math.round(pe/m);t(12,L.x=Math.max(Math.min(q,I-L.w),0),L),t(12,L.y=Math.max(ee,0),L),w.y&&t(12,L.y=Math.min(L.y,w.y),L),B()},un=G=>{G.preventDefault(),G.stopPropagation(),G.stopImmediatePropagation();const{clientX:ge,clientY:pe}=G;t(14,ne={x:ge-N,y:pe-P});const q=o;let ee=Math.max(0,(we.top+q-pe)/q),te=Math.max(0,(pe-(we.bottom-q))/q);const j=ee>0&&te===0,Y=te>0&&ee===0;Et.y=j?-1:Y?1:0,xt.y=Et.y===-1?ee:te,xt.y>0?at||(at=setInterval(()=>{ue.scrollTop+=2*(xt.y+Math.sign(xt.y))*Et.y,bt()},10)):at?Rt():bt()},Lt=G=>{Rt(),window.removeEventListener("pointerdown",lt),window.removeEventListener("pointermove",un),window.removeEventListener("pointerup",Lt),B(re,!0)};let Zt={x:0,y:0},ln={width:0,height:0};const rn=G=>{G.stopPropagation();const{pageX:ge,pageY:pe}=G;Zt={x:ge,y:pe},ln={width:a,height:l},t(14,ne={x:0,y:0}),t(17,ke=G.target.closest(".svlt-grid-item").getBoundingClientRect()),t(15,z={width:a,height:l}),t(13,O=!0),t(16,K=!1),t(12,L={x:v.x,y:v.y,w:v.w,h:v.h}),we=De(g),ue=Ge(g),window.addEventListener("pointermove",Ct),window.addEventListener("pointerup",gt)},Ct=({pageX:G,pageY:ge})=>{t(15,z.width=ln.width+G-Zt.x,z),t(15,z.height=ln.height+ge-Zt.y,z);let pe=I-L.x;pe=Math.min(w.w,pe)||pe,t(15,z.width=Math.max(Math.min(z.width,pe*p-_*2),E.w*p-_*2),z),t(15,z.height=Math.max(z.height,E.h*m-b*2),z),w.h&&t(15,z.height=Math.min(z.height,w.h*m-b*2),z),t(12,L.w=Math.round((z.width+_*2)/p),L),t(12,L.h=Math.round((z.height+b*2)/m),L),B()},gt=G=>{G.stopPropagation(),B(re,!0),window.removeEventListener("pointermove",Ct),window.removeEventListener("pointerup",gt)};function Re(G){ve[G?"unshift":"push"](()=>{T=G,t(11,T)})}return i.$$set=G=>{"sensor"in G&&t(20,o=G.sensor),"width"in G&&t(0,a=G.width),"height"in G&&t(1,l=G.height),"left"in G&&t(2,c=G.left),"top"in G&&t(3,u=G.top),"resizable"in G&&t(4,d=G.resizable),"draggable"in G&&t(5,h=G.draggable),"id"in G&&t(21,f=G.id),"container"in G&&t(22,g=G.container),"xPerPx"in G&&t(6,p=G.xPerPx),"yPerPx"in G&&t(7,m=G.yPerPx),"gapX"in G&&t(8,_=G.gapX),"gapY"in G&&t(9,b=G.gapY),"item"in G&&t(10,v=G.item),"max"in G&&t(23,w=G.max),"min"in G&&t(24,E=G.min),"cols"in G&&t(25,I=G.cols),"nativeContainer"in G&&t(26,x=G.nativeContainer),"$$scope"in G&&t(27,r=G.$$scope)},[a,l,c,u,d,h,p,m,_,b,v,T,L,O,ne,z,K,ke,lt,rn,o,f,g,w,E,I,x,r,n,Re]}class yde extends Ue{constructor(e){super(),je(this,e,Cde,wde,Ve,{sensor:20,width:0,height:1,left:2,top:3,resizable:4,draggable:5,id:21,container:22,xPerPx:6,yPerPx:7,gapX:8,gapY:9,item:10,max:23,min:24,cols:25,nativeContainer:26},null,[-1,-1])}}const Lgt="";function _B(i,e,t){const n=i.slice();return n[28]=e[t],n[30]=t,n}const Sde=i=>({movePointerDown:i[1]&2,resizePointerDown:i[1]&1,dataItem:i[0]&1,item:i[0]&17,index:i[0]&1}),bB=i=>({movePointerDown:i[32],resizePointerDown:i[31],dataItem:i[28],item:i[28][i[4]],index:i[30]});function vB(i){let e=[],t=new Map,n,r,s=i[0];const o=a=>a[28].id;for(let a=0;a{n=null}),Be())},i(r){t||(D(n),t=!0)},o(r){A(n),t=!1},d(r){n&&n.d(r),r&&S(e)}}}function CB(i,e){let t,n,r;return n=new yde({props:{id:e[28].id,resizable:e[28][e[4]]&&e[28][e[4]].resizable,draggable:e[28][e[4]]&&e[28][e[4]].draggable,xPerPx:e[6],yPerPx:e[10],width:Math.min(e[4],e[28][e[4]]&&e[28][e[4]].w)*e[6]-e[9]*2,height:(e[28][e[4]]&&e[28][e[4]].h)*e[10]-e[8]*2,top:(e[28][e[4]]&&e[28][e[4]].y)*e[10]+e[8],left:(e[28][e[4]]&&e[28][e[4]].x)*e[6]+e[9],item:e[28][e[4]],min:e[28][e[4]]&&e[28][e[4]].min,max:e[28][e[4]]&&e[28][e[4]].max,cols:e[4],gapX:e[9],gapY:e[8],sensor:e[3],container:e[2],nativeContainer:e[5],$$slots:{default:[kde,({resizePointerDown:s,movePointerDown:o})=>({31:s,32:o}),({resizePointerDown:s,movePointerDown:o})=>[0,(s?1:0)|(o?2:0)]]},$$scope:{ctx:e}}}),n.$on("repaint",e[12]),n.$on("pointerup",e[11]),{key:i,first:null,c(){t=Me(),Q(n.$$.fragment),this.h()},l(s){t=Me(),J(n.$$.fragment,s),this.h()},h(){this.first=t},m(s,o){F(s,t,o),Z(n,s,o),r=!0},p(s,o){e=s;const a={};o[0]&1&&(a.id=e[28].id),o[0]&17&&(a.resizable=e[28][e[4]]&&e[28][e[4]].resizable),o[0]&17&&(a.draggable=e[28][e[4]]&&e[28][e[4]].draggable),o[0]&64&&(a.xPerPx=e[6]),o[0]&593&&(a.width=Math.min(e[4],e[28][e[4]]&&e[28][e[4]].w)*e[6]-e[9]*2),o[0]&273&&(a.height=(e[28][e[4]]&&e[28][e[4]].h)*e[10]-e[8]*2),o[0]&273&&(a.top=(e[28][e[4]]&&e[28][e[4]].y)*e[10]+e[8]),o[0]&593&&(a.left=(e[28][e[4]]&&e[28][e[4]].x)*e[6]+e[9]),o[0]&17&&(a.item=e[28][e[4]]),o[0]&17&&(a.min=e[28][e[4]]&&e[28][e[4]].min),o[0]&17&&(a.max=e[28][e[4]]&&e[28][e[4]].max),o[0]&16&&(a.cols=e[4]),o[0]&512&&(a.gapX=e[9]),o[0]&256&&(a.gapY=e[8]),o[0]&8&&(a.sensor=e[3]),o[0]&4&&(a.container=e[2]),o[0]&32&&(a.nativeContainer=e[5]),o[0]&2097169|o[1]&3&&(a.$$scope={dirty:o,ctx:e}),n.$set(a)},i(s){r||(D(n.$$.fragment,s),r=!0)},o(s){A(n.$$.fragment,s),r=!1},d(s){s&&S(t),X(n,s)}}}function Ede(i){let e,t,n=(i[6]||!i[1])&&vB(i);return{c(){e=V("div"),n&&n.c(),this.h()},l(r){e=W(r,"DIV",{class:!0,style:!0});var s=M(e);n&&n.l(s),s.forEach(S),this.h()},h(){y(e,"class","svlt-grid-container svelte-10ksjm1"),Ye(e,"height",i[7]+"px")},m(r,s){F(r,e,s),n&&n.m(e,null),i[20](e),t=!0},p(r,s){r[6]||!r[1]?n?(n.p(r,s),s[0]&66&&D(n,1)):(n=vB(r),n.c(),D(n,1),n.m(e,null)):n&&(Fe(),A(n,1,1,()=>{n=null}),Be()),(!t||s[0]&128)&&Ye(e,"height",r[7]+"px")},i(r){t||(D(n),t=!0)},o(r){A(n),t=!1},d(r){r&&S(e),n&&n.d(),i[20](null)}}}function xde(i,e,t){let n,r,s,{$$slots:o={},$$scope:a}=e;const l=dr();let{fillSpace:c=!1}=e,{items:u}=e,{rowHeight:d}=e,{cols:h}=e,{gap:f=[10,10]}=e,{fastStart:g=!1}=e,{throttleUpdate:p=100}=e,{throttleResize:m=100}=e,{scroller:_=void 0}=e,{sensor:b=20}=e,v,w,E=0,I=d,x;const T=ne=>{l("pointerup",{id:ne.detail.id,cols:v})},L=cB(()=>{t(0,u=fB(u,v,h)),l("resize",{cols:v,xPerPx:E,yPerPx:I,width:x})},p);Oo(()=>{const ne=new ResizeObserver(z=>{requestAnimationFrame(()=>{let K=z[0].contentRect.width;K!==x&&(t(4,v=dde(K,h)),t(6,E=K/v),x?L():(t(0,u=fB(u,v,h)),l("mount",{cols:v,xPerPx:E,yPerPx:I})),x=K)})});return ne.observe(w),()=>ne.disconnect()});const O=({detail:ne})=>{let z=zL(ne.id,u);z&&(z={...z,[v]:{...z[v],...ne.shadow}},c?t(0,u=pde(z,u,v,zL(ne.id,u))):t(0,u=mde(z,u,v,zL(ne.id,u))),ne.onUpdate&&ne.onUpdate(),l("change",{unsafeItem:z,id:z.id,cols:v}))},N=cB(O,m),P=({detail:ne})=>{ne.isPointerUp?O({detail:ne}):N({detail:ne})};function $(ne){ve[ne?"unshift":"push"](()=>{w=ne,t(5,w)})}return i.$$set=ne=>{"fillSpace"in ne&&t(13,c=ne.fillSpace),"items"in ne&&t(0,u=ne.items),"rowHeight"in ne&&t(14,d=ne.rowHeight),"cols"in ne&&t(15,h=ne.cols),"gap"in ne&&t(16,f=ne.gap),"fastStart"in ne&&t(1,g=ne.fastStart),"throttleUpdate"in ne&&t(17,p=ne.throttleUpdate),"throttleResize"in ne&&t(18,m=ne.throttleResize),"scroller"in ne&&t(2,_=ne.scroller),"sensor"in ne&&t(3,b=ne.sensor),"$$scope"in ne&&t(21,a=ne.$$scope)},i.$$.update=()=>{i.$$.dirty[0]&65536&&t(9,[n,r]=f,n,(t(8,r),t(16,f))),i.$$.dirty[0]&17&&t(7,s=hde(u,I,v))},[u,g,_,b,v,w,E,s,r,n,I,T,P,c,d,h,f,p,m,o,$,a]}class Lde extends Ue{constructor(e){super(),je(this,e,xde,Ede,Ve,{fillSpace:13,items:0,rowHeight:14,cols:15,gap:16,fastStart:1,throttleUpdate:17,throttleResize:18,scroller:2,sensor:3},null,[-1,-1])}}async function Tde(i){console.error("Goto not implemented")}const yB=Q2({url:document.URL},function(e){return function(){}});class SB extends Error{constructor(t,n,r){super(r);Dt(this,"url");Dt(this,"status");Dt(this,"statusText");Dt(this,"body");Dt(this,"request");this.name="ApiError",this.url=n.url,this.status=n.status,this.statusText=n.statusText,this.body=n.body,this.request=t}}class Ide extends Error{constructor(e){super(e),this.name="CancelError"}get isCancelled(){return!0}}class Dde{constructor(e){Dt(this,bgt);Dt(this,"_isResolved");Dt(this,"_isRejected");Dt(this,"_isCancelled");Dt(this,"_cancelHandlers");Dt(this,"_promise");Dt(this,"_resolve");Dt(this,"_reject");this._isResolved=!1,this._isRejected=!1,this._isCancelled=!1,this._cancelHandlers=[],this._promise=new Promise((t,n)=>{this._resolve=t,this._reject=n;const r=a=>{var l;this._isResolved||this._isRejected||this._isCancelled||(this._isResolved=!0,(l=this._resolve)==null||l.call(this,a))},s=a=>{var l;this._isResolved||this._isRejected||this._isCancelled||(this._isRejected=!0,(l=this._reject)==null||l.call(this,a))},o=a=>{this._isResolved||this._isRejected||this._isCancelled||this._cancelHandlers.push(a)};return Object.defineProperty(o,"isResolved",{get:()=>this._isResolved}),Object.defineProperty(o,"isRejected",{get:()=>this._isRejected}),Object.defineProperty(o,"isCancelled",{get:()=>this._isCancelled}),e(r,s,o)})}then(e,t){return this._promise.then(e,t)}catch(e){return this._promise.catch(e)}finally(e){return this._promise.finally(e)}cancel(){var e;if(!(this._isResolved||this._isRejected||this._isCancelled)){if(this._isCancelled=!0,this._cancelHandlers.length)try{for(const t of this._cancelHandlers)t()}catch(t){console.warn("Cancellation threw an error",t);return}this._cancelHandlers.length=0,(e=this._reject)==null||e.call(this,new Ide("Request aborted"))}}get isCancelled(){return this._isCancelled}}bgt=Symbol.toStringTag;const We={BASE:"/api",VERSION:"1.62.0",WITH_CREDENTIALS:!1,CREDENTIALS:"include",TOKEN:void 0,USERNAME:void 0,PASSWORD:void 0,HEADERS:void 0,ENCODE_PATH:void 0};var kB;(i=>{(e=>{e.VIEWER="viewer",e.PUBLISHER="publisher",e.ANONYMOUS="anonymous"})(i.execution_mode||(i.execution_mode={}))})(kB||(kB={}));var EB;(i=>{(e=>{e.JOBS_RUN="jobs.run",e.SCRIPTS_CREATE="scripts.create",e.SCRIPTS_UPDATE="scripts.update",e.USERS_CREATE="users.create",e.USERS_DELETE="users.delete",e.USERS_SETPASSWORD="users.setpassword",e.USERS_UPDATE="users.update",e.USERS_LOGIN="users.login",e.USERS_TOKEN_CREATE="users.token.create",e.USERS_TOKEN_DELETE="users.token.delete",e.VARIABLES_CREATE="variables.create",e.VARIABLES_DELETE="variables.delete",e.VARIABLES_UPDATE="variables.update"})(i.operation||(i.operation={})),(e=>{e.CREATED="Created",e.UPDATED="Updated",e.DELETE="Delete",e.EXECUTE="Execute"})(i.action_kind||(i.action_kind={}))})(EB||(EB={}));var xB;(i=>{(e=>{e.SCRIPT="script",e.PREVIEW="preview",e.DEPENDENCIES="dependencies",e.FLOW="flow",e.FLOWPREVIEW="flowpreview",e.SCRIPT_HUB="script_hub",e.IDENTITY="identity"})(i.job_kind||(i.job_kind={})),(e=>{e.PYTHON3="python3",e.DENO="deno",e.GO="go",e.BASH="bash"})(i.language||(i.language={}))})(xB||(xB={}));var LB;(i=>{(e=>{e.WAITING_FOR_PRIOR_STEPS="WaitingForPriorSteps",e.WAITING_FOR_EVENTS="WaitingForEvents",e.WAITING_FOR_EXECUTOR="WaitingForExecutor",e.IN_PROGRESS="InProgress",e.SUCCESS="Success",e.FAILURE="Failure"})(i.type||(i.type={}))})(LB||(LB={}));var TB;(i=>{(e=>{e.PASSWORD="password",e.GITHUB="github"})(i.login_type||(i.login_type={}))})(TB||(TB={}));var IB;(i=>{(e=>{e.COMPLETED_JOB="CompletedJob",e.QUEUED_JOB="QueuedJob"})(i.type||(i.type={}))})(IB||(IB={}));var DB;(i=>{(e=>{e.VIEWER="viewer",e.PUBLISHER="publisher",e.ANONYMOUS="anonymous"})(i.execution_mode||(i.execution_mode={}))})(DB||(DB={}));var NB;(i=>{(e=>{e.VIEWER="viewer",e.PUBLISHER="publisher",e.ANONYMOUS="anonymous"})(i.execution_mode||(i.execution_mode={}))})(NB||(NB={}));var AB;(i=>{(e=>{e.PYTHON3="python3",e.DENO="deno",e.GO="go",e.BASH="bash"})(i.language||(i.language={}))})(AB||(AB={}));var RB;(i=>{(e=>{e.SCRIPT="script",e.PREVIEW="preview",e.DEPENDENCIES="dependencies",e.FLOW="flow",e.FLOWPREVIEW="flowpreview",e.SCRIPT_HUB="script_hub",e.IDENTITY="identity"})(i.job_kind||(i.job_kind={})),(e=>{e.PYTHON3="python3",e.DENO="deno",e.GO="go",e.BASH="bash"})(i.language||(i.language={}))})(RB||(RB={}));var OB;(i=>{(e=>{e.DENO="deno",e.PYTHON3="python3",e.GO="go",e.BASH="bash"})(i.language||(i.language={}))})(OB||(OB={}));var MB;(i=>{(e=>{e.PYTHON3="python3",e.DENO="deno",e.GO="go",e.BASH="bash"})(i.language||(i.language={})),(e=>{e.SCRIPT="script",e.FAILURE="failure",e.TRIGGER="trigger",e.COMMAND="command",e.APPROVAL="approval"})(i.kind||(i.kind={}))})(MB||(MB={}));const UL=i=>i!=null,J0=i=>typeof i=="string",jL=i=>J0(i)&&i!=="",qL=i=>typeof i=="object"&&typeof i.type=="string"&&typeof i.stream=="function"&&typeof i.arrayBuffer=="function"&&typeof i.constructor=="function"&&typeof i.constructor.name=="string"&&/^(Blob|File)$/.test(i.constructor.name)&&/^(Blob|File)$/.test(i[Symbol.toStringTag]),PB=i=>i instanceof FormData,Nde=i=>{try{return btoa(i)}catch{return Buffer.from(i).toString("base64")}},Ade=i=>{const e=[],t=(r,s)=>{e.push(`${encodeURIComponent(r)}=${encodeURIComponent(String(s))}`)},n=(r,s)=>{UL(s)&&(Array.isArray(s)?s.forEach(o=>{n(r,o)}):typeof s=="object"?Object.entries(s).forEach(([o,a])=>{n(`${r}[${o}]`,a)}):t(r,s))};return Object.entries(i).forEach(([r,s])=>{n(r,s)}),e.length>0?`?${e.join("&")}`:""},Rde=(i,e)=>{const t=i.ENCODE_PATH||encodeURI,n=e.url.replace("{api-version}",i.VERSION).replace(/{(.*?)}/g,(s,o)=>{var a;return(a=e.path)!=null&&a.hasOwnProperty(o)?t(String(e.path[o])):s}),r=`${i.BASE}${n}`;return e.query?`${r}${Ade(e.query)}`:r},Ode=i=>{if(i.formData){const e=new FormData,t=(n,r)=>{J0(r)||qL(r)?e.append(n,r):e.append(n,JSON.stringify(r))};return Object.entries(i.formData).filter(([n,r])=>UL(r)).forEach(([n,r])=>{Array.isArray(r)?r.forEach(s=>t(n,s)):t(n,r)}),e}},ey=async(i,e)=>typeof e=="function"?e(i):e,Mde=async(i,e)=>{const t=await ey(e,i.TOKEN),n=await ey(e,i.USERNAME),r=await ey(e,i.PASSWORD),s=await ey(e,i.HEADERS),o=Object.entries({Accept:"application/json",...s,...e.headers}).filter(([a,l])=>UL(l)).reduce((a,[l,c])=>({...a,[l]:String(c)}),{});if(jL(t)&&(o.Authorization=`Bearer ${t}`),jL(n)&&jL(r)){const a=Nde(`${n}:${r}`);o.Authorization=`Basic ${a}`}return e.body&&(e.mediaType?o["Content-Type"]=e.mediaType:qL(e.body)?o["Content-Type"]=e.body.type||"application/octet-stream":J0(e.body)?o["Content-Type"]="text/plain":PB(e.body)||(o["Content-Type"]="application/json")),new Headers(o)},Pde=i=>{var e;if(i.body)return(e=i.mediaType)!=null&&e.includes("/json")?JSON.stringify(i.body):J0(i.body)||qL(i.body)||PB(i.body)?i.body:JSON.stringify(i.body)},Fde=async(i,e,t,n,r,s,o)=>{const a=new AbortController,l={headers:s,body:n??r,method:e.method,signal:a.signal};return i.WITH_CREDENTIALS&&(l.credentials=i.CREDENTIALS),l.referrerPolicy="no-referrer",o(()=>a.abort()),await fetch(t,l)},Bde=(i,e)=>{if(e){const t=i.headers.get(e);if(J0(t))return t}},Vde=async i=>{if(i.status!==204)try{const e=i.headers.get("Content-Type");if(e)return e.toLowerCase().startsWith("application/json")?await i.json():await i.text()}catch(e){console.error(e)}},Wde=(i,e)=>{const n={400:"Bad Request",401:"Unauthorized",403:"Forbidden",404:"Not Found",500:"Internal Server Error",502:"Bad Gateway",503:"Service Unavailable",...i.errors}[e.status];if(n)throw new SB(i,e,n);if(!e.ok)throw new SB(i,e,"Generic Error")},He=(i,e)=>new Dde(async(t,n,r)=>{try{const s=Rde(i,e),o=Ode(e),a=Pde(e),l=await Mde(i,e);if(!r.isCancelled){const c=await Fde(i,e,s,a,o,l,r),u=await Vde(c),d=Bde(c,e.responseHeader),h={url:s,ok:c.ok,status:c.status,statusText:c.statusText,body:d??u};Wde(e,h),t(h.body)}}catch(s){n(s)}});class FB{static listHubApps(){return He(We,{method:"GET",url:"/apps/hub/list"})}static getHubAppById({id:e}){return He(We,{method:"GET",url:"/apps/hub/get/{id}",path:{id:e}})}static listApps({workspace:e,page:t,perPage:n,orderDesc:r,createdBy:s,pathStart:o,pathExact:a,starredOnly:l}){return He(We,{method:"GET",url:"/w/{workspace}/apps/list",path:{workspace:e},query:{page:t,per_page:n,order_desc:r,created_by:s,path_start:o,path_exact:a,starred_only:l}})}static existsApp({workspace:e,path:t}){return He(We,{method:"GET",url:"/w/{workspace}/apps/exists/{path}",path:{workspace:e,path:t}})}static getAppByPath({workspace:e,path:t}){return He(We,{method:"GET",url:"/w/{workspace}/apps/get/p/{path}",path:{workspace:e,path:t}})}static getPublicAppBySecret({workspace:e,path:t}){return He(We,{method:"GET",url:"/w/{workspace}/apps_u/public_app/{path}",path:{workspace:e,path:t}})}static getPublicSecretOfApp({workspace:e,path:t}){return He(We,{method:"GET",url:"/w/{workspace}/apps/secret_of/{path}",path:{workspace:e,path:t}})}static getAppByVersion({workspace:e,id:t}){return He(We,{method:"GET",url:"/w/{workspace}/apps/get/v/{id}",path:{workspace:e,id:t}})}static createApp({workspace:e,requestBody:t}){return He(We,{method:"POST",url:"/w/{workspace}/apps/create",path:{workspace:e},body:t,mediaType:"application/json"})}static deleteApp({workspace:e,path:t}){return He(We,{method:"DELETE",url:"/w/{workspace}/apps/delete/{path}",path:{workspace:e,path:t}})}static updateApp({workspace:e,path:t,requestBody:n}){return He(We,{method:"POST",url:"/w/{workspace}/apps/update/{path}",path:{workspace:e,path:t},body:n,mediaType:"application/json"})}static executeComponent({workspace:e,path:t,requestBody:n}){return He(We,{method:"POST",url:"/w/{workspace}/apps_u/execute_component/{path}",path:{workspace:e,path:t},body:n,mediaType:"application/json"})}}class Hde{static listHubFlows(){return He(We,{method:"GET",url:"/flows/hub/list"})}static getHubFlowById({id:e}){return He(We,{method:"GET",url:"/flows/hub/get/{id}",path:{id:e}})}static listFlowPaths({workspace:e}){return He(We,{method:"GET",url:"/w/{workspace}/flows/list_paths",path:{workspace:e}})}static listFlows({workspace:e,page:t,perPage:n,orderDesc:r,createdBy:s,pathStart:o,pathExact:a,showArchived:l,starredOnly:c}){return He(We,{method:"GET",url:"/w/{workspace}/flows/list",path:{workspace:e},query:{page:t,per_page:n,order_desc:r,created_by:s,path_start:o,path_exact:a,show_archived:l,starred_only:c}})}static getFlowByPath({workspace:e,path:t}){return He(We,{method:"GET",url:"/w/{workspace}/flows/get/{path}",path:{workspace:e,path:t}})}static existsFlowByPath({workspace:e,path:t}){return He(We,{method:"GET",url:"/w/{workspace}/flows/exists/{path}",path:{workspace:e,path:t}})}static createFlow({workspace:e,requestBody:t}){return He(We,{method:"POST",url:"/w/{workspace}/flows/create",path:{workspace:e},body:t,mediaType:"application/json"})}static updateFlow({workspace:e,path:t,requestBody:n}){return He(We,{method:"POST",url:"/w/{workspace}/flows/update/{path}",path:{workspace:e,path:t},body:n,mediaType:"application/json"})}static archiveFlowByPath({workspace:e,path:t}){return He(We,{method:"POST",url:"/w/{workspace}/flows/archive/{path}",path:{workspace:e,path:t}})}}class oh{static listFolders({workspace:e,page:t,perPage:n}){return He(We,{method:"GET",url:"/w/{workspace}/folders/list",path:{workspace:e},query:{page:t,per_page:n}})}static listFolderNames({workspace:e,onlyMemberOf:t}){return He(We,{method:"GET",url:"/w/{workspace}/folders/listnames",path:{workspace:e},query:{only_member_of:t}})}static createFolder({workspace:e,requestBody:t}){return He(We,{method:"POST",url:"/w/{workspace}/folders/create",path:{workspace:e},body:t,mediaType:"application/json"})}static updateFolder({workspace:e,name:t,requestBody:n}){return He(We,{method:"POST",url:"/w/{workspace}/folders/update/{name}",path:{workspace:e,name:t},body:n,mediaType:"application/json"})}static deleteFolder({workspace:e,name:t}){return He(We,{method:"DELETE",url:"/w/{workspace}/folders/delete/{name}",path:{workspace:e,name:t}})}static getFolder({workspace:e,name:t}){return He(We,{method:"GET",url:"/w/{workspace}/folders/get/{name}",path:{workspace:e,name:t}})}static getFolderUsage({workspace:e,name:t}){return He(We,{method:"GET",url:"/w/{workspace}/folders/getusage/{name}",path:{workspace:e,name:t}})}static addOwnerToFolder({workspace:e,name:t,requestBody:n}){return He(We,{method:"POST",url:"/w/{workspace}/folders/addowner/{name}",path:{workspace:e,name:t},body:n,mediaType:"application/json"})}static removeOwnerToFolder({workspace:e,name:t,requestBody:n}){return He(We,{method:"POST",url:"/w/{workspace}/folders/removeowner/{name}",path:{workspace:e,name:t},body:n,mediaType:"application/json"})}}class ah{static getGranularAcls({workspace:e,path:t,kind:n}){return He(We,{method:"GET",url:"/w/{workspace}/acls/get/{kind}/{path}",path:{workspace:e,path:t,kind:n}})}static addGranularAcls({workspace:e,path:t,kind:n,requestBody:r}){return He(We,{method:"POST",url:"/w/{workspace}/acls/add/{kind}/{path}",path:{workspace:e,path:t,kind:n},body:r,mediaType:"application/json"})}static removeGranularAcls({workspace:e,path:t,kind:n,requestBody:r}){return He(We,{method:"POST",url:"/w/{workspace}/acls/remove/{kind}/{path}",path:{workspace:e,path:t,kind:n},body:r,mediaType:"application/json"})}}class Yl{static listGroups({workspace:e,page:t,perPage:n}){return He(We,{method:"GET",url:"/w/{workspace}/groups/list",path:{workspace:e},query:{page:t,per_page:n}})}static listGroupNames({workspace:e,onlyMemberOf:t}){return He(We,{method:"GET",url:"/w/{workspace}/groups/listnames",path:{workspace:e},query:{only_member_of:t}})}static createGroup({workspace:e,requestBody:t}){return He(We,{method:"POST",url:"/w/{workspace}/groups/create",path:{workspace:e},body:t,mediaType:"application/json"})}static updateGroup({workspace:e,name:t,requestBody:n}){return He(We,{method:"POST",url:"/w/{workspace}/groups/update/{name}",path:{workspace:e,name:t},body:n,mediaType:"application/json"})}static deleteGroup({workspace:e,name:t}){return He(We,{method:"DELETE",url:"/w/{workspace}/groups/delete/{name}",path:{workspace:e,name:t}})}static getGroup({workspace:e,name:t}){return He(We,{method:"GET",url:"/w/{workspace}/groups/get/{name}",path:{workspace:e,name:t}})}static addUserToGroup({workspace:e,name:t,requestBody:n}){return He(We,{method:"POST",url:"/w/{workspace}/groups/adduser/{name}",path:{workspace:e,name:t},body:n,mediaType:"application/json"})}static removeUserToGroup({workspace:e,name:t,requestBody:n}){return He(We,{method:"POST",url:"/w/{workspace}/groups/removeuser/{name}",path:{workspace:e,name:t},body:n,mediaType:"application/json"})}}class _g{static runScriptByPath({workspace:e,path:t,requestBody:n,scheduledFor:r,scheduledInSecs:s,parentJob:o,invisibleToOwner:a}){return He(We,{method:"POST",url:"/w/{workspace}/jobs/run/p/{path}",path:{workspace:e,path:t},query:{scheduled_for:r,scheduled_in_secs:s,parent_job:o,invisible_to_owner:a},body:n,mediaType:"application/json"})}static runWaitResultScriptByPath({workspace:e,path:t,requestBody:n,scheduledFor:r,scheduledInSecs:s,parentJob:o,includeHeader:a,queueLimit:l}){return He(We,{method:"POST",url:"/w/{workspace}/jobs/run_wait_result/p/{path}",path:{workspace:e,path:t},query:{scheduled_for:r,scheduled_in_secs:s,parent_job:o,include_header:a,queue_limit:l},body:n,mediaType:"application/json"})}static runWaitResultFlowByPath({workspace:e,path:t,requestBody:n,scheduledFor:r,scheduledInSecs:s,includeHeader:o,queueLimit:a}){return He(We,{method:"POST",url:"/w/{workspace}/jobs/run_wait_result/f/{path}",path:{workspace:e,path:t},query:{scheduled_for:r,scheduled_in_secs:s,include_header:o,queue_limit:a},body:n,mediaType:"application/json"})}static resultById({workspace:e,flowJobId:t,nodeId:n,skipDirect:r}){return He(We,{method:"GET",url:"/w/{workspace}/jobs/result_by_id/{flow_job_id}/{node_id}",path:{workspace:e,flow_job_id:t,node_id:n},query:{skip_direct:r}})}static runFlowByPath({workspace:e,path:t,requestBody:n,scheduledFor:r,scheduledInSecs:s,parentJob:o,includeHeader:a,invisibleToOwner:l}){return He(We,{method:"POST",url:"/w/{workspace}/jobs/run/f/{path}",path:{workspace:e,path:t},query:{scheduled_for:r,scheduled_in_secs:s,parent_job:o,include_header:a,invisible_to_owner:l},body:n,mediaType:"application/json"})}static runScriptByHash({workspace:e,hash:t,requestBody:n,scheduledFor:r,scheduledInSecs:s,parentJob:o,includeHeader:a,invisibleToOwner:l}){return He(We,{method:"POST",url:"/w/{workspace}/jobs/run/h/{hash}",path:{workspace:e,hash:t},query:{scheduled_for:r,scheduled_in_secs:s,parent_job:o,include_header:a,invisible_to_owner:l},body:n,mediaType:"application/json"})}static runScriptPreview({workspace:e,requestBody:t,includeHeader:n,invisibleToOwner:r}){return He(We,{method:"POST",url:"/w/{workspace}/jobs/run/preview",path:{workspace:e},query:{include_header:n,invisible_to_owner:r},body:t,mediaType:"application/json"})}static runFlowPreview({workspace:e,requestBody:t,includeHeader:n,invisibleToOwner:r}){return He(We,{method:"POST",url:"/w/{workspace}/jobs/run/preview_flow",path:{workspace:e},query:{include_header:n,invisible_to_owner:r},body:t,mediaType:"application/json"})}static listQueue({workspace:e,orderDesc:t,createdBy:n,parentJob:r,scriptPathExact:s,scriptPathStart:o,scriptHash:a,createdBefore:l,createdAfter:c,success:u,jobKinds:d,suspended:h,running:f}){return He(We,{method:"GET",url:"/w/{workspace}/jobs/queue/list",path:{workspace:e},query:{order_desc:t,created_by:n,parent_job:r,script_path_exact:s,script_path_start:o,script_hash:a,created_before:l,created_after:c,success:u,job_kinds:d,suspended:h,running:f}})}static listCompletedJobs({workspace:e,orderDesc:t,createdBy:n,parentJob:r,scriptPathExact:s,scriptPathStart:o,scriptHash:a,createdBefore:l,createdAfter:c,success:u,jobKinds:d,isSkipped:h,isFlowStep:f}){return He(We,{method:"GET",url:"/w/{workspace}/jobs/completed/list",path:{workspace:e},query:{order_desc:t,created_by:n,parent_job:r,script_path_exact:s,script_path_start:o,script_hash:a,created_before:l,created_after:c,success:u,job_kinds:d,is_skipped:h,is_flow_step:f}})}static listJobs({workspace:e,createdBy:t,parentJob:n,scriptPathExact:r,scriptPathStart:s,scriptHash:o,createdBefore:a,createdAfter:l,jobKinds:c,isSkipped:u,isFlowStep:d,success:h}){return He(We,{method:"GET",url:"/w/{workspace}/jobs/list",path:{workspace:e},query:{created_by:t,parent_job:n,script_path_exact:r,script_path_start:s,script_hash:o,created_before:a,created_after:l,job_kinds:c,is_skipped:u,is_flow_step:d,success:h}})}static getJob({workspace:e,id:t}){return He(We,{method:"GET",url:"/w/{workspace}/jobs_u/get/{id}",path:{workspace:e,id:t}})}static getJobUpdates({workspace:e,id:t,running:n,logOffset:r}){return He(We,{method:"GET",url:"/w/{workspace}/jobs_u/getupdate/{id}",path:{workspace:e,id:t},query:{running:n,log_offset:r}})}static getCompletedJob({workspace:e,id:t}){return He(We,{method:"GET",url:"/w/{workspace}/jobs/completed/get/{id}",path:{workspace:e,id:t}})}static deleteCompletedJob({workspace:e,id:t}){return He(We,{method:"POST",url:"/w/{workspace}/jobs/completed/delete/{id}",path:{workspace:e,id:t}})}static cancelQueuedJob({workspace:e,id:t,requestBody:n}){return He(We,{method:"POST",url:"/w/{workspace}/jobs/queue/cancel/{id}",path:{workspace:e,id:t},body:n,mediaType:"application/json"})}static createJobSignature({workspace:e,id:t,resumeId:n,approver:r}){return He(We,{method:"GET",url:"/w/{workspace}/jobs/job_signature/{id}/{resume_id}",path:{workspace:e,id:t,resume_id:n},query:{approver:r}})}static getResumeUrls({workspace:e,id:t,resumeId:n,approver:r}){return He(We,{method:"GET",url:"/w/{workspace}/jobs/resume_urls/{id}/{resume_id}",path:{workspace:e,id:t,resume_id:n},query:{approver:r}})}static resumeSuspendedJobGet({workspace:e,id:t,resumeId:n,signature:r,approver:s}){return He(We,{method:"GET",url:"/w/{workspace}/jobs_u/resume/{id}/{resume_id}/{signature}",path:{workspace:e,id:t,resume_id:n,signature:r},query:{approver:s}})}static resumeSuspendedJobPost({workspace:e,id:t,resumeId:n,signature:r,requestBody:s,approver:o}){return He(We,{method:"POST",url:"/w/{workspace}/jobs_u/resume/{id}/{resume_id}/{signature}",path:{workspace:e,id:t,resume_id:n,signature:r},query:{approver:o},body:s,mediaType:"application/json"})}static resumeSuspendedFlowAsOwner({workspace:e,id:t,requestBody:n}){return He(We,{method:"POST",url:"/w/{workspace}/jobs/flow/resume/{id}",path:{workspace:e,id:t},body:n,mediaType:"application/json"})}static cancelSuspendedJobGet({workspace:e,id:t,resumeId:n,signature:r,approver:s}){return He(We,{method:"GET",url:"/w/{workspace}/jobs_u/cancel/{id}/{resume_id}/{signature}",path:{workspace:e,id:t,resume_id:n,signature:r},query:{approver:s}})}static cancelSuspendedJobPost({workspace:e,id:t,resumeId:n,signature:r,requestBody:s,approver:o}){return He(We,{method:"POST",url:"/w/{workspace}/jobs_u/cancel/{id}/{resume_id}/{signature}",path:{workspace:e,id:t,resume_id:n,signature:r},query:{approver:o},body:s,mediaType:"application/json"})}static getSuspendedJobFlow({workspace:e,id:t,resumeId:n,signature:r,approver:s}){return He(We,{method:"GET",url:"/w/{workspace}/jobs_u/get_flow/{id}/{resume_id}/{signature}",path:{workspace:e,id:t,resume_id:n,signature:r},query:{approver:s}})}}class BB{static connectSlackCallback({workspace:e,requestBody:t}){return He(We,{method:"POST",url:"/w/{workspace}/oauth/connect_slack_callback",path:{workspace:e},body:t,mediaType:"application/json"})}static connectCallback({clientName:e,requestBody:t}){return He(We,{method:"POST",url:"/oauth/connect_callback/{client_name}",path:{client_name:e},body:t,mediaType:"application/json"})}static createAccount({workspace:e,requestBody:t}){return He(We,{method:"POST",url:"/w/{workspace}/oauth/create_account",path:{workspace:e},body:t,mediaType:"application/json"})}static refreshToken({workspace:e,id:t,requestBody:n}){return He(We,{method:"POST",url:"/w/{workspace}/oauth/refresh_token/{id}",path:{workspace:e,id:t},body:n,mediaType:"application/json"})}static disconnectAccount({workspace:e,id:t}){return He(We,{method:"POST",url:"/w/{workspace}/oauth/disconnect/{id}",path:{workspace:e,id:t}})}static disconnectSlack({workspace:e}){return He(We,{method:"POST",url:"/w/{workspace}/oauth/disconnect_slack",path:{workspace:e}})}static listOAuthLogins(){return He(We,{method:"GET",url:"/oauth/list_logins"})}static listOAuthConnects(){return He(We,{method:"GET",url:"/oauth/list_connects"})}}class Zl{static createResource({workspace:e,requestBody:t}){return He(We,{method:"POST",url:"/w/{workspace}/resources/create",path:{workspace:e},body:t,mediaType:"application/json"})}static deleteResource({workspace:e,path:t}){return He(We,{method:"DELETE",url:"/w/{workspace}/resources/delete/{path}",path:{workspace:e,path:t}})}static updateResource({workspace:e,path:t,requestBody:n}){return He(We,{method:"POST",url:"/w/{workspace}/resources/update/{path}",path:{workspace:e,path:t},body:n,mediaType:"application/json"})}static updateResourceValue({workspace:e,path:t,requestBody:n}){return He(We,{method:"POST",url:"/w/{workspace}/resources/update_value/{path}",path:{workspace:e,path:t},body:n,mediaType:"application/json"})}static getResource({workspace:e,path:t}){return He(We,{method:"GET",url:"/w/{workspace}/resources/get/{path}",path:{workspace:e,path:t}})}static getResourceValue({workspace:e,path:t}){return He(We,{method:"GET",url:"/w/{workspace}/resources/get_value/{path}",path:{workspace:e,path:t}})}static existsResource({workspace:e,path:t}){return He(We,{method:"GET",url:"/w/{workspace}/resources/exists/{path}",path:{workspace:e,path:t}})}static listResource({workspace:e,page:t,perPage:n,resourceType:r,resourceTypeExclude:s}){return He(We,{method:"GET",url:"/w/{workspace}/resources/list",path:{workspace:e},query:{page:t,per_page:n,resource_type:r,resource_type_exclude:s}})}static createResourceType({workspace:e,requestBody:t}){return He(We,{method:"POST",url:"/w/{workspace}/resources/type/create",path:{workspace:e},body:t,mediaType:"application/json"})}static deleteResourceType({workspace:e,path:t}){return He(We,{method:"DELETE",url:"/w/{workspace}/resources/type/delete/{path}",path:{workspace:e,path:t}})}static updateResourceType({workspace:e,path:t,requestBody:n}){return He(We,{method:"POST",url:"/w/{workspace}/resources/type/update/{path}",path:{workspace:e,path:t},body:n,mediaType:"application/json"})}static getResourceType({workspace:e,path:t}){return He(We,{method:"GET",url:"/w/{workspace}/resources/type/get/{path}",path:{workspace:e,path:t}})}static existsResourceType({workspace:e,path:t}){return He(We,{method:"GET",url:"/w/{workspace}/resources/type/exists/{path}",path:{workspace:e,path:t}})}static listResourceType({workspace:e}){return He(We,{method:"GET",url:"/w/{workspace}/resources/type/list",path:{workspace:e}})}static listResourceTypeNames({workspace:e}){return He(We,{method:"GET",url:"/w/{workspace}/resources/type/listnames",path:{workspace:e}})}}class zde{static previewSchedule({requestBody:e}){return He(We,{method:"POST",url:"/schedules/preview",body:e,mediaType:"application/json"})}static createSchedule({workspace:e,requestBody:t}){return He(We,{method:"POST",url:"/w/{workspace}/schedules/create",path:{workspace:e},body:t,mediaType:"application/json"})}static updateSchedule({workspace:e,path:t,requestBody:n}){return He(We,{method:"POST",url:"/w/{workspace}/schedules/update/{path}",path:{workspace:e,path:t},body:n,mediaType:"application/json"})}static setScheduleEnabled({workspace:e,path:t,requestBody:n}){return He(We,{method:"POST",url:"/w/{workspace}/schedules/setenabled/{path}",path:{workspace:e,path:t},body:n,mediaType:"application/json"})}static deleteSchedule({workspace:e,path:t}){return He(We,{method:"DELETE",url:"/w/{workspace}/schedules/delete/{path}",path:{workspace:e,path:t}})}static getSchedule({workspace:e,path:t}){return He(We,{method:"GET",url:"/w/{workspace}/schedules/get/{path}",path:{workspace:e,path:t}})}static existsSchedule({workspace:e,path:t}){return He(We,{method:"GET",url:"/w/{workspace}/schedules/exists/{path}",path:{workspace:e,path:t}})}static listSchedules({workspace:e,page:t,perPage:n}){return He(We,{method:"GET",url:"/w/{workspace}/schedules/list",path:{workspace:e},query:{page:t,per_page:n}})}}class $de{static listHubScripts(){return He(We,{method:"GET",url:"/scripts/hub/list"})}static getHubScriptContentByPath({path:e}){return He(We,{method:"GET",url:"/scripts/hub/get/{path}",path:{path:e}})}static getHubScriptByPath({path:e}){return He(We,{method:"GET",url:"/scripts/hub/get_full/{path}",path:{path:e}})}static listScripts({workspace:e,page:t,perPage:n,orderDesc:r,createdBy:s,pathStart:o,pathExact:a,firstParentHash:l,lastParentHash:c,parentHash:u,showArchived:d,isTemplate:h,kind:f,starredOnly:g}){return He(We,{method:"GET",url:"/w/{workspace}/scripts/list",path:{workspace:e},query:{page:t,per_page:n,order_desc:r,created_by:s,path_start:o,path_exact:a,first_parent_hash:l,last_parent_hash:c,parent_hash:u,show_archived:d,is_template:h,kind:f,starred_only:g}})}static listScriptPaths({workspace:e}){return He(We,{method:"GET",url:"/w/{workspace}/scripts/list_paths",path:{workspace:e}})}static createScript({workspace:e,requestBody:t}){return He(We,{method:"POST",url:"/w/{workspace}/scripts/create",path:{workspace:e},body:t,mediaType:"application/json"})}static pythonToJsonschema({requestBody:e}){return He(We,{method:"POST",url:"/scripts/python/tojsonschema",body:e,mediaType:"application/json"})}static denoToJsonschema({requestBody:e}){return He(We,{method:"POST",url:"/scripts/deno/tojsonschema",body:e,mediaType:"application/json"})}static bashToJsonschema({requestBody:e}){return He(We,{method:"POST",url:"/scripts/bash/tojsonschema",body:e,mediaType:"application/json"})}static goToJsonschema({requestBody:e}){return He(We,{method:"POST",url:"/scripts/go/tojsonschema",body:e,mediaType:"application/json"})}static archiveScriptByPath({workspace:e,path:t}){return He(We,{method:"POST",url:"/w/{workspace}/scripts/archive/p/{path}",path:{workspace:e,path:t}})}static archiveScriptByHash({workspace:e,hash:t}){return He(We,{method:"POST",url:"/w/{workspace}/scripts/archive/h/{hash}",path:{workspace:e,hash:t}})}static deleteScriptByHash({workspace:e,hash:t}){return He(We,{method:"POST",url:"/w/{workspace}/scripts/delete/h/{hash}",path:{workspace:e,hash:t}})}static getScriptByPath({workspace:e,path:t}){return He(We,{method:"GET",url:"/w/{workspace}/scripts/get/p/{path}",path:{workspace:e,path:t}})}static rawScriptByPath({workspace:e,path:t}){return He(We,{method:"GET",url:"/w/{workspace}/scripts/raw/p/{path}",path:{workspace:e,path:t}})}static existsScriptByPath({workspace:e,path:t}){return He(We,{method:"GET",url:"/w/{workspace}/scripts/exists/p/{path}",path:{workspace:e,path:t}})}static getScriptByHash({workspace:e,hash:t}){return He(We,{method:"GET",url:"/w/{workspace}/scripts/get/h/{hash}",path:{workspace:e,hash:t}})}static rawScriptByHash({workspace:e,path:t}){return He(We,{method:"GET",url:"/w/{workspace}/scripts/raw/h/{path}",path:{workspace:e,path:t}})}static getScriptDeploymentStatus({workspace:e,hash:t}){return He(We,{method:"GET",url:"/w/{workspace}/scripts/deployment_status/h/{hash}",path:{workspace:e,hash:t}})}}class GL{static login({requestBody:e}){return He(We,{method:"POST",url:"/auth/login",body:e,mediaType:"application/json"})}static logout(){return He(We,{method:"POST",url:"/auth/logout"})}static createUser({workspace:e,requestBody:t}){return He(We,{method:"POST",url:"/w/{workspace}/users/add",path:{workspace:e},body:t,mediaType:"application/json"})}static updateUser({workspace:e,username:t,requestBody:n}){return He(We,{method:"POST",url:"/w/{workspace}/users/update/{username}",path:{workspace:e,username:t},body:n,mediaType:"application/json"})}static isOwnerOfPath({workspace:e,path:t}){return He(We,{method:"GET",url:"/w/{workspace}/users/is_owner/{path}",path:{workspace:e,path:t}})}static setPassword({requestBody:e}){return He(We,{method:"POST",url:"/users/setpassword",body:e,mediaType:"application/json"})}static createUserGlobally({requestBody:e}){return He(We,{method:"POST",url:"/users/create",body:e,mediaType:"application/json"})}static globalUserUpdate({email:e,requestBody:t}){return He(We,{method:"POST",url:"/users/update/{email}",path:{email:e},body:t,mediaType:"application/json"})}static globalUserDelete({email:e}){return He(We,{method:"DELETE",url:"/users/delete/{email}",path:{email:e}})}static deleteUser({workspace:e,username:t}){return He(We,{method:"DELETE",url:"/w/{workspace}/users/delete/{username}",path:{workspace:e,username:t}})}static getCurrentEmail(){return He(We,{method:"GET",url:"/users/email"})}static getUsage(){return He(We,{method:"GET",url:"/users/usage"})}static globalWhoami(){return He(We,{method:"GET",url:"/users/whoami"})}static listWorkspaceInvites(){return He(We,{method:"GET",url:"/users/list_invites"})}static whoami({workspace:e}){return He(We,{method:"GET",url:"/w/{workspace}/users/whoami",path:{workspace:e}})}static leaveWorkspace({workspace:e}){return He(We,{method:"POST",url:"/w/{workspace}/users/leave_workspace",path:{workspace:e}})}static acceptInvite({requestBody:e}){return He(We,{method:"POST",url:"/users/accept_invite",body:e,mediaType:"application/json"})}static declineInvite({requestBody:e}){return He(We,{method:"POST",url:"/users/decline_invite",body:e,mediaType:"application/json"})}static whois({workspace:e,username:t}){return He(We,{method:"GET",url:"/w/{workspace}/users/whois/{username}",path:{workspace:e,username:t}})}static listUsersAsSuperAdmin({page:e,perPage:t}){return He(We,{method:"GET",url:"/users/list_as_super_admin",query:{page:e,per_page:t}})}static listUsers({workspace:e}){return He(We,{method:"GET",url:"/w/{workspace}/users/list",path:{workspace:e}})}static listUsernames({workspace:e}){return He(We,{method:"GET",url:"/w/{workspace}/users/list_usernames",path:{workspace:e}})}static createToken({requestBody:e}){return He(We,{method:"POST",url:"/users/tokens/create",body:e,mediaType:"application/json"})}static deleteToken({tokenPrefix:e}){return He(We,{method:"DELETE",url:"/users/tokens/delete/{token_prefix}",path:{token_prefix:e}})}static listTokens(){return He(We,{method:"GET",url:"/users/tokens/list"})}static loginWithOauth({clientName:e,requestBody:t}){return He(We,{method:"POST",url:"/oauth/login_callback/{client_name}",path:{client_name:e},body:t,mediaType:"application/json"})}}class Xu{static createVariable({workspace:e,requestBody:t}){return He(We,{method:"POST",url:"/w/{workspace}/variables/create",path:{workspace:e},body:t,mediaType:"application/json"})}static deleteVariable({workspace:e,path:t}){return He(We,{method:"DELETE",url:"/w/{workspace}/variables/delete/{path}",path:{workspace:e,path:t}})}static updateVariable({workspace:e,path:t,requestBody:n}){return He(We,{method:"POST",url:"/w/{workspace}/variables/update/{path}",path:{workspace:e,path:t},body:n,mediaType:"application/json"})}static getVariable({workspace:e,path:t,decryptSecret:n}){return He(We,{method:"GET",url:"/w/{workspace}/variables/get/{path}",path:{workspace:e,path:t},query:{decrypt_secret:n}})}static existsVariable({workspace:e,path:t}){return He(We,{method:"GET",url:"/w/{workspace}/variables/exists/{path}",path:{workspace:e,path:t}})}static listVariable({workspace:e}){return He(We,{method:"GET",url:"/w/{workspace}/variables/list",path:{workspace:e}})}static listContextualVariables({workspace:e}){return He(We,{method:"GET",url:"/w/{workspace}/variables/list_contextual",path:{workspace:e}})}}class Ude{static listWorkspaces(){return He(We,{method:"GET",url:"/workspaces/list"})}static isDomainAllowed(){return He(We,{method:"GET",url:"/workspaces/allowed_domain_auto_invite"})}static listUserWorkspaces(){return He(We,{method:"GET",url:"/workspaces/users"})}static listWorkspacesAsSuperAdmin({page:e,perPage:t}){return He(We,{method:"GET",url:"/workspaces/list_as_superadmin",query:{page:e,per_page:t}})}static createWorkspace({requestBody:e}){return He(We,{method:"POST",url:"/workspaces/create",body:e,mediaType:"application/json"})}static existsWorkspace({requestBody:e}){return He(We,{method:"POST",url:"/workspaces/exists",body:e,mediaType:"application/json"})}static existsUsername({requestBody:e}){return He(We,{method:"POST",url:"/workspaces/exists_username",body:e,mediaType:"application/json"})}static inviteUser({workspace:e,requestBody:t}){return He(We,{method:"POST",url:"/w/{workspace}/workspaces/invite_user",path:{workspace:e},body:t,mediaType:"application/json"})}static addUser({workspace:e,requestBody:t}){return He(We,{method:"POST",url:"/w/{workspace}/workspaces/add_user",path:{workspace:e},body:t,mediaType:"application/json"})}static deleteInvite({workspace:e,requestBody:t}){return He(We,{method:"POST",url:"/w/{workspace}/workspaces/delete_invite",path:{workspace:e},body:t,mediaType:"application/json"})}static archiveWorkspace({workspace:e}){return He(We,{method:"POST",url:"/w/{workspace}/workspaces/archive",path:{workspace:e}})}static unarchiveWorkspace({workspace:e}){return He(We,{method:"POST",url:"/workspaces/unarchive/{workspace}",path:{workspace:e}})}static deleteWorkspace({workspace:e}){return He(We,{method:"DELETE",url:"/workspaces/delete/{workspace}",path:{workspace:e}})}static listPendingInvites({workspace:e}){return He(We,{method:"GET",url:"/w/{workspace}/workspaces/list_pending_invites",path:{workspace:e}})}static getSettings({workspace:e}){return He(We,{method:"GET",url:"/w/{workspace}/workspaces/get_settings",path:{workspace:e}})}static getPremiumInfo({workspace:e}){return He(We,{method:"GET",url:"/w/{workspace}/workspaces/premium_info",path:{workspace:e}})}static editSlackCommand({workspace:e,requestBody:t}){return He(We,{method:"POST",url:"/w/{workspace}/workspaces/edit_slack_command",path:{workspace:e},body:t,mediaType:"application/json"})}static editAutoInvite({workspace:e,requestBody:t}){return He(We,{method:"POST",url:"/w/{workspace}/workspaces/edit_auto_invite",path:{workspace:e},body:t,mediaType:"application/json"})}static editWebhook({workspace:e,requestBody:t}){return He(We,{method:"POST",url:"/w/{workspace}/workspaces/edit_webhook",path:{workspace:e},body:t,mediaType:"application/json"})}}function jde(i,{from:e,to:t},n={}){const r=getComputedStyle(i),s=r.transform==="none"?"":r.transform,[o,a]=r.transformOrigin.split(" ").map(parseFloat),l=e.left+e.width*o/t.width-(t.left+o),c=e.top+e.height*a/t.height-(t.top+a),{delay:u=0,duration:d=f=>Math.sqrt(f)*120,easing:h=X0}=n;return{delay:u,duration:xr(d)?d(Math.sqrt(l*l+c*c)):d,easing:h,css:(f,g)=>{const p=g*l,m=g*c,_=f+g*e.width/t.width,b=f+g*e.height/t.height;return`transform: ${s} translate(${p}px, ${m}px) scale(${_}, ${b});`}}}const qde={duration:4e3,initial:1,next:0,pausable:!1,dismissable:!0,reversed:!1,intro:{x:256}},VB=(()=>{const{subscribe:i,update:e}=er([]);let t=0;const n={},r=c=>c instanceof Object;return{subscribe:i,push:(c,u={})=>{const d={target:"default",...r(c)?c:{...u,msg:c}},h=n[d.target]||{},f={...qde,...h,...d,theme:{...h.theme,...d.theme},classes:[...h.classes||[],...d.classes||[]],id:++t};return e(g=>f.reversed?[...g,f]:[f,...g]),t},pop:c=>{e(u=>{if(!u.length||c===0)return[];if(r(c))return u.filter(h=>c(h));const d=c||Math.max(...u.map(h=>h.id));return u.filter(h=>h.id!==d)})},set:(c,u={})=>{const d=r(c)?{...c}:{...u,id:c};e(h=>{const f=h.findIndex(g=>g.id===d.id);return f>-1&&(h[f]={...h[f],...d}),h})},_init:(c="default",u={})=>(n[c]=u,n)}})(),Igt="",Dgt="";async function Gde(i){try{const e=await GL.whoami({workspace:i});return Kde(e)}catch{return}}function Kde(i){return{...i,groups:i.groups,pgroups:i.groups.map(e=>`g/${e}`)}}let WB=localStorage.getItem("workspace");const HB=er(void 0),bg=er(void 0),Oa=er(WB?String(WB):void 0),Yde=er({premium:!1}),Zde=er(void 0),zB=er(void 0);lB([Zde,zB],([i,e])=>{const t=(i==null?void 0:i.workspaces)??[];return e?[...t.filter(n=>n.id!="starter"&&n.id!="admins"),{id:"admins",name:"Admins",username:"superadmin"}]:t}),Oa.subscribe(async i=>{if(i){try{localStorage.setItem("workspace",String(i))}catch(t){console.error("Could not persist workspace to local storage",t)}const e=await Gde(i);bg.set(e),nhe()&&(e!=null&&e.is_admin)&&Yde.set(await Ude.getPremiumInfo({workspace:i}))}else bg.set(void 0)});function Qu(i,e=!1){e?VB.push(i,{theme:{"--toastBackground":"#FEE2E2","--toastBarBackground":"#FEE2E2"}}):VB.push(i)}function $B(){return{$schema:"https://json-schema.org/draft/2020-12/schema",properties:{},required:[],type:"object"}}function Xde(i,e){if(!e)return!1;if(e.is_admin||e.is_super_admin)return!0;let t=`u/${e.username}`;return!!(i.startsWith(t)||e.pgroups.findIndex(n=>i.startsWith(n))!=-1||e.folders.findIndex(n=>i.startsWith("f/"+n))!=-1)}function KL(i,e,t){let n=Object.keys(e);if(!t)return!1;if(Xde(i,t))return!0;let r=`u/${t.username}`;return!!(n.includes(r)&&e[r]||t.pgroups.findIndex(s=>n.includes(s)&&e[s])!=-1||t.folders.findIndex(s=>i.startsWith("f/"+s))!=-1)}function ty(i){return i==null||i===""}function Qde(i,e){return ty(i)?e:i}function Jde(i){return Object.values(i).every(Boolean)}function ny(i,e,t="..."){return i?i.length<=e?i:i.substring(0,e)+t:""}function UB(i,e,t="..."){return i?i.length<=e?i:t+i.substring(i.length-e,i.length):t}function ehe(i,e,t,n,r){return i==="number"||i==="integer"?"number":i==="boolean"?"boolean":i=="array"&&t!=null?"list":i=="object"&&(e!=null&&e.startsWith("resource"))?"resource-object":!i||i=="object"||i=="array"?"object":i=="string"&&n?"enum":i=="string"&&e=="date-time"?"date":i=="string"&&e=="sql"?"sql":i=="string"&&e=="yaml"?"yaml":i=="string"&&r=="base64"?"base64":"string"}function li(...i){return i.filter(Boolean).join(" ")}async function the(i,e=!0){if(!i)return!1;let t=!1;return navigator!=null&&navigator.clipboard&&(t=await navigator.clipboard.writeText(i).then(()=>!0).catch(()=>!1)),e&&Qu(t?"Copied to clipboard!":"Couldn't copy to clipboard",!t),t}function nhe(){var i,e;return((e=(i=WF(yB))==null?void 0:i.url)==null?void 0:e.hostname)=="app.windmill.dev"}function ihe(i){return typeof i=="object"}const jB={sm:640,lg:1024},qB=[[jB.lg,12],[jB.sm,3]],eb=qB.map(i=>i[1]);function rhe(i){return eb.forEach(e=>{i[e].customDragger=!0,i[e].customResizer=!0}),i}function she(i){const e=!i[eb[0]].fixed;return eb.forEach(t=>{i[t].fixed=e}),i}function GB(i){let e=!1;return eb.forEach(t=>{i[t].fixed&&(e=!0)}),e}function ohe(i){return eb.forEach(e=>{i[e].customDragger=!1,i[e].customResizer=!1}),i}function ahe(i){let e,t,n=[{id:t="path-"+i[0]},i[1]],r={};for(let s=0;s{"id"in s&&t(0,n=s.id),"data"in s&&t(1,r=s.data)},[n,r]}let che=class extends Ue{constructor(e){super(),je(this,e,lhe,ahe,Ve,{id:0,data:1})}};function uhe(i){let e,t,n=[{id:t="polygon-"+i[0]},i[1]],r={};for(let s=0;s{"id"in s&&t(0,n=s.id),"data"in s&&t(1,r=s.data)},[n,r]}class hhe extends Ue{constructor(e){super(),je(this,e,dhe,uhe,Ve,{id:0,data:1})}}function fhe(i){let e;return{c(){e=Ee("g")},l(t){e=xe(t,"g",{});var n=M(e);n.forEach(S)},m(t,n){F(t,e,n),e.innerHTML=i[0]},p(t,[n]){n&1&&(e.innerHTML=t[0])},i:fe,o:fe,d(t){t&&S(e)}}}function ghe(i,e,t){let n=870711;function r(){return n+=1,`fa-${n.toString(16)}`}let s,{data:o}=e;function a(l){if(!l||!l.raw)return null;let c=l.raw;const u={};return c=c.replace(/\s(?:xml:)?id=["']?([^"')\s]+)/g,(d,h)=>{const f=r();return u[h]=f,` id="${f}"`}),c=c.replace(/#(?:([^'")\s]+)|xpointer\(id\((['"]?)([^')]+)\2\)\))/g,(d,h,f,g)=>{const p=h||g;return!p||!u[p]?d:`#${u[p]}`}),c}return i.$$set=l=>{"data"in l&&t(1,o=l.data)},i.$$.update=()=>{i.$$.dirty&2&&t(0,s=a(o))},[s,o]}class phe extends Ue{constructor(e){super(),je(this,e,ghe,fhe,Ve,{data:1})}}const Ngt="";function mhe(i){let e,t,n,r;const s=i[13].default,o=Ut(s,i,i[12],null);return{c(){e=Ee("svg"),o&&o.c(),this.h()},l(a){e=xe(a,"svg",{version:!0,class:!0,x:!0,y:!0,width:!0,height:!0,"aria-label":!0,role:!0,viewBox:!0,style:!0});var l=M(e);o&&o.l(l),l.forEach(S),this.h()},h(){y(e,"version","1.1"),y(e,"class",t="fa-icon "+i[0]+" svelte-t2yqf8"),y(e,"x",i[8]),y(e,"y",i[9]),y(e,"width",i[1]),y(e,"height",i[2]),y(e,"aria-label",i[11]),y(e,"role",n=i[11]?"img":"presentation"),y(e,"viewBox",i[3]),y(e,"style",i[10]),vt(e,"fa-spin",i[4]),vt(e,"fa-pulse",i[6]),vt(e,"fa-inverse",i[5]),vt(e,"fa-flip-horizontal",i[7]==="horizontal"),vt(e,"fa-flip-vertical",i[7]==="vertical")},m(a,l){F(a,e,l),o&&o.m(e,null),r=!0},p(a,[l]){o&&o.p&&(!r||l&4096)&&qt(o,s,a,a[12],r?jt(s,a[12],l,null):Gt(a[12]),null),(!r||l&1&&t!==(t="fa-icon "+a[0]+" svelte-t2yqf8"))&&y(e,"class",t),(!r||l&256)&&y(e,"x",a[8]),(!r||l&512)&&y(e,"y",a[9]),(!r||l&2)&&y(e,"width",a[1]),(!r||l&4)&&y(e,"height",a[2]),(!r||l&2048)&&y(e,"aria-label",a[11]),(!r||l&2048&&n!==(n=a[11]?"img":"presentation"))&&y(e,"role",n),(!r||l&8)&&y(e,"viewBox",a[3]),(!r||l&1024)&&y(e,"style",a[10]),(!r||l&17)&&vt(e,"fa-spin",a[4]),(!r||l&65)&&vt(e,"fa-pulse",a[6]),(!r||l&33)&&vt(e,"fa-inverse",a[5]),(!r||l&129)&&vt(e,"fa-flip-horizontal",a[7]==="horizontal"),(!r||l&129)&&vt(e,"fa-flip-vertical",a[7]==="vertical")},i(a){r||(D(o,a),r=!0)},o(a){A(o,a),r=!1},d(a){a&&S(e),o&&o.d(a)}}}function _he(i,e,t){let{$$slots:n={},$$scope:r}=e,{class:s}=e,{width:o}=e,{height:a}=e,{box:l}=e,{spin:c=!1}=e,{inverse:u=!1}=e,{pulse:d=!1}=e,{flip:h=null}=e,{x:f=void 0}=e,{y:g=void 0}=e,{style:p=void 0}=e,{label:m=void 0}=e;return i.$$set=_=>{"class"in _&&t(0,s=_.class),"width"in _&&t(1,o=_.width),"height"in _&&t(2,a=_.height),"box"in _&&t(3,l=_.box),"spin"in _&&t(4,c=_.spin),"inverse"in _&&t(5,u=_.inverse),"pulse"in _&&t(6,d=_.pulse),"flip"in _&&t(7,h=_.flip),"x"in _&&t(8,f=_.x),"y"in _&&t(9,g=_.y),"style"in _&&t(10,p=_.style),"label"in _&&t(11,m=_.label),"$$scope"in _&&t(12,r=_.$$scope)},[s,o,a,l,c,u,d,h,f,g,p,m,r,n]}class bhe extends Ue{constructor(e){super(),je(this,e,_he,mhe,Ve,{class:0,width:1,height:2,box:3,spin:4,inverse:5,pulse:6,flip:7,x:8,y:9,style:10,label:11})}}function KB(i,e,t){const n=i.slice();return n[24]=e[t],n[26]=t,n}function YB(i,e,t){const n=i.slice();return n[27]=e[t],n[26]=t,n}function ZB(i){let e,t,n,r,s=i[6].paths&&XB(i),o=i[6].polygons&&JB(i),a=i[6].raw&&tV(i);return{c(){s&&s.c(),e=ae(),o&&o.c(),t=ae(),a&&a.c(),n=Me()},l(l){s&&s.l(l),e=le(l),o&&o.l(l),t=le(l),a&&a.l(l),n=Me()},m(l,c){s&&s.m(l,c),F(l,e,c),o&&o.m(l,c),F(l,t,c),a&&a.m(l,c),F(l,n,c),r=!0},p(l,c){l[6].paths?s?(s.p(l,c),c&64&&D(s,1)):(s=XB(l),s.c(),D(s,1),s.m(e.parentNode,e)):s&&(Fe(),A(s,1,1,()=>{s=null}),Be()),l[6].polygons?o?(o.p(l,c),c&64&&D(o,1)):(o=JB(l),o.c(),D(o,1),o.m(t.parentNode,t)):o&&(Fe(),A(o,1,1,()=>{o=null}),Be()),l[6].raw?a?(a.p(l,c),c&64&&D(a,1)):(a=tV(l),a.c(),D(a,1),a.m(n.parentNode,n)):a&&(Fe(),A(a,1,1,()=>{a=null}),Be())},i(l){r||(D(s),D(o),D(a),r=!0)},o(l){A(s),A(o),A(a),r=!1},d(l){s&&s.d(l),l&&S(e),o&&o.d(l),l&&S(t),a&&a.d(l),l&&S(n)}}}function XB(i){let e,t,n=i[6].paths,r=[];for(let o=0;oA(r[o],1,1,()=>{r[o]=null});return{c(){for(let o=0;oA(r[o],1,1,()=>{r[o]=null});return{c(){for(let o=0;oTe(e,"data",r)),{c(){Q(e.$$.fragment)},l(o){J(e.$$.fragment,o)},m(o,a){Z(e,o,a),n=!0},p(o,a){const l={};!t&&a&64&&(t=!0,l.data=o[6],Le(()=>t=!1)),e.$set(l)},i(o){n||(D(e.$$.fragment,o),n=!0)},o(o){A(e.$$.fragment,o),n=!1},d(o){X(e,o)}}}function vhe(i){let e,t,n=i[6]&&ZB(i);return{c(){n&&n.c(),e=Me()},l(r){n&&n.l(r),e=Me()},m(r,s){n&&n.m(r,s),F(r,e,s),t=!0},p(r,s){r[6]?n?(n.p(r,s),s&64&&D(n,1)):(n=ZB(r),n.c(),D(n,1),n.m(e.parentNode,e)):n&&(Fe(),A(n,1,1,()=>{n=null}),Be())},i(r){t||(D(n),t=!0)},o(r){A(n),t=!1},d(r){n&&n.d(r),r&&S(e)}}}function whe(i){let e;const t=i[14].default,n=Ut(t,i,i[16],null),r=n||vhe(i);return{c(){r&&r.c()},l(s){r&&r.l(s)},m(s,o){r&&r.m(s,o),e=!0},p(s,o){n?n.p&&(!e||o&65536)&&qt(n,t,s,s[16],e?jt(t,s[16],o,null):Gt(s[16]),null):r&&r.p&&(!e||o&64)&&r.p(s,e?o:-1)},i(s){e||(D(r,s),e=!0)},o(s){A(r,s),e=!1},d(s){r&&r.d(s)}}}function Che(i){let e,t;return e=new bhe({props:{label:i[5],width:i[7],height:i[8],box:i[10],style:i[9],spin:i[1],flip:i[4],inverse:i[2],pulse:i[3],class:i[0],$$slots:{default:[whe]},$$scope:{ctx:i}}}),{c(){Q(e.$$.fragment)},l(n){J(e.$$.fragment,n)},m(n,r){Z(e,n,r),t=!0},p(n,[r]){const s={};r&32&&(s.label=n[5]),r&128&&(s.width=n[7]),r&256&&(s.height=n[8]),r&1024&&(s.box=n[10]),r&512&&(s.style=n[9]),r&2&&(s.spin=n[1]),r&16&&(s.flip=n[4]),r&4&&(s.inverse=n[2]),r&8&&(s.pulse=n[3]),r&1&&(s.class=n[0]),r&65600&&(s.$$scope={dirty:r,ctx:n}),e.$set(s)},i(n){t||(D(e.$$.fragment,n),t=!0)},o(n){A(e.$$.fragment,n),t=!1},d(n){X(e,n)}}}let nV=1;function yhe(i){if("iconName"in i&&"icon"in i){let e={},t=i.icon,n=i.iconName,r=t[0],s=t[1],o=t[4],a={width:r,height:s,paths:[{d:o}]};return e[n]=a,e}return i}function She(i,e,t){let{$$slots:n={},$$scope:r}=e,{class:s=""}=e,{data:o}=e,{scale:a=1}=e,{spin:l=!1}=e,{inverse:c=!1}=e,{pulse:u=!1}=e,{flip:d=null}=e,{label:h=null}=e,f=null,{style:g=null}=e,p,m,_,b;function v(){if(typeof o>"u")return;const N=yhe(o),[P]=Object.keys(N),$=N[P];$.paths||($.paths=[]),$.d&&$.paths.push({d:$.d}),$.polygons||($.polygons=[]),$.points&&$.polygons.push({points:$.points}),t(6,f=$)}function w(){let N=1;return typeof a<"u"&&(N=Number(a)),isNaN(N)||N<=0?(console.warn('Invalid prop: prop "scale" should be a number over 0.'),nV):N*nV}function E(){return f?`0 0 ${f.width} ${f.height}`:`0 0 ${p} ${m}`}function I(){return f?Math.max(f.width,f.height)/16:1}function x(){return f?f.width/I()*w():0}function T(){return f?f.height/I()*w():0}function L(){let N="";g!==null&&(N+=g);let P=w();return P===1?N.length===0?void 0:N:(N!==""&&!N.endsWith(";")&&(N+="; "),`${N}font-size: ${P}em`)}function O(N){f=N,t(6,f)}return i.$$set=N=>{"class"in N&&t(0,s=N.class),"data"in N&&t(11,o=N.data),"scale"in N&&t(12,a=N.scale),"spin"in N&&t(1,l=N.spin),"inverse"in N&&t(2,c=N.inverse),"pulse"in N&&t(3,u=N.pulse),"flip"in N&&t(4,d=N.flip),"label"in N&&t(5,h=N.label),"style"in N&&t(13,g=N.style),"$$scope"in N&&t(16,r=N.$$scope)},i.$$.update=()=>{i.$$.dirty&14336&&(v(),t(7,p=x()),t(8,m=T()),t(9,_=L()),t(10,b=E()))},[s,l,c,u,d,h,f,p,m,_,b,o,a,g,n,O,r]}let fr=class extends Ue{constructor(e){super(),je(this,e,She,Che,Ve,{class:0,data:11,scale:12,spin:1,inverse:2,pulse:3,flip:4,label:5,style:13})}};const iV={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round"};function rV(i,e,t){const n=i.slice();return n[9]=e[t][0],n[10]=e[t][1],n}function YL(i){let e,t=[i[10]],n={};for(let r=0;r{t(6,e=Qe(Qe({},e),Bt(h))),t(5,r=ea(e,n)),"name"in h&&t(0,a=h.name),"color"in h&&t(1,l=h.color),"size"in h&&t(2,c=h.size),"strokeWidth"in h&&t(3,u=h.strokeWidth),"iconNode"in h&&t(4,d=h.iconNode),"$$scope"in h&&t(7,o=h.$$scope)},e=Bt(e),[a,l,c,u,d,r,e,o,s]}class xhe extends Ue{constructor(e){super(),je(this,e,Ehe,khe,Ve,{name:0,color:1,size:2,strokeWidth:3,iconNode:4})}}const fl=xhe;function Lhe(i){let e;const t=i[2].default,n=Ut(t,i,i[3],null);return{c(){n&&n.c()},l(r){n&&n.l(r)},m(r,s){n&&n.m(r,s),e=!0},p(r,s){n&&n.p&&(!e||s&8)&&qt(n,t,r,r[3],e?jt(t,r[3],s,null):Gt(r[3]),null)},i(r){e||(D(n,r),e=!0)},o(r){A(n,r),e=!1},d(r){n&&n.d(r)}}}function The(i){let e,t;const n=[{name:"anchor"},i[1],{iconNode:i[0]}];let r={$$slots:{default:[Lhe]},$$scope:{ctx:i}};for(let s=0;s{t(1,e=Qe(Qe({},e),Bt(o))),"$$scope"in o&&t(3,r=o.$$scope)},e=Bt(e),[s,e,n,r]}class Dhe extends Ue{constructor(e){super(),je(this,e,Ihe,The,Ve,{})}}const oV=Dhe;function Nhe(i){let e;const t=i[2].default,n=Ut(t,i,i[3],null);return{c(){n&&n.c()},l(r){n&&n.l(r)},m(r,s){n&&n.m(r,s),e=!0},p(r,s){n&&n.p&&(!e||s&8)&&qt(n,t,r,r[3],e?jt(t,r[3],s,null):Gt(r[3]),null)},i(r){e||(D(n,r),e=!0)},o(r){A(n,r),e=!1},d(r){n&&n.d(r)}}}function Ahe(i){let e,t;const n=[{name:"bug"},i[1],{iconNode:i[0]}];let r={$$slots:{default:[Nhe]},$$scope:{ctx:i}};for(let s=0;s{t(1,e=Qe(Qe({},e),Bt(o))),"$$scope"in o&&t(3,r=o.$$scope)},e=Bt(e),[s,e,n,r]}class Ohe extends Ue{constructor(e){super(),je(this,e,Rhe,Ahe,Ve,{})}}const Mhe=Ohe;function Phe(i){let e;const t=i[2].default,n=Ut(t,i,i[3],null);return{c(){n&&n.c()},l(r){n&&n.l(r)},m(r,s){n&&n.m(r,s),e=!0},p(r,s){n&&n.p&&(!e||s&8)&&qt(n,t,r,r[3],e?jt(t,r[3],s,null):Gt(r[3]),null)},i(r){e||(D(n,r),e=!0)},o(r){A(n,r),e=!1},d(r){n&&n.d(r)}}}function Fhe(i){let e,t;const n=[{name:"chevron-down"},i[1],{iconNode:i[0]}];let r={$$slots:{default:[Phe]},$$scope:{ctx:i}};for(let s=0;s{t(1,e=Qe(Qe({},e),Bt(o))),"$$scope"in o&&t(3,r=o.$$scope)},e=Bt(e),[s,e,n,r]}class Vhe extends Ue{constructor(e){super(),je(this,e,Bhe,Fhe,Ve,{})}}const Whe=Vhe;function Hhe(i){let e;const t=i[2].default,n=Ut(t,i,i[3],null);return{c(){n&&n.c()},l(r){n&&n.l(r)},m(r,s){n&&n.m(r,s),e=!0},p(r,s){n&&n.p&&(!e||s&8)&&qt(n,t,r,r[3],e?jt(t,r[3],s,null):Gt(r[3]),null)},i(r){e||(D(n,r),e=!0)},o(r){A(n,r),e=!1},d(r){n&&n.d(r)}}}function zhe(i){let e,t;const n=[{name:"chevron-left"},i[1],{iconNode:i[0]}];let r={$$slots:{default:[Hhe]},$$scope:{ctx:i}};for(let s=0;s{t(1,e=Qe(Qe({},e),Bt(o))),"$$scope"in o&&t(3,r=o.$$scope)},e=Bt(e),[s,e,n,r]}class Uhe extends Ue{constructor(e){super(),je(this,e,$he,zhe,Ve,{})}}const jhe=Uhe;function qhe(i){let e;const t=i[2].default,n=Ut(t,i,i[3],null);return{c(){n&&n.c()},l(r){n&&n.l(r)},m(r,s){n&&n.m(r,s),e=!0},p(r,s){n&&n.p&&(!e||s&8)&&qt(n,t,r,r[3],e?jt(t,r[3],s,null):Gt(r[3]),null)},i(r){e||(D(n,r),e=!0)},o(r){A(n,r),e=!1},d(r){n&&n.d(r)}}}function Ghe(i){let e,t;const n=[{name:"chevron-right"},i[1],{iconNode:i[0]}];let r={$$slots:{default:[qhe]},$$scope:{ctx:i}};for(let s=0;s{t(1,e=Qe(Qe({},e),Bt(o))),"$$scope"in o&&t(3,r=o.$$scope)},e=Bt(e),[s,e,n,r]}class Yhe extends Ue{constructor(e){super(),je(this,e,Khe,Ghe,Ve,{})}}const Zhe=Yhe;function Xhe(i){let e;const t=i[2].default,n=Ut(t,i,i[3],null);return{c(){n&&n.c()},l(r){n&&n.l(r)},m(r,s){n&&n.m(r,s),e=!0},p(r,s){n&&n.p&&(!e||s&8)&&qt(n,t,r,r[3],e?jt(t,r[3],s,null):Gt(r[3]),null)},i(r){e||(D(n,r),e=!0)},o(r){A(n,r),e=!1},d(r){n&&n.d(r)}}}function Qhe(i){let e,t;const n=[{name:"clipboard"},i[1],{iconNode:i[0]}];let r={$$slots:{default:[Xhe]},$$scope:{ctx:i}};for(let s=0;s{t(1,e=Qe(Qe({},e),Bt(o))),"$$scope"in o&&t(3,r=o.$$scope)},e=Bt(e),[s,e,n,r]}class efe extends Ue{constructor(e){super(),je(this,e,Jhe,Qhe,Ve,{})}}const tfe=efe;function nfe(i){let e;const t=i[2].default,n=Ut(t,i,i[3],null);return{c(){n&&n.c()},l(r){n&&n.l(r)},m(r,s){n&&n.m(r,s),e=!0},p(r,s){n&&n.p&&(!e||s&8)&&qt(n,t,r,r[3],e?jt(t,r[3],s,null):Gt(r[3]),null)},i(r){e||(D(n,r),e=!0)},o(r){A(n,r),e=!1},d(r){n&&n.d(r)}}}function ife(i){let e,t;const n=[{name:"loader-2"},i[1],{iconNode:i[0]}];let r={$$slots:{default:[nfe]},$$scope:{ctx:i}};for(let s=0;s{t(1,e=Qe(Qe({},e),Bt(o))),"$$scope"in o&&t(3,r=o.$$scope)},e=Bt(e),[s,e,n,r]}class sfe extends Ue{constructor(e){super(),je(this,e,rfe,ife,Ve,{})}}const iy=sfe;function ofe(i){let e;const t=i[2].default,n=Ut(t,i,i[3],null);return{c(){n&&n.c()},l(r){n&&n.l(r)},m(r,s){n&&n.m(r,s),e=!0},p(r,s){n&&n.p&&(!e||s&8)&&qt(n,t,r,r[3],e?jt(t,r[3],s,null):Gt(r[3]),null)},i(r){e||(D(n,r),e=!0)},o(r){A(n,r),e=!1},d(r){n&&n.d(r)}}}function afe(i){let e,t;const n=[{name:"more-horizontal"},i[1],{iconNode:i[0]}];let r={$$slots:{default:[ofe]},$$scope:{ctx:i}};for(let s=0;s{t(1,e=Qe(Qe({},e),Bt(o))),"$$scope"in o&&t(3,r=o.$$scope)},e=Bt(e),[s,e,n,r]}class cfe extends Ue{constructor(e){super(),je(this,e,lfe,afe,Ve,{})}}const ufe=cfe;function dfe(i){let e;const t=i[2].default,n=Ut(t,i,i[3],null);return{c(){n&&n.c()},l(r){n&&n.l(r)},m(r,s){n&&n.m(r,s),e=!0},p(r,s){n&&n.p&&(!e||s&8)&&qt(n,t,r,r[3],e?jt(t,r[3],s,null):Gt(r[3]),null)},i(r){e||(D(n,r),e=!0)},o(r){A(n,r),e=!1},d(r){n&&n.d(r)}}}function hfe(i){let e,t;const n=[{name:"move"},i[1],{iconNode:i[0]}];let r={$$slots:{default:[dfe]},$$scope:{ctx:i}};for(let s=0;s{t(1,e=Qe(Qe({},e),Bt(o))),"$$scope"in o&&t(3,r=o.$$scope)},e=Bt(e),[s,e,n,r]}class gfe extends Ue{constructor(e){super(),je(this,e,ffe,hfe,Ve,{})}}const pfe=gfe;function mfe(i){let e;const t=i[2].default,n=Ut(t,i,i[3],null);return{c(){n&&n.c()},l(r){n&&n.l(r)},m(r,s){n&&n.m(r,s),e=!0},p(r,s){n&&n.p&&(!e||s&8)&&qt(n,t,r,r[3],e?jt(t,r[3],s,null):Gt(r[3]),null)},i(r){e||(D(n,r),e=!0)},o(r){A(n,r),e=!1},d(r){n&&n.d(r)}}}function _fe(i){let e,t;const n=[{name:"qr-code"},i[1],{iconNode:i[0]}];let r={$$slots:{default:[mfe]},$$scope:{ctx:i}};for(let s=0;s{t(1,e=Qe(Qe({},e),Bt(o))),"$$scope"in o&&t(3,r=o.$$scope)},e=Bt(e),[s,e,n,r]}class vfe extends Ue{constructor(e){super(),je(this,e,bfe,_fe,Ve,{})}}const wfe=vfe;function Cfe(i){let e;const t=i[2].default,n=Ut(t,i,i[3],null);return{c(){n&&n.c()},l(r){n&&n.l(r)},m(r,s){n&&n.m(r,s),e=!0},p(r,s){n&&n.p&&(!e||s&8)&&qt(n,t,r,r[3],e?jt(t,r[3],s,null):Gt(r[3]),null)},i(r){e||(D(n,r),e=!0)},o(r){A(n,r),e=!1},d(r){n&&n.d(r)}}}function yfe(i){let e,t;const n=[{name:"refresh-cw"},i[1],{iconNode:i[0]}];let r={$$slots:{default:[Cfe]},$$scope:{ctx:i}};for(let s=0;s{t(1,e=Qe(Qe({},e),Bt(o))),"$$scope"in o&&t(3,r=o.$$scope)},e=Bt(e),[s,e,n,r]}class kfe extends Ue{constructor(e){super(),je(this,e,Sfe,yfe,Ve,{})}}const aV=kfe;function Efe(i){let e;const t=i[2].default,n=Ut(t,i,i[3],null);return{c(){n&&n.c()},l(r){n&&n.l(r)},m(r,s){n&&n.m(r,s),e=!0},p(r,s){n&&n.p&&(!e||s&8)&&qt(n,t,r,r[3],e?jt(t,r[3],s,null):Gt(r[3]),null)},i(r){e||(D(n,r),e=!0)},o(r){A(n,r),e=!1},d(r){n&&n.d(r)}}}function xfe(i){let e,t;const n=[{name:"unlock"},i[1],{iconNode:i[0]}];let r={$$slots:{default:[Efe]},$$scope:{ctx:i}};for(let s=0;s{t(1,e=Qe(Qe({},e),Bt(o))),"$$scope"in o&&t(3,r=o.$$scope)},e=Bt(e),[s,e,n,r]}class Tfe extends Ue{constructor(e){super(),je(this,e,Lfe,xfe,Ve,{})}}const Ife=Tfe;var lV={prefix:"fas",iconName:"chevron-up",icon:[512,512,[],"f077","M233.4 105.4c12.5-12.5 32.8-12.5 45.3 0l192 192c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L256 173.3 86.6 342.6c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3l192-192z"]},cV={prefix:"fas",iconName:"user",icon:[448,512,[128100,62144],"f007","M224 256c70.7 0 128-57.3 128-128S294.7 0 224 0S96 57.3 96 128s57.3 128 128 128zm-45.7 48C79.8 304 0 383.8 0 482.3C0 498.7 13.3 512 29.7 512H418.3c16.4 0 29.7-13.3 29.7-29.7C448 383.8 368.2 304 269.7 304H178.3z"]},Dfe={prefix:"fas",iconName:"circle-check",icon:[512,512,[61533,"check-circle"],"f058","M256 512c141.4 0 256-114.6 256-256S397.4 0 256 0S0 114.6 0 256S114.6 512 256 512zM369 209L241 337c-9.4 9.4-24.6 9.4-33.9 0l-64-64c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0l47 47L335 175c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9z"]},Nfe=Dfe,uV={prefix:"fas",iconName:"eye",icon:[576,512,[128065],"f06e","M288 32c-80.8 0-145.5 36.8-192.6 80.6C48.6 156 17.3 208 2.5 243.7c-3.3 7.9-3.3 16.7 0 24.6C17.3 304 48.6 356 95.4 399.4C142.5 443.2 207.2 480 288 480s145.5-36.8 192.6-80.6c46.8-43.5 78.1-95.4 93-131.1c3.3-7.9 3.3-16.7 0-24.6c-14.9-35.7-46.2-87.7-93-131.1C433.5 68.8 368.8 32 288 32zM432 256c0 79.5-64.5 144-144 144s-144-64.5-144-144s64.5-144 144-144s144 64.5 144 144zM288 192c0 35.3-28.7 64-64 64c-11.5 0-22.3-3-31.6-8.4c-.2 2.8-.4 5.5-.4 8.4c0 53 43 96 96 96s96-43 96-96s-43-96-96-96c-2.8 0-5.6 .1-8.4 .4c5.3 9.3 8.4 20.1 8.4 31.6z"]},Afe={prefix:"fas",iconName:"pen",icon:[512,512,[128394],"f304","M362.7 19.3L314.3 67.7 444.3 197.7l48.4-48.4c25-25 25-65.5 0-90.5L453.3 19.3c-25-25-65.5-25-90.5 0zm-71 71L58.6 323.5c-10.4 10.4-18 23.3-22.2 37.4L1 481.2C-1.5 489.7 .8 498.8 7 505s15.3 8.5 23.7 6.1l120.3-35.4c14.1-4.2 27-11.8 37.4-22.2L421.7 220.3 291.7 90.3z"]},Rfe={prefix:"fas",iconName:"floppy-disk",icon:[448,512,[128190,128426,"save"],"f0c7","M64 32C28.7 32 0 60.7 0 96V416c0 35.3 28.7 64 64 64H384c35.3 0 64-28.7 64-64V173.3c0-17-6.7-33.3-18.7-45.3L352 50.7C340 38.7 323.7 32 306.7 32H64zm0 96c0-17.7 14.3-32 32-32H288c17.7 0 32 14.3 32 32v64c0 17.7-14.3 32-32 32H96c-17.7 0-32-14.3-32-32V128zM224 416c-35.3 0-64-28.7-64-64s28.7-64 64-64s64 28.7 64 64s-28.7 64-64 64z"]},dV=Rfe,Ofe={prefix:"fas",iconName:"circle-info",icon:[512,512,["info-circle"],"f05a","M256 512c141.4 0 256-114.6 256-256S397.4 0 256 0S0 114.6 0 256S114.6 512 256 512zM216 336h24V272H216c-13.3 0-24-10.7-24-24s10.7-24 24-24h48c13.3 0 24 10.7 24 24v88h8c13.3 0 24 10.7 24 24s-10.7 24-24 24H216c-13.3 0-24-10.7-24-24s10.7-24 24-24zm40-144c-17.7 0-32-14.3-32-32s14.3-32 32-32s32 14.3 32 32s-14.3 32-32 32z"]},hV=Ofe,fV={prefix:"fas",iconName:"minus",icon:[448,512,[8211,8722,10134,"subtract"],"f068","M432 256c0 17.7-14.3 32-32 32L48 288c-17.7 0-32-14.3-32-32s14.3-32 32-32l352 0c17.7 0 32 14.3 32 32z"]},Mfe={prefix:"fas",iconName:"download",icon:[512,512,[],"f019","M288 32c0-17.7-14.3-32-32-32s-32 14.3-32 32V274.7l-73.4-73.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l128 128c12.5 12.5 32.8 12.5 45.3 0l128-128c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L288 274.7V32zM64 352c-35.3 0-64 28.7-64 64v32c0 35.3 28.7 64 64 64H448c35.3 0 64-28.7 64-64V416c0-35.3-28.7-64-64-64H346.5l-45.3 45.3c-25 25-65.5 25-90.5 0L165.5 352H64zM432 456c-13.3 0-24-10.7-24-24s10.7-24 24-24s24 10.7 24 24s-10.7 24-24 24z"]},Pfe={prefix:"fas",iconName:"rotate-right",icon:[512,512,["redo-alt","rotate-forward"],"f2f9","M463.5 224H472c13.3 0 24-10.7 24-24V72c0-9.7-5.8-18.5-14.8-22.2s-19.3-1.7-26.2 5.2L413.4 96.6c-87.6-86.5-228.7-86.2-315.8 1c-87.5 87.5-87.5 229.3 0 316.8s229.3 87.5 316.8 0c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0c-62.5 62.5-163.8 62.5-226.3 0s-62.5-163.8 0-226.3c62.2-62.2 162.7-62.5 225.3-1L327 183c-6.9 6.9-8.9 17.2-5.2 26.2s12.5 14.8 22.2 14.8H463.5z"]},gV={prefix:"fas",iconName:"chevron-down",icon:[512,512,[],"f078","M233.4 406.6c12.5 12.5 32.8 12.5 45.3 0l192-192c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L256 338.7 86.6 169.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l192 192z"]},lh={prefix:"fas",iconName:"plus",icon:[448,512,[10133,61543,"add"],"2b","M256 80c0-17.7-14.3-32-32-32s-32 14.3-32 32V224H48c-17.7 0-32 14.3-32 32s14.3 32 32 32H192V432c0 17.7 14.3 32 32 32s32-14.3 32-32V288H400c17.7 0 32-14.3 32-32s-14.3-32-32-32H256V80z"]},Ffe={prefix:"fas",iconName:"xmark",icon:[320,512,[128473,10005,10006,10060,215,"close","multiply","remove","times"],"f00d","M310.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L160 210.7 54.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L114.7 256 9.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L160 301.3 265.4 406.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L205.3 256 310.6 150.6z"]},pV=Ffe,Bfe={prefix:"fas",iconName:"triangle-exclamation",icon:[512,512,[9888,"exclamation-triangle","warning"],"f071","M256 32c14.2 0 27.3 7.5 34.5 19.8l216 368c7.3 12.4 7.3 27.7 .2 40.1S486.3 480 472 480H40c-14.3 0-27.6-7.7-34.7-20.1s-7-27.8 .2-40.1l216-368C228.7 39.5 241.8 32 256 32zm0 128c-13.3 0-24 10.7-24 24V296c0 13.3 10.7 24 24 24s24-10.7 24-24V184c0-13.3-10.7-24-24-24zm32 224c0-17.7-14.3-32-32-32s-32 14.3-32 32s14.3 32 32 32s32-14.3 32-32z"]},mV=Bfe,Vfe={prefix:"fas",iconName:"dollar-sign",icon:[320,512,[128178,61781,"dollar","usd"],"24","M160 0c17.7 0 32 14.3 32 32V67.7c1.6 .2 3.1 .4 4.7 .7c10.6 1.6 42.1 6.7 55.1 10c17.1 4.3 27.5 21.7 23.2 38.9s-21.7 27.5-38.9 23.2c-9.3-2.4-37.6-7-48.9-8.7c-32.1-4.8-59.6-2.4-78.5 4.9c-18.3 7-25.9 16.9-27.9 28c-1.9 10.7-.5 16.8 1.3 20.6c1.9 4 5.6 8.5 12.9 13.4c16.2 10.8 41.1 17.9 73.3 26.7l2.8 .8c28.4 7.7 63.2 17.2 89 34.3c14.1 9.4 27.3 22.1 35.5 39.7c8.3 17.8 10.1 37.8 6.3 59.1c-6.9 38-33.1 63.4-65.6 76.7c-13.7 5.6-28.6 9.2-44.4 11V480c0 17.7-14.3 32-32 32s-32-14.3-32-32V445.1c-.4-.1-.9-.1-1.3-.2l-.2 0 0 0c-24.4-3.8-64.5-14.3-91.5-26.3c-16.2-7.2-23.4-26.1-16.2-42.2s26.1-23.4 42.2-16.2c20.9 9.3 55.3 18.4 75.2 21.6c31.9 4.7 58.2 2 76-5.3c16.9-6.9 24.6-16.9 26.8-28.9c1.9-10.7 .5-16.8-1.3-20.6c-1.9-4-5.6-8.5-12.9-13.4c-16.2-10.8-41.1-17.9-73.3-26.7l-2.8-.8c-28.4-7.7-63.2-17.2-89-34.3c-14.1-9.4-27.3-22.1-35.5-39.7c-8.3-17.8-10.1-37.8-6.3-59.1C25 114.1 53 89.3 86 76.7c13-5 27.2-8.2 42-10V32c0-17.7 14.3-32 32-32z"]};function Wfe(i){let e,t,n,r,s,o,a,l,c,u,d,h,f,g;r=new fr({props:{data:i[4][i[0]],class:i[5][i[0]].iconClass}});const p=i[8].default,m=Ut(p,i,i[7],null);return{c(){e=V("div"),t=V("div"),n=V("div"),Q(r.$$.fragment),s=ae(),o=V("div"),a=V("span"),l=me(i[1]),u=ae(),d=V("div"),m&&m.c(),this.h()},l(_){e=W(_,"DIV",{class:!0});var b=M(e);t=W(b,"DIV",{class:!0});var v=M(t);n=W(v,"DIV",{class:!0});var w=M(n);J(r.$$.fragment,w),w.forEach(S),s=le(v),o=W(v,"DIV",{class:!0});var E=M(o);a=W(E,"SPAN",{class:!0});var I=M(a);l=_e(I,i[1]),I.forEach(S),u=le(E),d=W(E,"DIV",{class:!0});var x=M(d);m&&m.l(x),x.forEach(S),E.forEach(S),v.forEach(S),b.forEach(S),this.h()},h(){y(n,"class","flex h-8 w-8 items-center justify-center rounded-full"),y(a,"class",c=li(i[3]==="sm"?"text-sm":"text-xs ","font-medium",i[5][i[0]].titleClass)),y(d,"class",h=li(i[3]==="sm"?"text-sm":"text-xs ","mt-2",i[5][i[0]].descriptionClass)),y(o,"class","ml-2 w-full"),y(t,"class","flex"),y(e,"class",f=li(i[2]?"":"rounded-md",i[3]==="sm"?"p-4":"p-2 ",i[5][i[0]].bgClass,i[6].class))},m(_,b){F(_,e,b),R(e,t),R(t,n),Z(r,n,null),R(t,s),R(t,o),R(o,a),R(a,l),R(o,u),R(o,d),m&&m.m(d,null),g=!0},p(_,[b]){const v={};b&1&&(v.data=_[4][_[0]]),b&1&&(v.class=_[5][_[0]].iconClass),r.$set(v),(!g||b&2)&&pt(l,_[1]),(!g||b&9&&c!==(c=li(_[3]==="sm"?"text-sm":"text-xs ","font-medium",_[5][_[0]].titleClass)))&&y(a,"class",c),m&&m.p&&(!g||b&128)&&qt(m,p,_,_[7],g?jt(p,_[7],b,null):Gt(_[7]),null),(!g||b&9&&h!==(h=li(_[3]==="sm"?"text-sm":"text-xs ","mt-2",_[5][_[0]].descriptionClass)))&&y(d,"class",h),(!g||b&77&&f!==(f=li(_[2]?"":"rounded-md",_[3]==="sm"?"p-4":"p-2 ",_[5][_[0]].bgClass,_[6].class)))&&y(e,"class",f)},i(_){g||(D(r.$$.fragment,_),D(m,_),g=!0)},o(_){A(r.$$.fragment,_),A(m,_),g=!1},d(_){_&&S(e),X(r),m&&m.d(_)}}}function Hfe(i,e,t){let{$$slots:n={},$$scope:r}=e,{type:s="info"}=e,{title:o}=e,{notRounded:a=!1}=e,{size:l="sm"}=e;const c={info:hV,warning:mV,error:mV,success:Nfe},u={info:{bgClass:"bg-blue-50 border-blue-200 border",iconClass:"text-blue-500",titleClass:"text-blue-800",descriptionClass:"text-blue-700"},warning:{bgClass:"bg-yellow-50 border-yellow-200 border",iconClass:"text-yellow-500",titleClass:"text-yellow-800",descriptionClass:"text-yellow-700"},error:{bgClass:"bg-red-50 border-red-200 border",iconClass:"text-red-500",titleClass:"text-red-800",descriptionClass:"text-red-700"},success:{bgClass:"bg-green-50 border-green-200 border",iconClass:"text-green-500",titleClass:"text-green-800",descriptionClass:"text-green-700"}};return i.$$set=d=>{t(6,e=Qe(Qe({},e),Bt(d))),"type"in d&&t(0,s=d.type),"title"in d&&t(1,o=d.title),"notRounded"in d&&t(2,a=d.notRounded),"size"in d&&t(3,l=d.size),"$$scope"in d&&t(7,r=d.$$scope)},e=Bt(e),[s,o,a,l,c,u,e,r,n]}class ch extends Ue{constructor(e){super(),je(this,e,Hfe,Wfe,Ve,{type:0,title:1,notRounded:2,size:3})}}const _V="dark-";function bV(i){let e,t;const n=[i[4]];let r={};for(let s=0;s{o=null}),Be()),l&&l.p&&(!s||g&8192)&&qt(l,a,f,f[13],s?jt(a,f[13],g,null):Gt(f[13]),null),f[4].data&&f[4].position==="right"?c?(c.p(f,g),g&16&&D(c,1)):(c=vV(f),c.c(),D(c,1),c.m(e,r)):c&&(Fe(),A(c,1,1,()=>{c=null}),Be()),f[1]?u?(u.p(f,g),g&2&&D(u,1)):(u=wV(f),u.c(),D(u,1),u.m(e,null)):u&&(Fe(),A(u,1,1,()=>{u=null}),Be()),h=dn(d,[(!s||g&1)&&{href:f[0]},g&128&&f[7],(!s||g&32)&&{class:f[5]}]),/-/.test(f[0]?"a":"span")?Km(e,h):co(e,h),vt(e,"hidden",f[3]),vt(e,"capitalize",f[2])},i(f){s||(D(o),D(l,f),D(c),D(u),s=!0)},o(f){A(o),A(l,f),A(c),A(u),s=!1},d(f){f&&S(e),o&&o.d(),l&&l.d(f),c&&c.d(),u&&u.d()}}}function zfe(i){let e,t=i[0]?"a":"span",n,r,s,o=(i[0]?"a":"span")&&ZL(i);return{c(){e=V("span"),o&&o.c(),this.h()},l(a){e=W(a,"SPAN",{class:!0});var l=M(e);o&&o.l(l),l.forEach(S),this.h()},h(){y(e,"class","inline-flex justify-center items-center whitespace-nowrap")},m(a,l){F(a,e,l),o&&o.m(e,null),n=!0,r||(s=[Pe(e,"click",i[15]),Pe(e,"keydown",i[16])],r=!0)},p(a,[l]){a[0],t?Ve(t,a[0]?"a":"span")?(o.d(1),o=ZL(a),o.c(),o.m(e,null)):o.p(a,l):(o=ZL(a),o.c(),o.m(e,null)),t=a[0]?"a":"span"},i(a){n||(D(o),n=!0)},o(a){A(o),n=!1},d(a){a&&S(e),o&&o.d(a),r=!1,pn(s)}}}function $fe(i,e,t){let n,r;const s=["color","large","href","rounded","dismissable","baseClass","capitalize","icon"];let o=ea(e,s),{$$slots:a={},$$scope:l}=e,{color:c="gray"}=e,{large:u=!1}=e,{href:d=""}=e,{rounded:h=!1}=e,{dismissable:f=!1}=e,{baseClass:g="text-center"}=e,{capitalize:p=!1}=e,{icon:m=void 0}=e,_={data:void 0,position:"left",scale:.7},b=!1;const v={gray:"bg-gray-100 text-gray-800 dark:bg-gray-700 dark:text-gray-300",blue:"bg-blue-100 text-blue-800 dark:bg-blue-200 dark:text-blue-800",red:"bg-red-100 text-red-800 dark:bg-red-200 dark:text-red-900",green:"bg-green-100 text-green-800 dark:bg-green-200 dark:text-green-900",yellow:"bg-yellow-100 text-yellow-800 dark:bg-yellow-200 dark:text-yellow-900",indigo:"bg-indigo-100 text-indigo-800 dark:bg-indigo-200 dark:text-indigo-900",["dark-gray"]:"bg-gray-500 text-gray-100",["dark-blue"]:"bg-blue-500 text-blue-100",["dark-red"]:"bg-red-500 text-white",["dark-green"]:"bg-green-500 text-green-100",["dark-yellow"]:"bg-yellow-300 text-yellow-800",["dark-indigo"]:"bg-indigo-500 text-indigo-100"},w={gray:"hover:bg-gray-200 dark:hover:bg-gray-300",blue:"hover:bg-blue-200 dark:hover:bg-blue-300",red:"hover:bg-red-200 dark:hover:bg-red-300",green:"hover:bg-green-200 dark:hover:bg-green-300",yellow:"hover:bg-yellow-200 dark:hover:bg-yellow-300",indigo:"hover:bg-indigo-200 dark:hover:bg-indigo-300"},E=()=>t(3,b=!b);function I(T){hr.call(this,i,T)}function x(T){hr.call(this,i,T)}return i.$$set=T=>{t(20,e=Qe(Qe({},e),Bt(T))),t(7,o=ea(e,s)),"color"in T&&t(8,c=T.color),"large"in T&&t(9,u=T.large),"href"in T&&t(0,d=T.href),"rounded"in T&&t(10,h=T.rounded),"dismissable"in T&&t(1,f=T.dismissable),"baseClass"in T&&t(11,g=T.baseClass),"capitalize"in T&&t(2,p=T.capitalize),"icon"in T&&t(12,m=T.icon),"$$scope"in T&&t(13,l=T.$$scope)},i.$$.update=()=>{t(5,n=li(g,u?"text-sm font-medium":"text-xs font-semibold",v[c],d&&(c.startsWith(_V)?w[c.replace(_V,"")]:w[c]),h?"rounded-full px-2 py-1":"rounded px-2.5 py-0.5",e.class)),i.$$.dirty&4096&&t(4,r=m?{..._,...m}:{data:void 0})},e=Bt(e),[d,f,p,b,r,n,E,o,c,u,h,g,m,l,a,I,x]}class XL extends Ue{constructor(e){super(),je(this,e,$fe,zfe,Ve,{color:8,large:9,href:0,rounded:10,dismissable:1,baseClass:11,capitalize:2,icon:12})}}var uh;(i=>{i.FontSizeClasses={xs:"text-xs",sm:"text-sm",md:"text-md",lg:"text-lg",xl:"text-xl"},i.SpacingClasses={xs:{border:"px-3 py-[6px]",contained:"px-3 py-[7px]"},sm:{border:"px-3 py-[6px]",contained:"px-3 py-[7px]"},md:{border:"px-3 py-[6px]",contained:"px-3 py-[7px]"},lg:{border:"px-4 py-[8px]",contained:"px-4 py-[9px]"},xl:{border:"px-4 py-[8px]",contained:"px-4 py-[9px]"}},i.IconScale={xs:.7,sm:.8,md:1,lg:1.1,xl:1.2},i.ItemContextKey="popupItemProps"})(uh||(uh={}));function Ufe(i){let e,t;return e=new fr({props:{data:i[6].icon,class:i[9],scale:uh.IconScale[i[2]]}}),{c(){Q(e.$$.fragment)},l(n){J(e.$$.fragment,n)},m(n,r){Z(e,n,r),t=!0},p(n,r){const s={};r&64&&(s.data=n[6].icon),r&512&&(s.class=n[9]),r&4&&(s.scale=uh.IconScale[n[2]]),e.$set(s)},i(n){t||(D(e.$$.fragment,n),t=!0)},o(n){A(e.$$.fragment,n),t=!1},d(n){X(e,n)}}}function jfe(i){let e,t;return e=new iy({props:{class:"animate-spin mr-1",size:14}}),{c(){Q(e.$$.fragment)},l(n){J(e.$$.fragment,n)},m(n,r){Z(e,n,r),t=!0},p:fe,i(n){t||(D(e.$$.fragment,n),t=!0)},o(n){A(e.$$.fragment,n),t=!1},d(n){X(e,n)}}}function CV(i){let e;const t=i[23].default,n=Ut(t,i,i[22],null);return{c(){n&&n.c()},l(r){n&&n.l(r)},m(r,s){n&&n.m(r,s),e=!0},p(r,s){n&&n.p&&(!e||s&4194304)&&qt(n,t,r,r[22],e?jt(t,r[22],s,null):Gt(r[22]),null)},i(r){e||(D(n,r),e=!0)},o(r){A(n,r),e=!1},d(r){n&&n.d(r)}}}function yV(i){let e,t;return e=new fr({props:{data:i[7].icon,class:i[8],scale:uh.IconScale[i[2]]}}),{c(){Q(e.$$.fragment)},l(n){J(e.$$.fragment,n)},m(n,r){Z(e,n,r),t=!0},p(n,r){const s={};r&128&&(s.data=n[7].icon),r&256&&(s.class=n[8]),r&4&&(s.scale=uh.IconScale[n[2]]),e.$set(s)},i(n){t||(D(e.$$.fragment,n),t=!0)},o(n){A(e.$$.fragment,n),t=!1},d(n){X(e,n)}}}function QL(i){let e,t,n,r,s,o,a,l,c;const u=[jfe,Ufe],d=[];function h(_,b){return _[1]?0:_[6]?1:-1}~(t=h(i))&&(n=d[t]=u[t](i));let f=!i[5]&&CV(i),g=i[7]&&yV(i),p=[i[10],{disabled:o=i[3]||i[1]},{type:"submit"}],m={};for(let _=0;_{d[v]=null}),Be()),~t?(n=d[t],n?n.p(_,b):(n=d[t]=u[t](_),n.c()),D(n,1),n.m(e,r)):n=null),_[5]?f&&(Fe(),A(f,1,1,()=>{f=null}),Be()):f?(f.p(_,b),b&32&&D(f,1)):(f=CV(_),f.c(),D(f,1),f.m(e,s)),_[7]?g?(g.p(_,b),b&128&&D(g,1)):(g=yV(_),g.c(),D(g,1),g.m(e,null)):g&&(Fe(),A(g,1,1,()=>{g=null}),Be()),m=dn(p,[b&1024&&_[10],(!a||b&10&&o!==(o=_[3]||_[1]))&&{disabled:o},{type:"submit"}]),/-/.test(_[4]?"a":"button")?Km(e,m):co(e,m)},i(_){a||(D(n),D(f),D(g),a=!0)},o(_){A(n),A(f),A(g),a=!1},d(_){_&&S(e),~t&&d[t].d(),f&&f.d(),g&&g.d(),i[27](null),l=!1,pn(c)}}}function qfe(i){let e=i[4]?"a":"button",t,n,r=(i[4]?"a":"button")&&QL(i);return{c(){r&&r.c(),t=Me()},l(s){r&&r.l(s),t=Me()},m(s,o){r&&r.m(s,o),F(s,t,o),n=!0},p(s,[o]){s[4],e?Ve(e,s[4]?"a":"button")?(r.d(1),r=QL(s),r.c(),r.m(t.parentNode,t)):r.p(s,o):(r=QL(s),r.c(),r.m(t.parentNode,t)),e=s[4]?"a":"button"},i(s){n||(D(r),n=!0)},o(s){A(r),n=!1},d(s){s&&S(t),r&&r.d(s)}}}function Gfe(i,e,t){let n,r,s,o;const a=["size","spacingSize","color","variant","btnClasses","disabled","href","target","iconOnly","startIcon","endIcon","element","id","nonCaptureEvent","buttonType","loading","title"];let l=ea(e,a),{$$slots:c={},$$scope:u}=e,{size:d="md"}=e,{spacingSize:h=d}=e,{color:f="blue"}=e,{variant:g="contained"}=e,{btnClasses:p=""}=e,{disabled:m=!1}=e,{href:_=void 0}=e,{target:b="_self"}=e,{iconOnly:v=!1}=e,{startIcon:w=void 0}=e,{endIcon:E=void 0}=e,{element:I=void 0}=e,{id:x=""}=e,{nonCaptureEvent:T=!1}=e,{buttonType:L="button"}=e,{loading:O=!1}=e,{title:N=void 0}=e;const P=dr(),$={blue:{border:"border-frost-500 hover:border-frost-700 focus:border-frost-700 bg-white hover:bg-frost-100 focus:bg-frost-100 text-frost-500 hover:text-frost-700 focus:text-frost-700 focus:ring-frost-300",contained:"bg-frost-500 hover:bg-frost-700 focus:bg-frost-700 text-white focus:ring-frost-300"},red:{border:"border-red-600 hover:border-red-700 bg-white hover:bg-red-100 text-red-600 hover:text-red-700 focus:ring-red-300",contained:"bg-red-600 hover:bg-red-700 text-white focus:ring-red-300"},green:{border:"border-green-600 hover:border-green-700 bg-white hover:bg-green-100 text-green-600 hover:text-green-700 focus:ring-green-300",contained:"bg-green-600 hover:bg-green-700 text-white focus:ring-green-300"},dark:{border:"border-gray-800 hover:border-gray-900 focus:border-gray-900 bg-white hover:bg-gray-200 focus:bg-gray-200 text-gray-800 hover:text-gray-900 focus:text-gray-900 focus:ring-gray-300",contained:"bg-gray-700 hover:bg-gray-900 focus:bg-gray-900 text-white focus:ring-gray-300"},gray:{border:"border-gray-600 hover:border-gray-900 focus:border-gray-900 bg-white hover:bg-gray-200 focus:bg-gray-200 text-gray-800 hover:text-gray-900 focus:text-gray-900 focus:ring-gray-300",contained:"bg-gray-700/90 hover:bg-gray-900/90 focus:bg-gray-900/90 text-white focus:ring-gray-300"},light:{border:"border border-gray-300 bg-white hover:bg-gray-100 focus:bg-gray-100 text-gray-700 hover:text-gray-800 focus:text-gray-800 focus:ring-gray-300",contained:"bg-white border-gray-300 hover:bg-gray-100 focus:bg-gray-100 text-gray-700 focus:ring-gray-300"}};async function ne(B){T||(B.preventDefault(),B.stopPropagation(),P("click",B),_&&(_.startsWith("http")||b=="_blank"?window.open(_,b):(t(1,O=!0),t(1,O=!1))))}function z(B){hr.call(this,i,B)}function K(B){hr.call(this,i,B)}function ce(B){hr.call(this,i,B)}function re(B){ve[B?"unshift":"push"](()=>{I=B,t(0,I)})}return i.$$set=B=>{e=Qe(Qe({},e),Bt(B)),t(30,l=ea(e,a)),"size"in B&&t(2,d=B.size),"spacingSize"in B&&t(12,h=B.spacingSize),"color"in B&&t(13,f=B.color),"variant"in B&&t(14,g=B.variant),"btnClasses"in B&&t(15,p=B.btnClasses),"disabled"in B&&t(3,m=B.disabled),"href"in B&&t(4,_=B.href),"target"in B&&t(16,b=B.target),"iconOnly"in B&&t(5,v=B.iconOnly),"startIcon"in B&&t(6,w=B.startIcon),"endIcon"in B&&t(7,E=B.endIcon),"element"in B&&t(0,I=B.element),"id"in B&&t(17,x=B.id),"nonCaptureEvent"in B&&t(18,T=B.nonCaptureEvent),"buttonType"in B&&t(19,L=B.buttonType),"loading"in B&&t(1,O=B.loading),"title"in B&&t(20,N=B.title),"$$scope"in B&&t(22,u=B.$$scope)},i.$$.update=()=>{var B;t(10,n={id:x,class:li((B=$==null?void 0:$[f])==null?void 0:B[g],g==="border"?"border":"",uh.FontSizeClasses[d],uh.SpacingClasses[h][g],"focus:ring-2 font-semibold","duration-200 rounded-md","justify-center items-center text-center whitespace-nowrap inline-flex",p,m?"!bg-gray-300 !text-gray-600 !cursor-not-allowed":""),href:_,target:b,tabindex:m?-1:0,type:L,title:N,...l}),i.$$.dirty&4&&t(21,r=d==="xs"||d==="sm"),i.$$.dirty&2097248&&t(9,s=li(v?void 0:r?"mr-1":"mr-2",w==null?void 0:w.classes)),i.$$.dirty&2097312&&t(8,o=li(v?void 0:r?"ml-1":"ml-2",E==null?void 0:E.classes))},[I,O,d,m,_,v,w,E,o,s,n,ne,h,f,g,p,b,x,T,L,N,r,u,c,z,K,ce,re]}let En=class extends Ue{constructor(e){super(),je(this,e,Gfe,qfe,Ve,{size:2,spacingSize:12,color:13,variant:14,btnClasses:15,disabled:3,href:4,target:16,iconOnly:5,startIcon:6,endIcon:7,element:0,id:17,nonCaptureEvent:18,buttonType:19,loading:1,title:20})}};const Agt="";function SV(i){let e;const t=i[16].default,n=Ut(t,i,i[15],null);return{c(){n&&n.c()},l(r){n&&n.l(r)},m(r,s){n&&n.m(r,s),e=!0},p(r,s){n&&n.p&&(!e||s&32768)&&qt(n,t,r,r[15],e?jt(t,r[15],s,null):Gt(r[15]),null)},i(r){e||(D(n,r),e=!0)},o(r){A(n,r),e=!1},d(r){n&&n.d(r)}}}function Kfe(i){let e,t,n,r,s,o,a,l,c,u=(i[0]||!i[4]||i[3])&&SV(i);return{c(){e=V("aside"),t=V("div"),n=ae(),r=V("div"),u&&u.c(),this.h()},l(d){e=W(d,"ASIDE",{class:!0,style:!0});var h=M(e);t=W(h,"DIV",{class:!0}),M(t).forEach(S),n=le(h),r=W(h,"DIV",{class:!0});var f=M(r);u&&u.l(f),f.forEach(S),h.forEach(S),this.h()},h(){y(t,"class","overlay svelte-1nbastr"),y(r,"class",s="panel "+i[1]+" svelte-1nbastr"),vt(r,"size",i[2]),y(e,"class",o="drawer "+i[8].class+" svelte-1nbastr"),y(e,"style",i[5]),vt(e,"open",i[0]),vt(e,"close",!i[0]&&i[4])},m(d,h){F(d,e,h),R(e,t),R(e,n),R(e,r),u&&u.m(r,null),a=!0,l||(c=[Pe(window,"keydown",i[7]),Pe(t,"click",i[6])],l=!0)},p(d,[h]){d[0]||!d[4]||d[3]?u?(u.p(d,h),h&25&&D(u,1)):(u=SV(d),u.c(),D(u,1),u.m(r,null)):u&&(Fe(),A(u,1,1,()=>{u=null}),Be()),(!a||h&2&&s!==(s="panel "+d[1]+" svelte-1nbastr"))&&y(r,"class",s),(!a||h&6)&&vt(r,"size",d[2]),(!a||h&256&&o!==(o="drawer "+d[8].class+" svelte-1nbastr"))&&y(e,"class",o),(!a||h&32)&&y(e,"style",d[5]),(!a||h&257)&&vt(e,"open",d[0]),(!a||h&273)&&vt(e,"close",!d[0]&&d[4])},i(d){a||(D(u),a=!0)},o(d){A(u),a=!1},d(d){d&&S(e),u&&u.d(),l=!1,pn(c)}}}function Yfe(i,e,t){let n,r,{$$slots:s={},$$scope:o}=e,{open:a=!1}=e,{duration:l=.3}=e,{placement:c="right"}=e,{size:u="600px"}=e,{alwaysOpen:d=!1}=e;function h(){t(0,a=!a)}function f(){t(0,a=!0)}function g(){t(0,a=!1),setTimeout(()=>{_("afterClose")},n)}function p(){return a}let m=!1;const _=dr();function b(I){{const x=document.querySelector("body");m&&x&&(x.style.overflowY=I?"hidden":"auto")}}function v(){_("clickAway"),t(0,a=!1)}function w(I){if(a)switch(I.key){case"Escape":I.preventDefault(),I.stopPropagation(),I.stopImmediatePropagation(),t(0,a=!1);break}}let E=!0;return Oo(()=>{m=!0,b(a)}),i.$$set=I=>{t(8,e=Qe(Qe({},e),Bt(I))),"open"in I&&t(0,a=I.open),"duration"in I&&t(9,l=I.duration),"placement"in I&&t(1,c=I.placement),"size"in I&&t(2,u=I.size),"alwaysOpen"in I&&t(3,d=I.alwaysOpen),"$$scope"in I&&t(15,o=I.$$scope)},i.$$.update=()=>{i.$$.dirty&512&&t(14,n=l*1e3),i.$$.dirty&516&&t(5,r=`--duration: ${l}s; --size: ${u};`),i.$$.dirty&1&&b(a),i.$$.dirty&1&&_(a?"open":"close"),i.$$.dirty&16385&&(a?t(4,E=!1):setTimeout(()=>t(4,E=!0),n))},e=Bt(e),[a,c,u,d,E,r,v,w,e,l,h,f,g,p,n,o,s]}class dh extends Ue{constructor(e){super(),je(this,e,Yfe,Kfe,Ve,{open:0,duration:9,placement:1,size:2,alwaysOpen:3,toggleDrawer:10,openDrawer:11,closeDrawer:12,isOpen:13})}get toggleDrawer(){return this.$$.ctx[10]}get openDrawer(){return this.$$.ctx[11]}get closeDrawer(){return this.$$.ctx[12]}get isOpen(){return this.$$.ctx[13]}}const Zfe=i=>({}),kV=i=>({});function EV(i){let e,t;const n=i[7].actions,r=Ut(n,i,i[6],kV);return{c(){e=V("div"),r&&r.c(),this.h()},l(s){e=W(s,"DIV",{class:!0});var o=M(e);r&&r.l(o),o.forEach(S),this.h()},h(){y(e,"class","flex gap-1 items-center justify-end")},m(s,o){F(s,e,o),r&&r.m(e,null),t=!0},p(s,o){r&&r.p&&(!t||o&64)&&qt(r,n,s,s[6],t?jt(n,s[6],o,Zfe):Gt(s[6]),kV)},i(s){t||(D(r,s),t=!0)},o(s){A(r,s),t=!1},d(s){s&&S(e),r&&r.d(s)}}}function Xfe(i){let e,t,n,r,s,o,a,l,c,u,d,h,f,g,p;s=new fr({props:{data:pV,class:"text-gray-500"}});let m=i[5].actions&&EV(i);const _=i[7].default,b=Ut(_,i,i[6],null);return{c(){e=V("div"),t=V("div"),n=V("div"),r=V("button"),Q(s.$$.fragment),o=ae(),a=V("span"),l=me(i[0]),c=ae(),m&&m.c(),u=ae(),d=V("div"),b&&b.c(),this.h()},l(v){e=W(v,"DIV",{class:!0});var w=M(e);t=W(w,"DIV",{class:!0});var E=M(t);n=W(E,"DIV",{class:!0});var I=M(n);r=W(I,"BUTTON",{class:!0});var x=M(r);J(s.$$.fragment,x),x.forEach(S),o=le(I),a=W(I,"SPAN",{class:!0});var T=M(a);l=_e(T,i[0]),T.forEach(S),I.forEach(S),c=le(E),m&&m.l(E),E.forEach(S),u=le(w),d=W(w,"DIV",{class:!0});var L=M(d);b&&b.l(L),L.forEach(S),w.forEach(S),this.h()},h(){y(r,"class","hover:bg-gray-200 bg-gray-100 rounded-full w-8 h-8 flex items-center justify-center transition-all"),y(a,"class","font-semibold truncate text-gray-800"),y(n,"class","flex items-center gap-2"),y(t,"class","flex justify-between w-wull items-center px-2 py-2 "),y(d,"class",h=li(i[2]?"":"p-4","grow h-full max-h-full",i[3]?"!overflow-visible":"")),vt(d,"overflow-y-auto",i[1]),y(e,"class","flex flex-col divide-y h-screen max-h-screen")},m(v,w){F(v,e,w),R(e,t),R(t,n),R(n,r),Z(s,r,null),R(n,o),R(n,a),R(a,l),R(t,c),m&&m.m(t,null),R(e,u),R(e,d),b&&b.m(d,null),f=!0,g||(p=Pe(r,"click",i[8]),g=!0)},p(v,[w]){(!f||w&1)&&pt(l,v[0]),v[5].actions?m?(m.p(v,w),w&32&&D(m,1)):(m=EV(v),m.c(),D(m,1),m.m(t,null)):m&&(Fe(),A(m,1,1,()=>{m=null}),Be()),b&&b.p&&(!f||w&64)&&qt(b,_,v,v[6],f?jt(_,v[6],w,null):Gt(v[6]),null),(!f||w&12&&h!==(h=li(v[2]?"":"p-4","grow h-full max-h-full",v[3]?"!overflow-visible":"")))&&y(d,"class",h),(!f||w&14)&&vt(d,"overflow-y-auto",v[1])},i(v){f||(D(s.$$.fragment,v),D(m),D(b,v),f=!0)},o(v){A(s.$$.fragment,v),A(m),A(b,v),f=!1},d(v){v&&S(e),X(s),m&&m.d(),b&&b.d(v),g=!1,p()}}}function Qfe(i,e,t){let{$$slots:n={},$$scope:r}=e;const s=OL(n);let{title:o=void 0}=e,{overflow_y:a=!0}=e,{noPadding:l=!1}=e,{forceOverflowVisible:c=!1}=e;const u=dr(),d=()=>u("close");return i.$$set=h=>{"title"in h&&t(0,o=h.title),"overflow_y"in h&&t(1,a=h.overflow_y),"noPadding"in h&&t(2,l=h.noPadding),"forceOverflowVisible"in h&&t(3,c=h.forceOverflowVisible),"$$scope"in h&&t(6,r=h.$$scope)},[o,a,l,c,u,s,r,n,d]}class hh extends Ue{constructor(e){super(),je(this,e,Qfe,Xfe,Ve,{title:0,overflow_y:1,noPadding:2,forceOverflowVisible:3})}}const Jfe=i=>({}),xV=i=>({close:i[4]}),ege=i=>({}),LV=i=>({class:"triggerable",close:i[4]});function TV(i){let e,t,n;const r=i[7].default,s=Ut(r,i,i[6],xV);return{c(){e=V("div"),s&&s.c(),this.h()},l(o){e=W(o,"DIV",{class:!0,role:!0,tabindex:!0});var a=M(e);s&&s.l(a),a.forEach(S),this.h()},h(){y(e,"class",t=li("z-50 absolute mt-2 rounded-md shadow-lg bg-white ring-1 ring-black ring-opacity-5 focus:outline-none",i[5][i[1]],i[0]?"min-w-0":"w-60")),y(e,"role","menu"),y(e,"tabindex","-1")},m(o,a){F(o,e,a),s&&s.m(e,null),n=!0},p(o,a){s&&s.p&&(!n||a&64)&&qt(s,r,o,o[6],n?jt(r,o[6],a,Jfe):Gt(o[6]),xV),(!n||a&3&&t!==(t=li("z-50 absolute mt-2 rounded-md shadow-lg bg-white ring-1 ring-black ring-opacity-5 focus:outline-none",o[5][o[1]],o[0]?"min-w-0":"w-60")))&&y(e,"class",t)},i(o){n||(D(s,o),n=!0)},o(o){A(s,o),n=!1},d(o){o&&S(e),s&&s.d(o)}}}function tge(i){let e,t,n,r,s,o;const a=i[7].trigger,l=Ut(a,i,i[6],LV);let c=i[2]&&TV(i);return{c(){e=V("div"),t=V("div"),l&&l.c(),n=ae(),c&&c.c(),this.h()},l(u){e=W(u,"DIV",{class:!0});var d=M(e);t=W(d,"DIV",{class:!0});var h=M(t);l&&l.l(h),h.forEach(S),n=le(d),c&&c.l(d),d.forEach(S),this.h()},h(){y(t,"class","cursor-pointer hover:bg-gray-100/30"),y(e,"class","relative")},m(u,d){F(u,e,d),R(e,t),l&&l.m(t,null),R(e,n),c&&c.m(e,null),i[9](e),r=!0,s||(o=Pe(t,"click",is(i[8])),s=!0)},p(u,[d]){l&&l.p&&(!r||d&64)&&qt(l,a,u,u[6],r?jt(a,u[6],d,ege):Gt(u[6]),LV),u[2]?c?(c.p(u,d),d&4&&D(c,1)):(c=TV(u),c.c(),D(c,1),c.m(e,null)):c&&(Fe(),A(c,1,1,()=>{c=null}),Be())},i(u){r||(D(l,u),D(c),r=!0)},o(u){A(l,u),A(c),r=!1},d(u){u&&S(e),l&&l.d(u),c&&c.d(),i[9](null),s=!1,o()}}}let JL;function nge(i,e,t){let{$$slots:n={},$$scope:r}=e,{noMinW:s=!1}=e,o=!1,a,{placement:l="bottom-start"}=e;function c(p){o&&!a.contains(p.target)&&(t(2,o=!1),p.preventDefault(),p.stopPropagation())}function u(p){o&&p.key==="Escape"&&t(2,o=!1)}function d(){t(2,o=!1)}Oo(()=>(document.addEventListener("click",c,!1),document.addEventListener("keyup",u,!1),()=>{document.removeEventListener("click",c,!1),document.removeEventListener("keyup",u,!1)}));const h={"bottom-start":"origin-top-left left-0","bottom-end":"origin-top-right right-0","top-start":"origin-bottom-left left-0 bottom-0","top-end":"origin-bottom-right right-0 bottom-0"},f=()=>{o||(JL&&JL(),JL=d),t(2,o=!o)};function g(p){ve[p?"unshift":"push"](()=>{a=p,t(3,a)})}return i.$$set=p=>{"noMinW"in p&&t(0,s=p.noMinW),"placement"in p&&t(1,l=p.placement),"$$scope"in p&&t(6,r=p.$$scope)},[s,l,o,a,d,h,r,n,f,g]}let ige=class extends Ue{constructor(e){super(),je(this,e,nge,tge,Ve,{noMinW:0,placement:1})}};var na="top",gl="bottom",pl="right",ia="left",ry="auto",tb=[na,gl,pl,ia],e_="start",nb="end",rge="clippingParents",IV="viewport",ib="popper",sge="reference",DV=tb.reduce(function(i,e){return i.concat([e+"-"+e_,e+"-"+nb])},[]),NV=[].concat(tb,[ry]).reduce(function(i,e){return i.concat([e,e+"-"+e_,e+"-"+nb])},[]),oge="beforeRead",age="read",lge="afterRead",cge="beforeMain",uge="main",dge="afterMain",hge="beforeWrite",fge="write",gge="afterWrite",e8=[oge,age,lge,cge,uge,dge,hge,fge,gge];function Bc(i){return i?(i.nodeName||"").toLowerCase():null}function ml(i){if(i==null)return window;if(i.toString()!=="[object Window]"){var e=i.ownerDocument;return e&&e.defaultView||window}return i}function vg(i){var e=ml(i).Element;return i instanceof e||i instanceof Element}function Ma(i){var e=ml(i).HTMLElement;return i instanceof e||i instanceof HTMLElement}function t8(i){if(typeof ShadowRoot>"u")return!1;var e=ml(i).ShadowRoot;return i instanceof e||i instanceof ShadowRoot}function pge(i){var e=i.state;Object.keys(e.elements).forEach(function(t){var n=e.styles[t]||{},r=e.attributes[t]||{},s=e.elements[t];!Ma(s)||!Bc(s)||(Object.assign(s.style,n),Object.keys(r).forEach(function(o){var a=r[o];a===!1?s.removeAttribute(o):s.setAttribute(o,a===!0?"":a)}))})}function mge(i){var e=i.state,t={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,t.popper),e.styles=t,e.elements.arrow&&Object.assign(e.elements.arrow.style,t.arrow),function(){Object.keys(e.elements).forEach(function(n){var r=e.elements[n],s=e.attributes[n]||{},o=Object.keys(e.styles.hasOwnProperty(n)?e.styles[n]:t[n]),a=o.reduce(function(l,c){return l[c]="",l},{});!Ma(r)||!Bc(r)||(Object.assign(r.style,a),Object.keys(s).forEach(function(l){r.removeAttribute(l)}))})}}const _ge={name:"applyStyles",enabled:!0,phase:"write",fn:pge,effect:mge,requires:["computeStyles"]};function Xl(i){return i.split("-")[0]}var wg=Math.max,sy=Math.min,t_=Math.round;function n8(){var i=navigator.userAgentData;return i!=null&&i.brands?i.brands.map(function(e){return e.brand+"/"+e.version}).join(" "):navigator.userAgent}function AV(){return!/^((?!chrome|android).)*safari/i.test(n8())}function n_(i,e,t){e===void 0&&(e=!1),t===void 0&&(t=!1);var n=i.getBoundingClientRect(),r=1,s=1;e&&Ma(i)&&(r=i.offsetWidth>0&&t_(n.width)/i.offsetWidth||1,s=i.offsetHeight>0&&t_(n.height)/i.offsetHeight||1);var o=vg(i)?ml(i):window,a=o.visualViewport,l=!AV()&&t,c=(n.left+(l&&a?a.offsetLeft:0))/r,u=(n.top+(l&&a?a.offsetTop:0))/s,d=n.width/r,h=n.height/s;return{width:d,height:h,top:u,right:c+d,bottom:u+h,left:c,x:c,y:u}}function i8(i){var e=n_(i),t=i.offsetWidth,n=i.offsetHeight;return Math.abs(e.width-t)<=1&&(t=e.width),Math.abs(e.height-n)<=1&&(n=e.height),{x:i.offsetLeft,y:i.offsetTop,width:t,height:n}}function RV(i,e){var t=e.getRootNode&&e.getRootNode();if(i.contains(e))return!0;if(t&&t8(t)){var n=e;do{if(n&&i.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function Ql(i){return ml(i).getComputedStyle(i)}function bge(i){return["table","td","th"].indexOf(Bc(i))>=0}function fh(i){return((vg(i)?i.ownerDocument:i.document)||window.document).documentElement}function oy(i){return Bc(i)==="html"?i:i.assignedSlot||i.parentNode||(t8(i)?i.host:null)||fh(i)}function OV(i){return!Ma(i)||Ql(i).position==="fixed"?null:i.offsetParent}function vge(i){var e=/firefox/i.test(n8()),t=/Trident/i.test(n8());if(t&&Ma(i)){var n=Ql(i);if(n.position==="fixed")return null}var r=oy(i);for(t8(r)&&(r=r.host);Ma(r)&&["html","body"].indexOf(Bc(r))<0;){var s=Ql(r);if(s.transform!=="none"||s.perspective!=="none"||s.contain==="paint"||["transform","perspective"].indexOf(s.willChange)!==-1||e&&s.willChange==="filter"||e&&s.filter&&s.filter!=="none")return r;r=r.parentNode}return null}function rb(i){for(var e=ml(i),t=OV(i);t&&bge(t)&&Ql(t).position==="static";)t=OV(t);return t&&(Bc(t)==="html"||Bc(t)==="body"&&Ql(t).position==="static")?e:t||vge(i)||e}function r8(i){return["top","bottom"].indexOf(i)>=0?"x":"y"}function sb(i,e,t){return wg(i,sy(e,t))}function wge(i,e,t){var n=sb(i,e,t);return n>t?t:n}function MV(){return{top:0,right:0,bottom:0,left:0}}function PV(i){return Object.assign({},MV(),i)}function FV(i,e){return e.reduce(function(t,n){return t[n]=i,t},{})}var Cge=function(e,t){return e=typeof e=="function"?e(Object.assign({},t.rects,{placement:t.placement})):e,PV(typeof e!="number"?e:FV(e,tb))};function yge(i){var e,t=i.state,n=i.name,r=i.options,s=t.elements.arrow,o=t.modifiersData.popperOffsets,a=Xl(t.placement),l=r8(a),c=[ia,pl].indexOf(a)>=0,u=c?"height":"width";if(!(!s||!o)){var d=Cge(r.padding,t),h=i8(s),f=l==="y"?na:ia,g=l==="y"?gl:pl,p=t.rects.reference[u]+t.rects.reference[l]-o[l]-t.rects.popper[u],m=o[l]-t.rects.reference[l],_=rb(s),b=_?l==="y"?_.clientHeight||0:_.clientWidth||0:0,v=p/2-m/2,w=d[f],E=b-h[u]-d[g],I=b/2-h[u]/2+v,x=sb(w,I,E),T=l;t.modifiersData[n]=(e={},e[T]=x,e.centerOffset=x-I,e)}}function Sge(i){var e=i.state,t=i.options,n=t.element,r=n===void 0?"[data-popper-arrow]":n;if(r!=null&&!(typeof r=="string"&&(r=e.elements.popper.querySelector(r),!r))){if(process.env.NODE_ENV!=="production"&&(Ma(r)||console.error(['Popper: "arrow" element must be an HTMLElement (not an SVGElement).',"To use an SVG arrow, wrap it in an HTMLElement that will be used as","the arrow."].join(" "))),!RV(e.elements.popper,r)){process.env.NODE_ENV!=="production"&&console.error(['Popper: "arrow" modifier\'s `element` must be a child of the popper',"element."].join(" "));return}e.elements.arrow=r}}const kge={name:"arrow",enabled:!0,phase:"main",fn:yge,effect:Sge,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function i_(i){return i.split("-")[1]}var Ege={top:"auto",right:"auto",bottom:"auto",left:"auto"};function xge(i){var e=i.x,t=i.y,n=window,r=n.devicePixelRatio||1;return{x:t_(e*r)/r||0,y:t_(t*r)/r||0}}function BV(i){var e,t=i.popper,n=i.popperRect,r=i.placement,s=i.variation,o=i.offsets,a=i.position,l=i.gpuAcceleration,c=i.adaptive,u=i.roundOffsets,d=i.isFixed,h=o.x,f=h===void 0?0:h,g=o.y,p=g===void 0?0:g,m=typeof u=="function"?u({x:f,y:p}):{x:f,y:p};f=m.x,p=m.y;var _=o.hasOwnProperty("x"),b=o.hasOwnProperty("y"),v=ia,w=na,E=window;if(c){var I=rb(t),x="clientHeight",T="clientWidth";if(I===ml(t)&&(I=fh(t),Ql(I).position!=="static"&&a==="absolute"&&(x="scrollHeight",T="scrollWidth")),I=I,r===na||(r===ia||r===pl)&&s===nb){w=gl;var L=d&&I===E&&E.visualViewport?E.visualViewport.height:I[x];p-=L-n.height,p*=l?1:-1}if(r===ia||(r===na||r===gl)&&s===nb){v=pl;var O=d&&I===E&&E.visualViewport?E.visualViewport.width:I[T];f-=O-n.width,f*=l?1:-1}}var N=Object.assign({position:a},c&&Ege),P=u===!0?xge({x:f,y:p}):{x:f,y:p};if(f=P.x,p=P.y,l){var $;return Object.assign({},N,($={},$[w]=b?"0":"",$[v]=_?"0":"",$.transform=(E.devicePixelRatio||1)<=1?"translate("+f+"px, "+p+"px)":"translate3d("+f+"px, "+p+"px, 0)",$))}return Object.assign({},N,(e={},e[w]=b?p+"px":"",e[v]=_?f+"px":"",e.transform="",e))}function Lge(i){var e=i.state,t=i.options,n=t.gpuAcceleration,r=n===void 0?!0:n,s=t.adaptive,o=s===void 0?!0:s,a=t.roundOffsets,l=a===void 0?!0:a;if(process.env.NODE_ENV!=="production"){var c=Ql(e.elements.popper).transitionProperty||"";o&&["transform","top","right","bottom","left"].some(function(d){return c.indexOf(d)>=0})&&console.warn(["Popper: Detected CSS transitions on at least one of the following",'CSS properties: "transform", "top", "right", "bottom", "left".',` + +`,'Disable the "computeStyles" modifier\'s `adaptive` option to allow',"for smooth transitions, or remove these properties from the CSS","transition declaration on the popper element if only transitioning","opacity or background-color for example.",` + +`,"We recommend using the popper element as a wrapper around an inner","element that can have any CSS property transitioned for animations."].join(" "))}var u={placement:Xl(e.placement),variation:i_(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:r,isFixed:e.options.strategy==="fixed"};e.modifiersData.popperOffsets!=null&&(e.styles.popper=Object.assign({},e.styles.popper,BV(Object.assign({},u,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:o,roundOffsets:l})))),e.modifiersData.arrow!=null&&(e.styles.arrow=Object.assign({},e.styles.arrow,BV(Object.assign({},u,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})}const Tge={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:Lge,data:{}};var ay={passive:!0};function Ige(i){var e=i.state,t=i.instance,n=i.options,r=n.scroll,s=r===void 0?!0:r,o=n.resize,a=o===void 0?!0:o,l=ml(e.elements.popper),c=[].concat(e.scrollParents.reference,e.scrollParents.popper);return s&&c.forEach(function(u){u.addEventListener("scroll",t.update,ay)}),a&&l.addEventListener("resize",t.update,ay),function(){s&&c.forEach(function(u){u.removeEventListener("scroll",t.update,ay)}),a&&l.removeEventListener("resize",t.update,ay)}}const Dge={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:Ige,data:{}};var Nge={left:"right",right:"left",bottom:"top",top:"bottom"};function ly(i){return i.replace(/left|right|bottom|top/g,function(e){return Nge[e]})}var Age={start:"end",end:"start"};function VV(i){return i.replace(/start|end/g,function(e){return Age[e]})}function s8(i){var e=ml(i),t=e.pageXOffset,n=e.pageYOffset;return{scrollLeft:t,scrollTop:n}}function o8(i){return n_(fh(i)).left+s8(i).scrollLeft}function Rge(i,e){var t=ml(i),n=fh(i),r=t.visualViewport,s=n.clientWidth,o=n.clientHeight,a=0,l=0;if(r){s=r.width,o=r.height;var c=AV();(c||!c&&e==="fixed")&&(a=r.offsetLeft,l=r.offsetTop)}return{width:s,height:o,x:a+o8(i),y:l}}function Oge(i){var e,t=fh(i),n=s8(i),r=(e=i.ownerDocument)==null?void 0:e.body,s=wg(t.scrollWidth,t.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),o=wg(t.scrollHeight,t.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0),a=-n.scrollLeft+o8(i),l=-n.scrollTop;return Ql(r||t).direction==="rtl"&&(a+=wg(t.clientWidth,r?r.clientWidth:0)-s),{width:s,height:o,x:a,y:l}}function a8(i){var e=Ql(i),t=e.overflow,n=e.overflowX,r=e.overflowY;return/auto|scroll|overlay|hidden/.test(t+r+n)}function WV(i){return["html","body","#document"].indexOf(Bc(i))>=0?i.ownerDocument.body:Ma(i)&&a8(i)?i:WV(oy(i))}function ob(i,e){var t;e===void 0&&(e=[]);var n=WV(i),r=n===((t=i.ownerDocument)==null?void 0:t.body),s=ml(n),o=r?[s].concat(s.visualViewport||[],a8(n)?n:[]):n,a=e.concat(o);return r?a:a.concat(ob(oy(o)))}function l8(i){return Object.assign({},i,{left:i.x,top:i.y,right:i.x+i.width,bottom:i.y+i.height})}function Mge(i,e){var t=n_(i,!1,e==="fixed");return t.top=t.top+i.clientTop,t.left=t.left+i.clientLeft,t.bottom=t.top+i.clientHeight,t.right=t.left+i.clientWidth,t.width=i.clientWidth,t.height=i.clientHeight,t.x=t.left,t.y=t.top,t}function HV(i,e,t){return e===IV?l8(Rge(i,t)):vg(e)?Mge(e,t):l8(Oge(fh(i)))}function Pge(i){var e=ob(oy(i)),t=["absolute","fixed"].indexOf(Ql(i).position)>=0,n=t&&Ma(i)?rb(i):i;return vg(n)?e.filter(function(r){return vg(r)&&RV(r,n)&&Bc(r)!=="body"}):[]}function Fge(i,e,t,n){var r=e==="clippingParents"?Pge(i):[].concat(e),s=[].concat(r,[t]),o=s[0],a=s.reduce(function(l,c){var u=HV(i,c,n);return l.top=wg(u.top,l.top),l.right=sy(u.right,l.right),l.bottom=sy(u.bottom,l.bottom),l.left=wg(u.left,l.left),l},HV(i,o,n));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}function zV(i){var e=i.reference,t=i.element,n=i.placement,r=n?Xl(n):null,s=n?i_(n):null,o=e.x+e.width/2-t.width/2,a=e.y+e.height/2-t.height/2,l;switch(r){case na:l={x:o,y:e.y-t.height};break;case gl:l={x:o,y:e.y+e.height};break;case pl:l={x:e.x+e.width,y:a};break;case ia:l={x:e.x-t.width,y:a};break;default:l={x:e.x,y:e.y}}var c=r?r8(r):null;if(c!=null){var u=c==="y"?"height":"width";switch(s){case e_:l[c]=l[c]-(e[u]/2-t[u]/2);break;case nb:l[c]=l[c]+(e[u]/2-t[u]/2);break}}return l}function ab(i,e){e===void 0&&(e={});var t=e,n=t.placement,r=n===void 0?i.placement:n,s=t.strategy,o=s===void 0?i.strategy:s,a=t.boundary,l=a===void 0?rge:a,c=t.rootBoundary,u=c===void 0?IV:c,d=t.elementContext,h=d===void 0?ib:d,f=t.altBoundary,g=f===void 0?!1:f,p=t.padding,m=p===void 0?0:p,_=PV(typeof m!="number"?m:FV(m,tb)),b=h===ib?sge:ib,v=i.rects.popper,w=i.elements[g?b:h],E=Fge(vg(w)?w:w.contextElement||fh(i.elements.popper),l,u,o),I=n_(i.elements.reference),x=zV({reference:I,element:v,strategy:"absolute",placement:r}),T=l8(Object.assign({},v,x)),L=h===ib?T:I,O={top:E.top-L.top+_.top,bottom:L.bottom-E.bottom+_.bottom,left:E.left-L.left+_.left,right:L.right-E.right+_.right},N=i.modifiersData.offset;if(h===ib&&N){var P=N[r];Object.keys(O).forEach(function($){var ne=[pl,gl].indexOf($)>=0?1:-1,z=[na,gl].indexOf($)>=0?"y":"x";O[$]+=P[z]*ne})}return O}function Bge(i,e){e===void 0&&(e={});var t=e,n=t.placement,r=t.boundary,s=t.rootBoundary,o=t.padding,a=t.flipVariations,l=t.allowedAutoPlacements,c=l===void 0?NV:l,u=i_(n),d=u?a?DV:DV.filter(function(g){return i_(g)===u}):tb,h=d.filter(function(g){return c.indexOf(g)>=0});h.length===0&&(h=d,process.env.NODE_ENV!=="production"&&console.error(["Popper: The `allowedAutoPlacements` option did not allow any","placements. Ensure the `placement` option matches the variation","of the allowed placements.",'For example, "auto" cannot be used to allow "bottom-start".','Use "auto-start" instead.'].join(" ")));var f=h.reduce(function(g,p){return g[p]=ab(i,{placement:p,boundary:r,rootBoundary:s,padding:o})[Xl(p)],g},{});return Object.keys(f).sort(function(g,p){return f[g]-f[p]})}function Vge(i){if(Xl(i)===ry)return[];var e=ly(i);return[VV(i),e,VV(e)]}function Wge(i){var e=i.state,t=i.options,n=i.name;if(!e.modifiersData[n]._skip){for(var r=t.mainAxis,s=r===void 0?!0:r,o=t.altAxis,a=o===void 0?!0:o,l=t.fallbackPlacements,c=t.padding,u=t.boundary,d=t.rootBoundary,h=t.altBoundary,f=t.flipVariations,g=f===void 0?!0:f,p=t.allowedAutoPlacements,m=e.options.placement,_=Xl(m),b=_===m,v=l||(b||!g?[ly(m)]:Vge(m)),w=[m].concat(v).reduce(function(De,Ge){return De.concat(Xl(Ge)===ry?Bge(e,{placement:Ge,boundary:u,rootBoundary:d,padding:c,flipVariations:g,allowedAutoPlacements:p}):Ge)},[]),E=e.rects.reference,I=e.rects.popper,x=new Map,T=!0,L=w[0],O=0;O=0,z=ne?"width":"height",K=ab(e,{placement:N,boundary:u,rootBoundary:d,altBoundary:h,padding:c}),ce=ne?$?pl:ia:$?gl:na;E[z]>I[z]&&(ce=ly(ce));var re=ly(ce),B=[];if(s&&B.push(K[P]<=0),a&&B.push(K[ce]<=0,K[re]<=0),B.every(function(De){return De})){L=N,T=!1;break}x.set(N,B)}if(T)for(var Ae=g?3:1,we=function(Ge){var lt=w.find(function(Et){var xt=x.get(Et);if(xt)return xt.slice(0,Ge).every(function(at){return at})});if(lt)return L=lt,"break"},ke=Ae;ke>0;ke--){var ue=we(ke);if(ue==="break")break}e.placement!==L&&(e.modifiersData[n]._skip=!0,e.placement=L,e.reset=!0)}}const Hge={name:"flip",enabled:!0,phase:"main",fn:Wge,requiresIfExists:["offset"],data:{_skip:!1}};function $V(i,e,t){return t===void 0&&(t={x:0,y:0}),{top:i.top-e.height-t.y,right:i.right-e.width+t.x,bottom:i.bottom-e.height+t.y,left:i.left-e.width-t.x}}function UV(i){return[na,pl,gl,ia].some(function(e){return i[e]>=0})}function zge(i){var e=i.state,t=i.name,n=e.rects.reference,r=e.rects.popper,s=e.modifiersData.preventOverflow,o=ab(e,{elementContext:"reference"}),a=ab(e,{altBoundary:!0}),l=$V(o,n),c=$V(a,r,s),u=UV(l),d=UV(c);e.modifiersData[t]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:u,hasPopperEscaped:d},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":d})}const $ge={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:zge};function Uge(i,e,t){var n=Xl(i),r=[ia,na].indexOf(n)>=0?-1:1,s=typeof t=="function"?t(Object.assign({},e,{placement:i})):t,o=s[0],a=s[1];return o=o||0,a=(a||0)*r,[ia,pl].indexOf(n)>=0?{x:a,y:o}:{x:o,y:a}}function jge(i){var e=i.state,t=i.options,n=i.name,r=t.offset,s=r===void 0?[0,0]:r,o=NV.reduce(function(u,d){return u[d]=Uge(d,e.rects,s),u},{}),a=o[e.placement],l=a.x,c=a.y;e.modifiersData.popperOffsets!=null&&(e.modifiersData.popperOffsets.x+=l,e.modifiersData.popperOffsets.y+=c),e.modifiersData[n]=o}const qge={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:jge};function Gge(i){var e=i.state,t=i.name;e.modifiersData[t]=zV({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})}const Kge={name:"popperOffsets",enabled:!0,phase:"read",fn:Gge,data:{}};function Yge(i){return i==="x"?"y":"x"}function Zge(i){var e=i.state,t=i.options,n=i.name,r=t.mainAxis,s=r===void 0?!0:r,o=t.altAxis,a=o===void 0?!1:o,l=t.boundary,c=t.rootBoundary,u=t.altBoundary,d=t.padding,h=t.tether,f=h===void 0?!0:h,g=t.tetherOffset,p=g===void 0?0:g,m=ab(e,{boundary:l,rootBoundary:c,padding:d,altBoundary:u}),_=Xl(e.placement),b=i_(e.placement),v=!b,w=r8(_),E=Yge(w),I=e.modifiersData.popperOffsets,x=e.rects.reference,T=e.rects.popper,L=typeof p=="function"?p(Object.assign({},e.rects,{placement:e.placement})):p,O=typeof L=="number"?{mainAxis:L,altAxis:L}:Object.assign({mainAxis:0,altAxis:0},L),N=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,P={x:0,y:0};if(I){if(s){var $,ne=w==="y"?na:ia,z=w==="y"?gl:pl,K=w==="y"?"height":"width",ce=I[w],re=ce+m[ne],B=ce-m[z],Ae=f?-T[K]/2:0,we=b===e_?x[K]:T[K],ke=b===e_?-T[K]:-x[K],ue=e.elements.arrow,De=f&&ue?i8(ue):{width:0,height:0},Ge=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:MV(),lt=Ge[ne],Et=Ge[z],xt=sb(0,x[K],De[K]),at=v?x[K]/2-Ae-xt-lt-O.mainAxis:we-xt-lt-O.mainAxis,Rt=v?-x[K]/2+Ae+xt+Et+O.mainAxis:ke+xt+Et+O.mainAxis,bt=e.elements.arrow&&rb(e.elements.arrow),un=bt?w==="y"?bt.clientTop||0:bt.clientLeft||0:0,Lt=($=N==null?void 0:N[w])!=null?$:0,Zt=ce+at-Lt-un,ln=ce+Rt-Lt,rn=sb(f?sy(re,Zt):re,ce,f?wg(B,ln):B);I[w]=rn,P[w]=rn-ce}if(a){var Ct,gt=w==="x"?na:ia,Re=w==="x"?gl:pl,G=I[E],ge=E==="y"?"height":"width",pe=G+m[gt],q=G-m[Re],ee=[na,ia].indexOf(_)!==-1,te=(Ct=N==null?void 0:N[E])!=null?Ct:0,j=ee?pe:G-x[ge]-T[ge]-te+O.altAxis,Y=ee?G+x[ge]+T[ge]-te-O.altAxis:q,Oe=f&&ee?wge(j,G,Y):sb(f?j:pe,G,f?Y:q);I[E]=Oe,P[E]=Oe-G}e.modifiersData[n]=P}}const Xge={name:"preventOverflow",enabled:!0,phase:"main",fn:Zge,requiresIfExists:["offset"]};function Qge(i){return{scrollLeft:i.scrollLeft,scrollTop:i.scrollTop}}function Jge(i){return i===ml(i)||!Ma(i)?s8(i):Qge(i)}function epe(i){var e=i.getBoundingClientRect(),t=t_(e.width)/i.offsetWidth||1,n=t_(e.height)/i.offsetHeight||1;return t!==1||n!==1}function tpe(i,e,t){t===void 0&&(t=!1);var n=Ma(e),r=Ma(e)&&epe(e),s=fh(e),o=n_(i,r,t),a={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(n||!n&&!t)&&((Bc(e)!=="body"||a8(s))&&(a=Jge(e)),Ma(e)?(l=n_(e,!0),l.x+=e.clientLeft,l.y+=e.clientTop):s&&(l.x=o8(s))),{x:o.left+a.scrollLeft-l.x,y:o.top+a.scrollTop-l.y,width:o.width,height:o.height}}function npe(i){var e=new Map,t=new Set,n=[];i.forEach(function(s){e.set(s.name,s)});function r(s){t.add(s.name);var o=[].concat(s.requires||[],s.requiresIfExists||[]);o.forEach(function(a){if(!t.has(a)){var l=e.get(a);l&&r(l)}}),n.push(s)}return i.forEach(function(s){t.has(s.name)||r(s)}),n}function ipe(i){var e=npe(i);return e8.reduce(function(t,n){return t.concat(e.filter(function(r){return r.phase===n}))},[])}function rpe(i){var e;return function(){return e||(e=new Promise(function(t){Promise.resolve().then(function(){e=void 0,t(i())})})),e}}function gh(i){for(var e=arguments.length,t=new Array(e>1?e-1:0),n=1;n100)){console.error(cpe);break}if(u.reset===!0){u.reset=!1,E=-1;continue}var I=u.orderedModifiers[E],x=I.fn,T=I.options,L=T===void 0?{}:T,O=I.name;typeof x=="function"&&(u=x({state:u,options:L,name:O,instance:f})||u)}}},update:rpe(function(){return new Promise(function(m){f.forceUpdate(),m(u)})}),destroy:function(){p(),h=!0}};if(!KV(a,l))return process.env.NODE_ENV!=="production"&&console.error(qV),f;f.setOptions(c).then(function(m){!h&&c.onFirstUpdate&&c.onFirstUpdate(m)});function g(){u.orderedModifiers.forEach(function(m){var _=m.name,b=m.options,v=b===void 0?{}:b,w=m.effect;if(typeof w=="function"){var E=w({state:u,name:_,instance:f,options:v}),I=function(){};d.push(E||I)}})}function p(){d.forEach(function(m){return m()}),d=[]}return f}}var dpe=[Dge,Kge,Tge,_ge,qge,Hge,Xge,kge,$ge],hpe=upe({defaultModifiers:dpe});function fpe(i){let e=null,t,n,r=i;const s=()=>{t!==void 0&&n!==void 0&&(e=hpe(t,n,r))},o=()=>{e!==null&&(e.destroy(),e=null)},a=u=>"subscribe"in u?(l(u),{}):(t=u,s(),{destroy(){o()}}),l=u=>{const d=u.subscribe(h=>{t===void 0?(t=h,s()):(Object.assign(t,h),e==null||e.update())});Zm(d)};return[a,(u,d)=>(n=u,r={...i,...d},s(),{update(h){r={...i,...h},e==null||e.setOptions(r)},destroy(){o()}}),()=>e]}const cy=16;function gpe(i){let e;return{c(){e=V("div"),this.h()},l(t){e=W(t,"DIV",{class:!0,style:!0}),M(e).forEach(S),this.h()},h(){y(e,"class","animate-skeleton [animation-delay:1000ms]"),Ye(e,"height",i[0].h*cy+"px"),Ye(e,"width",i[0].w+"%"),Ye(e,"min-width",i[0].minW+"px")},m(t,n){F(t,e,n)},p(t,[n]){n&1&&Ye(e,"height",t[0].h*cy+"px"),n&1&&Ye(e,"width",t[0].w+"%"),n&1&&Ye(e,"min-width",t[0].minW+"px")},i:fe,o:fe,d(t){t&&S(e)}}}function ppe(i,e,t){let{element:n}=e;return i.$$set=r=>{"element"in r&&t(0,n=r.element)},[n]}class YV extends Ue{constructor(e){super(),je(this,e,ppe,gpe,Ve,{element:0})}}function ZV(i,e,t){const n=i.slice();return n[4]=e[t],n}function XV(i,e,t){const n=i.slice();return n[13]=e[t],n}function QV(i,e,t){const n=i.slice();n[7]=e[t];const r=typeof n[7]=="number"?{h:n[7],w:100/n[4].length,minW:0}:n[7];return n[8]=r,n}function mpe(i){const e=i.slice(),t=e[4];return e[11]=t.elements,e[12]=t.h,e}function JV(i){let e,t,n,r,s,o=i[0],a=[];for(let c=0;cA(a[c],1,1,()=>{a[c]=null});return{c(){e=V("div"),t=V("div");for(let c=0;c{r=iB(t,rh,{duration:1e3}),r.start()}),s=!0}},o(c){a=a.filter(Boolean);for(let u=0;uA(r[o],1,1,()=>{r[o]=null});return{c(){for(let o=0;oA(r[o],1,1,()=>{r[o]=null});return{c(){for(let o=0;o{l[f]=null}),Be(),r=l[n],r?r.p(u(d,n),h):(r=l[n]=a[n](u(d,n)),r.c()),D(r,1),r.m(e,s))},i(d){o||(D(r),o=!0)},o(d){A(r),o=!1},d(d){d&&S(e),l[n].d()}}}function wpe(i){let e,t,n=i[1]&&JV(i);return{c(){n&&n.c(),e=Me()},l(r){n&&n.l(r),e=Me()},m(r,s){n&&n.m(r,s),F(r,e,s),t=!0},p(r,[s]){r[1]?n?(n.p(r,s),s&2&&D(n,1)):(n=JV(r),n.c(),D(n,1),n.m(e.parentNode,e)):n&&(Fe(),A(n,1,1,()=>{n=null}),Be())},i(r){t||(D(n),t=!0)},o(r){A(n),t=!1},d(r){n&&n.d(r),r&&S(e)}}}function Cpe(i,e,t){let{layout:n}=e,{loading:r=!0}=e,{overlay:s=!1}=e;return i.$$set=o=>{t(3,e=Qe(Qe({},e),Bt(o))),"layout"in o&&t(0,n=o.layout),"loading"in o&&t(1,r=o.loading),"overlay"in o&&t(2,s=o.overlay)},e=Bt(e),[n,r,s,e]}class yg extends Ue{constructor(e){super(),je(this,e,Cpe,wpe,Ve,{layout:0,loading:1,overlay:2})}}function ype(i){let e;const t=i[8].default,n=Ut(t,i,i[10],null);return{c(){n&&n.c()},l(r){n&&n.l(r)},m(r,s){n&&n.m(r,s),e=!0},p(r,s){n&&n.p&&(!e||s&1024)&&qt(n,t,r,r[10],e?jt(t,r[10],s,null):Gt(r[10]),null)},i(r){e||(D(n,r),e=!0)},o(r){A(n,r),e=!1},d(r){n&&n.d(r)}}}function Spe(i){let e,t;const n=[i[7],{title:i[3]},{btnClasses:li("border-gray-200 focus:ring-0 w-full",i[1]==="left"?"rounded-none rounded-l-lg border":"",i[1]==="center"?"rounded-none border-t border-b border-r":"",i[1]==="right"?"rounded-none rounded-r-md border-r border-y":"")},{color:i[4]===i[0]?i[2]?"gray":"dark":"light"},{variant:"contained"}];let r={$$slots:{default:[ype]},$$scope:{ctx:i}};for(let s=0;st(4,n=f));const h=()=>u(o);return i.$$set=f=>{t(7,e=Qe(Qe({},e),Bt(f))),"value"in f&&t(0,o=f.value),"position"in f&&t(1,a=f.position),"light"in f&&t(2,l=f.light),"title"in f&&t(3,c=f.title),"$$scope"in f&&t(10,s=f.$$scope)},e=Bt(e),[o,a,l,c,n,u,d,e,r,h,s]}class _l extends Ue{constructor(e){super(),je(this,e,kpe,Spe,Ve,{value:0,position:1,light:2,title:3})}}function Epe(i){let e,t,n;const r=i[6].default,s=Ut(r,i,i[5],null);return{c(){e=V("div"),s&&s.c(),this.h()},l(o){e=W(o,"DIV",{class:!0,role:!0});var a=M(e);s&&s.l(a),a.forEach(S),this.h()},h(){y(e,"class",t="flex rounded-md "+i[2].class),y(e,"role","group"),vt(e,"flex-col",i[0])},m(o,a){F(o,e,a),s&&s.m(e,null),n=!0},p(o,[a]){s&&s.p&&(!n||a&32)&&qt(s,r,o,o[5],n?jt(r,o[5],a,null):Gt(o[5]),null),(!n||a&4&&t!==(t="flex rounded-md "+o[2].class))&&y(e,"class",t),(!n||a&5)&&vt(e,"flex-col",o[0])},i(o){n||(D(s,o),n=!0)},o(o){A(s,o),n=!1},d(o){o&&S(e),s&&s.d(o)}}}function xpe(i,e,t){let n,{$$slots:r={},$$scope:s}=e,{selected:o}=e,{col:a=!1}=e;const l=dr(),c=er(o);zt(i,c,d=>t(4,n=d));function u(d){c.set(d)}return JF("ToggleButtonGroup",{selected:c,select:d=>{c.set(d),t(3,o=d)}}),i.$$set=d=>{t(2,e=Qe(Qe({},e),Bt(d))),"selected"in d&&t(3,o=d.selected),"col"in d&&t(0,a=d.col),"$$scope"in d&&t(5,s=d.$$scope)},i.$$.update=()=>{i.$$.dirty&8&&u(o),i.$$.dirty&16&&n&&l("selected",n)},e=Bt(e),[a,c,e,o,n,s,r]}class lb extends Ue{constructor(e){super(),je(this,e,xpe,Epe,Ve,{selected:3,col:0})}}function iW(i,e,t){const n=i.slice();return n[13]=e[t],n[15]=t,n}function rW(i){let e,t,n=i[0],r=[];for(let o=0;oA(r[o],1,1,()=>{r[o]=null});return{c(){for(let o=0;o{u=null}),Be()),(!a||h&1)&&n!==(n=d[13].displayName+"")&&pt(r,n),(!a||h&2&&o!==(o="user-menu-item-"+d[1]+"-"+d[15]+"}"))&&y(e,"id",o),(!a||h&1)&&vt(e,"bg-gray-50",d[13].disabled)},i(d){a||(D(u),a=!0)},o(d){A(u),a=!1},d(d){d&&S(e),u&&u.d(),l=!1,c()}}}function Tpe(i){let e,t,n=i[13].displayName+"",r,s,o,a,l,c,u,d,h=i[13].icon&&oW(i);function f(){return i[10](i[13])}return{c(){e=V("a"),h&&h.c(),t=ae(),r=me(n),s=ae(),this.h()},l(g){e=W(g,"A",{href:!0,class:!0,role:!0,tabindex:!0,id:!0});var p=M(e);h&&h.l(p),t=le(p),r=_e(p,n),s=le(p),p.forEach(S),this.h()},h(){y(e,"href",o=i[13].href),y(e,"class",a="block w-full px-4 font-semibold text-left py-2 text-sm text-gray-700 hover:drop-shadow-sm hover:bg-gray-50 hover:bg-opacity-30 "+(i[13].disabled?"bg-gray-200":"")),y(e,"role","menuitem"),y(e,"tabindex","-1"),y(e,"id",l="user-menu-item-"+i[1]+"-"+i[15]+"}"),vt(e,"disabled",i[13].disabled)},m(g,p){F(g,e,p),h&&h.m(e,null),R(e,t),R(e,r),R(e,s),c=!0,u||(d=Pe(e,"click",is($s(f))),u=!0)},p(g,p){i=g,i[13].icon?h?(h.p(i,p),p&1&&D(h,1)):(h=oW(i),h.c(),D(h,1),h.m(e,t)):h&&(Fe(),A(h,1,1,()=>{h=null}),Be()),(!c||p&1)&&n!==(n=i[13].displayName+"")&&pt(r,n),(!c||p&1&&o!==(o=i[13].href))&&y(e,"href",o),(!c||p&1&&a!==(a="block w-full px-4 font-semibold text-left py-2 text-sm text-gray-700 hover:drop-shadow-sm hover:bg-gray-50 hover:bg-opacity-30 "+(i[13].disabled?"bg-gray-200":"")))&&y(e,"class",a),(!c||p&2&&l!==(l="user-menu-item-"+i[1]+"-"+i[15]+"}"))&&y(e,"id",l),(!c||p&1)&&vt(e,"disabled",i[13].disabled)},i(g){c||(D(h),c=!0)},o(g){A(h),c=!1},d(g){g&&S(e),h&&h.d(),u=!1,d()}}}function Ipe(i){let e,t,n=i[13].displayName+"",r,s,o,a,l,c,u,d,h=i[13].icon&&aW(i);function f(...g){return i[9](i[13],i[12],...g)}return{c(){e=V("button"),h&&h.c(),t=ae(),r=me(n),s=ae(),this.h()},l(g){e=W(g,"BUTTON",{class:!0,role:!0,tabindex:!0,id:!0});var p=M(e);h&&h.l(p),t=le(p),r=_e(p,n),s=le(p),p.forEach(S),this.h()},h(){y(e,"class",o="block w-full whitespace-nowrap hover:drop-shadow-sm hover:bg-gray-50 hover:bg-opacity-30 px-4 py-2 text-sm text-gray-700 text-left "+(i[13].disabled?"bg-gray-200":"")+" "+(i[13].separatorTop?"border-t":"")+" "+(i[13].separatorBottom?"border-b":"")+" "+(i[13].type=="delete"?"text-red-500":"")),y(e,"role","menuitem"),y(e,"tabindex","-1"),y(e,"id",a="user-menu-item-"+i[1]+"-"+i[15]+"}"),e.disabled=l=i[13].disabled},m(g,p){F(g,e,p),h&&h.m(e,null),R(e,t),R(e,r),R(e,s),c=!0,u||(d=Pe(e,"click",is($s(f))),u=!0)},p(g,p){i=g,i[13].icon?h?(h.p(i,p),p&1&&D(h,1)):(h=aW(i),h.c(),D(h,1),h.m(e,t)):h&&(Fe(),A(h,1,1,()=>{h=null}),Be()),(!c||p&1)&&n!==(n=i[13].displayName+"")&&pt(r,n),(!c||p&1&&o!==(o="block w-full whitespace-nowrap hover:drop-shadow-sm hover:bg-gray-50 hover:bg-opacity-30 px-4 py-2 text-sm text-gray-700 text-left "+(i[13].disabled?"bg-gray-200":"")+" "+(i[13].separatorTop?"border-t":"")+" "+(i[13].separatorBottom?"border-b":"")+" "+(i[13].type=="delete"?"text-red-500":"")))&&y(e,"class",o),(!c||p&2&&a!==(a="user-menu-item-"+i[1]+"-"+i[15]+"}"))&&y(e,"id",a),(!c||p&1&&l!==(l=i[13].disabled))&&(e.disabled=l)},i(g){c||(D(h),c=!0)},o(g){A(h),c=!1},d(g){g&&S(e),h&&h.d(),u=!1,d()}}}function sW(i){let e,t;return e=new fr({props:{data:i[13].icon,scale:.6,class:"inline mr-2 "+(i[13].type=="delete"?"text-red-500":"text-gray-700")}}),{c(){Q(e.$$.fragment)},l(n){J(e.$$.fragment,n)},m(n,r){Z(e,n,r),t=!0},p(n,r){const s={};r&1&&(s.data=n[13].icon),r&1&&(s.class="inline mr-2 "+(n[13].type=="delete"?"text-red-500":"text-gray-700")),e.$set(s)},i(n){t||(D(e.$$.fragment,n),t=!0)},o(n){A(e.$$.fragment,n),t=!1},d(n){X(e,n)}}}function oW(i){let e,t;return e=new fr({props:{data:i[13].icon,scale:.6,class:"inline mr-2 "+(i[13].type=="delete"?"text-red-500":"text-gray-700")}}),{c(){Q(e.$$.fragment)},l(n){J(e.$$.fragment,n)},m(n,r){Z(e,n,r),t=!0},p(n,r){const s={};r&1&&(s.data=n[13].icon),r&1&&(s.class="inline mr-2 "+(n[13].type=="delete"?"text-red-500":"text-gray-700")),e.$set(s)},i(n){t||(D(e.$$.fragment,n),t=!0)},o(n){A(e.$$.fragment,n),t=!1},d(n){X(e,n)}}}function aW(i){let e,t;return e=new fr({props:{data:i[13].icon,scale:.6,class:"inline mr-2 "+(i[13].type=="delete"?"text-red-500":"text-gray-700")}}),{c(){Q(e.$$.fragment)},l(n){J(e.$$.fragment,n)},m(n,r){Z(e,n,r),t=!0},p(n,r){const s={};r&1&&(s.data=n[13].icon),r&1&&(s.class="inline mr-2 "+(n[13].type=="delete"?"text-red-500":"text-gray-700")),e.$set(s)},i(n){t||(D(e.$$.fragment,n),t=!0)},o(n){A(e.$$.fragment,n),t=!1},d(n){X(e,n)}}}function lW(i){let e,t,n,r;const s=[Ipe,Tpe,Lpe],o=[];function a(l,c){return l[13].action?0:l[13].href&&!l[13].disabled?1:2}return e=a(i),t=o[e]=s[e](i),{c(){t.c(),n=Me()},l(l){t.l(l),n=Me()},m(l,c){o[e].m(l,c),F(l,n,c),r=!0},p(l,c){let u=e;e=a(l),e===u?o[e].p(l,c):(Fe(),A(o[u],1,1,()=>{o[u]=null}),Be(),t=o[e],t?t.p(l,c):(t=o[e]=s[e](l),t.c()),D(t,1),t.m(n.parentNode,n))},i(l){r||(D(t),r=!0)},o(l){A(t),r=!1},d(l){o[e].d(l),l&&S(n)}}}function Dpe(i){let e,t,n=i[0]&&rW(i);return{c(){n&&n.c(),e=Me()},l(r){n&&n.l(r),e=Me()},m(r,s){n&&n.m(r,s),F(r,e,s),t=!0},p(r,s){r[0]?n?(n.p(r,s),s&1&&D(n,1)):(n=rW(r),n.c(),D(n,1),n.m(e.parentNode,e)):n&&(Fe(),A(n,1,1,()=>{n=null}),Be())},i(r){t||(D(n),t=!0)},o(r){A(n),t=!1},d(r){n&&n.d(r),r&&S(e)}}}function Npe(i){let e;const t=i[7].default,n=Ut(t,i,i[11],null);return{c(){n&&n.c()},l(r){n&&n.l(r)},m(r,s){n&&n.m(r,s),e=!0},p(r,s){n&&n.p&&(!e||s&2048)&&qt(n,t,r,r[11],e?jt(t,r[11],s,null):Gt(r[11]),null)},i(r){e||(D(n,r),e=!0)},o(r){A(n,r),e=!1},d(r){n&&n.d(r)}}}function Ape(i){let e,t;return e=new ufe({props:{size:20}}),{c(){Q(e.$$.fragment)},l(n){J(e.$$.fragment,n)},m(n,r){Z(e,n,r),t=!0},p:fe,i(n){t||(D(e.$$.fragment,n),t=!0)},o(n){A(e.$$.fragment,n),t=!1},d(n){X(e,n)}}}function Rpe(i){let e,t,n,r;const s=[Ape,Npe],o=[];function a(l,c){return l[6].default?1:0}return e=a(i),t=o[e]=s[e](i),{c(){t.c(),n=Me()},l(l){t.l(l),n=Me()},m(l,c){o[e].m(l,c),F(l,n,c),r=!0},p(l,c){let u=e;e=a(l),e===u?o[e].p(l,c):(Fe(),A(o[u],1,1,()=>{o[u]=null}),Be(),t=o[e],t?t.p(l,c):(t=o[e]=s[e](l),t.c()),D(t,1),t.m(n.parentNode,n))},i(l){r||(D(t),r=!0)},o(l){A(t),r=!1},d(l){o[e].d(l),l&&S(n)}}}function Ope(i){let e,t;const n=[{nonCaptureEvent:!0},{color:"light"},{size:"xs"},{btnClasses:i[3]},i[5],{slot:"trigger"}];let r={$$slots:{default:[Rpe]},$$scope:{ctx:i}};for(let s=0;s({12:n}),({close:n})=>n?4096:0],default:[Dpe,({close:n})=>({12:n}),({close:n})=>n?4096:0]},$$scope:{ctx:i}}}),{c(){Q(e.$$.fragment)},l(n){J(e.$$.fragment,n)},m(n,r){Z(e,n,r),t=!0},p(n,[r]){const s={};r&4&&(s.placement=n[2]),r&6251&&(s.$$scope={dirty:r,ctx:n}),e.$set(s)},i(n){t||(D(e.$$.fragment,n),t=!0)},o(n){A(e.$$.fragment,n),t=!1},d(n){X(e,n)}}}function Ppe(i,e,t){const n=["dropdownItems","name","placement","btnClasses"];let r=ea(e,n),{$$slots:s={},$$scope:o}=e;const a=OL(s);let{dropdownItems:l}=e,{name:c=void 0}=e,{placement:u="bottom-start"}=e,{btnClasses:d="!text-blue-500 bg-transparent"}=e;const h=dr();function f(m){hr.call(this,i,m)}const g=(m,_,b)=>{m.disabled||(_(),m.action&&m.action(b),h("click",{item:m==null?void 0:m.eventName}))},p=m=>Tde(m.href??"");return i.$$set=m=>{e=Qe(Qe({},e),Bt(m)),t(5,r=ea(e,n)),"dropdownItems"in m&&t(0,l=m.dropdownItems),"name"in m&&t(1,c=m.name),"placement"in m&&t(2,u=m.placement),"btnClasses"in m&&t(3,d=m.btnClasses),"$$scope"in m&&t(11,o=m.$$scope)},[l,c,u,d,h,r,a,s,f,g,p,o]}class Fpe extends Ue{constructor(e){super(),je(this,e,Ppe,Mpe,Ve,{dropdownItems:0,name:1,placement:2,btnClasses:3})}}function Bpe(i){let e,t;return e=new aV({props:{class:i[0]?"animate-spin":"",size:16}}),{c(){Q(e.$$.fragment)},l(n){J(e.$$.fragment,n)},m(n,r){Z(e,n,r),t=!0},p(n,r){const s={};r&1&&(s.class=n[0]?"animate-spin":""),e.$set(s)},i(n){t||(D(e.$$.fragment,n),t=!0)},o(n){A(e.$$.fragment,n),t=!1},d(n){X(e,n)}}}function Vpe(i){let e,t=i[2]?`${i[2]/1e3}s`:"once",n,r,s,o;return s=new Whe({props:{class:"ml-0.5",size:14}}),{c(){e=V("span"),n=me(t),r=ae(),Q(s.$$.fragment),this.h()},l(a){e=W(a,"SPAN",{class:!0});var l=M(e);n=_e(l,t),l.forEach(S),r=le(a),J(s.$$.fragment,a),this.h()},h(){y(e,"class","grow text center")},m(a,l){F(a,e,l),R(e,n),F(a,r,l),Z(s,a,l),o=!0},p(a,l){(!o||l&4)&&t!==(t=a[2]?`${a[2]/1e3}s`:"once")&&pt(n,t)},i(a){o||(D(s.$$.fragment,a),o=!0)},o(a){A(s.$$.fragment,a),o=!1},d(a){a&&S(e),a&&S(r),X(s,a)}}}function Wpe(i){let e,t,n,r,s;return t=new En({props:{color:i[1]?"blue":"light",variant:i[1]?"contained":"border",size:"xs",btnClasses:"!rounded-r-none "+(i[1]?"!border !border-blue-500":""),title:"Refresh "+i[3]+" component"+(i[3]>1?"s":"")+" "+(i[2]?`every ${i[2]/1e3} seconds`:"once"),$$slots:{default:[Bpe]},$$scope:{ctx:i}}}),t.$on("click",i[8]),r=new Fpe({props:{btnClasses:"!rounded-l-none !border-l-0 min-w-[4rem] !px-2",color:i[1]?"blue":"light",variant:"border",dropdownItems:[{displayName:"Once",action:i[9]},...[1,2,3,4,5,6].map(i[10])],$$slots:{default:[Vpe]},$$scope:{ctx:i}}}),{c(){e=V("div"),Q(t.$$.fragment),n=ae(),Q(r.$$.fragment),this.h()},l(o){e=W(o,"DIV",{class:!0});var a=M(e);J(t.$$.fragment,a),n=le(a),J(r.$$.fragment,a),a.forEach(S),this.h()},h(){y(e,"class","flex items-center")},m(o,a){F(o,e,a),Z(t,e,null),R(e,n),Z(r,e,null),s=!0},p(o,[a]){const l={};a&2&&(l.color=o[1]?"blue":"light"),a&2&&(l.variant=o[1]?"contained":"border"),a&2&&(l.btnClasses="!rounded-r-none "+(o[1]?"!border !border-blue-500":"")),a&12&&(l.title="Refresh "+o[3]+" component"+(o[3]>1?"s":"")+" "+(o[2]?`every ${o[2]/1e3} seconds`:"once")),a&16385&&(l.$$scope={dirty:a,ctx:o}),t.$set(l);const c={};a&2&&(c.color=o[1]?"blue":"light"),a&16388&&(c.$$scope={dirty:a,ctx:o}),r.$set(c)},i(o){s||(D(t.$$.fragment,o),D(r.$$.fragment,o),s=!0)},o(o){A(t.$$.fragment,o),A(r.$$.fragment,o),s=!1},d(o){o&&S(e),X(t),X(r)}}}function Hpe(i,e,t){let n,r;const{runnableComponents:s}=jr("AppEditorContext");zt(i,s,_=>t(7,r=_));let o=!1,a,l,c=!1;function u(_=!0){a&&(clearInterval(a),t(1,a=void 0),c=!1,_)||(h(),l&&(c=!0,t(1,a=setInterval(h,l))))}function d(_){t(2,l=_),u(!_)}function h(){t(0,o=!0),Promise.all(Object.keys(r).map(_=>{var b;return(b=r==null?void 0:r[_])==null?void 0:b.call(r)})).finally(()=>{t(0,o=!1)})}function f(){document.visibilityState==="hidden"?a&&(clearInterval(a),t(1,a=void 0)):c&&t(1,a=setInterval(h,l))}Oo(()=>(document.addEventListener("visibilitychange",f),()=>{document.removeEventListener("visibilitychange",f),a&&clearInterval(a)}));const g=()=>u(),p=()=>d(void 0),m=_=>({displayName:`Every ${_*5} seconds`,action:()=>d(_*5e3)});return i.$$.update=()=>{i.$$.dirty&128&&t(3,n=Object.keys(r).length)},[o,a,l,n,s,u,d,r,g,p,m]}class zpe extends Ue{constructor(e){super(),je(this,e,Hpe,Wpe,Ve,{})}}function $pe(i){let e,t,n=i[1]!=""?`${i[1]}`:"",r,s,o;return{c(){e=V("span"),t=me("("),r=me(n),s=me(")"),this.h()},l(a){e=W(a,"SPAN",{class:!0});var l=M(e);t=_e(l,"("),r=_e(l,n),s=_e(l,")"),l.forEach(S),this.h()},h(){y(e,"class",o="text-sm text-gray-500 ml-2 font-normal "+i[2].class)},m(a,l){F(a,e,l),R(e,t),R(e,r),R(e,s)},p(a,l){l&2&&n!==(n=a[1]!=""?`${a[1]}`:"")&&pt(r,n),l&4&&o!==(o="text-sm text-gray-500 ml-2 font-normal "+a[2].class)&&y(e,"class",o)},d(a){a&&S(e)}}}function Upe(i){let e,t,n;return{c(){e=V("span"),t=me("*"),this.h()},l(r){e=W(r,"SPAN",{class:!0});var s=M(e);t=_e(s,"*"),s.forEach(S),this.h()},h(){y(e,"class",n="text-red-700 font-normal "+i[2].class)},m(r,s){F(r,e,s),R(e,t)},p(r,s){s&4&&n!==(n="text-red-700 font-normal "+r[2].class)&&y(e,"class",n)},d(r){r&&S(e)}}}function jpe(i){let e;function t(s,o){if(s[0])return Upe;if(s[1]||s[1]!="")return $pe}let n=t(i),r=n&&n(i);return{c(){r&&r.c(),e=Me()},l(s){r&&r.l(s),e=Me()},m(s,o){r&&r.m(s,o),F(s,e,o)},p(s,[o]){n===(n=t(s))&&r?r.p(s,o):(r&&r.d(1),r=n&&n(s),r&&(r.c(),r.m(e.parentNode,e)))},i:fe,o:fe,d(s){r&&r.d(s),s&&S(e)}}}function qpe(i,e,t){let{required:n}=e,{detail:r=""}=e;return i.$$set=s=>{t(2,e=Qe(Qe({},e),Bt(s))),"required"in s&&t(0,n=s.required),"detail"in s&&t(1,r=s.detail)},e=Bt(e),[n,r,e]}class uy extends Ue{constructor(e){super(),je(this,e,qpe,jpe,Ve,{required:0,detail:1})}}function Gpe(i){var v,w;let e,t,n,r,s,o,a,l,c=(i[3]??"any")+"",u,d=i[2]&&i[2]!=""?`, encoding: ${i[2]}`:"",h,f=i[1]&&i[1]!=""?`, format: ${i[1]}`:"",g,p=(v=i[5])!=null&&v.type?` of ${(w=i[5])==null?void 0:w.type}s`:"",m,_,b;return s=new uy({props:{required:i[4],class:"!ml-0"}}),{c(){e=V("div"),t=V("span"),n=me(i[0]),r=ae(),Q(s.$$.fragment),o=ae(),a=V("span"),l=me("("),u=me(c),h=me(d),g=me(f),m=me(p),_=me(")"),this.h()},l(E){e=W(E,"DIV",{class:!0});var I=M(e);t=W(I,"SPAN",{class:!0});var x=M(t);n=_e(x,i[0]),x.forEach(S),r=le(I),J(s.$$.fragment,I),o=le(I),a=W(I,"SPAN",{class:!0});var T=M(a);l=_e(T,"("),u=_e(T,c),h=_e(T,d),g=_e(T,f),m=_e(T,p),_=_e(T,")"),T.forEach(S),I.forEach(S),this.h()},h(){y(t,"class","font-semibold"),y(a,"class","text-sm italic ml-1 text-indigo-800"),y(e,"class","inline-flex flex-row items-center")},m(E,I){F(E,e,I),R(e,t),R(t,n),R(e,r),Z(s,e,null),R(e,o),R(e,a),R(a,l),R(a,u),R(a,h),R(a,g),R(a,m),R(a,_),b=!0},p(E,[I]){var T,L;(!b||I&1)&&pt(n,E[0]);const x={};I&16&&(x.required=E[4]),s.$set(x),(!b||I&8)&&c!==(c=(E[3]??"any")+"")&&pt(u,c),(!b||I&4)&&d!==(d=E[2]&&E[2]!=""?`, encoding: ${E[2]}`:"")&&pt(h,d),(!b||I&2)&&f!==(f=E[1]&&E[1]!=""?`, format: ${E[1]}`:"")&&pt(g,f),(!b||I&32)&&p!==(p=(T=E[5])!=null&&T.type?` of ${(L=E[5])==null?void 0:L.type}s`:"")&&pt(m,p)},i(E){b||(D(s.$$.fragment,E),b=!0)},o(E){A(s.$$.fragment,E),b=!1},d(E){E&&S(e),X(s)}}}function Kpe(i,e,t){let{label:n}=e,{format:r=""}=e,{contentEncoding:s=""}=e,{type:o=void 0}=e,{required:a=!1}=e,{itemsType:l=void 0}=e;return i.$$set=c=>{"label"in c&&t(0,n=c.label),"format"in c&&t(1,r=c.format),"contentEncoding"in c&&t(2,s=c.contentEncoding),"type"in c&&t(3,o=c.type),"required"in c&&t(4,a=c.required),"itemsType"in c&&t(5,l=c.itemsType)},[n,r,s,o,a,l]}class Ype extends Ue{constructor(e){super(),je(this,e,Kpe,Gpe,Ve,{label:0,format:1,contentEncoding:2,type:3,required:4,itemsType:5})}}function cb(i){return i.split("-")[0]}function c8(i){return i.split("-")[1]}function dy(i){return["top","bottom"].includes(cb(i))?"x":"y"}function cW(i){return i==="y"?"height":"width"}function uW(i,e,t){let{reference:n,floating:r}=i;const s=n.x+n.width/2-r.width/2,o=n.y+n.height/2-r.height/2,a=dy(e),l=cW(a),c=n[l]/2-r[l]/2,u=cb(e),d=a==="x";let h;switch(u){case"top":h={x:s,y:n.y-r.height};break;case"bottom":h={x:s,y:n.y+n.height};break;case"right":h={x:n.x+n.width,y:o};break;case"left":h={x:n.x-r.width,y:o};break;default:h={x:n.x,y:n.y}}switch(c8(e)){case"start":h[a]-=c*(t&&d?-1:1);break;case"end":h[a]+=c*(t&&d?-1:1);break}return h}const Zpe=async(i,e,t)=>{const{placement:n="bottom",strategy:r="absolute",middleware:s=[],platform:o}=t,a=s.filter(Boolean),l=await(o.isRTL==null?void 0:o.isRTL(e));if(process.env.NODE_ENV!=="production"){if(o==null&&console.error(["Floating UI: `platform` property was not passed to config. If you","want to use Floating UI on the web, install @floating-ui/dom","instead of the /core package. Otherwise, you can create your own","`platform`: https://floating-ui.com/docs/platform"].join(" ")),a.filter(p=>{let{name:m}=p;return m==="autoPlacement"||m==="flip"}).length>1)throw new Error(["Floating UI: duplicate `flip` and/or `autoPlacement` middleware","detected. This will lead to an infinite loop. Ensure only one of","either has been passed to the `middleware` array."].join(" "));(!i||!e)&&console.error(["Floating UI: The reference and/or floating element was not defined","when `computePosition()` was called. Ensure that both elements have","been created and can be measured."].join(" "))}let c=await o.getElementRects({reference:i,floating:e,strategy:r}),{x:u,y:d}=uW(c,n,l),h=n,f={},g=0;for(let p=0;p50&&console.warn(["Floating UI: The middleware lifecycle appears to be running in an","infinite loop. This is usually caused by a `reset` continually","being returned without a break condition."].join(" ")),E&&g<=50){g++,typeof E=="object"&&(E.placement&&(h=E.placement),E.rects&&(c=E.rects===!0?await o.getElementRects({reference:i,floating:e,strategy:r}):E.rects),{x:u,y:d}=uW(c,h,l)),p=-1;continue}}return{x:u,y:d,placement:h,strategy:r,middlewareData:f}};function Xpe(i){return{top:0,right:0,bottom:0,left:0,...i}}function Qpe(i){return typeof i!="number"?Xpe(i):{top:i,right:i,bottom:i,left:i}}function hy(i){return{...i,top:i.y,left:i.x,right:i.x+i.width,bottom:i.y+i.height}}async function dW(i,e){var t;e===void 0&&(e={});const{x:n,y:r,platform:s,rects:o,elements:a,strategy:l}=i,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:h=!1,padding:f=0}=e,g=Qpe(f),m=a[h?d==="floating"?"reference":"floating":d],_=hy(await s.getClippingRect({element:(t=await(s.isElement==null?void 0:s.isElement(m)))==null||t?m:m.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:l})),b=d==="floating"?{...o.floating,x:n,y:r}:o.reference,v=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a.floating)),w=await(s.isElement==null?void 0:s.isElement(v))?await(s.getScale==null?void 0:s.getScale(v))||{x:1,y:1}:{x:1,y:1},E=hy(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({rect:b,offsetParent:v,strategy:l}):b);return process.env.NODE_ENV,{top:(_.top-E.top+g.top)/w.y,bottom:(E.bottom-_.bottom+g.bottom)/w.y,left:(_.left-E.left+g.left)/w.x,right:(E.right-_.right+g.right)/w.x}}const Jpe=Math.min,eme=Math.max;function hW(i,e,t){return eme(i,Jpe(e,t))}const tme={left:"right",right:"left",bottom:"top",top:"bottom"};function fy(i){return i.replace(/left|right|bottom|top/g,e=>tme[e])}function nme(i,e,t){t===void 0&&(t=!1);const n=c8(i),r=dy(i),s=cW(r);let o=r==="x"?n===(t?"end":"start")?"right":"left":n==="start"?"bottom":"top";return e.reference[s]>e.floating[s]&&(o=fy(o)),{main:o,cross:fy(o)}}const ime={start:"end",end:"start"};function fW(i){return i.replace(/start|end/g,e=>ime[e])}function rme(i){const e=fy(i);return[fW(i),e,fW(e)]}const sme=function(i){return i===void 0&&(i={}),{name:"flip",options:i,async fn(e){var t;const{placement:n,middlewareData:r,rects:s,initialPlacement:o,platform:a,elements:l}=e,{mainAxis:c=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:h="bestFit",flipAlignment:f=!0,...g}=i,p=cb(n),_=d||(p===o||!f?[fy(o)]:rme(o)),b=[o,..._],v=await dW(e,g),w=[];let E=((t=r.flip)==null?void 0:t.overflows)||[];if(c&&w.push(v[p]),u){const{main:L,cross:O}=nme(n,s,await(a.isRTL==null?void 0:a.isRTL(l.floating)));w.push(v[L],v[O])}if(E=[...E,{placement:n,overflows:w}],!w.every(L=>L<=0)){var I,x;const L=((I=(x=r.flip)==null?void 0:x.index)!=null?I:0)+1,O=b[L];if(O)return{data:{index:L,overflows:E},reset:{placement:O}};let N="bottom";switch(h){case"bestFit":{var T;const P=(T=E.map($=>[$,$.overflows.filter(ne=>ne>0).reduce((ne,z)=>ne+z,0)]).sort(($,ne)=>$[1]-ne[1])[0])==null?void 0:T[0].placement;P&&(N=P);break}case"initialPlacement":N=o;break}if(n!==N)return{reset:{placement:N}}}return{}}}};async function ome(i,e){const{placement:t,platform:n,elements:r}=i,s=await(n.isRTL==null?void 0:n.isRTL(r.floating)),o=cb(t),a=c8(t),l=dy(t)==="x",c=["left","top"].includes(o)?-1:1,u=s&&l?-1:1,d=typeof e=="function"?e(i):e;let{mainAxis:h,crossAxis:f,alignmentAxis:g}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return a&&typeof g=="number"&&(f=a==="end"?g*-1:g),l?{x:f*u,y:h*c}:{x:h*c,y:f*u}}const ame=function(i){return i===void 0&&(i=0),{name:"offset",options:i,async fn(e){const{x:t,y:n}=e,r=await ome(e,i);return{x:t+r.x,y:n+r.y,data:r}}}};function lme(i){return i==="x"?"y":"x"}const cme=function(i){return i===void 0&&(i={}),{name:"shift",options:i,async fn(e){const{x:t,y:n,placement:r}=e,{mainAxis:s=!0,crossAxis:o=!1,limiter:a={fn:m=>{let{x:_,y:b}=m;return{x:_,y:b}}},...l}=i,c={x:t,y:n},u=await dW(e,l),d=dy(cb(r)),h=lme(d);let f=c[d],g=c[h];if(s){const m=d==="y"?"top":"left",_=d==="y"?"bottom":"right",b=f+u[m],v=f-u[_];f=hW(b,f,v)}if(o){const m=h==="y"?"top":"left",_=h==="y"?"bottom":"right",b=g+u[m],v=g-u[_];g=hW(b,g,v)}const p=a.fn({...e,[d]:f,[h]:g});return{...p,data:{x:p.x-t,y:p.y-n}}}}};function bl(i){var e;return((e=i.ownerDocument)==null?void 0:e.defaultView)||window}function Vc(i){return bl(i).getComputedStyle(i)}function ph(i){return pW(i)?(i.nodeName||"").toLowerCase():""}let gy;function gW(){if(gy)return gy;const i=navigator.userAgentData;return i&&Array.isArray(i.brands)?(gy=i.brands.map(e=>e.brand+"/"+e.version).join(" "),gy):navigator.userAgent}function Ju(i){return i instanceof bl(i).HTMLElement}function Jl(i){return i instanceof bl(i).Element}function pW(i){return i instanceof bl(i).Node}function mW(i){if(typeof ShadowRoot>"u")return!1;const e=bl(i).ShadowRoot;return i instanceof e||i instanceof ShadowRoot}function py(i){const{overflow:e,overflowX:t,overflowY:n,display:r}=Vc(i);return/auto|scroll|overlay|hidden|clip/.test(e+n+t)&&!["inline","contents"].includes(r)}function ume(i){return["table","td","th"].includes(ph(i))}function u8(i){const e=/firefox/i.test(gW()),t=Vc(i),n=t.backdropFilter||t.WebkitBackdropFilter;return t.transform!=="none"||t.perspective!=="none"||(n?n!=="none":!1)||e&&t.willChange==="filter"||e&&(t.filter?t.filter!=="none":!1)||["transform","perspective"].some(r=>t.willChange.includes(r))||["paint","layout","strict","content"].some(r=>{const s=t.contain;return s!=null?s.includes(r):!1})}function _W(){return!/^((?!chrome|android).)*safari/i.test(gW())}function d8(i){return["html","body","#document"].includes(ph(i))}const bW=Math.min,ub=Math.max,my=Math.round;function vW(i){const e=Vc(i);let t=parseFloat(e.width),n=parseFloat(e.height);const r=i.offsetWidth,s=i.offsetHeight,o=my(t)!==r||my(n)!==s;return o&&(t=r,n=s),{width:t,height:n,fallback:o}}function wW(i){return Jl(i)?i:i.contextElement}const CW={x:1,y:1};function r_(i){const e=wW(i);if(!Ju(e))return CW;const t=e.getBoundingClientRect(),{width:n,height:r,fallback:s}=vW(e);let o=(s?my(t.width):t.width)/n,a=(s?my(t.height):t.height)/r;return(!o||!Number.isFinite(o))&&(o=1),(!a||!Number.isFinite(a))&&(a=1),{x:o,y:a}}function Sg(i,e,t,n){var r,s;e===void 0&&(e=!1),t===void 0&&(t=!1);const o=i.getBoundingClientRect(),a=wW(i);let l=CW;e&&(n?Jl(n)&&(l=r_(n)):l=r_(i));const c=a?bl(a):window,u=!_W()&&t;let d=(o.left+(u&&((r=c.visualViewport)==null?void 0:r.offsetLeft)||0))/l.x,h=(o.top+(u&&((s=c.visualViewport)==null?void 0:s.offsetTop)||0))/l.y,f=o.width/l.x,g=o.height/l.y;if(a){const p=bl(a),m=n&&Jl(n)?bl(n):n;let _=p.frameElement;for(;_&&n&&m!==p;){const b=r_(_),v=_.getBoundingClientRect(),w=getComputedStyle(_);v.x+=(_.clientLeft+parseFloat(w.paddingLeft))*b.x,v.y+=(_.clientTop+parseFloat(w.paddingTop))*b.y,d*=b.x,h*=b.y,f*=b.x,g*=b.y,d+=v.x,h+=v.y,_=bl(_).frameElement}}return{width:f,height:g,top:h,right:d+f,bottom:h+g,left:d,x:d,y:h}}function mh(i){return((pW(i)?i.ownerDocument:i.document)||window.document).documentElement}function _y(i){return Jl(i)?{scrollLeft:i.scrollLeft,scrollTop:i.scrollTop}:{scrollLeft:i.pageXOffset,scrollTop:i.pageYOffset}}function yW(i){return Sg(mh(i)).left+_y(i).scrollLeft}function dme(i,e,t){const n=Ju(e),r=mh(e),s=Sg(i,!0,t==="fixed",e);let o={scrollLeft:0,scrollTop:0};const a={x:0,y:0};if(n||!n&&t!=="fixed")if((ph(e)!=="body"||py(r))&&(o=_y(e)),Ju(e)){const l=Sg(e,!0);a.x=l.x+e.clientLeft,a.y=l.y+e.clientTop}else r&&(a.x=yW(r));return{x:s.left+o.scrollLeft-a.x,y:s.top+o.scrollTop-a.y,width:s.width,height:s.height}}function db(i){if(ph(i)==="html")return i;const e=i.assignedSlot||i.parentNode||(mW(i)?i.host:null)||mh(i);return mW(e)?e.host:e}function SW(i){return!Ju(i)||Vc(i).position==="fixed"?null:i.offsetParent}function hme(i){let e=db(i);for(;Ju(e)&&!d8(e);){if(u8(e))return e;e=db(e)}return null}function kW(i){const e=bl(i);let t=SW(i);for(;t&&ume(t)&&Vc(t).position==="static";)t=SW(t);return t&&(ph(t)==="html"||ph(t)==="body"&&Vc(t).position==="static"&&!u8(t))?e:t||hme(i)||e}function fme(i){return vW(i)}function gme(i){let{rect:e,offsetParent:t,strategy:n}=i;const r=Ju(t),s=mh(t);if(t===s)return e;let o={scrollLeft:0,scrollTop:0},a={x:1,y:1};const l={x:0,y:0};if((r||!r&&n!=="fixed")&&((ph(t)!=="body"||py(s))&&(o=_y(t)),Ju(t))){const c=Sg(t);a=r_(t),l.x=c.x+t.clientLeft,l.y=c.y+t.clientTop}return{width:e.width*a.x,height:e.height*a.y,x:e.x*a.x-o.scrollLeft*a.x+l.x,y:e.y*a.y-o.scrollTop*a.y+l.y}}function pme(i,e){const t=bl(i),n=mh(i),r=t.visualViewport;let s=n.clientWidth,o=n.clientHeight,a=0,l=0;if(r){s=r.width,o=r.height;const c=_W();(c||!c&&e==="fixed")&&(a=r.offsetLeft,l=r.offsetTop)}return{width:s,height:o,x:a,y:l}}function mme(i){var e;const t=mh(i),n=_y(i),r=(e=i.ownerDocument)==null?void 0:e.body,s=ub(t.scrollWidth,t.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),o=ub(t.scrollHeight,t.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0);let a=-n.scrollLeft+yW(i);const l=-n.scrollTop;return Vc(r||t).direction==="rtl"&&(a+=ub(t.clientWidth,r?r.clientWidth:0)-s),{width:s,height:o,x:a,y:l}}function EW(i){const e=db(i);return d8(e)?i.ownerDocument.body:Ju(e)&&py(e)?e:EW(e)}function hb(i,e){var t;e===void 0&&(e=[]);const n=EW(i),r=n===((t=i.ownerDocument)==null?void 0:t.body),s=bl(n);return r?e.concat(s,s.visualViewport||[],py(n)?n:[]):e.concat(n,hb(n))}function _me(i,e){const t=Sg(i,!0,e==="fixed"),n=t.top+i.clientTop,r=t.left+i.clientLeft,s=Ju(i)?r_(i):{x:1,y:1},o=i.clientWidth*s.x,a=i.clientHeight*s.y,l=r*s.x,c=n*s.y;return{top:c,left:l,right:l+o,bottom:c+a,x:l,y:c,width:o,height:a}}function xW(i,e,t){return e==="viewport"?hy(pme(i,t)):Jl(e)?_me(e,t):hy(mme(mh(i)))}function bme(i,e){const t=e.get(i);if(t)return t;let n=hb(i).filter(a=>Jl(a)&&ph(a)!=="body"),r=null;const s=Vc(i).position==="fixed";let o=s?db(i):i;for(;Jl(o)&&!d8(o);){const a=Vc(o),l=u8(o);(s?!l&&!r:!l&&a.position==="static"&&!!r&&["absolute","fixed"].includes(r.position))?n=n.filter(u=>u!==o):r=a,o=db(o)}return e.set(i,n),n}function vme(i){let{element:e,boundary:t,rootBoundary:n,strategy:r}=i;const o=[...t==="clippingAncestors"?bme(e,this._c):[].concat(t),n],a=o[0],l=o.reduce((c,u)=>{const d=xW(e,u,r);return c.top=ub(d.top,c.top),c.right=bW(d.right,c.right),c.bottom=bW(d.bottom,c.bottom),c.left=ub(d.left,c.left),c},xW(e,a,r));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}const wme={getClippingRect:vme,convertOffsetParentRelativeRectToViewportRelativeRect:gme,isElement:Jl,getDimensions:fme,getOffsetParent:kW,getDocumentElement:mh,getScale:r_,async getElementRects(i){let{reference:e,floating:t,strategy:n}=i;const r=this.getOffsetParent||kW,s=this.getDimensions;return{reference:dme(e,await r(t),n),floating:{x:0,y:0,...await s(t)}}},getClientRects:i=>Array.from(i.getClientRects()),isRTL:i=>Vc(i).direction==="rtl"};function Cme(i,e,t,n){n===void 0&&(n={});const{ancestorScroll:r=!0,ancestorResize:s=!0,elementResize:o=!0,animationFrame:a=!1}=n,l=r&&!a,c=l||s?[...Jl(i)?hb(i):i.contextElement?hb(i.contextElement):[],...hb(e)]:[];c.forEach(g=>{l&&g.addEventListener("scroll",t,{passive:!0}),s&&g.addEventListener("resize",t)});let u=null;if(o){let g=!0;u=new ResizeObserver(()=>{g||t(),g=!1}),Jl(i)&&!a&&u.observe(i),!Jl(i)&&i.contextElement&&!a&&u.observe(i.contextElement),u.observe(e)}let d,h=a?Sg(i):null;a&&f();function f(){const g=Sg(i);h&&(g.x!==h.x||g.y!==h.y||g.width!==h.width||g.height!==h.height)&&t(),h=g,d=requestAnimationFrame(f)}return t(),()=>{var g;c.forEach(p=>{l&&p.removeEventListener("scroll",t),s&&p.removeEventListener("resize",t)}),(g=u)==null||g.disconnect(),u=null,a&&cancelAnimationFrame(d)}}const yme=(i,e,t)=>{const n=new Map,r={platform:wme,...t},s={...r.platform,_c:n};return Zpe(i,e,{...r,platform:s})};function Sme(i){let e,t;const n={autoUpdate:!0};let r=i;const s=c=>({...n,...i||{},...c||{}}),o=c=>{e&&t&&(r=s(c),yme(e,t,r).then(u=>{Object.assign(t.style,{position:u.strategy,left:`${u.x}px`,top:`${u.y}px`}),r!=null&&r.onComputed&&r.onComputed(u)}))};return[c=>{e=c,o()},(c,u)=>{let d;t=c,r=s(u),setTimeout(()=>o(u),0),o(u);const h=()=>{d&&(d(),d=void 0)},f=({autoUpdate:g}=r||{})=>{if(h(),g!==!1)return Cme(e,t,()=>o(r),g===!0?{}:g)};return d=f(),{update(g){o(g),d=f(g)},destroy(){h()}}},o]}function kme({loadOptions:i,filterText:e,items:t,multiple:n,value:r,itemId:s,groupBy:o,filterSelectedItems:a,itemFilter:l,convertStringItemsToObjects:c,filterGroupedItems:u,label:d}){if(t&&i)return t;if(!t)return[];t&&t.length>0&&typeof t[0]!="object"&&(t=c(t));let h=t.filter(f=>{let g=l(f[d],e,f);return g&&n&&(r!=null&&r.length)&&(g=!r.some(p=>a?p[s]===f[s]:!1)),g});return o&&(h=u(h)),h}async function Eme({dispatch:i,loadOptions:e,convertStringItemsToObjects:t,filterText:n}){let r=await e(n).catch(s=>{console.warn("svelte-select loadOptions error :>> ",s),i("error",{type:"loadOptions",details:s})});if(r&&!r.cancelled)return r?(r&&r.length>0&&typeof r[0]!="object"&&(r=t(r)),i("loaded",{items:r})):r=[],{filteredItems:r,loading:!1,focused:!0,listOpen:!0}}const Rgt="";function xme(i){let e,t;return{c(){e=Ee("svg"),t=Ee("path"),this.h()},l(n){e=xe(n,"svg",{width:!0,height:!0,viewBox:!0,focusable:!0,"aria-hidden":!0,class:!0});var r=M(e);t=xe(r,"path",{fill:!0,d:!0}),M(t).forEach(S),r.forEach(S),this.h()},h(){y(t,"fill","currentColor"),y(t,"d",`M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 + 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 + 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 + 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 + 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z`),y(e,"width","100%"),y(e,"height","100%"),y(e,"viewBox","0 0 20 20"),y(e,"focusable","false"),y(e,"aria-hidden","true"),y(e,"class","svelte-1cidz43")},m(n,r){F(n,e,r),R(e,t)},p:fe,i:fe,o:fe,d(n){n&&S(e)}}}class Lme extends Ue{constructor(e){super(),je(this,e,null,xme,Ve,{})}}const Ogt="";function Tme(i){let e,t;return{c(){e=Ee("svg"),t=Ee("path"),this.h()},l(n){e=xe(n,"svg",{width:!0,height:!0,viewBox:!0,focusable:!0,"aria-hidden":!0,role:!0,class:!0});var r=M(e);t=xe(r,"path",{fill:!0,d:!0}),M(t).forEach(S),r.forEach(S),this.h()},h(){y(t,"fill","currentColor"),y(t,"d",`M34.923,37.251L24,26.328L13.077,37.251L9.436,33.61l10.923-10.923L9.436,11.765l3.641-3.641L24,19.047L34.923,8.124 + l3.641,3.641L27.641,22.688L38.564,33.61L34.923,37.251z`),y(e,"width","100%"),y(e,"height","100%"),y(e,"viewBox","-2 -2 50 50"),y(e,"focusable","false"),y(e,"aria-hidden","true"),y(e,"role","presentation"),y(e,"class","svelte-1vqnp8a")},m(n,r){F(n,e,r),R(e,t)},p:fe,i:fe,o:fe,d(n){n&&S(e)}}}class by extends Ue{constructor(e){super(),je(this,e,null,Tme,Ve,{})}}const Mgt="";function Ime(i){let e,t;return{c(){e=Ee("svg"),t=Ee("circle"),this.h()},l(n){e=xe(n,"svg",{class:!0,viewBox:!0});var r=M(e);t=xe(r,"circle",{class:!0,cx:!0,cy:!0,r:!0,fill:!0,stroke:!0,"stroke-width":!0,"stroke-miterlimit":!0}),M(t).forEach(S),r.forEach(S),this.h()},h(){y(t,"class","circle_path svelte-1wg2des"),y(t,"cx","50"),y(t,"cy","50"),y(t,"r","20"),y(t,"fill","none"),y(t,"stroke","currentColor"),y(t,"stroke-width","5"),y(t,"stroke-miterlimit","10"),y(e,"class","loading svelte-1wg2des"),y(e,"viewBox","25 25 50 50")},m(n,r){F(n,e,r),R(e,t)},p:fe,i:fe,o:fe,d(n){n&&S(e)}}}class Dme extends Ue{constructor(e){super(),je(this,e,null,Ime,Ve,{})}}const Pgt="",Nme=i=>({value:i[0]&8}),LW=i=>({value:i[3]}),Ame=i=>({listOpen:i[0]&64}),TW=i=>({listOpen:i[6]}),Rme=i=>({}),IW=i=>({}),Ome=i=>({}),DW=i=>({}),Mme=i=>({selection:i[0]&8}),NW=i=>({selection:i[3]});function AW(i,e,t){const n=i.slice();return n[128]=e[t],n[130]=t,n}const Pme=i=>({}),RW=i=>({}),Fme=i=>({selection:i[0]&8}),OW=i=>({selection:i[128],index:i[130]}),Bme=i=>({}),MW=i=>({}),Vme=i=>({}),PW=i=>({});function FW(i,e,t){const n=i.slice();return n[128]=e[t],n[130]=t,n}const Wme=i=>({item:i[0]&16777216}),BW=i=>({item:i[128],index:i[130]}),Hme=i=>({filteredItems:i[0]&16777216}),VW=i=>({filteredItems:i[24]});function WW(i){let e,t,n,r,s,o;const a=[Ume,$me,zme],l=[];function c(u,d){return u[51].list?0:u[24].length>0?1:u[19]?-1:2}return~(t=c(i))&&(n=l[t]=a[t](i)),{c(){e=V("div"),n&&n.c(),this.h()},l(u){e=W(u,"DIV",{class:!0});var d=M(e);n&&n.l(d),d.forEach(S),this.h()},h(){y(e,"class","svelte-select-list svelte-1sqd52n"),vt(e,"prefloat",i[28])},m(u,d){F(u,e,d),~t&&l[t].m(e,null),i[91](e),r=!0,s||(o=[zs(i[49].call(null,e)),Pe(e,"scroll",i[41]),Pe(e,"pointerdown",$s(i[50])),Pe(e,"pointerup",is($s(i[86])))],s=!0)},p(u,d){let h=t;t=c(u),t===h?~t&&l[t].p(u,d):(n&&(Fe(),A(l[h],1,1,()=>{l[h]=null}),Be()),~t?(n=l[t],n?n.p(u,d):(n=l[t]=a[t](u),n.c()),D(n,1),n.m(e,null)):n=null),(!r||d[0]&268435456)&&vt(e,"prefloat",u[28])},i(u){r||(D(n),r=!0)},o(u){A(n),r=!1},d(u){u&&S(e),~t&&l[t].d(),i[91](null),s=!1,pn(o)}}}function zme(i){let e;const t=i[81].empty,n=Ut(t,i,i[80],PW),r=n||jme();return{c(){r&&r.c()},l(s){r&&r.l(s)},m(s,o){r&&r.m(s,o),e=!0},p(s,o){n&&n.p&&(!e||o[2]&262144)&&qt(n,t,s,s[80],e?jt(t,s[80],o,Vme):Gt(s[80]),PW)},i(s){e||(D(r,s),e=!0)},o(s){A(r,s),e=!1},d(s){r&&r.d(s)}}}function $me(i){let e,t,n=i[24],r=[];for(let o=0;oA(r[o],1,1,()=>{r[o]=null});return{c(){for(let o=0;o{o[u]=null}),Be(),t=o[e],t?t.p(l,c):(t=o[e]=s[e](l),t.c()),D(t,1),t.m(n.parentNode,n))},i(l){r||(D(t),r=!0)},o(l){A(t),r=!1},d(l){o[e].d(l),l&&S(n)}}}function Gme(i){let e,t;const n=i[81].selection,r=Ut(n,i,i[80],NW),s=r||Yme(i);return{c(){e=V("div"),s&&s.c(),this.h()},l(o){e=W(o,"DIV",{class:!0});var a=M(e);s&&s.l(a),a.forEach(S),this.h()},h(){y(e,"class","selected-item svelte-1sqd52n"),vt(e,"hide-selected-item",i[35])},m(o,a){F(o,e,a),s&&s.m(e,null),t=!0},p(o,a){r?r.p&&(!t||a[0]&8|a[2]&262144)&&qt(r,n,o,o[80],t?jt(n,o[80],a,Mme):Gt(o[80]),NW):s&&s.p&&(!t||a[0]&4104)&&s.p(o,t?a:[-1,-1,-1,-1,-1]),(!t||a[1]&16)&&vt(e,"hide-selected-item",o[35])},i(o){t||(D(s,o),t=!0)},o(o){A(s,o),t=!1},d(o){o&&S(e),s&&s.d(o)}}}function Kme(i){let e,t,n=i[3],r=[];for(let o=0;oA(r[o],1,1,()=>{r[o]=null});return{c(){for(let o=0;o{d=null}),Be()),(!s||g[0]&67108864)&&vt(e,"active",i[26]===i[130]),(!s||g[0]&2048)&&vt(e,"disabled",i[11])},i(f){s||(D(u,f),D(d),s=!0)},o(f){A(u,f),A(d),s=!1},d(f){f&&S(e),u&&u.d(f),d&&d.d(),o=!1,pn(a)}}}function qW(i){let e,t;const n=i[81]["loading-icon"],r=Ut(n,i,i[80],DW),s=r||Qme();return{c(){e=V("div"),s&&s.c(),this.h()},l(o){e=W(o,"DIV",{class:!0,"aria-hidden":!0});var a=M(e);s&&s.l(a),a.forEach(S),this.h()},h(){y(e,"class","icon loading svelte-1sqd52n"),y(e,"aria-hidden","true")},m(o,a){F(o,e,a),s&&s.m(e,null),t=!0},p(o,a){r&&r.p&&(!t||a[2]&262144)&&qt(r,n,o,o[80],t?jt(n,o[80],a,Ome):Gt(o[80]),DW)},i(o){t||(D(s,o),t=!0)},o(o){A(s,o),t=!1},d(o){o&&S(e),s&&s.d(o)}}}function Qme(i){let e,t;return e=new Dme({}),{c(){Q(e.$$.fragment)},l(n){J(e.$$.fragment,n)},m(n,r){Z(e,n,r),t=!0},i(n){t||(D(e.$$.fragment,n),t=!0)},o(n){A(e.$$.fragment,n),t=!1},d(n){X(e,n)}}}function GW(i){let e,t,n,r;const s=i[81]["clear-icon"],o=Ut(s,i,i[80],IW),a=o||Jme();return{c(){e=V("button"),a&&a.c(),this.h()},l(l){e=W(l,"BUTTON",{class:!0,tabindex:!0});var c=M(e);a&&a.l(c),c.forEach(S),this.h()},h(){y(e,"class","icon clear-select svelte-1sqd52n"),y(e,"tabindex","0")},m(l,c){F(l,e,c),a&&a.m(e,null),t=!0,n||(r=[Pe(e,"click",is($s(i[22]))),Pe(e,"pointerdown",is($s(i[82])))],n=!0)},p(l,c){o&&o.p&&(!t||c[2]&262144)&&qt(o,s,l,l[80],t?jt(s,l[80],c,Rme):Gt(l[80]),IW)},i(l){t||(D(a,l),t=!0)},o(l){A(a,l),t=!1},d(l){l&&S(e),a&&a.d(l),n=!1,pn(r)}}}function Jme(i){let e,t;return e=new by({}),{c(){Q(e.$$.fragment)},l(n){J(e.$$.fragment,n)},m(n,r){Z(e,n,r),t=!0},i(n){t||(D(e.$$.fragment,n),t=!0)},o(n){A(e.$$.fragment,n),t=!1},d(n){X(e,n)}}}function KW(i){let e,t;const n=i[81]["chevron-icon"],r=Ut(n,i,i[80],TW),s=r||e_e();return{c(){e=V("div"),s&&s.c(),this.h()},l(o){e=W(o,"DIV",{class:!0,"aria-hidden":!0});var a=M(e);s&&s.l(a),a.forEach(S),this.h()},h(){y(e,"class","icon chevron svelte-1sqd52n"),y(e,"aria-hidden","true")},m(o,a){F(o,e,a),s&&s.m(e,null),t=!0},p(o,a){r&&r.p&&(!t||a[0]&64|a[2]&262144)&&qt(r,n,o,o[80],t?jt(n,o[80],a,Ame):Gt(o[80]),TW)},i(o){t||(D(s,o),t=!0)},o(o){A(s,o),t=!1},d(o){o&&S(e),s&&s.d(o)}}}function e_e(i){let e,t;return e=new Lme({}),{c(){Q(e.$$.fragment)},l(n){J(e.$$.fragment,n)},m(n,r){Z(e,n,r),t=!0},i(n){t||(D(e.$$.fragment,n),t=!0)},o(n){A(e.$$.fragment,n),t=!1},d(n){X(e,n)}}}function YW(i){let e;const t=i[81].required,n=Ut(t,i,i[80],LW),r=n||t_e();return{c(){r&&r.c()},l(s){r&&r.l(s)},m(s,o){r&&r.m(s,o),e=!0},p(s,o){n&&n.p&&(!e||o[0]&8|o[2]&262144)&&qt(n,t,s,s[80],e?jt(t,s[80],o,Nme):Gt(s[80]),LW)},i(s){e||(D(r,s),e=!0)},o(s){A(r,s),e=!1},d(s){r&&r.d(s)}}}function t_e(i){let e;return{c(){e=V("select"),this.h()},l(t){e=W(t,"SELECT",{class:!0}),M(e).forEach(S),this.h()},h(){y(e,"class","required svelte-1sqd52n"),e.required=!0},m(t,n){F(t,e,n)},p:fe,d(t){t&&S(e)}}}function n_e(i){let e,t,n,r,s,o,a,l,c,u,d,h,f,g,p,m,_,b,v,w,E,I,x=i[6]&&WW(i),T=i[2]&&zW(i);const L=i[81].prepend,O=Ut(L,i,i[80],MW);let N=i[25]&&$W(i),P=[{readOnly:u=!i[17]},i[27],{placeholder:i[33]},{style:i[18]},{disabled:i[11]}],$={};for(let re=0;re{x=null}),Be()),re[2]?T?T.p(re,B):(T=zW(re),T.c(),T.m(n,null)):T&&(T.d(1),T=null),O&&O.p&&(!w||B[2]&262144)&&qt(O,L,re,re[80],w?jt(L,re[80],B,Bme):Gt(re[80]),MW),re[25]?N?(N.p(re,B),B[0]&33554432&&D(N,1)):(N=$W(re),N.c(),D(N,1),N.m(a,l)):N&&(Fe(),A(N,1,1,()=>{N=null}),Be()),co(c,$=dn(P,[(!w||B[0]&131072&&u!==(u=!re[17]))&&{readOnly:u},B[0]&134217728&&re[27],(!w||B[1]&4)&&{placeholder:re[33]},(!w||B[0]&262144)&&{style:re[18]},(!w||B[0]&2048)&&{disabled:re[11]}])),B[0]&16&&c.value!==re[4]&&an(c,re[4]),vt(c,"svelte-1sqd52n",!0),re[5]?ne?(ne.p(re,B),B[0]&32&&D(ne,1)):(ne=qW(re),ne.c(),D(ne,1),ne.m(h,f)):ne&&(Fe(),A(ne,1,1,()=>{ne=null}),Be()),re[34]?z?(z.p(re,B),B[1]&8&&D(z,1)):(z=GW(re),z.c(),D(z,1),z.m(h,g)):z&&(Fe(),A(z,1,1,()=>{z=null}),Be()),re[20]?K?(K.p(re,B),B[0]&1048576&&D(K,1)):(K=KW(re),K.c(),D(K,1),K.m(h,null)):K&&(Fe(),A(K,1,1,()=>{K=null}),Be()),(!w||B[0]&256)&&y(m,"name",re[8]),(!w||B[0]&8&&_!==(_=re[3]?JSON.stringify(re[3]):null))&&(m.value=_),re[16]&&(!re[3]||re[3].length===0)?ce?(ce.p(re,B),B[0]&65544&&D(ce,1)):(ce=YW(re),ce.c(),D(ce,1),ce.m(e,null)):ce&&(Fe(),A(ce,1,1,()=>{ce=null}),Be()),(!w||B[0]&2097152&&v!==(v="svelte-select "+re[21]+" svelte-1sqd52n"))&&y(e,"class",v),(!w||B[0]&16384)&&y(e,"style",re[14]),(!w||B[0]&2097664)&&vt(e,"multi",re[9]),(!w||B[0]&2099200)&&vt(e,"disabled",re[11]),(!w||B[0]&2097156)&&vt(e,"focused",re[2]),(!w||B[0]&2097216)&&vt(e,"list-open",re[6]),(!w||B[0]&3145728)&&vt(e,"show-chevron",re[20]),(!w||B[0]&2129920)&&vt(e,"error",re[15])},i(re){w||(D(x),D(O,re),D(N),D(ne),D(z),D(K),D(ce),w=!0)},o(re){A(x),A(O,re),A(N),A(ne),A(z),A(K),A(ce),w=!1},d(re){re&&S(e),x&&x.d(),T&&T.d(),O&&O.d(re),N&&N.d(),i[94](null),ne&&ne.d(),z&&z.d(),K&&K.d(),ce&&ce.d(),i[96](null),E=!1,pn(I)}}}function ZW(i){return i.map((e,t)=>({index:t,value:e,label:`${e}`}))}function i_e(i){return i===0}function r_e(i){return i.groupHeader&&i.selectable||i.selectable||!i.hasOwnProperty("selectable")}function s_e(i,e,t){let n,r,s,o,a,l,c,u,d,{$$slots:h={},$$scope:f}=e;const g=OL(h),p=dr();let{justValue:m=null}=e,{filter:_=kme}=e,{getItems:b=Eme}=e,{id:v=null}=e,{name:w=null}=e,{container:E=void 0}=e,{input:I=void 0}=e,{multiple:x=!1}=e,{multiFullItemClearable:T=!1}=e,{disabled:L=!1}=e,{focused:O=!1}=e,{value:N=null}=e,{filterText:P=""}=e,{placeholder:$="Please select"}=e,{placeholderAlwaysShow:ne=!1}=e,{items:z=null}=e,{label:K="label"}=e,{itemFilter:ce=(Se,U)=>`${Se}`.toLowerCase().includes(U.toLowerCase())}=e,{groupBy:re=void 0}=e,{groupFilter:B=Se=>Se}=e,{groupHeaderSelectable:Ae=!1}=e,{itemId:we="value"}=e,{loadOptions:ke=void 0}=e,{containerStyles:ue=""}=e,{hasError:De=!1}=e,{filterSelectedItems:Ge=!0}=e,{required:lt=!1}=e,{createGroupHeaderItem:Et=(Se,U)=>({value:Se,[K]:Se})}=e;const xt=()=>c;let{searchable:at=!0}=e,{inputStyles:Rt=""}=e,{clearable:bt=!0}=e,{loading:un=!1}=e,{listOpen:Lt=!1}=e,Zt,{debounce:ln=(Se,U=1)=>{clearTimeout(Zt),Zt=setTimeout(Se,U)}}=e,{debounceWait:rn=300}=e,{hideEmptyState:Ct=!1}=e,{inputAttributes:gt={}}=e,{listAutoWidth:Re=!0}=e,{showChevron:G=!1}=e,{listOffset:ge=5}=e,{hoverItemIndex:pe=0}=e,{floatingConfig:q={}}=e,{class:ee=""}=e,te,j,Y,Oe;function dt(){if(typeof N=="string"){let Se=(z||[]).find(U=>U[we]===N);t(3,N=Se||{[we]:N,label:N})}else x&&Array.isArray(N)&&N.length>0&&t(3,N=N.map(Se=>typeof Se=="string"?{value:Se,label:Se}:Se))}let Ke;function Ot(){t(27,Ke=Object.assign({autocapitalize:"none",autocomplete:"off",autocorrect:"off",spellcheck:!1,tabindex:0,type:"text","aria-autocomplete":"list"},gt)),v&&t(27,Ke.id=v,Ke),at||t(27,Ke.readonly=!0,Ke)}function ft(Se){const U=[],se={};Se.forEach(qe=>{const ct=re(qe);U.includes(ct)||(U.push(ct),se[ct]=[],ct&&se[ct].push(Object.assign(Et(ct,qe),{id:ct,groupHeader:!0,selectable:Ae}))),se[ct].push(Object.assign({groupItem:!!ct},qe))});const Ce=[];return B(U).forEach(qe=>{se[qe]&&Ce.push(...se[qe])}),Ce}function yn(){if(x){JSON.stringify(N)!==JSON.stringify(j)&&Qn()&&p("input",N);return}(!j||JSON.stringify(N[we])!==JSON.stringify(j[we]))&&p("input",N)}function hn(){N&&(Array.isArray(N)?t(3,N=[...N]):t(3,N=[N]))}function It(){N&&t(3,N=null)}function Bn(){const Se=c.findIndex(U=>U[we]===N[we]);Ti(Se,!0)}function Sn(Se){p("hoverItem",Se)}function Ti(Se=0,U){t(7,pe=Se),!U&&re&&c[pe]&&!c[pe].selectable&&ql(1)}function Hn(){!ke&&P.length===0||(ke?ln(async function(){t(5,un=!0);let Se=await b({dispatch:p,loadOptions:ke,convertStringItemsToObjects:ZW,filterText:P});Se?(t(5,un=Se.loading),t(6,Lt=Lt?Se.listOpen:P.length>0),t(2,O=Lt&&Se.focused),t(52,z=re?ft(Se.filteredItems):Se.filteredItems)):(t(5,un=!1),t(2,O=!0),t(6,Lt=!0))},rn):(t(6,Lt=!0),x&&t(26,te=void 0)))}function Ii(Se){Lt&&p("filter",Se)}Xue(async()=>{t(77,j=N),t(78,Y=P),t(79,Oe=x)});function yi(){return x?N?N.map(Se=>Se[we]):null:N&&N[we]}function Qn(){let Se=!0;if(N){const U=[],se=[];N.forEach(Ce=>{U.includes(Ce[we])?Se=!1:(U.push(Ce[we]),se.push(Ce))}),Se||t(3,N=se)}return Se}function lr(Se){let U=Se?Se[we]:N[we];return z.find(se=>se[we]===U)}function Di(Se){!Se||Se.length===0||Se.some(U=>typeof U!="object")||!N||(x?N.some(U=>!U||!U[we]):!N[we])||(Array.isArray(N)?t(3,N=N.map(U=>lr(U)||U)):t(3,N=lr()||N))}async function Ni(Se){const U=N[Se];N.length===1?t(3,N=void 0):t(3,N=N.filter(se=>se!==U)),p("clear",U)}function Io(Se){if(O)switch(Se.stopPropagation(),Se.key){case"Escape":Se.preventDefault(),bs();break;case"Enter":if(Se.preventDefault(),Lt){if(c.length===0)break;const U=c[pe];if(N&&!x&&N[we]===U[we]){bs();break}else jl(c[pe])}break;case"ArrowDown":Se.preventDefault(),Lt?ql(1):(t(6,Lt=!0),t(26,te=void 0));break;case"ArrowUp":Se.preventDefault(),Lt?ql(-1):(t(6,Lt=!0),t(26,te=void 0));break;case"Tab":if(Lt&&O){if(c.length===0||N&&N[we]===c[pe][we])return bs();Se.preventDefault(),jl(c[pe]),bs()}break;case"Backspace":if(!x||P.length>0)return;if(x&&N&&N.length>0){if(Ni(te!==void 0?te:N.length-1),te===0||te===void 0)break;t(26,te=N.length>te?te-1:void 0)}break;case"ArrowLeft":if(!N||!x||P.length>0)return;te===void 0?t(26,te=N.length-1):N.length>te&&te!==0&&t(26,te-=1);break;case"ArrowRight":if(!N||!x||P.length>0||te===void 0)return;te===N.length-1?t(26,te=void 0):te{Lt&&t(2,O=!0),O&&I&&I.focus()});function cr(Se){if(Se){t(4,P="");const U=Object.assign({},Se);(!U.groupHeader||U.selectable)&&(x?t(3,N=N?N.concat([U]):[U]):t(3,N=U),t(3,N),setTimeout(()=>{bs(),t(26,te=void 0),p("change",N)}))}}function bs(){t(4,P=""),t(6,Lt=!1)}let{ariaValues:tn=Se=>`Option ${Se}, selected.`}=e,{ariaListOpen:ze=(Se,U)=>`You are currently focused on option ${Se}. There are ${U} results available.`}=e,{ariaFocused:St=()=>"Select is focused, type to refine list, press down to open the menu."}=e;function Kt(Se){let U;return Se&&N.length>0?U=N.map(se=>se[K]).join(", "):U=N[K],tn(U)}function pi(){if(!c||c.length===0)return"";let Se=c[pe];if(Lt&&Se){let U=c?c.length:0;return ze(Se[K],U)}else return St()}let ni=null,yr;function ur(){clearTimeout(yr),yr=setTimeout(()=>{Na=!1},100)}function Ns(Se){E&&!E.contains(Se.target)&&!(ni!=null&&ni.contains(Se.target))&&$r()}Zm(()=>{ni==null||ni.remove()});let Na=!1;function jl(Se){Se.isCreator||Se.selectable===!1||cr(Se)}function Ws(Se){Na||t(7,pe=Se)}function ul(Se){const{item:U,i:se}=Se;if((U==null?void 0:U.selectable)!==!1){if(N&&!x&&N[we]===U[we])return bs();r_e(U)&&(t(7,pe=se),jl(U)),Do=!1}}function ql(Se){if(c.filter(Ce=>!Object.hasOwn(Ce,"selectable")||Ce.selectable===!0).length===0)return t(7,pe=0);Se>0&&pe===c.length-1?t(7,pe=0):Se<0&&pe===0?t(7,pe=c.length-1):t(7,pe=pe+Se);const se=c[pe];if(se&&se.selectable===!1){(Se===1||Se===-1)&&ql(Se);return}}function sg(Se,U,se){if(!x)return U&&U[se]===Se[se]}const Wm=W0,M2=W0;function W0(Se){return{update(U){U.scroll&&(ur(),Se.scrollIntoView({behavior:"auto",block:"nearest",inline:"start"}))}}}function Gu(){const{width:Se}=E.getBoundingClientRect();t(23,ni.style.width=Re?Se+"px":"auto",ni)}let Hs={strategy:"absolute",placement:"bottom-start",middleware:[ame(ge),sme(),cme()],autoUpdate:!1};const[Ku,Gl,dl]=Sme(Hs);let Rc=!0;function Aa(Se,U){if(!Se||!U)return t(28,Rc=!0);setTimeout(()=>{t(28,Rc=!1)},0)}let Do=!1;function Hm(){Do=!0}function Qd(Se){hr.call(this,i,Se)}function No(Se){hr.call(this,i,Se)}function Ao(Se){hr.call(this,i,Se)}function Jd(Se){hr.call(this,i,Se)}function og(Se){hr.call(this,i,Se)}function ag(Se){hr.call(this,i,Se)}const zm=Se=>Ws(Se),Yu=Se=>Ws(Se),eh=(Se,U)=>ul({item:Se,i:U});function Jo(Se){ve[Se?"unshift":"push"](()=>{ni=Se,t(23,ni)})}const H0=Se=>Ni(Se),lg=Se=>T?Ni(Se):{};function $m(Se){ve[Se?"unshift":"push"](()=>{I=Se,t(1,I)})}function z0(){P=this.value,t(4,P)}function P2(Se){ve[Se?"unshift":"push"](()=>{E=Se,t(0,E)})}return i.$$set=Se=>{"justValue"in Se&&t(53,m=Se.justValue),"filter"in Se&&t(54,_=Se.filter),"getItems"in Se&&t(55,b=Se.getItems),"id"in Se&&t(56,v=Se.id),"name"in Se&&t(8,w=Se.name),"container"in Se&&t(0,E=Se.container),"input"in Se&&t(1,I=Se.input),"multiple"in Se&&t(9,x=Se.multiple),"multiFullItemClearable"in Se&&t(10,T=Se.multiFullItemClearable),"disabled"in Se&&t(11,L=Se.disabled),"focused"in Se&&t(2,O=Se.focused),"value"in Se&&t(3,N=Se.value),"filterText"in Se&&t(4,P=Se.filterText),"placeholder"in Se&&t(57,$=Se.placeholder),"placeholderAlwaysShow"in Se&&t(58,ne=Se.placeholderAlwaysShow),"items"in Se&&t(52,z=Se.items),"label"in Se&&t(12,K=Se.label),"itemFilter"in Se&&t(59,ce=Se.itemFilter),"groupBy"in Se&&t(60,re=Se.groupBy),"groupFilter"in Se&&t(61,B=Se.groupFilter),"groupHeaderSelectable"in Se&&t(62,Ae=Se.groupHeaderSelectable),"itemId"in Se&&t(13,we=Se.itemId),"loadOptions"in Se&&t(63,ke=Se.loadOptions),"containerStyles"in Se&&t(14,ue=Se.containerStyles),"hasError"in Se&&t(15,De=Se.hasError),"filterSelectedItems"in Se&&t(64,Ge=Se.filterSelectedItems),"required"in Se&&t(16,lt=Se.required),"createGroupHeaderItem"in Se&&t(65,Et=Se.createGroupHeaderItem),"searchable"in Se&&t(17,at=Se.searchable),"inputStyles"in Se&&t(18,Rt=Se.inputStyles),"clearable"in Se&&t(67,bt=Se.clearable),"loading"in Se&&t(5,un=Se.loading),"listOpen"in Se&&t(6,Lt=Se.listOpen),"debounce"in Se&&t(68,ln=Se.debounce),"debounceWait"in Se&&t(69,rn=Se.debounceWait),"hideEmptyState"in Se&&t(19,Ct=Se.hideEmptyState),"inputAttributes"in Se&&t(70,gt=Se.inputAttributes),"listAutoWidth"in Se&&t(71,Re=Se.listAutoWidth),"showChevron"in Se&&t(20,G=Se.showChevron),"listOffset"in Se&&t(72,ge=Se.listOffset),"hoverItemIndex"in Se&&t(7,pe=Se.hoverItemIndex),"floatingConfig"in Se&&t(73,q=Se.floatingConfig),"class"in Se&&t(21,ee=Se.class),"ariaValues"in Se&&t(74,tn=Se.ariaValues),"ariaListOpen"in Se&&t(75,ze=Se.ariaListOpen),"ariaFocused"in Se&&t(76,St=Se.ariaFocused),"$$scope"in Se&&t(80,f=Se.$$scope)},i.$$.update=()=>{i.$$.dirty[0]&8|i.$$.dirty[1]&2097152&&N&&dt(),i.$$.dirty[0]&131072|i.$$.dirty[2]&256&&(gt||!at)&&Ot(),i.$$.dirty[0]&512&&x&&hn(),i.$$.dirty[0]&512|i.$$.dirty[2]&131072&&Oe&&!x&&It(),i.$$.dirty[0]&520&&x&&N&&N.length>1&&Qn(),i.$$.dirty[0]&8&&N&&yn(),i.$$.dirty[0]&520|i.$$.dirty[2]&32768&&!N&&x&&j&&p("input",N),i.$$.dirty[0]&6&&!O&&I&&bs(),i.$$.dirty[0]&16|i.$$.dirty[2]&65536&&P!==Y&&Hn(),i.$$.dirty[0]&12824|i.$$.dirty[1]&815792128|i.$$.dirty[2]&6&&t(24,c=_({loadOptions:ke,filterText:P,items:z,multiple:x,value:N,itemId:we,groupBy:re,label:K,filterSelectedItems:Ge,itemFilter:ce,convertStringItemsToObjects:ZW,filterGroupedItems:ft})),i.$$.dirty[0]&16777800&&!x&&Lt&&N&&c&&Bn(),i.$$.dirty[0]&576&&Lt&&x&&t(7,pe=0),i.$$.dirty[0]&128&&Sn(pe),i.$$.dirty[0]&520&&t(25,n=x?N&&N.length>0:N),i.$$.dirty[0]&33554448&&t(35,r=n&&P.length>0),i.$$.dirty[0]&33556512|i.$$.dirty[2]&32&&t(34,s=n&&bt&&!L&&!un),i.$$.dirty[0]&520|i.$$.dirty[1]&201326592&&t(33,o=ne&&x?$:N?"":$),i.$$.dirty[0]&520&&t(32,a=N?Kt(x):""),i.$$.dirty[0]&16777412&&t(31,l=pi()),i.$$.dirty[1]&2097152&&Di(z),i.$$.dirty[0]&8712&&t(53,m=yi()),i.$$.dirty[0]&520|i.$$.dirty[2]&32768&&!x&&j&&!N&&p("input",N),i.$$.dirty[0]&16777800&&Lt&&c&&!x&&!N&&Ti(),i.$$.dirty[0]&16777216&&Ii(c),i.$$.dirty[2]&2048&&q&&dl(Object.assign(Hs,q)),i.$$.dirty[0]&8388608&&t(30,u=!!ni),i.$$.dirty[0]&8388672&&Aa(ni,Lt),i.$$.dirty[0]&8388673&&Lt&&E&&ni&&Gu(),i.$$.dirty[0]&128&&t(29,d=pe)},[E,I,O,N,P,un,Lt,pe,w,x,T,L,K,we,ue,De,lt,at,Rt,Ct,G,ee,et,ni,c,n,te,Ke,Rc,d,u,l,a,o,s,r,Ni,Io,Cr,$r,ao,ur,Ns,Ws,ul,sg,Wm,M2,Ku,Gl,Hm,g,z,m,_,b,v,$,ne,ce,re,B,Ae,ke,Ge,Et,xt,bt,ln,rn,gt,Re,ge,q,tn,ze,St,j,Y,Oe,f,h,Qd,No,Ao,Jd,og,ag,zm,Yu,eh,Jo,H0,lg,$m,z0,P2]}class XW extends Ue{constructor(e){super(),je(this,e,s_e,n_e,Ve,{justValue:53,filter:54,getItems:55,id:56,name:8,container:0,input:1,multiple:9,multiFullItemClearable:10,disabled:11,focused:2,value:3,filterText:4,placeholder:57,placeholderAlwaysShow:58,items:52,label:12,itemFilter:59,groupBy:60,groupFilter:61,groupHeaderSelectable:62,itemId:13,loadOptions:63,containerStyles:14,hasError:15,filterSelectedItems:64,required:16,createGroupHeaderItem:65,getFilteredItems:66,searchable:17,inputStyles:18,clearable:67,loading:5,listOpen:6,debounce:68,debounceWait:69,hideEmptyState:19,inputAttributes:70,listAutoWidth:71,showChevron:20,listOffset:72,hoverItemIndex:7,floatingConfig:73,class:21,handleClear:22,ariaValues:74,ariaListOpen:75,ariaFocused:76},null,[-1,-1,-1,-1,-1])}get getFilteredItems(){return this.$$.ctx[66]}get handleClear(){return this.$$.ctx[22]}}function o_e(i){let e,t;return{c(){e=Ee("svg"),t=Ee("path"),this.h()},l(n){e=xe(n,"svg",{xmlns:!0,x:!0,y:!0,width:!0,height:!0,viewBox:!0,style:!0});var r=M(e);t=xe(r,"path",{d:!0}),M(t).forEach(S),r.forEach(S),this.h()},h(){y(t,"d","M 24.505859 4.0078125 C 23.980484 4.0080625 23.454344 4.1114062 22.964844 4.3164062 L 4.2226562 11.646484 C 3.4796562 11.959484 3 12.683281 3 13.488281 C 2.999 14.293281 3.4771406 15.017797 4.2441406 15.341797 L 23.236328 22.775391 C 23.613328 22.935391 24.018969 23.013672 24.417969 23.013672 C 24.802969 23.013672 25.181391 22.939875 25.525391 22.796875 L 45.771484 15.330078 C 46.519484 15.018078 47.001953 14.292422 47.001953 13.482422 C 47.000953 12.672422 46.516422 11.949047 45.732422 11.623047 L 26.046875 4.3144531 C 25.556875 4.1104531 25.031234 4.0075625 24.505859 4.0078125 z M 24.498047 6.0097656 C 24.770047 6.0097656 25.0455 6.0647813 25.3125 6.1757812 L 45.041016 13.46875 L 24.794922 20.935547 C 24.551922 21.039547 24.266188 21.039828 23.992188 20.923828 L 4.9765625 13.5 L 23.705078 6.1738281 L 23.728516 6.1640625 C 23.972516 6.0610625 24.233047 6.0097656 24.498047 6.0097656 z M 1.9980469 17.001953 C 0.94204687 17.001953 -2.9605947e-16 17.853906 0 19.003906 L 0 34.970703 C 0 36.129703 0.95195312 36.972656 2.0019531 36.972656 C 2.2979531 36.972656 2.6015312 36.906766 2.8945312 36.759766 L 20.894531 27.998047 C 22.425531 27.232047 22.349531 25.022281 20.769531 24.363281 L 2.7695312 17.15625 C 2.5135313 17.05125 2.2520469 17.001953 1.9980469 17.001953 z M 48.001953 17.001953 C 47.760953 17.001953 47.514484 17.045625 47.271484 17.140625 L 28.271484 24.505859 C 27.505484 24.806859 27 25.544188 27 26.367188 L 27 42.998047 C 27 44.146047 27.940047 45 28.998047 45 C 29.239047 45 29.485516 44.956328 29.728516 44.861328 L 48.728516 37.425781 C 49.495516 37.125781 50 36.387453 50 35.564453 L 50 19.003906 C 50 17.855906 49.059953 17.001953 48.001953 17.001953 z M 2.0058594 19.003906 L 2.0253906 19.013672 L 20.017578 26.201172 L 2 34.970703 L 2.0058594 19.003906 z M 48 19.003906 L 48 35.564453 L 29 42.998047 L 28.994141 26.371094 L 48 19.003906 z"),y(e,"xmlns","http://www.w3.org/2000/svg"),y(e,"x","0px"),y(e,"y","0px"),y(e,"width",i[1]),y(e,"height",i[0]),y(e,"viewBox","0 0 50 50"),Ye(e,"fill","currentcolor")},m(n,r){F(n,e,r),R(e,t)},p(n,[r]){r&2&&y(e,"width",n[1]),r&1&&y(e,"height",n[0])},i:fe,o:fe,d(n){n&&S(e)}}}function a_e(i,e,t){let{height:n="24px"}=e,{width:r="24px"}=e;return i.$$set=s=>{"height"in s&&t(0,n=s.height),"width"in s&&t(1,r=s.width)},[n,r]}class l_e extends Ue{constructor(e){super(),je(this,e,a_e,o_e,Ve,{height:0,width:1})}}function c_e(i){let e,t;return{c(){e=Ee("svg"),t=Ee("path"),this.h()},l(n){e=xe(n,"svg",{xmlns:!0,x:!0,y:!0,width:!0,height:!0,viewBox:!0,style:!0});var r=M(e);t=xe(r,"path",{d:!0}),M(t).forEach(S),r.forEach(S),this.h()},h(){y(t,"d","M 18.90625 7 C 18.90625 7 12.539063 7.4375 8.375 10.78125 C 8.355469 10.789063 8.332031 10.800781 8.3125 10.8125 C 7.589844 11.480469 7.046875 12.515625 6.375 14 C 5.703125 15.484375 4.992188 17.394531 4.34375 19.53125 C 3.050781 23.808594 2 29.058594 2 34 C 1.996094 34.175781 2.039063 34.347656 2.125 34.5 C 3.585938 37.066406 6.273438 38.617188 8.78125 39.59375 C 11.289063 40.570313 13.605469 40.960938 14.78125 41 C 15.113281 41.011719 15.429688 40.859375 15.625 40.59375 L 18.0625 37.21875 C 20.027344 37.683594 22.332031 38 25 38 C 27.667969 38 29.972656 37.683594 31.9375 37.21875 L 34.375 40.59375 C 34.570313 40.859375 34.886719 41.011719 35.21875 41 C 36.394531 40.960938 38.710938 40.570313 41.21875 39.59375 C 43.726563 38.617188 46.414063 37.066406 47.875 34.5 C 47.960938 34.347656 48.003906 34.175781 48 34 C 48 29.058594 46.949219 23.808594 45.65625 19.53125 C 45.007813 17.394531 44.296875 15.484375 43.625 14 C 42.953125 12.515625 42.410156 11.480469 41.6875 10.8125 C 41.667969 10.800781 41.644531 10.789063 41.625 10.78125 C 37.460938 7.4375 31.09375 7 31.09375 7 C 31.019531 6.992188 30.949219 6.992188 30.875 7 C 30.527344 7.046875 30.234375 7.273438 30.09375 7.59375 C 30.09375 7.59375 29.753906 8.339844 29.53125 9.40625 C 27.582031 9.09375 25.941406 9 25 9 C 24.058594 9 22.417969 9.09375 20.46875 9.40625 C 20.246094 8.339844 19.90625 7.59375 19.90625 7.59375 C 19.734375 7.203125 19.332031 6.964844 18.90625 7 Z M 18.28125 9.15625 C 18.355469 9.359375 18.40625 9.550781 18.46875 9.78125 C 16.214844 10.304688 13.746094 11.160156 11.4375 12.59375 C 11.074219 12.746094 10.835938 13.097656 10.824219 13.492188 C 10.816406 13.882813 11.039063 14.246094 11.390625 14.417969 C 11.746094 14.585938 12.167969 14.535156 12.46875 14.28125 C 17.101563 11.410156 22.996094 11 25 11 C 27.003906 11 32.898438 11.410156 37.53125 14.28125 C 37.832031 14.535156 38.253906 14.585938 38.609375 14.417969 C 38.960938 14.246094 39.183594 13.882813 39.175781 13.492188 C 39.164063 13.097656 38.925781 12.746094 38.5625 12.59375 C 36.253906 11.160156 33.785156 10.304688 31.53125 9.78125 C 31.59375 9.550781 31.644531 9.359375 31.71875 9.15625 C 32.859375 9.296875 37.292969 9.894531 40.3125 12.28125 C 40.507813 12.460938 41.1875 13.460938 41.8125 14.84375 C 42.4375 16.226563 43.09375 18.027344 43.71875 20.09375 C 44.9375 24.125 45.921875 29.097656 45.96875 33.65625 C 44.832031 35.496094 42.699219 36.863281 40.5 37.71875 C 38.5 38.496094 36.632813 38.84375 35.65625 38.9375 L 33.96875 36.65625 C 34.828125 36.378906 35.601563 36.078125 36.28125 35.78125 C 38.804688 34.671875 40.15625 33.5 40.15625 33.5 C 40.570313 33.128906 40.605469 32.492188 40.234375 32.078125 C 39.863281 31.664063 39.226563 31.628906 38.8125 32 C 38.8125 32 37.765625 32.957031 35.46875 33.96875 C 34.625 34.339844 33.601563 34.707031 32.4375 35.03125 C 32.167969 35 31.898438 35.078125 31.6875 35.25 C 29.824219 35.703125 27.609375 36 25 36 C 22.371094 36 20.152344 35.675781 18.28125 35.21875 C 18.070313 35.078125 17.8125 35.019531 17.5625 35.0625 C 16.394531 34.738281 15.378906 34.339844 14.53125 33.96875 C 12.234375 32.957031 11.1875 32 11.1875 32 C 10.960938 31.789063 10.648438 31.699219 10.34375 31.75 C 9.957031 31.808594 9.636719 32.085938 9.53125 32.464844 C 9.421875 32.839844 9.546875 33.246094 9.84375 33.5 C 9.84375 33.5 11.195313 34.671875 13.71875 35.78125 C 14.398438 36.078125 15.171875 36.378906 16.03125 36.65625 L 14.34375 38.9375 C 13.367188 38.84375 11.5 38.496094 9.5 37.71875 C 7.300781 36.863281 5.167969 35.496094 4.03125 33.65625 C 4.078125 29.097656 5.0625 24.125 6.28125 20.09375 C 6.90625 18.027344 7.5625 16.226563 8.1875 14.84375 C 8.8125 13.460938 9.492188 12.460938 9.6875 12.28125 C 12.707031 9.894531 17.140625 9.296875 18.28125 9.15625 Z M 18.5 21 C 15.949219 21 14 23.316406 14 26 C 14 28.683594 15.949219 31 18.5 31 C 21.050781 31 23 28.683594 23 26 C 23 23.316406 21.050781 21 18.5 21 Z M 31.5 21 C 28.949219 21 27 23.316406 27 26 C 27 28.683594 28.949219 31 31.5 31 C 34.050781 31 36 28.683594 36 26 C 36 23.316406 34.050781 21 31.5 21 Z M 18.5 23 C 19.816406 23 21 24.265625 21 26 C 21 27.734375 19.816406 29 18.5 29 C 17.183594 29 16 27.734375 16 26 C 16 24.265625 17.183594 23 18.5 23 Z M 31.5 23 C 32.816406 23 34 24.265625 34 26 C 34 27.734375 32.816406 29 31.5 29 C 30.183594 29 29 27.734375 29 26 C 29 24.265625 30.183594 23 31.5 23 Z"),y(e,"xmlns","http://www.w3.org/2000/svg"),y(e,"x","0px"),y(e,"y","0px"),y(e,"width",i[1]),y(e,"height",i[0]),y(e,"viewBox","0 0 50 50"),Ye(e,"fill","currentcolor")},m(n,r){F(n,e,r),R(e,t)},p(n,[r]){r&2&&y(e,"width",n[1]),r&1&&y(e,"height",n[0])},i:fe,o:fe,d(n){n&&S(e)}}}function u_e(i,e,t){let{height:n="24px"}=e,{width:r="24px"}=e;return i.$$set=s=>{"height"in s&&t(0,n=s.height),"width"in s&&t(1,r=s.width)},[n,r]}class QW extends Ue{constructor(e){super(),je(this,e,u_e,c_e,Ve,{height:0,width:1})}}function d_e(i){let e,t;return{c(){e=Ee("svg"),t=Ee("path"),this.h()},l(n){e=xe(n,"svg",{xmlns:!0,x:!0,y:!0,width:!0,height:!0,viewBox:!0,style:!0});var r=M(e);t=xe(r,"path",{d:!0}),M(t).forEach(S),r.forEach(S),this.h()},h(){y(t,"d","M 6.9667969 4 C 5.8922226 4 5 4.8922226 5 5.9667969 L 5 8.3867188 C 4.6700827 8.5693007 4.3668503 8.8022905 4.1230469 9.1015625 C 3.5561678 9.7967647 3.3299502 10.7122 3.5097656 11.591797 L 3.5097656 11.59375 C 4.0409792 14.178038 4.7794422 17.772026 4.8261719 18 C 4.7795089 18.227574 4.0439586 21.806083 3.5136719 24.390625 C 3.33239 25.274562 3.5603689 26.193876 4.1289062 26.892578 L 4.1289062 26.894531 C 4.6989448 27.593193 5.5544182 28 6.4570312 28 L 25.501953 28 C 26.414029 28 27.27875 27.588847 27.855469 26.882812 L 27.855469 26.880859 C 28.431397 26.174017 28.661627 25.244791 28.478516 24.351562 C 27.948342 21.768542 27.220293 18.226607 27.173828 18 C 27.220578 17.771923 27.959908 14.172625 28.490234 11.587891 C 28.670205 10.710536 28.445474 9.7948488 27.878906 9.0996094 L 27.876953 9.0976562 C 27.633016 8.7986233 27.330145 8.566746 27 8.3847656 L 27 5.9667969 C 27 4.8922226 26.107777 4 25.033203 4 L 6.9667969 4 z M 7 6 L 25 6 L 25 8 L 7 8 L 7 6 z M 6.4414062 10 L 25 10 L 25 10.003906 L 25.580078 10.003906 C 25.870925 10.00932 26.145127 10.138539 26.328125 10.363281 C 26.516313 10.593787 26.591101 10.893775 26.53125 11.185547 C 25.98421 13.851742 25.173828 17.798828 25.173828 17.798828 L 25.132812 18 L 25.173828 18.201172 C 25.173828 18.201172 25.970539 22.088714 26.517578 24.753906 C 26.579608 25.059411 26.503358 25.374804 26.306641 25.617188 C 26.107355 25.861152 25.815878 26 25.501953 26 L 6.4570312 26 C 6.1536443 26 5.871649 25.864198 5.6796875 25.628906 C 5.4891549 25.393814 5.4120715 25.088382 5.4726562 24.792969 C 6.0196814 22.126846 6.8261719 18.201172 6.8261719 18.201172 L 6.8671875 18 L 6.8261719 17.798828 C 6.8261719 17.798828 6.0168603 13.857943 5.46875 11.191406 L 5.4707031 11.191406 C 5.4106381 10.897589 5.4835861 10.595863 5.671875 10.365234 L 5.6738281 10.365234 C 5.8620903 10.134148 6.1432948 10 6.4414062 10 z M 13.294922 13 C 12.044922 13 10.909797 13.341641 10.341797 13.681641 L 10.796875 15.271484 C 11.250875 15.044484 12.046797 14.703125 12.841797 14.703125 C 13.750797 14.703125 14.205078 15.158563 14.205078 15.726562 C 14.205078 16.521563 13.295 16.863281 12.5 16.863281 L 11.591797 16.863281 L 11.591797 18.453125 L 12.501953 18.453125 C 13.524953 18.453125 14.433594 18.909359 14.433594 19.818359 C 14.433594 20.500359 13.864516 21.068359 12.728516 21.068359 C 11.819516 21.068359 10.910078 20.727 10.455078 20.5 L 9.9980469 22.318359 C 10.566047 22.659359 11.589844 23 12.839844 23 C 15.339844 23 16.816406 21.749922 16.816406 20.044922 C 16.816406 18.681922 15.907484 17.885203 14.771484 17.658203 C 15.908484 17.203203 16.476562 16.409719 16.476562 15.386719 C 16.476562 14.023719 15.339922 13 13.294922 13 z M 19 13 L 19 23 L 21 23 L 21 13 L 19 13 z"),y(e,"xmlns","http://www.w3.org/2000/svg"),y(e,"x","0px"),y(e,"y","0px"),y(e,"width",i[1]),y(e,"height",i[0]),y(e,"viewBox","0 0 32 32"),Ye(e,"fill","currentcolor")},m(n,r){F(n,e,r),R(e,t)},p(n,[r]){r&2&&y(e,"width",n[1]),r&1&&y(e,"height",n[0])},i:fe,o:fe,d(n){n&&S(e)}}}function h_e(i,e,t){let{height:n="24px"}=e,{width:r="24px"}=e;return i.$$set=s=>{"height"in s&&t(0,n=s.height),"width"in s&&t(1,r=s.width)},[n,r]}class f_e extends Ue{constructor(e){super(),je(this,e,h_e,d_e,Ve,{height:0,width:1})}}function g_e(i){let e,t;return{c(){e=Ee("svg"),t=Ee("path"),this.h()},l(n){e=xe(n,"svg",{xmlns:!0,x:!0,y:!0,width:!0,height:!0,viewBox:!0,style:!0});var r=M(e);t=xe(r,"path",{d:!0}),M(t).forEach(S),r.forEach(S),this.h()},h(){y(t,"d","M 15.6875 4 C 14.113281 4 12.652344 4.867188 11.875 6.25 L 2.59375 22.78125 C 1.816406 24.160156 1.816406 25.839844 2.59375 27.21875 L 11.875 43.75 C 12.652344 45.132813 14.113281 46 15.6875 46 L 34.3125 46 C 35.886719 46 37.347656 45.132813 38.125 43.75 L 47.40625 27.21875 C 48.183594 25.839844 48.183594 24.160156 47.40625 22.78125 L 38.125 6.25 C 37.347656 4.867188 35.886719 4 34.3125 4 Z M 15.6875 6 L 34.3125 6 C 35.15625 6 35.941406 6.449219 36.375 7.21875 L 39.0625 12 L 17.5 12 L 17.21875 12.5 L 11.15625 23 L 7.90625 17.375 L 13.625 7.21875 C 14.058594 6.449219 14.84375 6 15.6875 6 Z M 18.65625 14 L 31.34375 14 L 37.71875 25 L 34.125 31.21875 L 31.34375 36 L 18.65625 36 L 17.5 34.03125 L 14.90625 29.53125 L 12.28125 25 Z M 33.65625 14 L 40.1875 14 L 45.6875 23.75 C 46.121094 24.519531 46.121094 25.480469 45.6875 26.25 L 36.375 42.78125 C 35.941406 43.550781 35.15625 44 34.3125 44 L 29.0625 44 L 32.5 38 L 32.78125 37.5 L 39.71875 25.5 L 40 25 L 39.71875 24.5 Z M 25 19 C 21.699219 19 19 21.699219 19 25 C 19 28.300781 21.699219 31 25 31 C 28.300781 31 31 28.300781 31 25 C 31 21.699219 28.300781 19 25 19 Z M 6.75 19.40625 L 10 25 L 10.28125 25.5 L 15.78125 35.03125 L 17.21875 37.5 L 17.5 38 L 30.1875 38 L 26.71875 44 L 15.6875 44 C 14.84375 44 14.058594 43.550781 13.625 42.78125 L 4.3125 26.25 C 3.878906 25.480469 3.878906 24.519531 4.3125 23.75 Z M 25 21 C 27.222656 21 29 22.777344 29 25 C 29 27.222656 27.222656 29 25 29 C 22.777344 29 21 27.222656 21 25 C 21 22.777344 22.777344 21 25 21 Z"),y(e,"xmlns","http://www.w3.org/2000/svg"),y(e,"x","0px"),y(e,"y","0px"),y(e,"width",i[1]),y(e,"height",i[0]),y(e,"viewBox","0 0 50 50"),Ye(e,"fill","currentcolor")},m(n,r){F(n,e,r),R(e,t)},p(n,[r]){r&2&&y(e,"width",n[1]),r&1&&y(e,"height",n[0])},i:fe,o:fe,d(n){n&&S(e)}}}function p_e(i,e,t){let{height:n="24px"}=e,{width:r="24px"}=e;return i.$$set=s=>{"height"in s&&t(0,n=s.height),"width"in s&&t(1,r=s.width)},[n,r]}class m_e extends Ue{constructor(e){super(),je(this,e,p_e,g_e,Ve,{height:0,width:1})}}function __e(i){let e,t;return{c(){e=Ee("svg"),t=Ee("path"),this.h()},l(n){e=xe(n,"svg",{xmlns:!0,x:!0,y:!0,width:!0,height:!0,viewBox:!0,style:!0});var r=M(e);t=xe(r,"path",{d:!0}),M(t).forEach(S),r.forEach(S),this.h()},h(){y(t,"d","M 11.4375 5 L 11.15625 5.46875 L 3.15625 18.46875 L 2.84375 18.96875 L 3.125 19.5 L 7.125 26.5 L 7.40625 27 L 24.59375 27 L 24.875 26.5 L 28.875 19.5 L 29.15625 18.96875 L 28.84375 18.46875 L 20.84375 5.46875 L 20.5625 5 Z M 13.78125 7 L 19.4375 7 L 26.21875 18 L 20.5625 18 Z M 12 7.90625 L 14.96875 12.75 L 8.03125 24.03125 L 5.15625 19 Z M 16.15625 14.65625 L 18.21875 18 L 14.09375 18 Z M 12.875 20 L 26.28125 20 L 23.40625 25 L 9.78125 25 Z"),y(e,"xmlns","http://www.w3.org/2000/svg"),y(e,"x","0px"),y(e,"y","0px"),y(e,"width",i[1]),y(e,"height",i[0]),y(e,"viewBox","0 0 32 32"),Ye(e,"fill","currentcolor")},m(n,r){F(n,e,r),R(e,t)},p(n,[r]){r&2&&y(e,"width",n[1]),r&1&&y(e,"height",n[0])},i:fe,o:fe,d(n){n&&S(e)}}}function b_e(i,e,t){let{height:n="24px"}=e,{width:r="24px"}=e;return i.$$set=s=>{"height"in s&&t(0,n=s.height),"width"in s&&t(1,r=s.width)},[n,r]}class v_e extends Ue{constructor(e){super(),je(this,e,b_e,__e,Ve,{height:0,width:1})}}function w_e(i){let e,t;return{c(){e=Ee("svg"),t=Ee("path"),this.h()},l(n){e=xe(n,"svg",{xmlns:!0,x:!0,y:!0,width:!0,height:!0,viewBox:!0,style:!0});var r=M(e);t=xe(r,"path",{d:!0}),M(t).forEach(S),r.forEach(S),this.h()},h(){y(t,"d","M15,3C8.373,3,3,8.373,3,15c0,5.623,3.872,10.328,9.092,11.63C12.036,26.468,12,26.28,12,26.047v-2.051 c-0.487,0-1.303,0-1.508,0c-0.821,0-1.551-0.353-1.905-1.009c-0.393-0.729-0.461-1.844-1.435-2.526 c-0.289-0.227-0.069-0.486,0.264-0.451c0.615,0.174,1.125,0.596,1.605,1.222c0.478,0.627,0.703,0.769,1.596,0.769 c0.433,0,1.081-0.025,1.691-0.121c0.328-0.833,0.895-1.6,1.588-1.962c-3.996-0.411-5.903-2.399-5.903-5.098 c0-1.162,0.495-2.286,1.336-3.233C9.053,10.647,8.706,8.73,9.435,8c1.798,0,2.885,1.166,3.146,1.481C13.477,9.174,14.461,9,15.495,9 c1.036,0,2.024,0.174,2.922,0.483C18.675,9.17,19.763,8,21.565,8c0.732,0.731,0.381,2.656,0.102,3.594 c0.836,0.945,1.328,2.066,1.328,3.226c0,2.697-1.904,4.684-5.894,5.097C18.199,20.49,19,22.1,19,23.313v2.734 c0,0.104-0.023,0.179-0.035,0.268C23.641,24.676,27,20.236,27,15C27,8.373,21.627,3,15,3z"),y(e,"xmlns","http://www.w3.org/2000/svg"),y(e,"x","0px"),y(e,"y","0px"),y(e,"width",i[1]),y(e,"height",i[0]),y(e,"viewBox","0 0 30 30"),Ye(e,"fill","currentcolor")},m(n,r){F(n,e,r),R(e,t)},p(n,[r]){r&2&&y(e,"width",n[1]),r&1&&y(e,"height",n[0])},i:fe,o:fe,d(n){n&&S(e)}}}function C_e(i,e,t){let{height:n="24px"}=e,{width:r="24px"}=e;return i.$$set=s=>{"height"in s&&t(0,n=s.height),"width"in s&&t(1,r=s.width)},[n,r]}class y_e extends Ue{constructor(e){super(),je(this,e,C_e,w_e,Ve,{height:0,width:1})}}function S_e(i){let e,t;return{c(){e=Ee("svg"),t=Ee("path"),this.h()},l(n){e=xe(n,"svg",{xmlns:!0,x:!0,y:!0,width:!0,height:!0,viewBox:!0,style:!0});var r=M(e);t=xe(r,"path",{d:!0}),M(t).forEach(S),r.forEach(S),this.h()},h(){y(t,"d","M 38.011719 4 C 37.574219 3.996094 37.183594 4.273438 37.046875 4.691406 L 32.074219 20 L 17.925781 20 L 12.953125 4.691406 C 12.820313 4.289063 12.449219 4.011719 12.023438 4 C 11.597656 3.992188 11.214844 4.25 11.0625 4.648438 L 5.070313 20.640625 C 5.066406 20.640625 5.066406 20.644531 5.0625 20.648438 L 2.0625 28.648438 C 1.90625 29.070313 2.046875 29.542969 2.414063 29.808594 L 24.40625 45.800781 L 24.410156 45.808594 C 24.414063 45.808594 24.414063 45.808594 24.414063 45.8125 C 24.425781 45.820313 24.441406 45.828125 24.453125 45.835938 C 24.46875 45.84375 24.480469 45.855469 24.496094 45.863281 C 24.5 45.863281 24.5 45.867188 24.503906 45.867188 C 24.503906 45.867188 24.507813 45.871094 24.511719 45.871094 C 24.515625 45.875 24.519531 45.878906 24.527344 45.878906 C 24.53125 45.882813 24.539063 45.886719 24.542969 45.890625 C 24.5625 45.898438 24.585938 45.910156 24.609375 45.917969 C 24.609375 45.917969 24.609375 45.917969 24.609375 45.921875 C 24.632813 45.929688 24.65625 45.9375 24.675781 45.945313 C 24.679688 45.945313 24.679688 45.945313 24.683594 45.949219 C 24.699219 45.953125 24.714844 45.957031 24.734375 45.964844 C 24.742188 45.964844 24.75 45.96875 24.761719 45.96875 C 24.761719 45.972656 24.761719 45.972656 24.761719 45.96875 C 24.78125 45.976563 24.800781 45.980469 24.820313 45.984375 C 24.847656 45.988281 24.871094 45.992188 24.898438 45.996094 C 24.9375 45.996094 24.980469 46 25.019531 46 C 25.058594 45.996094 25.09375 45.996094 25.128906 45.988281 C 25.144531 45.988281 25.15625 45.988281 25.171875 45.984375 C 25.171875 45.984375 25.175781 45.984375 25.179688 45.984375 C 25.1875 45.980469 25.191406 45.980469 25.199219 45.980469 C 25.203125 45.980469 25.207031 45.976563 25.214844 45.976563 C 25.222656 45.972656 25.234375 45.972656 25.242188 45.96875 C 25.257813 45.964844 25.269531 45.960938 25.28125 45.957031 C 25.289063 45.957031 25.292969 45.957031 25.296875 45.953125 C 25.300781 45.953125 25.304688 45.953125 25.308594 45.953125 C 25.324219 45.945313 25.34375 45.9375 25.359375 45.933594 C 25.378906 45.925781 25.394531 45.917969 25.410156 45.910156 C 25.414063 45.910156 25.414063 45.910156 25.417969 45.90625 C 25.421875 45.90625 25.425781 45.90625 25.429688 45.902344 C 25.4375 45.898438 25.445313 45.894531 25.453125 45.890625 C 25.476563 45.878906 25.496094 45.867188 25.515625 45.855469 C 25.523438 45.851563 25.527344 45.847656 25.53125 45.84375 C 25.535156 45.84375 25.539063 45.839844 25.542969 45.839844 C 25.558594 45.828125 25.574219 45.820313 25.589844 45.808594 L 25.597656 45.796875 L 47.589844 29.808594 C 47.953125 29.542969 48.09375 29.070313 47.9375 28.648438 L 44.945313 20.675781 C 44.941406 20.667969 44.9375 20.65625 44.9375 20.648438 L 38.9375 4.648438 C 38.789063 4.261719 38.425781 4.003906 38.011719 4 Z M 11.933594 8.027344 L 15.824219 20 L 7.445313 20 Z M 38.066406 8.027344 L 42.558594 20 L 34.175781 20 Z M 8.066406 22 L 16.472656 22 L 22.328125 40.015625 Z M 18.578125 22 L 31.421875 22 L 25 41.765625 Z M 33.527344 22 L 41.933594 22 L 27.671875 40.015625 Z M 6.3125 23.007813 L 19.6875 39.902344 L 4.203125 28.640625 Z M 43.6875 23.007813 L 45.796875 28.640625 L 30.3125 39.902344 Z"),y(e,"xmlns","http://www.w3.org/2000/svg"),y(e,"x","0px"),y(e,"y","0px"),y(e,"width",i[1]),y(e,"height",i[0]),y(e,"viewBox","0 0 50 50"),Ye(e,"fill","currentcolor")},m(n,r){F(n,e,r),R(e,t)},p(n,[r]){r&2&&y(e,"width",n[1]),r&1&&y(e,"height",n[0])},i:fe,o:fe,d(n){n&&S(e)}}}function k_e(i,e,t){let{height:n="24px"}=e,{width:r="24px"}=e;return i.$$set=s=>{"height"in s&&t(0,n=s.height),"width"in s&&t(1,r=s.width)},[n,r]}class E_e extends Ue{constructor(e){super(),je(this,e,k_e,S_e,Ve,{height:0,width:1})}}function x_e(i){let e,t;return{c(){e=Ee("svg"),t=Ee("path"),this.h()},l(n){e=xe(n,"svg",{xmlns:!0,x:!0,y:!0,width:!0,height:!0,viewBox:!0,style:!0});var r=M(e);t=xe(r,"path",{d:!0}),M(t).forEach(S),r.forEach(S),this.h()},h(){y(t,"d","M 43.753906 6.4023438 C 42.53621 6.3489969 41.294792 6.712898 40.271484 7.46875 L 37.525391 9.4960938 L 25 18.755859 L 12.591797 9.5839844 A 1.0001 1.0001 0 0 0 11.949219 9.3007812 L 12.199219 9.3007812 L 9.734375 7.4765625 C 8.7104042 6.7188363 7.4671493 6.3528895 6.2480469 6.40625 C 5.0289444 6.4596105 3.8349462 6.9314667 2.9082031 7.8457031 C 1.7309454 9.0063798 1 10.629831 1 12.410156 L 1 15.84375 A 1.0001 1.0001 0 0 0 1 16.138672 L 1 39.5 C 1 41.421188 2.5788117 43 4.5 43 L 12 43 A 1.0001 1.0001 0 0 0 13 42 L 13 25.373047 L 24.40625 33.804688 A 1.0001 1.0001 0 0 0 25.59375 33.804688 L 37 25.373047 L 37 42 A 1.0001 1.0001 0 0 0 38 43 L 45.5 43 C 47.421188 43 49 41.421188 49 39.5 L 49 16.119141 A 1.0001 1.0001 0 0 0 49 15.859375 L 49 12.410156 C 49 10.6517 48.290455 9.0357821 47.128906 7.8730469 C 47.095336 7.8394769 47.084086 7.83018 47.097656 7.84375 A 1.0001 1.0001 0 0 0 47.091797 7.8378906 C 46.165242 6.9256756 44.971603 6.4556905 43.753906 6.4023438 z M 43.644531 8.4003906 C 44.400835 8.4300436 45.134049 8.7168876 45.689453 9.2636719 C 45.708363 9.2823439 45.722171 9.2964424 45.712891 9.2871094 C 46.50934 10.084374 47 11.188613 47 12.410156 L 47 15.496094 L 39 21.408203 L 39 11 A 1.0001 1.0001 0 0 0 38.996094 10.898438 L 41.458984 9.078125 A 1.0001 1.0001 0 0 0 41.460938 9.078125 C 42.109578 8.598977 42.888228 8.3707375 43.644531 8.4003906 z M 6.3574219 8.40625 C 7.1145694 8.37661 7.8958927 8.6037105 8.5449219 9.0839844 L 11.003906 10.902344 A 1.0001 1.0001 0 0 0 11 11 L 11 21.408203 L 3 15.496094 L 3 12.410156 C 3 11.174482 3.5017577 10.068855 4.3125 9.2695312 C 4.8677569 8.7217677 5.6002743 8.4358895 6.3574219 8.40625 z M 37 12.371094 L 37 22.886719 L 25 31.755859 L 13 22.886719 L 13 12.373047 L 24.40625 20.804688 A 1.0001 1.0001 0 0 0 25.59375 20.804688 L 37 12.371094 z M 3 17.982422 L 11 23.896484 L 11 41 L 4.5 41 C 3.6591883 41 3 40.340812 3 39.5 L 3 17.982422 z M 47 17.982422 L 47 39.5 C 47 40.340812 46.340812 41 45.5 41 L 39 41 L 39 23.896484 L 47 17.982422 z"),y(e,"xmlns","http://www.w3.org/2000/svg"),y(e,"x","0px"),y(e,"y","0px"),y(e,"width",i[1]),y(e,"height",i[0]),y(e,"viewBox","0 0 50 50"),Ye(e,"fill","currentcolor")},m(n,r){F(n,e,r),R(e,t)},p(n,[r]){r&2&&y(e,"width",n[1]),r&1&&y(e,"height",n[0])},i:fe,o:fe,d(n){n&&S(e)}}}function L_e(i,e,t){let{height:n="24px"}=e,{width:r="24px"}=e;return i.$$set=s=>{"height"in s&&t(0,n=s.height),"width"in s&&t(1,r=s.width)},[n,r]}class T_e extends Ue{constructor(e){super(),je(this,e,L_e,x_e,Ve,{height:0,width:1})}}function I_e(i){let e,t;return{c(){e=Ee("svg"),t=Ee("path"),this.h()},l(n){e=xe(n,"svg",{xmlns:!0,x:!0,y:!0,width:!0,height:!0,viewBox:!0,style:!0});var r=M(e);t=xe(r,"path",{d:!0}),M(t).forEach(S),r.forEach(S),this.h()},h(){y(t,"d","M 28.90625 1.96875 C 28.863281 1.976563 28.820313 1.988281 28.78125 2 L 11.5 2 C 9.585938 2 8 3.558594 8 5.46875 L 8 43.90625 C 8 46.160156 9.867188 48 12.125 48 L 37.875 48 C 40.132813 48 42 46.160156 42 43.90625 L 42 15.1875 C 42.027344 15.054688 42.027344 14.914063 42 14.78125 L 42 14.5 C 42.007813 14.234375 41.90625 13.972656 41.71875 13.78125 L 30.21875 2.28125 C 30.027344 2.09375 29.765625 1.992188 29.5 2 L 29.1875 2 C 29.097656 1.976563 29 1.964844 28.90625 1.96875 Z M 11.5 4 L 28 4 L 28 12.34375 C 28 14.355469 29.644531 16 31.65625 16 L 40 16 L 40 43.90625 C 40 45.074219 39.054688 46 37.875 46 L 12.125 46 C 10.945313 46 10 45.074219 10 43.90625 L 10 5.46875 C 10 4.644531 10.660156 4 11.5 4 Z M 30 4.9375 L 39.0625 14 L 31.65625 14 C 30.722656 14 30 13.277344 30 12.34375 Z M 17 24 L 17 38 L 33 38 L 33 24 Z M 19 26 L 24 26 L 24 28 L 19 28 Z M 26 26 L 31 26 L 31 28 L 26 28 Z M 19 30 L 24 30 L 24 32 L 19 32 Z M 26 30 L 31 30 L 31 32 L 26 32 Z M 19 34 L 24 34 L 24 36 L 19 36 Z M 26 34 L 31 34 L 31 36 L 26 36 Z"),y(e,"xmlns","http://www.w3.org/2000/svg"),y(e,"x","0px"),y(e,"y","0px"),y(e,"width",i[1]),y(e,"height",i[0]),y(e,"viewBox","0 0 50 50"),Ye(e,"fill","currentcolor")},m(n,r){F(n,e,r),R(e,t)},p(n,[r]){r&2&&y(e,"width",n[1]),r&1&&y(e,"height",n[0])},i:fe,o:fe,d(n){n&&S(e)}}}function D_e(i,e,t){let{height:n="24px"}=e,{width:r="24px"}=e;return i.$$set=s=>{"height"in s&&t(0,n=s.height),"width"in s&&t(1,r=s.width)},[n,r]}class N_e extends Ue{constructor(e){super(),je(this,e,D_e,I_e,Ve,{height:0,width:1})}}function A_e(i){let e,t,n;return{c(){e=Ee("svg"),t=Ee("g"),n=Ee("path"),this.h()},l(r){e=xe(r,"svg",{xmlns:!0,x:!0,y:!0,width:!0,height:!0,"xmlns:xlink":!0,viewBox:!0,"enable-background":!0,"xml:space":!0});var s=M(e);t=xe(s,"g",{});var o=M(t);n=xe(o,"path",{d:!0}),M(n).forEach(S),o.forEach(S),s.forEach(S),this.h()},h(){y(n,"d","M732.4,557.3c-4.2-0.8-12.5-1.2-25.2-1.2h-16.9v49.3h19.2c13.7,0,23-1,27.6-2.8c4.7-1.8,8.3-4.7,11-8.6c2.7-3.9,4-8.3,4-13.5c0-6.3-1.8-11.6-5.5-15.7C742.8,560.9,738.1,558.3,732.4,557.3z M845.2,483.1c-13.4,0-26.4,1.8-38.8,5.3c2.2-10,3.4-20.4,3.4-31c0-79.2-63.9-143.4-142.6-143.4c-32.5,0-62.6,11-86.5,29.5C541.2,274,467,227.2,381.7,227.2c-117.6,0-214.4,89.2-227.3,203.8C72.6,444,10,515.1,10,600.8c0,95,76.8,172,171.4,172h663.7l0,0c80,0,144.9-64.9,144.9-144.9C990.1,547.9,925.3,483.1,845.2,483.1z M342.1,700.5h-35v-76.1h-68.5v76.1h-35V526.7h35v68.5h68.5v-68.5h35V700.5z M497.3,556.1h-51.2v144.4h-35V556.1h-51.4v-29.4h137.5V556.1z M639,556.1h-51.2v144.4h-35V556.1h-51.4v-29.4H639V556.1z M782.3,607.1c-3.9,7.2-8.8,13-14.7,17.1c-5.9,4.1-11.9,6.9-18.1,8.2c-8.3,1.7-20.4,2.5-36.3,2.5h-22.8v65.6h-35l0-173.8h56.1c21.2,0,35.1,0.8,41.6,2.7c9.9,2.7,18.2,8.3,25,17c6.6,8.7,10,20,10,33.9C788.1,590.8,786,599.9,782.3,607.1z"),y(e,"xmlns","http://www.w3.org/2000/svg"),y(e,"x","0px"),y(e,"y","0px"),y(e,"width",i[1]),y(e,"height",i[0]),y(e,"xmlns:xlink","http://www.w3.org/1999/xlink"),y(e,"viewBox","0 0 1000 1000"),y(e,"enable-background","new 0 0 1000 1000"),y(e,"xml:space","preserve")},m(r,s){F(r,e,s),R(e,t),R(t,n)},p(r,[s]){s&2&&y(e,"width",r[1]),s&1&&y(e,"height",r[0])},i:fe,o:fe,d(r){r&&S(e)}}}function R_e(i,e,t){let{height:n="24px"}=e,{width:r="24px"}=e;return i.$$set=s=>{"height"in s&&t(0,n=s.height),"width"in s&&t(1,r=s.width)},[n,r]}class O_e extends Ue{constructor(e){super(),je(this,e,R_e,A_e,Ve,{height:0,width:1})}}function M_e(i){let e,t,n;return{c(){e=Ee("svg"),t=Ee("rect"),n=Ee("path"),this.h()},l(r){e=xe(r,"svg",{xmlns:!0,width:!0,height:!0,viewBox:!0,fill:!0,stroke:!0,"stroke-width":!0,"stroke-linecap":!0,"stroke-linejoin":!0});var s=M(e);t=xe(s,"rect",{x:!0,y:!0,width:!0,height:!0,rx:!0}),M(t).forEach(S),n=xe(s,"path",{d:!0}),M(n).forEach(S),s.forEach(S),this.h()},h(){y(t,"x","2"),y(t,"y","4"),y(t,"width","20"),y(t,"height","16"),y(t,"rx","2"),y(n,"d","m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7"),y(e,"xmlns","http://www.w3.org/2000/svg"),y(e,"width",i[1]),y(e,"height",i[0]),y(e,"viewBox","0 0 24 24"),y(e,"fill","none"),y(e,"stroke","currentColor"),y(e,"stroke-width","2"),y(e,"stroke-linecap","round"),y(e,"stroke-linejoin","round")},m(r,s){F(r,e,s),R(e,t),R(e,n)},p(r,[s]){s&2&&y(e,"width",r[1]),s&1&&y(e,"height",r[0])},i:fe,o:fe,d(r){r&&S(e)}}}function P_e(i,e,t){let{height:n="24px"}=e,{width:r="24px"}=e;return i.$$set=s=>{"height"in s&&t(0,n=s.height),"width"in s&&t(1,r=s.width)},[n,r]}class F_e extends Ue{constructor(e){super(),je(this,e,P_e,M_e,Ve,{height:0,width:1})}}function B_e(i){let e,t;return{c(){e=Ee("svg"),t=Ee("path"),this.h()},l(n){e=xe(n,"svg",{xmlns:!0,x:!0,y:!0,width:!0,height:!0,viewBox:!0,style:!0});var r=M(e);t=xe(r,"path",{d:!0}),M(t).forEach(S),r.forEach(S),this.h()},h(){y(t,"d","M 15.9375 4.03125 C 12.917 4.0435 9.9179219 4.4269844 8.3574219 5.1464844 C 8.3574219 5.1464844 5 6.6748594 5 11.880859 C 5 18.077859 4.9955 25.860234 10.5625 27.365234 C 12.6945 27.938234 14.527953 28.061562 16.001953 27.976562 C 18.676953 27.825562 20 27.005859 20 27.005859 L 19.910156 25.029297 C 19.910156 25.029297 18.176297 25.640313 16.029297 25.570312 C 13.902297 25.495313 11.6615 25.335688 11.3125 22.679688 C 11.2805 22.432688 11.264625 22.182594 11.265625 21.933594 C 15.772625 23.052594 19.615828 22.420969 20.673828 22.292969 C 23.627828 21.933969 26.199344 20.081672 26.527344 18.388672 C 27.041344 15.720672 26.998047 11.880859 26.998047 11.880859 C 26.998047 6.6748594 23.646484 5.1464844 23.646484 5.1464844 C 22.000984 4.3779844 18.958 4.019 15.9375 4.03125 z M 12.705078 8.0019531 C 13.739953 8.0297031 14.762578 8.4927031 15.392578 9.4707031 L 16.001953 10.505859 L 16.609375 9.4707031 C 17.874375 7.5037031 20.709594 7.6264375 22.058594 9.1484375 C 23.302594 10.596438 23.025391 11.531 23.025391 18 L 23.025391 18.001953 L 20.578125 18.001953 L 20.578125 12.373047 C 20.578125 9.7380469 17.21875 9.6362812 17.21875 12.738281 L 17.21875 16 L 14.787109 16 L 14.787109 12.738281 C 14.787109 9.6362812 11.429688 9.7360938 11.429688 12.371094 L 11.429688 18 L 8.9765625 18 C 8.9765625 11.526 8.7043594 10.585438 9.9433594 9.1484375 C 10.622859 8.3824375 11.670203 7.9742031 12.705078 8.0019531 z"),y(e,"xmlns","http://www.w3.org/2000/svg"),y(e,"x","0px"),y(e,"y","0px"),y(e,"width",i[1]),y(e,"height",i[0]),y(e,"viewBox","0 0 32 32"),Ye(e,"fill","currentcolor")},m(n,r){F(n,e,r),R(e,t)},p(n,[r]){r&2&&y(e,"width",n[1]),r&1&&y(e,"height",n[0])},i:fe,o:fe,d(n){n&&S(e)}}}function V_e(i,e,t){let{height:n="24px"}=e,{width:r="24px"}=e;return i.$$set=s=>{"height"in s&&t(0,n=s.height),"width"in s&&t(1,r=s.width)},[n,r]}class W_e extends Ue{constructor(e){super(),je(this,e,V_e,B_e,Ve,{height:0,width:1})}}function H_e(i){let e,t;return{c(){e=Ee("svg"),t=Ee("path"),this.h()},l(n){e=xe(n,"svg",{xmlns:!0,x:!0,y:!0,width:!0,height:!0,viewBox:!0,style:!0});var r=M(e);t=xe(r,"path",{d:!0}),M(t).forEach(S),r.forEach(S),this.h()},h(){y(t,"d","M 5 5 A 1.0001 1.0001 0 0 0 4 6 L 4 44 A 1.0001 1.0001 0 0 0 5 45 L 8 45 A 1.0001 1.0001 0 1 0 8 43 L 6 43 L 6 7 L 8 7 A 1.0001 1.0001 0 1 0 8 5 L 5 5 z M 42 5 A 1.0001 1.0001 0 1 0 42 7 L 44 7 L 44 43 L 42 43 A 1.0001 1.0001 0 1 0 42 45 L 45 45 A 1.0001 1.0001 0 0 0 46 44 L 46 6 A 1.0001 1.0001 0 0 0 45 5 L 42 5 z M 31.074219 17.509766 C 29.975744 17.487506 28.868391 17.760297 27.978516 18.373047 C 27.407516 18.767047 26.915609 19.272813 26.349609 19.757812 C 25.488609 18.039813 23.929344 17.580781 22.152344 17.550781 C 20.351344 17.519781 18.920922 18.341797 17.669922 19.841797 L 17.669922 18 L 14 18 L 14 32 L 17.664062 32 C 17.664062 32 17.657969 26.766016 17.667969 24.166016 C 17.669969 23.704016 17.689203 23.23225 17.783203 22.78125 C 18.073203 21.39225 19.538031 20.534437 20.957031 20.648438 C 22.309031 20.757437 23.100016 21.495656 23.166016 23.097656 C 23.177016 23.376656 23.166016 32 23.166016 32 L 26.832031 32 L 26.832031 24.228516 C 26.838031 23.629516 26.901875 23.0175 27.046875 22.4375 C 27.372875 21.1375 28.590531 20.49825 30.019531 20.65625 C 31.279531 20.79525 32.239031 21.474609 32.332031 22.849609 L 32.332031 32 L 36 32 L 36 22 C 36 21 35.746359 20.490859 35.443359 19.880859 C 34.710859 18.405234 32.90501 17.546865 31.074219 17.509766 z"),y(e,"xmlns","http://www.w3.org/2000/svg"),y(e,"x","0px"),y(e,"y","0px"),y(e,"width",i[1]),y(e,"height",i[0]),y(e,"viewBox","0 0 50 50"),Ye(e,"fill","currentcolor")},m(n,r){F(n,e,r),R(e,t)},p(n,[r]){r&2&&y(e,"width",n[1]),r&1&&y(e,"height",n[0])},i:fe,o:fe,d(n){n&&S(e)}}}function z_e(i,e,t){let{height:n="24px"}=e,{width:r="24px"}=e;return i.$$set=s=>{"height"in s&&t(0,n=s.height),"width"in s&&t(1,r=s.width)},[n,r]}class $_e extends Ue{constructor(e){super(),je(this,e,z_e,H_e,Ve,{height:0,width:1})}}function U_e(i){let e,t,n,r,s,o,a,l,c,u,d,h,f,g,p,m,_;return{c(){e=Ee("svg"),t=Ee("g"),n=Ee("path"),r=Ee("g"),s=Ee("path"),o=Ee("g"),a=Ee("path"),l=Ee("g"),c=Ee("path"),u=Ee("g"),d=Ee("path"),h=Ee("g"),f=Ee("path"),g=Ee("g"),p=Ee("path"),m=Ee("g"),_=Ee("path"),this.h()},l(b){e=xe(b,"svg",{"xmlns:xlink":!0,xmlns:!0,width:!0,height:!0,viewBox:!0});var v=M(e);t=xe(v,"g",{transform:!0,style:!0});var w=M(t);n=xe(w,"path",{d:!0}),M(n).forEach(S),w.forEach(S),r=xe(v,"g",{transform:!0,style:!0});var E=M(r);s=xe(E,"path",{d:!0}),M(s).forEach(S),E.forEach(S),o=xe(v,"g",{transform:!0,style:!0});var I=M(o);a=xe(I,"path",{d:!0}),M(a).forEach(S),I.forEach(S),l=xe(v,"g",{transform:!0,style:!0});var x=M(l);c=xe(x,"path",{d:!0}),M(c).forEach(S),x.forEach(S),u=xe(v,"g",{transform:!0,style:!0});var T=M(u);d=xe(T,"path",{d:!0}),M(d).forEach(S),T.forEach(S),h=xe(v,"g",{transform:!0,style:!0});var L=M(h);f=xe(L,"path",{d:!0}),M(f).forEach(S),L.forEach(S),g=xe(v,"g",{transform:!0,style:!0});var O=M(g);p=xe(O,"path",{d:!0}),M(p).forEach(S),O.forEach(S),m=xe(v,"g",{transform:!0,style:!0});var N=M(m);_=xe(N,"path",{d:!0}),M(_).forEach(S),N.forEach(S),v.forEach(S),this.h()},h(){y(n,"d","M0 62.235 C0 62.235 12.8418 62.235 12.8418 62.235 C12.8418 62.235 12.8418 11.524 12.8418 11.524 C12.8418 11.524 32.7226 55.732 32.7226 55.732 C35.0683 61.083 38.2793 62.976 44.5762 62.976 C50.874 62.976 53.9609 61.083 56.3076 55.732 C56.3076 55.732 76.1875 11.524 76.1875 11.524 C76.1875 11.524 76.1875 62.235 76.1875 62.235 C76.1875 62.235 89.0303 62.235 89.0303 62.235 C89.0303 62.235 89.0303 11.607 89.0303 11.607 C89.0303 6.668 87.0537 4.28 82.9795 3.046 C73.2246 0 66.6797 2.634 63.7158 9.22 C63.7158 9.22 44.206 52.85 44.206 52.85 C44.206 52.85 25.3135 9.22 25.3135 9.22 C22.4736 2.634 15.8056 0 6.05078 3.046 C1.97559 4.28 0 6.668 0 11.607 C0 11.607 0 62.235 0 62.235 Z"),y(t,"transform","translate(0.738281, 121.593)"),Ye(t,"fill","#000000"),Ye(t,"fill-rule","nonzero"),Ye(t,"stroke","none"),Ye(t,"stroke-width","0.87088"),Ye(t,"stroke-linecap","butt"),Ye(t,"stroke-linejoin","miter"),Ye(t,"stroke-dasharray","none"),y(s,"d","M0.002 0.136 C0.002 0.136 12.84 0.136 12.84 0.136 C12.84 0.136 12.84 28.074 12.84 28.074 C12.72 29.592 13.327 33.154 20.362 33.265 C23.951 33.321 48.062 33.265 48.287 33.265 C48.287 33.265 48.287 0 48.287 0 C48.287 0 61.155 0 61.155 0 C61.214 0 61.142 45.364 61.143 45.557 C61.214 56.745 47.261 59.175 40.83 59.363 C40.83 59.363 0.281 59.363 0.281 59.363 C0.281 59.363 0.281 50.724 0.281 50.724 C0.352 50.724 40.8 50.732 40.902 50.722 C49.167 49.849 48.191 45.741 48.19 44.358 C48.19 44.358 48.19 40.99 48.19 40.99 C48.19 40.99 20.895 40.99 20.895 40.99 C8.196 40.873 0.109 35.331 0.009 28.955 C0 28.364 0.283 0.415 0.002 0.136 Z"),y(r,"transform","translate(100.444, 142.416)"),Ye(r,"fill","#000000"),Ye(r,"fill-rule","nonzero"),Ye(r,"stroke","none"),Ye(r,"stroke-width","0.87088"),Ye(r,"stroke-linecap","butt"),Ye(r,"stroke-linejoin","miter"),Ye(r,"stroke-dasharray","none"),y(a,"d","M0 59.271 C0 59.271 36.92 59.271 36.92 59.271 C41.242 59.271 45.441 58.366 48.775 56.801 C54.331 54.25 57.048 50.793 57.048 46.264 C57.048 46.264 57.048 36.88 57.048 36.88 C57.048 33.175 53.961 29.717 47.91 27.413 C44.699 26.177 40.748 25.519 36.92 25.519 C36.92 25.519 21.361 25.519 21.361 25.519 C16.176 25.519 13.706 23.955 13.089 20.498 C12.965 20.086 12.965 19.756 12.965 19.345 C12.965 19.345 12.965 13.501 12.965 13.501 C12.965 13.171 12.965 12.841 13.089 12.43 C13.706 9.796 15.065 9.054 19.633 8.643 C20.004 8.643 20.497 8.56 20.868 8.56 C20.868 8.56 57.542 8.56 57.542 8.56 C57.542 8.56 57.542 0 57.542 0 C57.542 0 21.485 0 21.485 0 C16.299 0 13.582 0.329 11.113 1.069 C3.457 3.457 0.123 7.244 0.123 13.83 C0.123 13.83 0.123 21.321 0.123 21.321 C0.123 27.084 6.668 32.023 17.657 33.175 C18.893 33.257 20.127 33.339 21.361 33.339 C21.361 33.339 34.697 33.339 34.697 33.339 C35.192 33.339 35.686 33.339 36.056 33.422 C40.131 33.752 41.859 34.492 43.095 35.974 C43.835 36.714 44.082 37.456 44.082 38.279 C44.082 38.279 44.082 45.77 44.082 45.77 C44.082 46.676 43.465 47.829 42.231 48.816 C41.119 49.804 39.267 50.463 36.797 50.628 C36.303 50.628 35.933 50.71 35.439 50.71 C35.439 50.71 0 50.71 0 50.71 C0 50.71 0 59.271 0 59.271 Z"),y(o,"transform","translate(171.496, 124.557)"),Ye(o,"fill","#000000"),Ye(o,"fill-rule","nonzero"),Ye(o,"stroke","none"),Ye(o,"stroke-width","0.87088"),Ye(o,"stroke-linecap","butt"),Ye(o,"stroke-linejoin","miter"),Ye(o,"stroke-dasharray","none"),y(c,"d","M0 44.371 C0 53.179 6.544 58.119 19.757 59.107 C20.991 59.189 22.227 59.271 23.461 59.271 C23.461 59.271 56.925 59.271 56.925 59.271 C56.925 59.271 56.925 50.71 56.925 50.71 C56.925 50.71 23.214 50.71 23.214 50.71 C15.682 50.71 12.842 48.816 12.842 44.289 C12.842 44.289 12.842 0 12.842 0 C12.842 0 0 0 0 0 C0 0 0 44.371 0 44.371 Z"),y(l,"transform","translate(308.656, 124.557)"),Ye(l,"fill","#000000"),Ye(l,"fill-rule","nonzero"),Ye(l,"stroke","none"),Ye(l,"stroke-width","0.87088"),Ye(l,"stroke-linecap","butt"),Ye(l,"stroke-linejoin","miter"),Ye(l,"stroke-dasharray","none"),y(d,"d","M0 44.711 C0 44.711 0 14.189 0 14.189 C0 6.435 5.445 1.732 16.209 0.247 C17.323 0.083 18.561 0 19.674 0 C19.674 0 44.05 0 44.05 0 C45.287 0 46.402 0.083 47.639 0.247 C58.404 1.732 63.848 6.435 63.848 14.189 C63.848 14.189 63.848 44.711 63.848 44.711 C63.848 51.002 61.536 54.369 56.207 56.563 C56.207 56.563 68.857 67.981 68.857 67.981 C68.857 67.981 53.946 67.981 53.946 67.981 C53.946 67.981 43.712 58.743 43.712 58.743 C43.712 58.743 33.409 59.396 33.409 59.396 C33.409 59.396 19.674 59.396 19.674 59.396 C17.323 59.396 14.849 59.065 12.126 58.323 C3.96 56.096 0 51.806 0 44.711 Z M13.861 43.969 C13.861 44.382 13.984 44.794 14.108 45.289 C14.85 48.836 18.191 50.816 23.264 50.816 C23.264 50.816 34.931 50.816 34.931 50.816 C34.931 50.816 24.214 41.141 24.214 41.141 C24.214 41.141 39.125 41.141 39.125 41.141 C39.125 41.141 48.472 49.579 48.472 49.579 C50.194 48.661 51.328 47.257 51.724 45.454 C51.847 45.042 51.847 44.629 51.847 44.217 C51.847 44.217 51.847 14.932 51.847 14.932 C51.847 14.602 51.847 14.189 51.724 13.776 C50.981 10.477 47.64 8.58 42.691 8.58 C42.691 8.58 23.264 8.58 23.264 8.58 C17.573 8.58 13.861 11.055 13.861 14.932 C13.861 14.932 13.861 43.969 13.861 43.969 Z"),y(u,"transform","translate(236.74, 124.666)"),Ye(u,"fill","#000000"),Ye(u,"fill-rule","nonzero"),Ye(u,"stroke","none"),Ye(u,"stroke-width","0.87088"),Ye(u,"stroke-linecap","butt"),Ye(u,"stroke-linejoin","miter"),Ye(u,"stroke-dasharray","none"),y(f,"d","M135.289 114.997 C127.395 114.783 121.365 115.517 116.21 117.691 C114.745 118.309 112.409 118.325 112.17 120.161 C112.975 121.005 113.1 122.265 113.74 123.303 C114.971 125.295 117.049 127.964 118.903 129.364 C120.929 130.893 123.017 132.529 125.189 133.853 C129.052 136.209 133.365 137.554 137.085 139.914 C139.277 141.305 141.455 143.057 143.594 144.627 C144.651 145.403 145.362 146.61 146.736 147.096 C146.736 147.022 146.736 146.947 146.736 146.872 C146.014 145.953 145.828 144.689 145.165 143.729 C144.193 142.757 143.22 141.784 142.247 140.811 C139.394 137.024 135.772 133.698 131.922 130.935 C128.852 128.731 121.98 125.754 120.699 122.181 C120.624 122.106 120.55 122.031 120.474 121.956 C122.651 121.711 125.2 120.923 127.209 120.385 C130.584 119.48 133.6 119.714 137.085 118.814 C138.656 118.365 140.227 117.915 141.799 117.467 C141.799 117.167 141.799 116.869 141.799 116.569 C140.037 114.761 138.781 112.369 136.86 110.733 C131.834 106.453 126.348 102.177 120.699 98.6114 C117.566 96.6338 113.694 95.3487 110.374 93.6729 C109.257 93.1094 107.295 92.8164 106.557 91.877 C104.813 89.6533 103.863 86.835 102.518 84.2451 C99.7 78.8194 96.933 72.8936 94.437 67.1856 C92.734 63.293 91.622 59.4541 89.499 55.9619 C79.307 39.2051 68.336 29.0908 51.341 19.1494 C47.725 17.0352 43.371 16.2002 38.77 15.1094 C36.302 14.96 33.832 14.8096 31.363 14.6602 C29.856 14.0303 28.288 12.1865 26.874 11.293 C21.244 7.73633 6.803 0 2.633 10.1709 C0 16.5908 6.568 22.8555 8.917 26.1084 C10.566 28.3906 12.677 30.9492 13.855 33.5156 C14.63 35.2022 14.764 36.8936 15.427 38.6787 C17.059 43.0752 18.478 47.8584 20.589 51.9219 C21.656 53.9776 22.832 56.1436 24.181 57.9824 C25.008 59.1104 26.425 59.6074 26.649 61.3496 C25.263 63.2891 25.184 66.2998 24.405 68.7569 C20.897 79.8184 22.22 93.5674 27.323 101.754 C28.889 104.267 32.577 109.657 37.648 107.59 C42.084 105.783 41.093 100.184 42.362 95.2442 C42.649 94.124 42.473 93.3008 43.035 92.5508 C43.035 92.625 43.035 92.7002 43.035 92.7754 C44.382 95.4688 45.729 98.1621 47.076 100.855 C50.066 105.671 55.373 110.704 59.87 114.1 C62.202 115.861 64.038 118.906 67.053 119.936 C67.053 119.861 67.053 119.787 67.053 119.711 C66.977 119.711 66.903 119.711 66.828 119.711 C66.244 118.8 65.33 118.423 64.584 117.691 C62.827 115.969 60.874 113.828 59.421 111.855 C55.331 106.302 51.716 100.224 48.423 93.8975 C46.85 90.877 45.483 87.544 44.157 84.4697 C43.646 83.2842 43.652 81.4922 42.587 80.878 C41.135 83.1309 38.996 84.9522 37.873 87.6123 C36.077 91.8643 35.845 97.0498 35.18 102.427 C34.786 102.568 34.961 102.471 34.73 102.651 C31.604 101.897 30.505 98.6787 29.344 95.918 C26.405 88.9356 25.859 77.6924 28.445 69.6553 C29.114 67.5762 32.138 61.0264 30.914 59.1055 C30.33 57.1885 28.402 56.0801 27.323 54.6153 C25.988 52.8047 24.655 50.4209 23.731 48.3301 C21.326 42.8858 20.203 36.7744 17.671 31.2715 C16.461 28.6406 14.414 25.9785 12.733 23.6397 C10.872 21.0489 8.788 19.1406 7.346 16.0069 C6.833 14.8936 6.136 13.1113 6.897 11.9668 C7.139 11.1943 7.48 10.8721 8.244 10.6201 C9.546 9.61621 13.172 10.9541 14.528 11.5176 C18.128 13.0127 21.132 14.4365 24.181 16.4561 C25.645 17.4268 27.125 19.3037 28.894 19.8233 C29.567 19.8233 30.241 19.8233 30.914 19.8233 C34.074 20.5498 37.614 20.0489 40.566 20.9453 C45.784 22.5313 50.46 24.9981 54.707 27.6797 C67.645 35.8487 78.223 47.4776 85.459 61.3496 C86.623 63.583 87.127 65.7149 88.152 68.084 C90.221 72.8614 92.827 77.7774 94.885 82.4492 C96.939 87.1104 98.941 91.8145 101.844 95.6934 C103.371 97.7324 109.266 98.8262 111.945 99.958 C113.823 100.752 116.9 101.579 118.679 102.651 C122.077 104.701 125.369 107.141 128.556 109.386 C130.149 110.508 135.045 112.969 135.289 114.997 Z"),y(h,"transform","translate(241.59, -4.64258)"),Ye(h,"fill","#000000"),Ye(h,"fill-rule","nonzero"),Ye(h,"stroke","none"),Ye(h,"stroke-width","0.87088"),Ye(h,"stroke-linecap","butt"),Ye(h,"stroke-linejoin","miter"),Ye(h,"stroke-dasharray","none"),y(p,"d","M4.041 0.0303 C2.395 0 1.231 0.21 0 0.4786 C0 0.5537 0 0.6289 0 0.7032 C0.075 0.7032 0.15 0.7032 0.225 0.7032 C1.01 2.3164 2.396 3.3545 3.367 4.7442 C4.115 6.3155 4.863 7.8868 5.612 9.4571 C5.686 9.3828 5.762 9.3077 5.836 9.2334 C7.226 8.2539 7.863 6.6866 7.856 4.295 C7.299 3.709 7.217 2.9737 6.734 2.2744 C6.092 1.3428 4.85 0.8135 4.041 0.0303 Z"),y(g,"transform","translate(272.504, 24.8027)"),Ye(g,"fill","#000000"),Ye(g,"fill-rule","evenodd"),Ye(g,"stroke","none"),Ye(g,"stroke-width","0.87088"),Ye(g,"stroke-linecap","butt"),Ye(g,"stroke-linejoin","miter"),Ye(g,"stroke-dasharray","none"),y(_,"d","M0 9.463 C0 15.117 4.467 18.927 9.464 18.927 C14.461 18.927 18.928 15.117 18.928 9.463 C18.928 3.81 14.461 0 9.464 0 C4.467 0 0 3.81 0 9.463 Z M16.808 9.463 C16.808 13.753 13.528 16.959 9.464 16.959 C5.351 16.959 2.12 13.753 2.12 9.463 C2.12 5.173 5.351 1.967 9.464 1.967 C13.528 1.967 16.808 5.173 16.808 9.463 Z M12.014 14.864 C12.014 14.864 14.133 14.864 14.133 14.864 C14.133 14.864 11.03 10.12 11.03 10.12 C12.695 9.943 13.956 9.135 13.956 7.167 C13.956 4.971 12.569 4.063 9.894 4.063 C9.894 4.063 5.679 4.063 5.679 4.063 C5.679 4.063 5.679 14.864 5.679 14.864 C5.679 14.864 7.496 14.864 7.496 14.864 C7.496 14.864 7.496 10.195 7.496 10.195 C7.496 10.195 9.187 10.195 9.187 10.195 C9.187 10.195 12.014 14.864 12.014 14.864 Z M7.496 8.681 C7.496 8.681 7.496 5.577 7.496 5.577 C7.496 5.577 9.59 5.577 9.59 5.577 C10.676 5.577 11.988 5.779 11.988 7.041 C11.988 8.554 10.802 8.681 9.439 8.681 C9.439 8.681 7.496 8.681 7.496 8.681 Z"),y(m,"transform","translate(371.609, 165.56)"),Ye(m,"fill","#000000"),Ye(m,"fill-rule","evenodd"),Ye(m,"stroke","none"),Ye(m,"stroke-width","1"),Ye(m,"stroke-linecap","butt"),Ye(m,"stroke-linejoin","miter"),Ye(m,"stroke-dasharray","none"),y(e,"xmlns:xlink","http://www.w3.org/1999/xlink"),y(e,"xmlns","http://www.w3.org/2000/svg"),y(e,"width",i[1]),y(e,"height",i[0]),y(e,"viewBox","0 0 391 202")},m(b,v){F(b,e,v),R(e,t),R(t,n),R(e,r),R(r,s),R(e,o),R(o,a),R(e,l),R(l,c),R(e,u),R(u,d),R(e,h),R(h,f),R(e,g),R(g,p),R(e,m),R(m,_)},p(b,[v]){v&2&&y(e,"width",b[1]),v&1&&y(e,"height",b[0])},i:fe,o:fe,d(b){b&&S(e)}}}function j_e(i,e,t){let{height:n="24px"}=e,{width:r="24px"}=e;return i.$$set=s=>{"height"in s&&t(0,n=s.height),"width"in s&&t(1,r=s.width)},[n,r]}class q_e extends Ue{constructor(e){super(),je(this,e,j_e,U_e,Ve,{height:0,width:1})}}function G_e(i){let e,t;return{c(){e=Ee("svg"),t=Ee("path"),this.h()},l(n){e=xe(n,"svg",{xmlns:!0,x:!0,y:!0,width:!0,height:!0,viewBox:!0,style:!0});var r=M(e);t=xe(r,"path",{d:!0}),M(t).forEach(S),r.forEach(S),this.h()},h(){y(t,"d","M 34.902344 2 C 32.863281 2 31.097656 2.550781 29.875 3.09375 C 28.675781 2.691406 26.6875 2.003906 24.300781 2.5 C 22.910156 2.742188 21.632813 3.316406 20.460938 4.195313 C 18.53125 3.265625 16.515625 2.695313 14.402344 2.601563 C 13.101563 2.5 7.800781 3.101563 5.898438 5.898438 C 5.199219 7 4.5 8.398438 4.199219 10.097656 C 3.898438 11.597656 3.898438 13.300781 4.398438 16.800781 C 4.699219 19.199219 5.101563 20.800781 6 24.097656 C 6.101563 24.398438 6.601563 26 8.101563 30.402344 C 8.398438 31.199219 9 32.699219 10.199219 34.097656 C 11 35.097656 11.800781 35.699219 12.800781 35.699219 C 14.101563 35.699219 15 34.800781 15.800781 33.800781 C 15.859375 33.734375 15.921875 33.660156 15.980469 33.59375 C 15.90625 33.710938 15.839844 33.839844 15.800781 34 C 15.601563 35 16.800781 35.800781 17.800781 36.199219 C 18.601563 36.597656 19.5 36.699219 20.199219 36.699219 C 21.097656 36.699219 21.800781 36.5 22.199219 36.402344 C 22.542969 36.285156 23.285156 35.964844 24.078125 35.4375 C 24.113281 37.992188 24.136719 41.007813 24.199219 41.699219 C 24.5 44.300781 25.199219 46.097656 26.5 47.097656 C 27.5 47.898438 29.300781 48 29.402344 48 C 31.199219 48 34 46.800781 35.199219 44.902344 C 35.800781 44 36 43.199219 36.199219 42.097656 C 36.398438 41.5 36.597656 38 36.699219 37.300781 C 36.835938 36.195313 36.941406 35.105469 37.046875 34.046875 C 37.707031 34.21875 38.519531 34.402344 39.402344 34.402344 C 41 34.402344 43.101563 33.300781 43.5 33.097656 C 44.300781 32.5 45.898438 31.101563 45.199219 29.902344 C 44.800781 29.199219 44.199219 29.199219 42.699219 29.402344 C 42.699219 29.402344 40.300781 29.699219 40.097656 29.597656 C 39.953125 29.542969 39.730469 29.402344 39.480469 29.21875 C 40 28.414063 40.460938 27.617188 41 26.902344 C 42.199219 24.601563 42.902344 22.800781 43.402344 21.402344 C 44.300781 18.902344 44.800781 16.898438 45.097656 15.5 C 45.800781 12.5 46 11.101563 45.597656 9.5 C 44.800781 6.699219 41.898438 4.300781 40.699219 3.601563 C 39.898438 3.199219 37.902344 2 34.902344 2 Z M 34.902344 4 C 37.402344 4 39.101563 5 40 5.398438 C 41.101563 6 43.601563 8 43.800781 9.898438 C 43.902344 11 44 12.101563 43.300781 15 C 42.902344 16.398438 42.5 18.199219 41.597656 20.699219 C 41.097656 22.097656 40.5 23.800781 39.300781 25.902344 C 39.269531 25.953125 39.234375 26.007813 39.203125 26.0625 C 39.320313 25.640625 39.402344 25.300781 39.402344 25.300781 C 39.601563 24.300781 39.601563 23.5 39.5 22.300781 C 39.398438 21.699219 39.300781 20.199219 39.300781 19.597656 C 39.300781 19.300781 39.597656 16.199219 39.699219 15.097656 C 39.800781 13.300781 38.699219 11.097656 38.402344 10.699219 C 36.902344 8.398438 36.101563 7.101563 34.5 5.800781 C 34.101563 5.460938 33.417969 4.894531 32.488281 4.324219 C 33.222656 4.144531 34.035156 4 34.902344 4 Z M 26.066406 4.410156 C 27.371094 4.441406 28.476563 4.800781 29.300781 5.101563 C 31.402344 5.800781 32.699219 6.898438 33.300781 7.398438 C 34.601563 8.5 35.300781 9.601563 36.800781 11.902344 C 36.910156 12.121094 37.195313 12.585938 37.421875 13.234375 C 35.375 13.046875 34.015625 13.765625 33.199219 14.5 C 32 15.5 32.097656 17 32.199219 18.097656 C 32.199219 18.898438 32.402344 19.902344 33.902344 23.300781 C 34.5 24.800781 35.097656 26.398438 35.699219 27.5 C 36.011719 28.121094 36.394531 28.691406 36.804688 29.199219 C 36.566406 29.320313 36.324219 29.476563 36.097656 29.699219 C 35.5 30.398438 35.398438 31.101563 35.199219 32.402344 C 35 33.402344 34.800781 35.5 34.699219 37.199219 C 34.699219 37.898438 34.402344 41.300781 34.300781 41.800781 C 34 42.800781 33.898438 43.300781 33.5 43.902344 C 32.800781 45 30.601563 45.902344 29.300781 45.800781 C 28.902344 45.800781 28.300781 45.800781 27.800781 45.402344 C 26.699219 44.601563 26.300781 42.800781 26.199219 41.402344 C 26.097656 40.402344 26.199219 33.199219 26 31.597656 C 25.898438 31.199219 25.800781 30.199219 25 29.5 C 24.664063 29.21875 23.96875 29.074219 23.3125 28.976563 C 23.320313 28.640625 23.339844 28.304688 23.402344 28 C 23.5 27.398438 23.699219 27.097656 23.902344 26.597656 C 24 26.300781 24.199219 25.902344 24.402344 25.402344 C 25.300781 22.601563 25.097656 18.898438 24.597656 16.597656 C 24.5 16.398438 24.097656 14.800781 22.699219 13.902344 C 21.199219 13 19.597656 13.5 18.699219 13.800781 C 18.328125 13.902344 17.960938 14.0625 17.59375 14.25 C 17.65625 13.832031 17.710938 13.410156 17.800781 13 C 18.199219 11 18.601563 9.300781 19.902344 7.601563 C 21.300781 5.898438 22.898438 4.800781 24.699219 4.5 C 25.175781 4.425781 25.632813 4.398438 26.066406 4.410156 Z M 13.71875 4.585938 C 13.953125 4.582031 14.152344 4.585938 14.300781 4.601563 C 15.863281 4.683594 17.359375 5.050781 18.84375 5.675781 C 18.660156 5.878906 18.476563 6.082031 18.300781 6.300781 C 16.601563 8.300781 16.199219 10.398438 15.800781 12.5 C 15.300781 15 15.199219 17.597656 15.597656 20.199219 L 15.402344 22.097656 C 15.300781 23.097656 15.097656 25 16.199219 27 C 16.585938 27.664063 17.011719 28.226563 17.480469 28.707031 C 16.464844 30.050781 15.386719 31.320313 14.300781 32.5 C 13.699219 33.199219 13.199219 33.699219 12.800781 33.699219 C 12.699219 33.699219 12.300781 33.5 11.699219 32.800781 C 10.597656 31.601563 10.199219 30.300781 10 29.800781 C 8.800781 26.199219 8.101563 23.898438 8 23.597656 C 7.199219 20.398438 6.800781 18.800781 6.398438 16.5 C 5.898438 13.300781 5.898438 11.699219 6.199219 10.402344 C 6.5 9 7 7.898438 7.5 7.101563 C 8.726563 5.175781 12.09375 4.628906 13.71875 4.585938 Z M 36.664063 15.125 C 36.984375 15.125 37.332031 15.164063 37.699219 15.242188 C 37.6875 16.175781 37.300781 19.105469 37.300781 19.5 C 37.300781 20.300781 37.5 21.898438 37.5 22.5 C 37.601563 23.601563 37.601563 24.199219 37.5 25 C 37.5 25 37.351563 25.714844 37.199219 26.222656 C 36.734375 25.171875 36.21875 23.917969 35.597656 22.5 C 34.097656 19.101563 34 18.402344 34 17.902344 C 34 17.199219 34 16.300781 34.597656 15.902344 C 35.160156 15.402344 35.84375 15.132813 36.664063 15.125 Z M 21.140625 15.417969 C 21.339844 15.441406 21.523438 15.5 21.699219 15.597656 C 22.5 16 22.699219 17 22.699219 17 C 23.199219 19.199219 23.398438 22.5 22.597656 24.699219 C 22.5 25.097656 22.300781 25.398438 22.199219 25.699219 C 22 26.199219 21.800781 26.699219 21.597656 27.597656 C 21.546875 27.96875 21.523438 28.335938 21.511719 28.703125 C 20.820313 28.558594 20.167969 28.3125 19.699219 28 C 18.898438 27.601563 18.300781 26.898438 17.902344 26.097656 C 17.199219 24.597656 17.300781 23.199219 17.402344 22.402344 L 17.597656 20.097656 C 17.457031 18.972656 17.390625 17.84375 17.40625 16.722656 C 17.867188 16.328125 18.46875 15.925781 19.300781 15.699219 C 19.902344 15.550781 20.558594 15.34375 21.140625 15.417969 Z M 35.886719 16.089844 C 35.625 16.101563 35.347656 16.148438 35.199219 16.199219 C 34.800781 16.300781 34.699219 16.300781 34.597656 16.5 C 34.5 16.699219 34.800781 17 34.902344 17.199219 C 35 17.199219 35.300781 17.5 35.699219 17.402344 C 36 17.300781 36.199219 17.101563 36.300781 17 C 36.402344 16.898438 36.800781 16.398438 36.5 16.199219 C 36.398438 16.097656 36.148438 16.074219 35.886719 16.089844 Z M 20.914063 16.816406 C 20.804688 16.824219 20.699219 16.851563 20.597656 16.902344 C 20.5 16.902344 20.300781 17 20.199219 17.199219 C 20.097656 17.398438 20.199219 17.597656 20.300781 17.699219 C 20.5 18 20.800781 18.300781 21.300781 18.300781 C 21.402344 18.300781 21.800781 18.300781 22.097656 18 C 22.097656 18 22.402344 17.699219 22.402344 17.402344 C 22.300781 17.199219 22.101563 17.101563 21.800781 17 C 21.574219 16.925781 21.238281 16.792969 20.914063 16.816406 Z M 19.074219 29.902344 C 19.6875 30.230469 20.425781 30.496094 21.234375 30.679688 C 21.019531 31.109375 20.710938 31.464844 20.402344 31.699219 C 19.699219 32.199219 18.800781 32.5 17.902344 32.699219 C 17.699219 32.699219 17.601563 32.800781 17.402344 32.800781 C 16.917969 32.9375 16.449219 33.089844 16.128906 33.421875 C 17.109375 32.332031 18.09375 31.128906 19.074219 29.902344 Z M 38.355469 30.703125 C 38.792969 31.03125 39.222656 31.273438 39.597656 31.402344 C 40.199219 31.601563 40.699219 31.601563 42.5 31.402344 C 42.199219 31.699219 41.300781 32.199219 40 32.402344 C 39.164063 32.484375 38.125 32.285156 37.28125 32.042969 C 37.359375 31.476563 37.449219 31.152344 37.597656 31 C 37.652344 30.949219 37.984375 30.847656 38.355469 30.703125 Z M 23.296875 31.003906 C 23.503906 31.039063 23.667969 31.066406 23.699219 31.097656 C 23.898438 31.300781 24 31.800781 24 32 C 24.011719 32.171875 24.019531 32.605469 24.027344 32.90625 C 23.203125 33.871094 21.878906 34.40625 21.597656 34.5 C 21.199219 34.699219 20 34.898438 18.800781 34.5 C 19.800781 34.199219 20.800781 33.902344 21.597656 33.300781 C 22.296875 32.800781 22.898438 32.003906 23.296875 31.003906 Z"),y(e,"xmlns","http://www.w3.org/2000/svg"),y(e,"x","0px"),y(e,"y","0px"),y(e,"width",i[1]),y(e,"height",i[0]),y(e,"viewBox","0 0 50 50"),Ye(e,"fill","currentcolor")},m(n,r){F(n,e,r),R(e,t)},p(n,[r]){r&2&&y(e,"width",n[1]),r&1&&y(e,"height",n[0])},i:fe,o:fe,d(n){n&&S(e)}}}function K_e(i,e,t){let{height:n="24px"}=e,{width:r="24px"}=e;return i.$$set=s=>{"height"in s&&t(0,n=s.height),"width"in s&&t(1,r=s.width)},[n,r]}class Y_e extends Ue{constructor(e){super(),je(this,e,K_e,G_e,Ve,{height:0,width:1})}}function Z_e(i){let e,t;return{c(){e=Ee("svg"),t=Ee("path"),this.h()},l(n){e=xe(n,"svg",{xmlns:!0,x:!0,y:!0,width:!0,height:!0,viewBox:!0,style:!0});var r=M(e);t=xe(r,"path",{d:!0}),M(t).forEach(S),r.forEach(S),this.h()},h(){y(t,"d","M 28 7.9453125 L 21 10.279297 L 21 18.279297 L 16 19.945312 L 10 17.945312 L 3 20.279297 L 3 29.720703 L 3.6835938 29.949219 L 9 31.720703 L 9 39.720703 L 9.6835938 39.949219 L 16 42.054688 L 23 39.720703 L 23 31.720703 L 29 29.720703 L 29 21.720703 L 34 20.054688 L 40 22.054688 L 47 19.720703 L 47 10.279297 L 40 7.9453125 L 34 9.9453125 L 28 7.9453125 z M 28 10.054688 L 32.335938 11.5 L 28 12.945312 L 23.664062 11.5 L 28 10.054688 z M 40 10.054688 L 44.335938 11.5 L 40 12.945312 L 35.664062 11.5 L 40 10.054688 z M 23 13.388672 L 27 14.720703 L 27 19.611328 L 23 18.279297 L 23 13.388672 z M 33 13.388672 L 33 18.279297 L 29 19.611328 L 29 14.720703 L 33 13.388672 z M 35 13.388672 L 39 14.720703 L 39 19.611328 L 35 18.279297 L 35 13.388672 z M 45 13.388672 L 45 18.279297 L 41 19.611328 L 41 14.720703 L 45 13.388672 z M 10 20.054688 L 14.335938 21.5 L 10 22.945312 L 5.6640625 21.5 L 10 20.054688 z M 22 20.054688 L 26.335938 21.5 L 22 22.945312 L 17.664062 21.5 L 22 20.054688 z M 5 23.388672 L 9 24.720703 L 9 29.611328 L 5 28.279297 L 5 23.388672 z M 15 23.388672 L 15 28.279297 L 11 29.611328 L 11 24.720703 L 15 23.388672 z M 17 23.388672 L 21 24.720703 L 21 29.611328 L 17 28.279297 L 17 23.388672 z M 27 23.388672 L 27 28.279297 L 23 29.611328 L 23 24.720703 L 27 23.388672 z M 16 30.054688 L 20.335938 31.5 L 16 32.945312 L 11.664062 31.5 L 16 30.054688 z M 11 33.388672 L 15 34.720703 L 15 39.611328 L 11 38.279297 L 11 33.388672 z M 21 33.388672 L 21 38.279297 L 17 39.611328 L 17 34.720703 L 21 33.388672 z"),y(e,"xmlns","http://www.w3.org/2000/svg"),y(e,"x","0px"),y(e,"y","0px"),y(e,"width",i[1]),y(e,"height",i[0]),y(e,"viewBox","0 0 50 50"),Ye(e,"fill","currentcolor")},m(n,r){F(n,e,r),R(e,t)},p(n,[r]){r&2&&y(e,"width",n[1]),r&1&&y(e,"height",n[0])},i:fe,o:fe,d(n){n&&S(e)}}}function X_e(i,e,t){let{height:n="24px"}=e,{width:r="24px"}=e;return i.$$set=s=>{"height"in s&&t(0,n=s.height),"width"in s&&t(1,r=s.width)},[n,r]}class Q_e extends Ue{constructor(e){super(),je(this,e,X_e,Z_e,Ve,{height:0,width:1})}}function J_e(i){let e,t;return{c(){e=Ee("svg"),t=Ee("path"),this.h()},l(n){e=xe(n,"svg",{xmlns:!0,x:!0,y:!0,width:!0,height:!0,viewBox:!0,style:!0});var r=M(e);t=xe(r,"path",{d:!0}),M(t).forEach(S),r.forEach(S),this.h()},h(){y(t,"d","M 16.644531 2.0058594 C 16.365063 1.9841719 16.077422 2.0168281 15.794922 2.1113281 C 14.664922 2.4893281 14.053641 3.71375 14.431641 4.84375 L 15.324219 7.5117188 L 10.236328 9.2128906 L 9.3828125 6.6601562 C 9.0048125 5.5301563 7.7803906 4.9208281 6.6503906 5.2988281 C 5.5193906 5.6768281 4.9110625 6.8992969 5.2890625 8.0292969 L 6.1425781 10.582031 L 3.4746094 11.474609 C 2.3446094 11.852609 1.7333281 13.075078 2.1113281 14.205078 C 2.4893281 15.335078 3.71375 15.946359 4.84375 15.568359 L 7.5117188 14.675781 L 9.2128906 19.763672 L 6.6601562 20.617188 C 5.5301563 20.995187 4.9208281 22.219609 5.2988281 23.349609 C 5.6768281 24.480609 6.8992969 25.088938 8.0292969 24.710938 L 10.582031 23.857422 L 11.474609 26.525391 C 11.852609 27.655391 13.075078 28.266672 14.205078 27.888672 C 15.335078 27.510672 15.945359 26.28625 15.568359 25.15625 L 14.675781 22.488281 L 19.763672 20.785156 L 20.617188 23.339844 C 20.995187 24.469844 22.219609 25.079172 23.349609 24.701172 C 24.480609 24.323172 25.089891 23.100703 24.712891 21.970703 L 23.857422 19.416016 L 26.525391 18.523438 C 27.655391 18.145437 28.266672 16.922969 27.888672 15.792969 C 27.510672 14.662969 26.28625 14.053641 25.15625 14.431641 L 22.488281 15.324219 L 20.787109 10.236328 L 23.339844 9.3828125 C 24.469844 9.0048125 25.079172 7.7803906 24.701172 6.6503906 C 24.323172 5.5203906 23.100703 4.9110625 21.970703 5.2890625 L 19.417969 6.1425781 L 18.525391 3.4746094 C 18.241891 2.6271094 17.482937 2.0709219 16.644531 2.0058594 z M 16.693359 11.605469 L 18.394531 16.693359 L 13.306641 18.394531 L 11.605469 13.306641 L 16.693359 11.605469 z"),y(e,"xmlns","http://www.w3.org/2000/svg"),y(e,"x","0px"),y(e,"y","0px"),y(e,"width",i[1]),y(e,"height",i[0]),y(e,"viewBox","0 0 30 30"),Ye(e,"fill","currentcolor")},m(n,r){F(n,e,r),R(e,t)},p(n,[r]){r&2&&y(e,"width",n[1]),r&1&&y(e,"height",n[0])},i:fe,o:fe,d(n){n&&S(e)}}}function e1e(i,e,t){let{height:n="24px"}=e,{width:r="24px"}=e;return i.$$set=s=>{"height"in s&&t(0,n=s.height),"width"in s&&t(1,r=s.width)},[n,r]}class t1e extends Ue{constructor(e){super(),je(this,e,e1e,J_e,Ve,{height:0,width:1})}}function n1e(i){let e,t,n,r;return{c(){e=Ee("svg"),t=Ee("path"),n=Ee("rect"),r=Ee("path"),this.h()},l(s){e=xe(s,"svg",{xmlns:!0,x:!0,y:!0,width:!0,height:!0,viewBox:!0,style:!0});var o=M(e);t=xe(o,"path",{d:!0}),M(t).forEach(S),n=xe(o,"rect",{width:!0,height:!0,x:!0,y:!0}),M(n).forEach(S),r=xe(o,"path",{d:!0}),M(r).forEach(S),o.forEach(S),this.h()},h(){y(t,"d","M32,9c12.682,0,23,10.318,23,23S44.682,55,32,55S9,44.682,9,32S19.318,9,32,9 M32,7 C18.193,7,7,18.193,7,32s11.193,25,25,25s25-11.193,25-25S45.807,7,32,7L32,7z"),y(n,"width","3.999"),y(n,"height","17.995"),y(n,"x","30.001"),y(n,"y","16.005"),y(r,"d","M35.5,20.043v3.713c3.35,1.379,5.714,4.67,5.714,8.518c0,5.087-4.126,9.214-9.213,9.214 c-5.087,0-9.212-4.126-9.212-9.214c0-3.847,2.36-7.137,5.712-8.517v-3.714c-5.324,1.525-9.223,6.418-9.223,12.23 C19.277,39.3,24.976,45,32,45c7.026,0,12.724-5.7,12.724-12.725C44.724,26.461,40.822,21.567,35.5,20.043z"),y(e,"xmlns","http://www.w3.org/2000/svg"),y(e,"x","0px"),y(e,"y","0px"),y(e,"width",i[1]),y(e,"height",i[0]),y(e,"viewBox","0 0 60 60"),Ye(e,"fill","currentcolor")},m(s,o){F(s,e,o),R(e,t),R(e,n),R(e,r)},p(s,[o]){o&2&&y(e,"width",s[1]),o&1&&y(e,"height",s[0])},i:fe,o:fe,d(s){s&&S(e)}}}function i1e(i,e,t){let{height:n="24px"}=e,{width:r="24px"}=e;return i.$$set=s=>{"height"in s&&t(0,n=s.height),"width"in s&&t(1,r=s.width)},[n,r]}class r1e extends Ue{constructor(e){super(),je(this,e,i1e,n1e,Ve,{height:0,width:1})}}function s1e(i){let e,t,n,r,s,o,a,l,c,u,d;return{c(){e=Ee("svg"),t=Ee("style"),n=me(".st0,.st1{fill:#fff}.st1{opacity:.4}.st2{fill:#bcd4fc}.st3{fill:#3b82f6}.st4{fill:#b3b3b3}.st5{fill:url(#SVGID_1_)}.st6{fill:url(#SVGID_00000021089067129159788970000008246765442136188072_)}.st7{fill:url(#SVGID_00000117639240116366130650000015074833605515028638_)}.st8{fill:url(#SVGID_00000101781798616409025840000016567063639337360777_)}.st8,.st9{opacity:.4}.st9{fill:url(#SVGID_00000052086836598721292040000002033117744178971046_)}.st10{fill:url(#SVGID_00000159460939004760751800000002448009281983951536_);opacity:.4}.st11{fill:url(#SVGID_00000013177830667419993080000017721442101626521532_);opacity:.4}.st12{fill:url(#SVGID_00000152235521444854938490000006526001119318383285_);opacity:.4}.st13{fill:url(#SVGID_00000119823135212293698520000012774889010992664993_);opacity:.4}"),r=Ee("g"),s=Ee("polygon"),o=Ee("polygon"),a=Ee("polygon"),l=Ee("polygon"),c=Ee("polygon"),u=Ee("polygon"),this.h()},l(h){e=xe(h,"svg",{class:!0,version:!0,id:!0,xmlns:!0,"xmlns:xlink":!0,x:!0,y:!0,width:!0,height:!0,viewBox:!0,style:!0,"xml:space":!0});var f=M(e);t=xe(f,"style",{type:!0});var g=M(t);n=_e(g,".st0,.st1{fill:#fff}.st1{opacity:.4}.st2{fill:#bcd4fc}.st3{fill:#3b82f6}.st4{fill:#b3b3b3}.st5{fill:url(#SVGID_1_)}.st6{fill:url(#SVGID_00000021089067129159788970000008246765442136188072_)}.st7{fill:url(#SVGID_00000117639240116366130650000015074833605515028638_)}.st8{fill:url(#SVGID_00000101781798616409025840000016567063639337360777_)}.st8,.st9{opacity:.4}.st9{fill:url(#SVGID_00000052086836598721292040000002033117744178971046_)}.st10{fill:url(#SVGID_00000159460939004760751800000002448009281983951536_);opacity:.4}.st11{fill:url(#SVGID_00000013177830667419993080000017721442101626521532_);opacity:.4}.st12{fill:url(#SVGID_00000152235521444854938490000006526001119318383285_);opacity:.4}.st13{fill:url(#SVGID_00000119823135212293698520000012774889010992664993_);opacity:.4}"),g.forEach(S),r=xe(f,"g",{});var p=M(r);s=xe(p,"polygon",{class:!0,points:!0}),M(s).forEach(S),o=xe(p,"polygon",{points:!0}),M(o).forEach(S),a=xe(p,"polygon",{points:!0}),M(a).forEach(S),l=xe(p,"polygon",{points:!0}),M(l).forEach(S),c=xe(p,"polygon",{class:!0,points:!0}),M(c).forEach(S),u=xe(p,"polygon",{class:!0,points:!0}),M(u).forEach(S),p.forEach(S),f.forEach(S),this.h()},h(){y(t,"type","text/css"),y(s,"class","st2"),y(s,"points","134.78,14.22 114.31,48.21 101.33,69.75 158.22,69.75 177.97,36.95 191.67,14.22 "),y(o,"points","227.55,69.75 186.61,69.75 101.33,69.75 129.78,119.02 158.16,119.02 228.61,119.02 256,119.02 "),vt(o,"st3",!i[2]),vt(o,"st0",i[2]),y(a,"points",`136.93,132.47 116.46,167.93 73.82,241.78 130.71,241.78 144.9,217.2 180.13,156.18 193.82,132.46 + `),vt(a,"st3",!i[2]),vt(a,"st0",i[2]),y(l,"points","121.7,131.95 101.23,96.49 58.59,22.63 30.15,71.91 44.34,96.49 79.57,157.5 93.26,181.22 "),vt(l,"st3",!i[2]),vt(l,"st0",i[2]),y(c,"class","st2"),y(c,"points","64.81,131.95 25.15,131.21 0,130.74 28.44,180.01 66.73,180.72 93.26,181.21 "),y(u,"class","st2"),y(u,"points","165.38,181.74 184.58,216.46 196.75,238.47 225.19,189.2 206.66,155.69 193.83,132.46 "),y(e,"class",d=i[3].class),y(e,"version","1.1"),y(e,"id","Calque_1"),y(e,"xmlns","http://www.w3.org/2000/svg"),y(e,"xmlns:xlink","http://www.w3.org/1999/xlink"),y(e,"x","0px"),y(e,"y","0px"),y(e,"width",i[1]),y(e,"height",i[0]),y(e,"viewBox","0 0 256 256"),Ye(e,"enable-background","new 0 0 256 256"),y(e,"xml:space","preserve")},m(h,f){F(h,e,f),R(e,t),R(t,n),R(e,r),R(r,s),R(r,o),R(r,a),R(r,l),R(r,c),R(r,u)},p(h,[f]){f&4&&vt(o,"st3",!h[2]),f&4&&vt(o,"st0",h[2]),f&4&&vt(a,"st3",!h[2]),f&4&&vt(a,"st0",h[2]),f&4&&vt(l,"st3",!h[2]),f&4&&vt(l,"st0",h[2]),f&8&&d!==(d=h[3].class)&&y(e,"class",d),f&2&&y(e,"width",h[1]),f&1&&y(e,"height",h[0])},i:fe,o:fe,d(h){h&&S(e)}}}function o1e(i,e,t){let{height:n="24px"}=e,{width:r="24px"}=e,{white:s=!1}=e;return i.$$set=o=>{t(3,e=Qe(Qe({},e),Bt(o))),"height"in o&&t(0,n=o.height),"width"in o&&t(1,r=o.width),"white"in o&&t(2,s=o.white)},e=Bt(e),[n,r,s,e]}class h8 extends Ue{constructor(e){super(),je(this,e,o1e,s1e,Ve,{height:0,width:1,white:2})}}function a1e(i){let e,t,n,r,s,o,a;return{c(){e=Ee("svg"),t=Ee("path"),n=Ee("path"),r=Ee("path"),s=Ee("path"),o=Ee("path"),a=Ee("path"),this.h()},l(l){e=xe(l,"svg",{width:!0,height:!0,viewBox:!0,fill:!0,xmlns:!0});var c=M(e);t=xe(c,"path",{d:!0,fill:!0}),M(t).forEach(S),n=xe(c,"path",{d:!0,fill:!0}),M(n).forEach(S),r=xe(c,"path",{d:!0,fill:!0}),M(r).forEach(S),s=xe(c,"path",{d:!0,fill:!0}),M(s).forEach(S),o=xe(c,"path",{d:!0,fill:!0}),M(o).forEach(S),a=xe(c,"path",{d:!0,fill:!0}),M(a).forEach(S),c.forEach(S),this.h()},h(){y(t,"d","M35.4564 23.7461C35.7634 23.9117 36.0345 24.1365 36.2539 24.4075C36.595 24.8245 37 25.5651 37 26.7228C37 28.3318 36.3816 30.045 36.1932 30.5305C36.1885 30.5398 36.1807 30.5491 36.1807 30.56C35.0954 33.1717 33.1998 35.3665 30.7727 36.8215C28.4004 38.2453 25.5204 39 22.4457 39H21.874C18.989 38.9399 16.1728 38.1087 13.7183 36.5928C11.5573 35.2377 9.80917 33.317 8.66388 31.0393C7.34228 30.8341 6.10864 30.2504 5.11251 29.3588C3.83683 28.2291 3.04712 26.7509 2.89136 25.1948C2.80667 24.4079 2.85245 23.6125 3.02687 22.8405L2.48482 22.3815C1.61255 21.6455 1.10321 20.5858 1.01443 19.341C0.941223 18.3047 1.14683 17.1221 1.62502 15.815C2.74183 12.7714 5.30566 9.14581 8.48631 6.11775C9.90595 4.74017 11.4809 3.53186 13.1794 2.51708C14.9302 1.50721 16.5189 0.995269 17.9021 1.00149C18.9853 0.973166 20.0403 1.3487 20.8616 2.05493C20.9071 2.08828 21.5749 2.74181 22.1033 3.2589L22.145 3.29976L22.3771 3.20173C24.131 2.47506 25.8568 2.09228 27.3693 2.09228C30.5561 2.09228 32.6215 3.80392 32.6215 6.44919C32.6215 8.08148 31.8225 9.91138 30.3443 11.6853C30.7474 12.3092 31.0516 12.9915 31.2462 13.7081C31.4562 14.4388 31.5709 15.1935 31.5873 15.9535C31.6029 16.2803 31.6169 16.8015 31.6293 17.2683C32.6044 17.5578 33.8287 18.0464 34.5639 18.8244C35.1335 19.3887 35.5069 20.1206 35.6293 20.9126C35.7507 21.6931 35.6295 22.492 35.282 23.2015C35.3131 23.2902 35.3505 23.4007 35.3785 23.4894C35.4066 23.5781 35.433 23.6637 35.4564 23.7461Z"),y(t,"fill","#001D28"),y(n,"d","M8.446 20.7569C8.16153 20.7416 7.87628 20.762 7.59683 20.8174C5.57352 21.2268 4.43041 22.9461 4.6574 25.1942C4.85989 27.2229 6.9077 28.934 8.802 28.9848C8.99665 28.9901 9.19135 28.9764 9.38336 28.9438C11.4312 28.5934 11.9701 26.3617 11.632 24.1676C11.2499 21.6918 9.57932 20.8191 8.446 20.7569ZM10.4514 26.6237C10.3683 26.7584 10.2494 26.8672 10.1081 26.9378C9.96668 27.0084 9.80843 27.038 9.65117 27.0232C9.21352 26.9888 8.72525 26.6695 8.6583 25.877C8.65371 25.4926 8.72416 25.111 8.86569 24.7537C8.95434 24.5298 8.96344 24.2821 8.89148 24.0522C8.81952 23.8223 8.67087 23.6243 8.4705 23.4913C8.35128 23.4129 8.21769 23.359 8.07751 23.3329C7.93733 23.3067 7.79336 23.3088 7.65399 23.339C7.51755 23.3679 7.38822 23.4238 7.27354 23.5034C7.15887 23.5829 7.06115 23.6846 6.98608 23.8024C6.88071 23.9835 6.79842 24.1771 6.74113 24.3788C6.73133 24.4148 6.72153 24.4426 6.715 24.4607C6.62192 24.7112 6.47331 24.7881 6.3737 24.7701C6.32634 24.7701 6.26102 24.7325 6.21856 24.6178C6.10915 24.3002 6.2055 23.4144 6.79012 22.7594C6.98319 22.5527 7.22241 22.3949 7.48813 22.299C7.75385 22.2031 8.03848 22.1718 8.31863 22.2076C8.61521 22.248 8.89714 22.3616 9.13913 22.5382C9.38111 22.7148 9.57557 22.9489 9.70506 23.2195C10.1068 23.9858 9.74915 24.7898 9.54176 25.2712L9.4797 25.4136C9.3458 25.7329 9.33926 26.0113 9.46011 26.1979C9.511 26.2713 9.57929 26.3308 9.65882 26.3711C9.73835 26.4114 9.82664 26.4312 9.91572 26.4288C9.9996 26.4283 10.0831 26.4167 10.1639 26.3944C10.2685 26.3699 10.3779 26.3437 10.4448 26.4272C10.467 26.4548 10.4796 26.4889 10.4808 26.5243C10.4819 26.5597 10.4716 26.5946 10.4514 26.6237Z"),y(n,"fill","#EFEEEA"),y(r,"d","M36.9567 24.6372C36.7266 24.352 36.4424 24.1155 36.1206 23.9413C36.0961 23.8545 36.0683 23.7644 36.0389 23.6711C36.0095 23.5778 35.9703 23.4615 35.9377 23.3682C36.302 22.6216 36.4292 21.7809 36.3018 20.9596C36.1736 20.1262 35.782 19.356 35.1849 18.7622C34.4141 17.9435 33.1305 17.4293 32.1082 17.1248C32.0952 16.6336 32.0805 16.085 32.0642 15.7412C32.0469 14.9414 31.9267 14.1473 31.7065 13.3784C31.5025 12.6243 31.1836 11.9063 30.761 11.2498C32.3107 9.38317 33.1485 7.45759 33.1485 5.73996C33.1485 2.95638 30.9831 1.15525 27.6419 1.15525C26.0563 1.15525 24.2469 1.55805 22.4081 2.32271L22.1648 2.42587C21.6047 1.8757 20.8682 1.15197 20.8192 1.11595C19.9582 0.37279 18.8521 -0.0223774 17.7164 0.00743079C16.2663 0.0008812 14.6006 0.539585 12.7651 1.60226C10.9843 2.6701 9.33319 3.94159 7.84482 5.3912C4.51019 8.57757 1.82224 12.3927 0.651367 15.5955C0.15003 16.9709 -0.0655288 18.2153 0.0112231 19.3058C0.104305 20.6157 0.638303 21.7308 1.55279 22.5053L2.12109 22.9883C1.93823 23.8007 1.89023 24.6377 1.97901 25.4657C2.14231 27.1031 2.97026 28.6586 4.3077 29.8474C5.35205 30.7856 6.64541 31.3999 8.03099 31.6158C9.23173 34.0126 11.0645 36.0337 13.3301 37.4596C15.9034 39.0548 18.856 39.9295 21.8806 39.9927C22.0799 39.9927 22.2807 39.9927 22.48 39.9927C25.7035 39.9927 28.723 39.1986 31.2101 37.7003C33.7547 36.1692 35.7421 33.8596 36.8799 31.1115C36.8799 31.1 36.8881 31.0902 36.893 31.0803C37.0906 30.5695 37.7389 28.7667 37.7389 27.0736C37.7389 25.8554 37.3143 25.076 36.9567 24.6372ZM35.6699 30.6088C33.462 35.9123 28.1939 38.8645 21.9198 38.6779C16.0703 38.5027 11.0815 35.4031 8.89812 30.3632C7.57701 30.3632 6.2167 29.7819 5.18137 28.8633C4.09214 27.894 3.4275 26.6414 3.2887 25.3331C3.18324 24.3913 3.29958 23.4379 3.62836 22.5495L2.4036 21.5081C-3.20746 16.7597 14.341 -2.80234 19.9553 2.10658L21.8692 3.98795C21.8692 3.98795 22.9062 3.54585 22.9127 3.54257C27.8346 1.49255 31.8306 2.4799 31.8421 5.7416C31.8421 7.43794 30.7659 9.41428 29.0398 11.2089C29.6652 11.7918 30.1666 12.7022 30.454 13.7419C30.6444 14.4085 30.7476 15.0971 30.761 15.7903C30.7904 16.4813 30.8231 18.0827 30.8263 18.1203L31.5204 18.3135C32.8415 18.6852 33.7821 19.1797 34.241 19.6644C34.6542 20.0673 34.9248 20.5946 35.0118 21.1659C35.0901 21.6096 35.0787 22.3923 34.4957 23.2667C34.6067 23.5288 34.7021 23.7972 34.7815 24.0706C34.9268 24.5373 35.0313 24.9254 35.0477 24.9827C35.5817 24.9827 36.421 25.6 36.421 27.0867C36.421 28.5735 35.8136 30.2371 35.6699 30.6088Z"),y(r,"fill","#EFEEEA"),y(s,"d","M34.7814 26.1871C34.5928 26.0813 34.3747 26.041 34.1609 26.0725C34.0471 25.3765 33.848 24.6973 33.5681 24.0503C32.2731 25.0753 30.6042 25.7974 29.3353 26.1625C27.4962 26.6805 25.5839 26.888 23.6769 26.7766C22.4489 26.6767 21.6372 26.3164 21.3319 27.312C24.1358 28.3419 27.1046 27.9014 27.1046 27.9014C27.1182 27.8999 27.1321 27.901 27.1453 27.9049C27.1585 27.9088 27.1707 27.9152 27.1814 27.9239C27.192 27.9326 27.2009 27.9434 27.2073 27.9556C27.2137 27.9677 27.2177 27.9811 27.2189 27.9948C27.2213 28.0177 27.2164 28.0408 27.205 28.0608C27.1936 28.0808 27.1762 28.0966 27.1552 28.1061C27.1552 28.1061 24.869 29.1688 21.2519 28.0455C21.3531 28.897 22.181 29.2785 22.5762 29.4324C22.9147 29.5589 23.264 29.6542 23.6197 29.7173C28.1073 30.4918 32.3041 27.9162 33.2545 27.2711C33.3248 27.2219 33.3721 27.2711 33.315 27.3546C33.2872 27.4006 33.2566 27.4449 33.2235 27.4872C32.0673 28.9821 28.9581 30.7145 24.9147 30.7129C23.1511 30.7129 21.389 30.0907 20.7407 29.1328C19.7364 27.6477 20.6917 25.4797 22.3639 25.7057L23.0972 25.7876C25.1891 26.0217 28.2167 25.7286 30.7119 24.5661C32.9982 23.5034 33.8571 22.3343 33.7281 21.3879C33.6846 21.0941 33.5464 20.8227 33.3346 20.615C32.9247 20.2122 32.2731 19.8978 31.1757 19.59C30.8132 19.4869 30.5666 19.4263 30.3021 19.3346C29.8317 19.1708 29.5982 19.0529 29.546 18.1655C29.5231 17.7774 29.4545 16.4233 29.43 15.8633C29.3876 14.8809 29.2667 13.5447 28.4404 12.9913C28.227 12.854 27.9802 12.7782 27.7268 12.7719C27.5856 12.7636 27.444 12.7774 27.3071 12.8128C26.8335 12.8931 26.5543 13.1403 26.2048 13.4383C25.1711 14.3012 24.2974 14.4437 23.3258 14.4011C22.7461 14.3765 22.1321 14.2865 21.4266 14.2374L21.0151 14.2144C19.382 14.1309 17.6445 15.5391 17.3538 17.5384C16.9505 20.3219 18.9607 21.7612 19.5421 22.6045C19.6325 22.7117 19.6893 22.8432 19.7054 22.9827C19.69 23.1377 19.6158 23.2807 19.498 23.3822C17.8388 25.0933 17.3081 27.8114 17.9336 30.0759C18.0098 30.3562 18.1081 30.6299 18.2275 30.8946C19.6972 34.3331 24.2452 35.9329 28.6919 34.4756C29.2711 34.2822 29.8331 34.0406 30.3723 33.7535C31.3449 33.2703 32.2214 32.6133 32.959 31.8148C34.1033 30.6657 34.857 29.184 35.1129 27.5805C35.2501 26.6898 35.0541 26.3508 34.7814 26.1871ZM28.7948 20.4955C28.7948 20.8623 28.5678 21.1505 28.3049 21.1505C28.0419 21.1505 27.828 20.8443 27.8329 20.4775C27.8378 20.1107 28.0615 19.8225 28.3228 19.8225C28.5841 19.8225 28.8078 20.1304 28.8013 20.4955H28.7948ZM27.5798 16.1646C28.0991 16.0811 28.349 16.6181 28.5351 17.5089C28.6592 18.1065 28.6347 18.6551 28.4976 18.9744C28.2412 18.9408 27.9815 18.9408 27.7251 18.9744C27.477 18.6176 27.3098 18.2108 27.2352 17.7823C27.0425 16.8932 27.0621 16.2481 27.5798 16.1646ZM25.8406 20.9458C25.9582 20.7051 26.3191 20.6412 26.6474 20.8033C26.9756 20.9654 27.1471 21.2945 27.0295 21.5303C26.9119 21.7661 26.5494 21.8333 26.2228 21.6711C25.8962 21.509 25.7231 21.1848 25.8406 20.9458ZM23.8092 20.6756C23.7553 20.7591 23.6459 20.7444 23.3976 20.7165C22.874 20.6372 22.3388 20.6936 21.843 20.8803C21.73 20.9277 21.6115 20.9607 21.4903 20.9785C21.461 20.9782 21.4328 20.9678 21.4103 20.9491C21.3981 20.9379 21.3886 20.9242 21.3824 20.9089C21.3762 20.8936 21.3734 20.8771 21.3743 20.8606C21.4019 20.7118 21.4863 20.5796 21.6095 20.4922C21.8717 20.2764 22.1914 20.1426 22.5289 20.1074C23.1951 20.0272 23.6818 20.3383 23.7961 20.5233C23.8133 20.5445 23.8237 20.5703 23.826 20.5975C23.8283 20.6246 23.8225 20.6518 23.8092 20.6756ZM20.0989 19.7587C20.0124 19.7456 19.9748 19.7079 19.9634 19.6588C19.9307 19.5065 20.1659 19.2527 20.4141 19.071C20.7761 18.8054 21.2001 18.6377 21.6454 18.5841C22.0908 18.5305 22.5423 18.5927 22.9567 18.7648C23.3438 18.9253 23.6766 19.1942 23.9153 19.5393C24.0035 19.6833 24.0198 19.7963 23.9627 19.8553C23.8745 19.9502 23.6459 19.8422 23.2752 19.6784C22.8298 19.4588 22.3374 19.3525 21.8414 19.369C21.0183 19.4197 20.3031 19.7816 20.0989 19.7587Z"),y(s,"fill","#EFEEEA"),y(o,"d","M25.7473 9.65984C25.8191 9.67622 25.8649 9.55341 25.8012 9.51739C24.7469 8.96866 23.5836 8.66321 22.3963 8.62337C22.3848 8.62329 22.3735 8.62 22.3638 8.61386C22.354 8.60772 22.3461 8.59898 22.3411 8.58861C22.336 8.57824 22.3339 8.56666 22.335 8.55515C22.3361 8.54365 22.3404 8.53269 22.3473 8.52349C22.5326 8.28205 22.7483 8.06575 22.9891 7.87999C22.9998 7.8713 23.0074 7.85946 23.011 7.84616C23.0146 7.83286 23.0139 7.81876 23.009 7.80589C23.0041 7.79301 22.9953 7.78201 22.9838 7.77444C22.9723 7.76687 22.9588 7.76313 22.945 7.76374C21.49 7.85379 19.8292 8.55296 18.8739 9.20628C18.8635 9.21332 18.8511 9.21701 18.8386 9.21686C18.826 9.21671 18.8138 9.21273 18.8035 9.20545C18.7932 9.19817 18.7854 9.18793 18.781 9.17609C18.7767 9.16425 18.7761 9.15137 18.7792 9.13915C18.8772 8.77135 19.0215 8.41756 19.2087 8.0863C19.215 8.07498 19.2174 8.06193 19.2158 8.04909C19.2141 8.03624 19.2084 8.02427 19.1994 8.01493C19.1905 8.00558 19.1788 7.99936 19.166 7.99718C19.1533 7.995 19.1402 7.99697 19.1287 8.0028C17.5936 8.79038 15.8822 10.1904 14.4909 11.8032C14.4812 11.8151 14.4762 11.83 14.4766 11.8453C14.477 11.8606 14.4829 11.8753 14.4932 11.8866C14.5035 11.8979 14.5175 11.9051 14.5327 11.9069C14.5478 11.9088 14.5631 11.9051 14.5758 11.8965C15.7761 11.0189 17.4238 10.2051 19.581 9.67785C21.609 9.2073 23.7166 9.20114 25.7473 9.65984Z"),y(o,"fill","#EFEEEA"),y(a,"d","M20.5548 4.67148C20.5548 4.67148 19.0263 2.8949 18.5658 2.76391C15.7276 1.99597 9.5989 6.23355 5.68618 11.8335C4.10379 14.098 1.83715 18.1112 2.91985 20.1744C3.05375 20.4298 3.80984 21.0864 4.21483 21.427C4.94219 20.4084 6.03506 19.7123 7.26368 19.485C8.86731 15.1607 11.5438 11.185 15.0875 8.44895C16.8025 7.04018 18.6312 5.77667 20.5548 4.67148Z"),y(a,"fill","#EFEEEA"),y(e,"width",i[1]),y(e,"height",i[0]),y(e,"viewBox","0 0 38 40"),y(e,"fill","none"),y(e,"xmlns","http://www.w3.org/2000/svg")},m(l,c){F(l,e,c),R(e,t),R(e,n),R(e,r),R(e,s),R(e,o),R(e,a)},p(l,[c]){c&2&&y(e,"width",l[1]),c&1&&y(e,"height",l[0])},i:fe,o:fe,d(l){l&&S(e)}}}function l1e(i,e,t){let{height:n="24px"}=e,{width:r="24px"}=e;return i.$$set=s=>{"height"in s&&t(0,n=s.height),"width"in s&&t(1,r=s.width)},[n,r]}class c1e extends Ue{constructor(e){super(),je(this,e,l1e,a1e,Ve,{height:0,width:1})}}function u1e(i){let e,t,n,r,s,o,a,l,c,u,d,h;return{c(){e=Ee("svg"),t=Ee("g"),n=Ee("g"),r=Ee("path"),s=Ee("path"),o=Ee("path"),a=Ee("path"),l=Ee("path"),c=Ee("path"),u=Ee("path"),d=Ee("path"),h=Ee("path"),this.h()},l(f){e=xe(f,"svg",{version:!0,id:!0,"xml:space":!0,width:!0,height:!0,viewBox:!0,xmlns:!0});var g=M(e);t=xe(g,"g",{id:!0,transform:!0});var p=M(t);n=xe(p,"g",{id:!0,transform:!0});var m=M(n);r=xe(m,"path",{d:!0,style:!0,id:!0}),M(r).forEach(S),s=xe(m,"path",{d:!0,style:!0,id:!0}),M(s).forEach(S),o=xe(m,"path",{d:!0,style:!0,id:!0}),M(o).forEach(S),a=xe(m,"path",{d:!0,style:!0,id:!0}),M(a).forEach(S),l=xe(m,"path",{d:!0,style:!0,id:!0}),M(l).forEach(S),c=xe(m,"path",{d:!0,style:!0,id:!0}),M(c).forEach(S),u=xe(m,"path",{d:!0,style:!0,id:!0}),M(u).forEach(S),d=xe(m,"path",{d:!0,style:!0,id:!0}),M(d).forEach(S),h=xe(m,"path",{d:!0,style:!0,id:!0}),M(h).forEach(S),m.forEach(S),p.forEach(S),g.forEach(S),this.h()},h(){y(r,"d","M 0,0 H 1850 V 1736.64 H 0 Z"),Ye(r,"fill","#223141"),Ye(r,"fill-opacity","1"),Ye(r,"fill-rule","nonzero"),Ye(r,"stroke","none"),y(r,"id","path12"),y(s,"d","M 1137.17,231.82 H 712.832 v 424.328 h -424.34 v 424.342 h 424.34 V 656.148 H 1137.17 V 231.82"),Ye(s,"fill","#ffffff"),Ye(s,"fill-opacity","1"),Ye(s,"fill-rule","nonzero"),Ye(s,"stroke","none"),y(s,"id","path14"),y(o,"d","M 1137.17,231.82 H 712.832 v 424.328 h -424.34 v 424.342 h 424.34 V 656.148 H 1137.17 V 231.82"),Ye(o,"fill","#575d6c"),Ye(o,"fill-opacity","1"),Ye(o,"fill-rule","nonzero"),Ye(o,"stroke","none"),y(o,"id","path16"),y(a,"d","M 288.496,231.82 H 712.832 V 656.148 H 288.496 Z"),Ye(a,"fill","#ffffff"),Ye(a,"fill-opacity","1"),Ye(a,"fill-rule","nonzero"),Ye(a,"stroke","none"),y(a,"id","path18"),y(l,"d","M 1561.51,656.148 H 1137.17 V 1080.49 H 712.832 v 424.33 h 424.338 v -424.33 h 424.34 V 656.148"),Ye(l,"fill","#ffffff"),Ye(l,"fill-opacity","1"),Ye(l,"fill-rule","nonzero"),Ye(l,"stroke","none"),y(l,"id","path20"),y(c,"d","M 1561.51,656.148 H 1137.17 V 1080.49 H 712.832 v 424.33 h 424.338 v -424.33 h 424.34 V 656.148"),Ye(c,"fill","#b2b1b9"),Ye(c,"fill-opacity","1"),Ye(c,"fill-rule","nonzero"),Ye(c,"stroke","none"),y(c,"id","path22"),y(u,"d","m 712.832,656.148 h 424.34 v 424.34 h -424.34 z"),Ye(u,"fill","#ffffff"),Ye(u,"fill-opacity","1"),Ye(u,"fill-rule","nonzero"),Ye(u,"stroke","none"),y(u,"id","path24"),y(d,"d","m 712.832,656.148 h 424.34 v 424.34 h -424.34 z"),Ye(d,"fill","#cbc9ce"),Ye(d,"fill-opacity","1"),Ye(d,"fill-rule","nonzero"),Ye(d,"stroke","none"),y(d,"id","path26"),y(h,"d","m 1561.5,1080.49 h -424.33 v 424.33 h 424.33 v -424.33"),Ye(h,"fill","#ffffff"),Ye(h,"fill-opacity","1"),Ye(h,"fill-rule","nonzero"),Ye(h,"stroke","none"),y(h,"id","path28"),y(n,"id","g10"),y(n,"transform","scale(0.1)"),y(t,"id","g8"),y(t,"transform","matrix(1.3333333,0,0,-1.3333333,0,231.54667)"),y(e,"version","1.1"),y(e,"id","svg2"),y(e,"xml:space","preserve"),y(e,"width",i[1]),y(e,"height",i[0]),y(e,"viewBox","0 0 246.66667 231.54668"),y(e,"xmlns","http://www.w3.org/2000/svg")},m(f,g){F(f,e,g),R(e,t),R(t,n),R(n,r),R(n,s),R(n,o),R(n,a),R(n,l),R(n,c),R(n,u),R(n,d),R(n,h)},p(f,[g]){g&2&&y(e,"width",f[1]),g&1&&y(e,"height",f[0])},i:fe,o:fe,d(f){f&&S(e)}}}function d1e(i,e,t){let{height:n="24px"}=e,{width:r="24px"}=e;return i.$$set=s=>{"height"in s&&t(0,n=s.height),"width"in s&&t(1,r=s.width)},[n,r]}class h1e extends Ue{constructor(e){super(),je(this,e,d1e,u1e,Ve,{height:0,width:1})}}function f1e(i){let e,t;return{c(){e=Ee("svg"),t=Ee("path"),this.h()},l(n){e=xe(n,"svg",{xmlns:!0,viewBox:!0,height:!0,width:!0,style:!0});var r=M(e);t=xe(r,"path",{d:!0}),M(t).forEach(S),r.forEach(S),this.h()},h(){y(t,"d","M522.63 807.57C515.63 830.07 500.44 850.06 478.07 862.84L146.72 1052.69C99.92 1079.39 40.3 1063.56 13.44 1017.38C-13.59 970.94 2.32 911.86 49.08 885.08L234.26 779.17L49.08 672.98C2.32 646.24 -13.67 587.15 13.44 540.88C40.3 494.58 99.92 478.7 146.72 505.4L478.07 695.13C501.37 708.46 516.94 729.6 523.48 753.24C525.68 760.84 526.66 768.44 527.04 776.08C527.3 786.6 525.94 797.26 522.63 807.57ZM612.54 985.38C663 988.98 702.84 1030.84 702.84 1081.77L702.84 1461.36C702.84 1514.89 659.05 1558.22 605.29 1558.22C551.27 1558.22 507.65 1514.89 507.65 1461.36L507.65 1249.05L321.84 1355.29C275.25 1382.2 215.67 1366.28 188.6 1320.06C161.7 1273.75 177.61 1214.37 224.29 1187.63L555.9 998.02C573.72 987.71 593.49 983.76 612.54 985.38ZM952.17 572.85C901.59 569.15 861.83 527.22 861.83 476.33L861.83 96.69C861.83 43.34 905.37 0 959.43 0C1013.44 0 1057.07 43.34 1057.07 96.69L1057.07 309.13L1242.75 202.72C1289.43 175.98 1349.04 191.85 1375.95 238.08C1402.8 284.56 1386.98 343.68 1340.26 370.42L1008.69 560.2C990.87 570.38 971.14 574.37 952.17 572.85ZM224.29 370.42C177.61 343.68 161.7 284.56 188.6 238.08C215.67 191.85 275.25 175.98 321.84 202.72L507.65 309.13L507.65 96.69C507.65 43.34 551.27 0 605.29 0C659.05 0 702.84 43.34 702.84 96.69L702.84 476.33C702.84 527.22 663 569.15 612.54 572.85C593.49 574.37 573.72 570.38 555.9 560.2L224.29 370.42ZM819.83 952.74C815.88 956.77 808.28 960.04 802.51 960.04L761.99 960.04C756.43 960.04 748.71 956.77 744.68 952.74L606.94 816.27C603 812.41 599.81 804.68 599.81 799.25L599.81 758.97C599.81 753.41 603 745.69 606.94 741.78L744.68 605.27C748.71 601.29 756.43 598.1 761.99 598.1L802.51 598.1C808.16 598.1 815.88 601.29 819.83 605.27L957.65 741.78C961.59 745.69 964.77 753.41 964.77 758.97L964.77 799.25C964.77 804.68 961.59 812.41 957.65 816.27L819.83 952.74ZM847.49 778.37C847.49 772.85 844.14 765.17 840.19 761.09L800.26 721.7C796.36 717.8 788.6 714.57 783.04 714.57L781.47 714.57C775.91 714.57 768.19 717.8 764.32 721.7L724.4 761.09C720.41 765.17 717.35 772.85 717.35 778.37L717.35 779.94C717.35 785.37 720.41 792.97 724.4 796.96L764.32 836.43C768.23 840.34 775.91 843.56 781.47 843.56L783.04 843.56C788.6 843.56 796.36 840.34 800.26 836.43L840.19 796.96C844.14 792.97 847.49 785.37 847.49 779.94L847.49 778.37ZM1340.26 1187.63C1386.98 1214.37 1402.8 1273.75 1375.95 1320.06C1349.04 1366.28 1289.38 1382.2 1242.75 1355.29L1057.07 1249.05L1057.07 1461.36C1057.07 1514.89 1013.44 1558.22 959.43 1558.22C905.37 1558.22 861.83 1514.89 861.83 1461.36L861.83 1081.77C861.83 1030.84 901.59 988.98 952.17 985.38C971.14 983.76 990.87 987.71 1008.69 998.02L1340.26 1187.63ZM1330.37 779.17L1515.55 885.08C1562.31 911.86 1578.31 970.94 1551.28 1017.38C1524.29 1063.56 1464.59 1079.39 1418 1052.69L1086.39 862.84C1064.24 850.06 1048.92 830.07 1042.09 807.57C1038.86 797.26 1037.33 786.6 1037.72 776.08C1037.89 768.44 1039.03 760.84 1041.15 753.24C1047.77 729.6 1063.35 708.46 1086.39 695.13L1418 505.4C1464.59 478.7 1524.29 494.58 1551.28 540.88C1578.31 587.15 1562.31 646.24 1515.55 672.98L1330.37 779.17Z"),y(e,"xmlns","http://www.w3.org/2000/svg"),y(e,"viewBox","0 0 1565 1559"),y(e,"height",i[0]),y(e,"width",i[1]),Ye(e,"fill","#000000")},m(n,r){F(n,e,r),R(e,t)},p(n,[r]){r&1&&y(e,"height",n[0]),r&2&&y(e,"width",n[1])},i:fe,o:fe,d(n){n&&S(e)}}}function g1e(i,e,t){let{height:n="24px"}=e,{width:r="24px"}=e;return i.$$set=s=>{"height"in s&&t(0,n=s.height),"width"in s&&t(1,r=s.width)},[n,r]}class p1e extends Ue{constructor(e){super(),je(this,e,g1e,f1e,Ve,{height:0,width:1})}}function m1e(i){let e,t;return e=new wfe({props:{size:i[0]}}),{c(){Q(e.$$.fragment)},l(n){J(e.$$.fragment,n)},m(n,r){Z(e,n,r),t=!0},p(n,[r]){const s={};r&1&&(s.size=n[0]),e.$set(s)},i(n){t||(D(e.$$.fragment,n),t=!0)},o(n){A(e.$$.fragment,n),t=!1},d(n){X(e,n)}}}function _1e(i,e,t){let{height:n=24}=e;return i.$$set=r=>{"height"in r&&t(0,n=r.height)},[n]}class b1e extends Ue{constructor(e){super(),je(this,e,_1e,m1e,Ve,{height:0})}}function v1e(i){let e,t;return{c(){e=Ee("svg"),t=Ee("path"),this.h()},l(n){e=xe(n,"svg",{xmlns:!0,x:!0,y:!0,width:!0,height:!0,viewBox:!0});var r=M(e);t=xe(r,"path",{d:!0}),M(t).forEach(S),r.forEach(S),this.h()},h(){y(t,"d","M9,25H4V10h5V25z M6.501,8C5.118,8,4,6.879,4,5.499S5.12,3,6.501,3C7.879,3,9,4.121,9,5.499C9,6.879,7.879,8,6.501,8z M27,25h-4.807v-7.3c0-1.741-0.033-3.98-2.499-3.98c-2.503,0-2.888,1.896-2.888,3.854V25H12V9.989h4.614v2.051h0.065 c0.642-1.18,2.211-2.424,4.551-2.424c4.87,0,5.77,3.109,5.77,7.151C27,16.767,27,25,27,25z"),y(e,"xmlns","http://www.w3.org/2000/svg"),y(e,"x","0px"),y(e,"y","0px"),y(e,"width",i[1]),y(e,"height",i[0]),y(e,"viewBox","0 0 30 30")},m(n,r){F(n,e,r),R(e,t)},p(n,[r]){r&2&&y(e,"width",n[1]),r&1&&y(e,"height",n[0])},i:fe,o:fe,d(n){n&&S(e)}}}function w1e(i,e,t){let{height:n="24px"}=e,{width:r="24px"}=e;return i.$$set=s=>{"height"in s&&t(0,n=s.height),"width"in s&&t(1,r=s.width)},[n,r]}class C1e extends Ue{constructor(e){super(),je(this,e,w1e,v1e,Ve,{height:0,width:1})}}function y1e(i){let e,t;return{c(){e=Ee("svg"),t=Ee("path"),this.h()},l(n){e=xe(n,"svg",{xmlns:!0,x:!0,y:!0,width:!0,height:!0,viewBox:!0});var r=M(e);t=xe(r,"path",{d:!0}),M(t).forEach(S),r.forEach(S),this.h()},h(){y(t,"d","M 7.5 4 A 2.5 2.5 0 0 0 7.5 9 A 2.5 2.5 0 0 0 8.8320312 8.6113281 L 16.318359 14.251953 C 15.494802 15.279183 15 16.5808 15 18 C 15 19.551691 15.594081 20.960309 16.560547 22.025391 L 13.515625 25.070312 A 2 2 0 0 0 13 25 A 2 2 0 0 0 13 29 A 2 2 0 0 0 14.929688 26.484375 L 18.138672 23.275391 C 18.139161 23.275657 18.140136 23.275125 18.140625 23.275391 C 18.990789 23.737195 19.964375 24 21 24 C 24.314 24 27 21.314 27 18 C 27 15.0276 24.836666 12.566888 22 12.089844 L 22 8.7304688 A 2 2 0 0 0 21 5 A 2 2 0 0 0 20 8.7304688 L 20 12.089844 C 19.221485 12.220767 18.495614 12.502316 17.849609 12.902344 L 9.9570312 6.9550781 A 2.5 2.5 0 0 0 7.5 4 z M 21 15 C 22.654 15 24 16.346 24 18 C 24 19.654 22.654 21 21 21 C 19.346 21 18 19.654 18 18 C 18 16.346 19.346 15 21 15 z"),y(e,"xmlns","http://www.w3.org/2000/svg"),y(e,"x","0px"),y(e,"y","0px"),y(e,"width",i[1]),y(e,"height",i[0]),y(e,"viewBox","0 0 32 32")},m(n,r){F(n,e,r),R(e,t)},p(n,[r]){r&2&&y(e,"width",n[1]),r&1&&y(e,"height",n[0])},i:fe,o:fe,d(n){n&&S(e)}}}function S1e(i,e,t){let{height:n="24px"}=e,{width:r="24px"}=e;return i.$$set=s=>{"height"in s&&t(0,n=s.height),"width"in s&&t(1,r=s.width)},[n,r]}class k1e extends Ue{constructor(e){super(),je(this,e,S1e,y1e,Ve,{height:0,width:1})}}function E1e(i){let e,t;return{c(){e=Ee("svg"),t=Ee("path"),this.h()},l(n){e=xe(n,"svg",{version:!0,id:!0,xmlns:!0,"xmlns:xlink":!0,width:!0,height:!0,x:!0,y:!0,viewBox:!0,"enable-background":!0,"xml:space":!0});var r=M(e);t=xe(r,"path",{id:!0,"fill-rule":!0,"clip-rule":!0,fill:!0,d:!0}),M(t).forEach(S),r.forEach(S),this.h()},h(){y(t,"id","Bits"),y(t,"fill-rule","evenodd"),y(t,"clip-rule","evenodd"),y(t,"fill","#000000"),y(t,"d",`M350.2,268.3l-27.3-18.1l-22.8,38.1l-26.5-7.8 + l-23.3,35.7l1.2,11.2l126.7-23.4l-7.4-79.4L350.2,268.3z M232,234l20.3-2.8c3.3,1.5,5.6,2,9.5,3.1c6.1,1.6,13.3,3.1,23.8-2.2 + c2.5-1.2,7.6-5.9,9.6-8.6l83.3-15.2l8.5,103.2l-142.7,25.8L232,234z M386.7,196.8l-8.2,1.6L362.7,34.7L93.5,66l33.2,270l31.5-4.6 + c-2.5-3.6-6.4-8-13.1-13.5c-9.3-7.7-6-20.9-0.5-29.2c7.2-14,44.6-31.8,42.4-54.2c-0.8-8.1-2-18.7-9.6-26c-0.3,3,0.2,5.9,0.2,5.9 + s-3.1-4-4.6-9.4c-1.5-2.1-2.7-2.7-4.4-5.5c-1.2,3.2-1,6.9-1,6.9s-2.5-6-2.9-11.1c-1.5,2.3-1.9,6.6-1.9,6.6s-3.3-9.5-2.5-14.6 + c-1.5-4.4-6-13.2-4.7-33.2c8.2,5.8,26.3,4.4,33.4-6c2.3-3.5,3.9-12.9-1.2-31.4c-3.3-11.9-11.4-29.6-14.6-36.4l-0.4,0.3 + c1.7,5.4,5.1,16.8,6.4,22.3c4,16.7,5.1,22.5,3.2,30.2c-1.6,6.7-5.4,11.1-15.1,16c-9.7,4.9-22.6-7-23.4-7.7 + c-9.4-7.5-16.7-19.8-17.5-25.8c-0.8-6.5,3.8-10.5,6.1-15.8c-3.3,1-7,2.6-7,2.6s4.4-4.6,9.9-8.6c2.3-1.5,3.6-2.5,6-4.4 + c-3.4-0.1-6.2,0-6.2,0s5.7-3.1,11.7-5.4c-4.4-0.2-8.5,0-8.5,0s12.8-5.7,22.9-10c7-2.9,13.8-2,17.6,3.5c5,7.3,10.3,11.2,21.4,13.6 + c6.9-3,8.9-4.6,17.5-7c7.6-8.4,13.5-9.4,13.5-9.4s-3,2.7-3.7,7c4.3-3.4,9-6.2,9-6.2s-1.8,2.3-3.5,5.8l0.4,0.6c5-3,10.9-5.4,10.9-5.4 + s-1.7,2.1-3.7,4.9c3.8,0,11.5,0.2,14.4,0.5c17.6,0.4,21.2-18.8,28-21.2c8.4-3,12.2-4.9,26.6,9.3c12.3,12.2,22,33.9,17.2,38.8 + c-4,4-11.9-1.6-20.7-12.6c-4.6-5.8-8.1-12.7-9.8-21.4c-1.4-7.4-6.8-11.6-6.8-11.6s3.1,7,3.1,13.2c0,3.4,0.4,16,5.8,23 + c-0.5,1-0.8,5.1-1.4,5.9c-6.3-7.6-19.7-13-21.9-14.6c7.4,6.1,24.5,20.1,31.1,33.6c6.2,12.7,2.5,24.4,5.7,27.4 + c0.9,0.9,13.3,16.4,15.7,24.2c4.2,13.6,0.2,27.9-5.2,36.8l-15.3,2.4c-2.2-0.6-3.7-0.9-5.7-2.1c1.1-2,3.3-6.8,3.3-7.9l-0.9-1.5 + c-4.7,6.7-12.7,13.3-19.3,17.1c-8.7,4.9-18.6,4.2-25.1,2.1c-18.4-5.7-35.9-18.2-40.1-21.5c0,0-0.1,2.6,0.7,3.2 + c4.6,5.3,15.3,14.8,25.6,21.4l-21.9,2.4l10.4,81c-4.6,0.7-5.3,1-10.3,1.7c-4.4-15.7-12.9-26-22.2-32c-8.2-5.3-19.5-6.5-30.3-4.3 + l-0.7,0.8c7.5-0.8,16.4,0.3,25.5,6.1c8.9,5.7,16.1,20.3,18.8,29.1c3.4,11.3,5.7,23.3-3.4,36.1c-6.5,9.1-25.5,14.1-40.8,3.2 + c4.1,6.6,9.6,12,17.1,13c11.1,1.5,21.6-0.4,28.8-7.9c6.2-6.4,9.4-19.7,8.6-33.7l9.8-1.4l3.5,25.2l161.6-19.5L386.7,196.8z + M288.4,128.5c-0.5,1-1.2,1.7-0.1,5.1l0.1,0.2l0.2,0.4l0.4,1c1.9,3.9,4,7.6,7.5,9.5c0.9-0.2,1.9-0.3,2.8-0.3 + c3.3-0.1,5.4,0.4,6.7,1.1c0.1-0.7,0.1-1.6,0.1-3.1c-0.3-5,1-13.5-8.6-17.9c-3.6-1.7-8.7-1.2-10.3,0.9c0.3,0,0.6,0.1,0.8,0.2 + C290.6,126.6,288.8,127.5,288.4,128.5 M315.2,175c-1.3-0.7-7.1-0.4-11.2,0.1c-7.8,0.9-16.3,3.7-18.2,5.1c-3.4,2.6-1.8,7.2,0.7,9 + c7,5.2,13.1,8.7,19.6,7.9c4-0.5,7.5-6.8,9.9-12.5C317.6,180.7,317.6,176.4,315.2,175 M245.8,134.7c2.2-2.1-11-4.9-21.3,2.1 + c-7.6,5.2-7.8,16.3-0.6,22.6c0.7,0.6,1.3,1.1,1.9,1.4c2.1-1,4.5-2,7.3-2.9c4.7-1.5,8.6-2.3,11.8-2.7c1.5-1.7,3.3-4.7,2.9-10.2 + C247.2,137.6,241.6,138.7,245.8,134.7`),y(e,"version","1.1"),y(e,"id","Layer_1"),y(e,"xmlns","http://www.w3.org/2000/svg"),y(e,"xmlns:xlink","http://www.w3.org/1999/xlink"),y(e,"width",i[1]),y(e,"height",i[0]),y(e,"x","0px"),y(e,"y","0px"),y(e,"viewBox","0 0 500 500"),y(e,"enable-background","new 0 0 500 500"),y(e,"xml:space","preserve")},m(n,r){F(n,e,r),R(e,t)},p(n,[r]){r&2&&y(e,"width",n[1]),r&1&&y(e,"height",n[0])},i:fe,o:fe,d(n){n&&S(e)}}}function x1e(i,e,t){let{height:n="24px"}=e,{width:r="24px"}=e;return i.$$set=s=>{"height"in s&&t(0,n=s.height),"width"in s&&t(1,r=s.width)},[n,r]}class L1e extends Ue{constructor(e){super(),je(this,e,x1e,E1e,Ve,{height:0,width:1})}}function T1e(i){let e,t;return{c(){e=Ee("svg"),t=Ee("path"),this.h()},l(n){e=xe(n,"svg",{xmlns:!0,x:!0,y:!0,width:!0,height:!0,viewBox:!0});var r=M(e);t=xe(r,"path",{d:!0}),M(t).forEach(S),r.forEach(S),this.h()},h(){y(t,"d","M 11.5 6 C 8.4802259 6 6 8.4802259 6 11.5 L 6 36.5 C 6 39.519774 8.4802259 42 11.5 42 L 36.5 42 C 39.519774 42 42 39.519774 42 36.5 L 42 11.5 C 42 8.4802259 39.519774 6 36.5 6 L 11.5 6 z M 11.5 9 L 36.5 9 C 37.898226 9 39 10.101774 39 11.5 L 39 36.5 C 39 37.898226 37.898226 39 36.5 39 L 11.5 39 C 10.101774 39 9 37.898226 9 36.5 L 9 11.5 C 9 10.101774 10.101774 9 11.5 9 z M 24.5 13 C 18.595 13 16.5 16.502 16.5 19.5 C 16.5 24.022 20.764797 25.442594 22.966797 26.058594 C 25.413797 26.779594 25.5 27.824484 25.5 28.271484 C 25.5 28.854484 25.259172 29.241688 25.076172 29.429688 C 24.552172 29.971688 23.624734 30.075562 22.677734 29.976562 C 20.612734 29.759563 18.51075 28.965844 17.34375 28.464844 C 17.17975 28.393844 17 28.516312 17 28.695312 L 17 33.357422 C 17 33.570422 17.129078 33.760078 17.330078 33.830078 C 19.065078 34.430078 21.291 35 23.5 35 C 29.405 35 31.5 31.364 31.5 28.25 C 31.5 24.985 29.309281 22.692641 24.988281 21.431641 C 22.511281 20.678641 22.5 19.822453 22.5 19.439453 C 22.5 18.973453 22.727672 18.654094 22.888672 18.496094 C 23.384672 18.007094 24.399984 17.918109 25.333984 18.037109 C 27.397984 18.220109 29.491297 19.017391 30.654297 19.525391 C 30.818297 19.597391 31 19.474922 31 19.294922 L 31 14.642578 C 31 14.429578 30.870922 14.239922 30.669922 14.169922 C 28.934922 13.570922 26.709 13 24.5 13 z"),y(e,"xmlns","http://www.w3.org/2000/svg"),y(e,"x","0px"),y(e,"y","0px"),y(e,"width",i[1]),y(e,"height",i[0]),y(e,"viewBox","0 0 48 48")},m(n,r){F(n,e,r),R(e,t)},p(n,[r]){r&2&&y(e,"width",n[1]),r&1&&y(e,"height",n[0])},i:fe,o:fe,d(n){n&&S(e)}}}function I1e(i,e,t){let{height:n="24px"}=e,{width:r="24px"}=e;return i.$$set=s=>{"height"in s&&t(0,n=s.height),"width"in s&&t(1,r=s.width)},[n,r]}class D1e extends Ue{constructor(e){super(),je(this,e,I1e,T1e,Ve,{height:0,width:1})}}function N1e(i){let e,t;return{c(){e=Ee("svg"),t=Ee("path"),this.h()},l(n){e=xe(n,"svg",{xmlns:!0,x:!0,y:!0,width:!0,height:!0,viewBox:!0});var r=M(e);t=xe(r,"path",{d:!0}),M(t).forEach(S),r.forEach(S),this.h()},h(){y(t,"d","M 44.376953 5.9863281 C 43.889905 6.0076957 43.415817 6.1432497 42.988281 6.3144531 C 42.565113 6.4845113 40.128883 7.5243408 36.53125 9.0625 C 32.933617 10.600659 28.256963 12.603668 23.621094 14.589844 C 14.349356 18.562196 5.2382813 22.470703 5.2382812 22.470703 L 5.3046875 22.445312 C 5.3046875 22.445312 4.7547875 22.629122 4.1972656 23.017578 C 3.9185047 23.211806 3.6186028 23.462555 3.3730469 23.828125 C 3.127491 24.193695 2.9479735 24.711788 3.015625 25.259766 C 3.2532479 27.184511 5.2480469 27.730469 5.2480469 27.730469 L 5.2558594 27.734375 L 14.158203 30.78125 C 14.385177 31.538434 16.858319 39.792923 17.402344 41.541016 C 17.702797 42.507484 17.984013 43.064995 18.277344 43.445312 C 18.424133 43.635633 18.577962 43.782915 18.748047 43.890625 C 18.815627 43.933415 18.8867 43.965525 18.957031 43.994141 C 18.958531 43.994806 18.959437 43.99348 18.960938 43.994141 C 18.969579 43.997952 18.977708 43.998295 18.986328 44.001953 L 18.962891 43.996094 C 18.979231 44.002694 18.995359 44.013801 19.011719 44.019531 C 19.043456 44.030655 19.062905 44.030268 19.103516 44.039062 C 20.123059 44.395042 20.966797 43.734375 20.966797 43.734375 L 21.001953 43.707031 L 26.470703 38.634766 L 35.345703 45.554688 L 35.457031 45.605469 C 37.010484 46.295216 38.415349 45.910403 39.193359 45.277344 C 39.97137 44.644284 40.277344 43.828125 40.277344 43.828125 L 40.310547 43.742188 L 46.832031 9.7519531 C 46.998903 8.9915162 47.022612 8.334202 46.865234 7.7402344 C 46.707857 7.1462668 46.325492 6.6299361 45.845703 6.34375 C 45.365914 6.0575639 44.864001 5.9649605 44.376953 5.9863281 z M 44.429688 8.0195312 C 44.627491 8.0103707 44.774102 8.032983 44.820312 8.0605469 C 44.866523 8.0881109 44.887272 8.0844829 44.931641 8.2519531 C 44.976011 8.419423 45.000036 8.7721605 44.878906 9.3242188 L 44.875 9.3359375 L 38.390625 43.128906 C 38.375275 43.162926 38.240151 43.475531 37.931641 43.726562 C 37.616914 43.982653 37.266874 44.182554 36.337891 43.792969 L 26.632812 36.224609 L 26.359375 36.009766 L 26.353516 36.015625 L 23.451172 33.837891 L 39.761719 14.648438 A 1.0001 1.0001 0 0 0 38.974609 13 A 1.0001 1.0001 0 0 0 38.445312 13.167969 L 14.84375 28.902344 L 5.9277344 25.849609 C 5.9277344 25.849609 5.0423771 25.356927 5 25.013672 C 4.99765 24.994652 4.9871961 25.011869 5.0332031 24.943359 C 5.0792101 24.874869 5.1948546 24.759225 5.3398438 24.658203 C 5.6298218 24.456159 5.9609375 24.333984 5.9609375 24.333984 L 5.9941406 24.322266 L 6.0273438 24.308594 C 6.0273438 24.308594 15.138894 20.399882 24.410156 16.427734 C 29.045787 14.44166 33.721617 12.440122 37.318359 10.902344 C 40.914175 9.3649615 43.512419 8.2583658 43.732422 8.1699219 C 43.982886 8.0696253 44.231884 8.0286918 44.429688 8.0195312 z M 33.613281 18.792969 L 21.244141 33.345703 L 21.238281 33.351562 A 1.0001 1.0001 0 0 0 21.183594 33.423828 A 1.0001 1.0001 0 0 0 21.128906 33.507812 A 1.0001 1.0001 0 0 0 20.998047 33.892578 A 1.0001 1.0001 0 0 0 20.998047 33.900391 L 19.386719 41.146484 C 19.35993 41.068197 19.341173 41.039555 19.3125 40.947266 L 19.3125 40.945312 C 18.800713 39.30085 16.467362 31.5161 16.144531 30.439453 L 33.613281 18.792969 z M 22.640625 35.730469 L 24.863281 37.398438 L 21.597656 40.425781 L 22.640625 35.730469 z"),y(e,"xmlns","http://www.w3.org/2000/svg"),y(e,"x","0px"),y(e,"y","0px"),y(e,"width",i[1]),y(e,"height",i[0]),y(e,"viewBox","0 0 50 50")},m(n,r){F(n,e,r),R(e,t)},p(n,[r]){r&2&&y(e,"width",n[1]),r&1&&y(e,"height",n[0])},i:fe,o:fe,d(n){n&&S(e)}}}function A1e(i,e,t){let{height:n="24px"}=e,{width:r="24px"}=e;return i.$$set=s=>{"height"in s&&t(0,n=s.height),"width"in s&&t(1,r=s.width)},[n,r]}class R1e extends Ue{constructor(e){super(),je(this,e,A1e,N1e,Ve,{height:0,width:1})}}function O1e(i){let e,t,n,r,s,o,a,l,c,u,d,h,f,g,p,m,_,b,v,w;return{c(){e=Ee("svg"),t=Ee("metadata"),n=Ee("rdf:RDF"),r=Ee("cc:Work"),s=Ee("dc:format"),o=me("image/svg+xml"),a=Ee("dc:type"),l=Ee("dc:title"),c=Ee("defs"),u=Ee("sodipodi:namedview"),d=Ee("inkscape:grid"),h=Ee("style"),f=me(".st0{fill:#fff}.st1{fill:#009fe3}.st2{fill:#3c3c3b}"),g=Ee("g"),p=Ee("g"),m=Ee("g"),_=Ee("path"),b=Ee("path"),v=Ee("path"),w=Ee("path"),this.h()},l(E){e=xe(E,"svg",{version:!0,id:!0,x:!0,y:!0,viewBox:!0,"xml:space":!0,width:!0,height:!0});var I=M(e);t=xe(I,"metadata",{id:!0});var x=M(t);n=xe(x,"rdf:RDF",{});var T=M(n);r=xe(T,"cc:Work",{"rdf:about":!0});var L=M(r);s=xe(L,"dc:format",{});var O=M(s);o=_e(O,"image/svg+xml"),O.forEach(S),a=xe(L,"dc:type",{"rdf:resource":!0}),M(a).forEach(S),l=xe(L,"dc:title",{}),M(l).forEach(S),L.forEach(S),T.forEach(S),x.forEach(S),c=xe(I,"defs",{id:!0}),M(c).forEach(S),u=xe(I,"sodipodi:namedview",{pagecolor:!0,bordercolor:!0,borderopacity:!0,objecttolerance:!0,gridtolerance:!0,guidetolerance:!0,"inkscape:pageopacity":!0,"inkscape:pageshadow":!0,"inkscape:window-width":!0,"inkscape:window-height":!0,id:!0,showgrid:!0,"inkscape:zoom":!0,"inkscape:cx":!0,"inkscape:cy":!0,"inkscape:window-x":!0,"inkscape:window-y":!0,"inkscape:window-maximized":!0,"inkscape:current-layer":!0});var N=M(u);d=xe(N,"inkscape:grid",{type:!0,id:!0,originx:!0,originy:!0}),M(d).forEach(S),N.forEach(S),h=xe(I,"style",{type:!0,id:!0});var P=M(h);f=_e(P,".st0{fill:#fff}.st1{fill:#009fe3}.st2{fill:#3c3c3b}"),P.forEach(S),g=xe(I,"g",{id:!0,transform:!0});var $=M(g);p=xe($,"g",{id:!0});var ne=M(p);m=xe(ne,"g",{id:!0});var z=M(m);_=xe(z,"path",{class:!0,d:!0,id:!0,style:!0}),M(_).forEach(S),b=xe(z,"path",{class:!0,d:!0,id:!0,style:!0}),M(b).forEach(S),v=xe(z,"path",{class:!0,d:!0,id:!0,style:!0}),M(v).forEach(S),z.forEach(S),w=xe(ne,"path",{class:!0,d:!0,id:!0,style:!0}),M(w).forEach(S),ne.forEach(S),$.forEach(S),I.forEach(S),this.h()},h(){y(a,"rdf:resource","http://purl.org/dc/dcmitype/StillImage"),y(r,"rdf:about",""),y(t,"id","metadata25"),y(c,"id","defs23"),y(d,"type","xygrid"),y(d,"id","grid4535"),y(d,"originx","-1.1305091"),y(d,"originy","-14.869552"),y(u,"pagecolor","#ffffff"),y(u,"bordercolor","#666666"),y(u,"borderopacity","1"),y(u,"objecttolerance","10"),y(u,"gridtolerance","10"),y(u,"guidetolerance","10"),y(u,"inkscape:pageopacity","0"),y(u,"inkscape:pageshadow","2"),y(u,"inkscape:window-width","1920"),y(u,"inkscape:window-height","1043"),y(u,"id","namedview21"),y(u,"showgrid","true"),y(u,"inkscape:zoom","1.84375"),y(u,"inkscape:cx","210.72257"),y(u,"inkscape:cy","88.813847"),y(u,"inkscape:window-x","0"),y(u,"inkscape:window-y","0"),y(u,"inkscape:window-maximized","1"),y(u,"inkscape:current-layer","Calque_1"),y(h,"type","text/css"),y(h,"id","style2"),y(_,"class","st1"),y(_,"d","m 128,157.1 c 17.7,0 32.1,-14.4 32.1,-32.1 0,-0.9 -0.8,-1.7 -1.7,-1.7 h -12.1 c -0.9,0 -1.7,0.8 -1.7,1.7 0,9.1 -7.4,16.6 -16.6,16.6 -9.1,0 -16.6,-7.4 -16.6,-16.6 0,-0.9 -0.8,-1.7 -1.7,-1.7 H 97.6 c -0.9,0 -1.7,0.8 -1.7,1.7 0,17.8 14.4,32.1 32.1,32.1 z"),y(_,"id","path6"),Ye(_,"fill","#000000"),y(b,"class","st1"),y(b,"d","m 128,187.4 c 34.3,0 62.3,-28 62.3,-62.3 0,-0.9 -0.8,-1.7 -1.7,-1.7 h -12.1 c -0.9,0 -1.7,0.8 -1.7,1.7 0,25.9 -21,46.9 -46.9,46.9 C 102,172 81,151 81,125.1 c 0,-0.9 -0.8,-1.7 -1.7,-1.7 H 67.4 c -0.9,0 -1.7,0.8 -1.7,1.7 -0.2,34.3 27.8,62.3 62.3,62.3 z"),y(b,"id","path8"),Ye(b,"fill","#000000"),y(v,"class","st1"),y(v,"d","m 219,123.4 h -12.1 c -0.9,0 -1.7,0.8 -1.7,1.7 0,42.6 -34.8,77.3 -77.3,77.3 -42.6,0 -77.3,-34.6 -77.3,-77.3 0,-0.9 -0.8,-1.7 -1.7,-1.7 H 37 c -0.9,0 -1.7,0.8 -1.7,1.7 0,51.1 41.6,92.7 92.7,92.7 51.1,0 92.7,-41.6 92.7,-92.7 0,-0.9 -0.8,-1.7 -1.7,-1.7 z"),y(v,"id","path10"),Ye(v,"fill","#000000"),y(m,"id","g12"),y(w,"class","st2"),y(w,"d","m 86.3,83.3 c 6.2,3.2 12.9,3.8 18.9,7.3 3.9,2.3 6.4,4.8 8.8,8.6 3.8,5.7 3.6,12.9 3.6,12.9 l 0.5,7.9 c 0,0 3,7.9 9.7,7.9 7.1,0 9.7,-7.9 9.7,-7.9 l 0.5,-7.9 c 0,0 -0.2,-7.1 3.6,-12.9 2.4,-3.8 4.8,-6.5 8.8,-8.6 6,-3.5 12.7,-4.1 18.9,-7.3 6.2,-3.2 12.2,-7.3 16.3,-13 4.1,-5.7 6,-13.3 3.8,-20 -11.8,-0.6 -25.4,0.8 -35.8,6.4 -14.5,7.7 -23.3,5 -25.9,16.5 h -0.2 c -2.6,-11.6 -11.3,-8.8 -25.9,-16.5 -10.4,-5.6 -24,-7 -35.8,-6.4 -2.3,6.7 -0.3,14.2 3.8,20 4.4,5.8 10.5,9.9 16.7,13 z"),y(w,"id","path14"),Ye(w,"fill","#3c3c3b"),y(p,"id","g16"),y(g,"id","g18"),y(g,"transform","matrix(1.3627521,0,0,1.3627521,-48.105149,-68.371499)"),y(e,"version","1.1"),y(e,"id","Calque_1"),y(e,"x","0px"),y(e,"y","0px"),y(e,"viewBox","0 0 252.65424 228.43591"),y(e,"xml:space","preserve"),y(e,"width",i[1]),y(e,"height",i[0])},m(E,I){F(E,e,I),R(e,t),R(t,n),R(n,r),R(r,s),R(s,o),R(r,a),R(r,l),R(e,c),R(e,u),R(u,d),R(e,h),R(h,f),R(e,g),R(g,p),R(p,m),R(m,_),R(m,b),R(m,v),R(p,w)},p(E,[I]){I&2&&y(e,"width",E[1]),I&1&&y(e,"height",E[0])},i:fe,o:fe,d(E){E&&S(e)}}}function M1e(i,e,t){let{height:n="24px"}=e,{width:r="24px"}=e;return i.$$set=s=>{"height"in s&&t(0,n=s.height),"width"in s&&t(1,r=s.width)},[n,r]}class P1e extends Ue{constructor(e){super(),je(this,e,M1e,O1e,Ve,{height:0,width:1})}}function F1e(i){let e,t;return{c(){e=Ee("svg"),t=Ee("path"),this.h()},l(n){e=xe(n,"svg",{xmlns:!0,x:!0,y:!0,width:!0,height:!0,viewBox:!0});var r=M(e);t=xe(r,"path",{d:!0}),M(t).forEach(S),r.forEach(S),this.h()},h(){y(t,"d","M 28.90625 1.96875 C 28.863281 1.976563 28.820313 1.988281 28.78125 2 L 11.5 2 C 9.585938 2 8 3.558594 8 5.46875 L 8 43.90625 C 8 46.160156 9.867188 48 12.125 48 L 37.875 48 C 40.132813 48 42 46.160156 42 43.90625 L 42 15.1875 C 42.027344 15.054688 42.027344 14.914063 42 14.78125 L 42 14.5 C 42.007813 14.234375 41.90625 13.972656 41.71875 13.78125 L 30.21875 2.28125 C 30.027344 2.09375 29.765625 1.992188 29.5 2 L 29.1875 2 C 29.097656 1.976563 29 1.964844 28.90625 1.96875 Z M 11.5 4 L 28 4 L 28 12.34375 C 28 14.355469 29.644531 16 31.65625 16 L 40 16 L 40 43.90625 C 40 45.074219 39.054688 46 37.875 46 L 12.125 46 C 10.945313 46 10 45.074219 10 43.90625 L 10 5.46875 C 10 4.644531 10.660156 4 11.5 4 Z M 30 4.9375 L 39.0625 14 L 31.65625 14 C 30.722656 14 30 13.277344 30 12.34375 Z M 17 24 L 17 26 L 33 26 L 33 24 Z M 17 28 L 17 30 L 33 30 L 33 28 Z M 17 32 L 17 34 L 33 34 L 33 32 Z M 17 36 L 17 38 L 26 38 L 26 36 Z"),y(e,"xmlns","http://www.w3.org/2000/svg"),y(e,"x","0px"),y(e,"y","0px"),y(e,"width",i[1]),y(e,"height",i[0]),y(e,"viewBox","0 0 50 50")},m(n,r){F(n,e,r),R(e,t)},p(n,[r]){r&2&&y(e,"width",n[1]),r&1&&y(e,"height",n[0])},i:fe,o:fe,d(n){n&&S(e)}}}function B1e(i,e,t){let{height:n="24px"}=e,{width:r="24px"}=e;return i.$$set=s=>{"height"in s&&t(0,n=s.height),"width"in s&&t(1,r=s.width)},[n,r]}class V1e extends Ue{constructor(e){super(),je(this,e,B1e,F1e,Ve,{height:0,width:1})}}function W1e(i){let e,t,n,r;return{c(){e=Ee("svg"),t=Ee("title"),n=me("Nextcloud icon"),r=Ee("path"),this.h()},l(s){e=xe(s,"svg",{role:!0,viewBox:!0,width:!0,height:!0,xmlns:!0});var o=M(e);t=xe(o,"title",{});var a=M(t);n=_e(a,"Nextcloud icon"),a.forEach(S),r=xe(o,"path",{d:!0}),M(r).forEach(S),o.forEach(S),this.h()},h(){y(r,"d","M12.018 6.537c-2.5 0-4.6 1.712-5.241 4.015-.56-1.232-1.793-2.105-3.225-2.105A3.569 3.569 0 0 0 0 12a3.569 3.569 0 0 0 3.552 3.553c1.432 0 2.664-.874 3.224-2.106.641 2.304 2.742 4.016 5.242 4.016 2.487 0 4.576-1.693 5.231-3.977.569 1.21 1.783 2.067 3.198 2.067A3.568 3.568 0 0 0 24 12a3.569 3.569 0 0 0-3.553-3.553c-1.416 0-2.63.858-3.199 2.067-.654-2.284-2.743-3.978-5.23-3.977zm0 2.085c1.878 0 3.378 1.5 3.378 3.378 0 1.878-1.5 3.378-3.378 3.378A3.362 3.362 0 0 1 8.641 12c0-1.878 1.5-3.378 3.377-3.378zm-8.466 1.91c.822 0 1.467.645 1.467 1.468s-.644 1.467-1.467 1.468A1.452 1.452 0 0 1 2.085 12c0-.823.644-1.467 1.467-1.467zm16.895 0c.823 0 1.468.645 1.468 1.468s-.645 1.468-1.468 1.468A1.452 1.452 0 0 1 18.98 12c0-.823.644-1.467 1.467-1.467z"),y(e,"role","img"),y(e,"viewBox","0 0 24 24"),y(e,"width",i[1]),y(e,"height",i[0]),y(e,"xmlns","http://www.w3.org/2000/svg")},m(s,o){F(s,e,o),R(e,t),R(t,n),R(e,r)},p(s,[o]){o&2&&y(e,"width",s[1]),o&1&&y(e,"height",s[0])},i:fe,o:fe,d(s){s&&S(e)}}}function H1e(i,e,t){let{height:n="24px"}=e,{width:r="24px"}=e;return i.$$set=s=>{"height"in s&&t(0,n=s.height),"width"in s&&t(1,r=s.width)},[n,r]}class JW extends Ue{constructor(e){super(),je(this,e,H1e,W1e,Ve,{height:0,width:1})}}function z1e(i){let e,t;return{c(){e=Ee("svg"),t=Ee("path"),this.h()},l(n){e=xe(n,"svg",{xmlns:!0,x:!0,y:!0,width:!0,height:!0,viewBox:!0,fill:!0});var r=M(e);t=xe(r,"path",{d:!0,fill:!0}),M(t).forEach(S),r.forEach(S),this.h()},h(){y(t,"d","M124.222 37.638C114.302 40.949 109.525 46.888 106.271 56.138C105.431 58.609 103.331 61.342 100.969 63.182L109.105 71.907L83.28 53.827L12 4C12 4 17.144 37.428 18.929 49.727C20.189 58.399 22.34 62.288 29.164 66.23L31.894 67.702L43.651 73.904L36.67 70.277L68.898 87.885L68.688 88.358L33.993 72.274C35.83 78.582 39.399 90.723 40.922 96.084C42.549 101.865 44.386 103.968 50.002 106.018L60.342 109.802L66.746 107.279L58.611 112.693L17.931 164.358C44.963 139.235 67.849 130.3 84.593 122.994C105.956 113.744 118.816 107.805 127.214 86.466C133.198 71.486 137.869 52.302 143.801 44.891L156.451 28.703C156.451 28.703 130.258 35.641 124.222 37.638Z"),y(t,"fill","#3F00A5"),y(e,"xmlns","http://www.w3.org/2000/svg"),y(e,"x","0px"),y(e,"y","0px"),y(e,"width",i[1]),y(e,"height",i[0]),y(e,"viewBox","0 0 168 168"),y(e,"fill","none")},m(n,r){F(n,e,r),R(e,t)},p(n,[r]){r&2&&y(e,"width",n[1]),r&1&&y(e,"height",n[0])},i:fe,o:fe,d(n){n&&S(e)}}}function $1e(i,e,t){let{height:n="24px"}=e,{width:r="24px"}=e;return i.$$set=s=>{"height"in s&&t(0,n=s.height),"width"in s&&t(1,r=s.width)},[n,r]}class U1e extends Ue{constructor(e){super(),je(this,e,$1e,z1e,Ve,{height:0,width:1})}}function j1e(i){let e,t,n;return{c(){e=Ee("svg"),t=Ee("path"),n=Ee("path"),this.h()},l(r){e=xe(r,"svg",{xmlns:!0,x:!0,y:!0,width:!0,height:!0,viewBox:!0,fill:!0});var s=M(e);t=xe(s,"path",{d:!0,fill:!0}),M(t).forEach(S),n=xe(s,"path",{d:!0,fill:!0}),M(n).forEach(S),s.forEach(S),this.h()},h(){y(t,"d","M0 139.667H18.6667V158.333H0V139.667Z"),y(t,"fill","#FF0000"),y(n,"d","M0 9H18.6667V139.667H0V9ZM37.3333 9H56V158.333H37.3333V9ZM74.6667 9H93.3333V158.333H74.6667V9ZM112 9H130.667V158.333H112V9ZM149.333 69.6667H168V97.6667H149.333V69.6667Z"),y(n,"fill","#FFCC00"),y(e,"xmlns","http://www.w3.org/2000/svg"),y(e,"x","0px"),y(e,"y","0px"),y(e,"width",i[1]),y(e,"height",i[0]),y(e,"viewBox","0 0 168 168"),y(e,"fill","none")},m(r,s){F(r,e,s),R(e,t),R(e,n)},p(r,[s]){s&2&&y(e,"width",r[1]),s&1&&y(e,"height",r[0])},i:fe,o:fe,d(r){r&&S(e)}}}function q1e(i,e,t){let{height:n="24px"}=e,{width:r="24px"}=e;return i.$$set=s=>{"height"in s&&t(0,n=s.height),"width"in s&&t(1,r=s.width)},[n,r]}class G1e extends Ue{constructor(e){super(),je(this,e,q1e,j1e,Ve,{height:0,width:1})}}function K1e(i){let e,t;return{c(){e=Ee("svg"),t=Ee("path"),this.h()},l(n){e=xe(n,"svg",{xmlns:!0,x:!0,y:!0,width:!0,height:!0,viewBox:!0,fill:!0});var r=M(e);t=xe(r,"path",{d:!0,fill:!0}),M(t).forEach(S),r.forEach(S),this.h()},h(){y(t,"d","M75.3666 0.990772C56.9205 0.990772 40.5323 12.7091 34.82 30.0051C28.9578 31.1972 23.4203 33.6075 18.5758 37.0754C13.7313 40.5434 9.69106 44.9895 6.7239 50.1179C-2.52748 65.8927 -0.414958 85.724 11.9789 99.245C8.15248 110.57 9.46573 122.963 15.5767 133.218C24.7714 149.049 43.2721 157.162 61.3762 153.387C65.3401 157.8 70.2122 161.329 75.6676 163.739C81.123 166.148 87.0364 167.382 93.0135 167.359C111.46 167.359 127.848 155.641 133.56 138.345C145.438 135.921 155.661 128.597 161.6 118.232C170.908 102.457 168.795 82.6257 156.403 69.1047V69.0488C158.293 63.451 158.95 57.5194 158.33 51.6509C157.709 45.7825 155.826 40.1123 152.805 35.0198C143.609 19.245 125.106 11.13 107.06 14.905C103.078 10.503 98.1934 6.98605 92.7294 4.58725C87.2654 2.18845 81.3471 0.962552 75.3666 0.990772ZM75.3666 11.8088L75.31 11.8646C82.7341 11.8646 89.873 14.4 95.5833 19.0773C95.3546 19.1891 94.8973 19.4706 94.5554 19.6403L60.9776 38.7389C59.2637 39.6971 58.2358 41.4998 58.2358 43.4722V88.3172L43.7881 80.0924V43.021C43.7849 34.7519 47.1089 26.8196 53.03 20.9669C58.9511 15.1141 66.9849 11.8195 75.3666 11.8068V11.8088ZM115.816 24.8646C121.381 24.854 126.849 26.2929 131.669 29.0359C136.489 31.7788 140.49 35.7285 143.267 40.4857C146.921 46.796 148.291 54.1764 147.034 61.3311C146.806 61.1614 146.351 60.9378 146.063 60.7682L112.485 41.6116C111.641 41.1403 110.687 40.8926 109.716 40.8926C108.746 40.8926 107.792 41.1403 106.947 41.6116L67.6005 64.0341V47.5826L100.094 29.0469C104.871 26.3143 110.294 24.8711 115.816 24.8626V24.8646ZM32.7662 41.8931V81.2742C32.7662 83.2466 33.7941 84.9933 35.508 86.0075L74.796 108.374L60.2896 116.655L27.8531 98.1749C20.6043 94.0304 15.3186 87.2176 13.1561 79.232C10.9937 71.2464 12.1313 62.7407 16.3193 55.5818C20.0137 49.2641 25.8321 44.4207 32.7662 41.8911V41.8931ZM108.032 51.639L140.525 70.1189C155.659 78.7389 160.796 97.7817 152.059 112.712L152.115 112.768C148.404 119.078 142.579 123.923 135.669 126.403V87.0196C135.669 85.0472 134.641 83.2446 132.927 82.2883L93.582 59.8638L108.032 51.639ZM84.1607 65.2179L100.723 74.6824V93.5555L84.1607 103.02L67.6005 93.5555V74.6824L84.1607 65.2179ZM110.201 80.0924L124.649 88.3172V125.333C124.649 142.573 110.486 156.545 93.0701 156.545V156.489C85.7026 156.489 78.5071 153.954 72.8534 149.278C73.0821 149.167 73.5961 148.883 73.8814 148.713L107.459 129.615C109.173 128.657 110.258 126.854 110.199 124.882L110.201 80.0924ZM100.778 104.318V120.767L68.2844 139.247C53.1508 147.811 33.8487 142.74 25.1113 127.866H25.168C21.4569 121.612 20.1416 114.175 21.3982 107.021C21.6269 107.19 22.0842 107.414 22.3695 107.584L55.9472 126.74C56.792 127.211 57.7459 127.459 58.7164 127.459C59.6868 127.459 60.6408 127.211 61.4855 126.74L100.778 104.318Z"),y(t,"fill","#0F0F0F"),y(e,"xmlns","http://www.w3.org/2000/svg"),y(e,"x","0px"),y(e,"y","0px"),y(e,"width",i[1]),y(e,"height",i[0]),y(e,"viewBox","0 0 168 168"),y(e,"fill","none")},m(n,r){F(n,e,r),R(e,t)},p(n,[r]){r&2&&y(e,"width",n[1]),r&1&&y(e,"height",n[0])},i:fe,o:fe,d(n){n&&S(e)}}}function Y1e(i,e,t){let{height:n="24px"}=e,{width:r="24px"}=e;return i.$$set=s=>{"height"in s&&t(0,n=s.height),"width"in s&&t(1,r=s.width)},[n,r]}class Z1e extends Ue{constructor(e){super(),je(this,e,Y1e,K1e,Ve,{height:0,width:1})}}function X1e(i){let e,t,n;return{c(){e=Ee("svg"),t=Ee("path"),n=Ee("path"),this.h()},l(r){e=xe(r,"svg",{x:!0,y:!0,width:!0,height:!0,viewBox:!0,fill:!0,xmlns:!0});var s=M(e);t=xe(s,"path",{"fill-rule":!0,"clip-rule":!0,d:!0,fill:!0}),M(t).forEach(S),n=xe(s,"path",{d:!0,fill:!0}),M(n).forEach(S),s.forEach(S),this.h()},h(){y(t,"fill-rule","evenodd"),y(t,"clip-rule","evenodd"),y(t,"d","M111.716 139.591C101.618 139.591 92.1532 136.884 84.0067 132.157C77.8943 135.694 71.1023 138.062 63.9721 139.059C49.4512 141.09 34.7181 137.269 23.0142 128.437C17.2134 124.066 12.3308 118.594 8.64533 112.336C4.95993 106.077 2.54395 99.1532 1.53545 91.9602C0.527001 84.7672 0.94584 77.4461 2.768 70.4149C4.59016 63.3838 7.77996 56.7809 12.1551 50.9832C16.5302 45.1854 22.005 40.3066 28.2664 36.6256C34.5278 32.9446 41.4532 30.5335 48.6472 29.5301C55.8407 28.5267 63.1613 28.9507 70.1914 30.7777C75.0433 32.0389 79.6913 33.9515 84.0104 36.4554C92.1563 31.7292 101.62 29.023 111.716 29.023C142.249 29.023 167 53.7741 167 84.307C167 114.84 142.249 139.591 111.716 139.591ZM74.7533 43.1944L74.7699 43.1799C67.0929 39.7354 58.5382 38.4798 50.0717 39.6638C38.2317 41.3196 27.534 47.6111 20.3325 57.1542C13.1311 66.6976 10.0156 78.7102 11.6714 90.5507C13.3272 102.391 19.6187 113.088 29.1618 120.29C38.7048 127.491 50.718 130.607 62.558 128.951C74.3985 127.295 85.0961 121.003 92.2974 111.46C99.4987 101.917 102.614 89.9044 100.958 78.0639C100.194 72.6015 98.4441 67.3823 95.8425 62.6373C91.1307 54.0783 83.7183 47.2148 74.7533 43.1944Z"),y(t,"fill","#F02E65"),y(n,"d","M57.7961 65.1797C57.7297 65.3431 56.8847 68.6631 55.9743 72.6009C55.0296 76.5387 53.5325 82.7544 52.688 86.4318C51.0591 93.1683 50.0828 97.5943 50.0828 98.1805C50.0828 98.3418 51.0923 98.4736 52.328 98.4736H54.5747L55.5821 93.9812C56.1693 91.541 57.4714 85.9432 58.5125 81.5499C59.5542 77.156 60.8225 71.8191 61.3117 69.6705C61.7988 67.5223 62.287 65.5713 62.3855 65.3431C62.4836 65.0505 61.929 64.9535 60.2374 64.9535C58.9675 64.9535 57.8599 65.0505 57.7961 65.1797ZM40.3189 79.2715L37.3247 82.5267L38.2045 83.5673C38.6911 84.1524 40.0269 85.6179 41.1661 86.8224L43.2488 89.0344H49.1719L46.3738 86.0075C44.843 84.3822 43.5736 82.8192 43.5736 82.6242C43.5736 82.3965 44.7459 80.9325 46.1782 79.3701C47.6094 77.7765 48.7813 76.4075 48.7813 76.2451C48.7813 76.1149 47.5446 76.0174 46.048 76.0174H43.3469L40.3189 79.2715ZM63.1004 76.2119C63.1004 76.311 63.6539 76.9283 64.336 77.612C66.8763 80.1503 68.666 82.2995 68.568 82.7212C68.5037 82.95 67.2659 84.4782 65.7698 86.0734L63.0698 89.0344H66.0951L69.122 89.0022L71.8869 85.9764C73.4178 84.2852 74.654 82.786 74.654 82.591C74.654 82.4297 73.3524 80.8993 71.7246 79.1755L68.7967 76.0174H65.9639C64.3692 76.0174 63.1004 76.1149 63.1004 76.2119Z"),y(n,"fill","#F02E65"),y(e,"x","0px"),y(e,"y","0px"),y(e,"width",i[1]),y(e,"height",i[0]),y(e,"viewBox","0 0 168 168"),y(e,"fill","none"),y(e,"xmlns","http://www.w3.org/2000/svg")},m(r,s){F(r,e,s),R(e,t),R(e,n)},p(r,[s]){s&2&&y(e,"width",r[1]),s&1&&y(e,"height",r[0])},i:fe,o:fe,d(r){r&&S(e)}}}function Q1e(i,e,t){let{height:n="24px"}=e,{width:r="24px"}=e;return i.$$set=s=>{"height"in s&&t(0,n=s.height),"width"in s&&t(1,r=s.width)},[n,r]}class J1e extends Ue{constructor(e){super(),je(this,e,Q1e,X1e,Ve,{height:0,width:1})}}function e0e(i){let e,t,n;return{c(){e=Ee("svg"),t=Ee("g"),n=Ee("path"),this.h()},l(r){e=xe(r,"svg",{version:!0,id:!0,x:!0,y:!0,width:!0,height:!0,viewBox:!0});var s=M(e);t=xe(s,"g",{id:!0});var o=M(t);n=xe(o,"path",{style:!0,d:!0,id:!0}),M(n).forEach(S),o.forEach(S),s.forEach(S),this.h()},h(){Ye(n,"fill","#000000"),y(n,"d","M 21.934964,54.577686 C -1.2680732,49.62024 -6.9798152,18.503632 12.863299,5.1567822 32.772873,-8.2347712 58.966204,9.2924868 54.765887,33.195885 53.022738,43.115892 43.59487,52.995551 34.461449,54.473328 c -2.2,0.355957 -4.675,0.790728 -5.5,0.966157 -0.825,0.175429 -3.986918,-0.212381 -7.026485,-0.861799 z M 45.071867,32.670208 C 51.629793,25.125635 52.430122,21.8666 49.075771,16.36585 46.719483,12.501807 40.750657,9.5309908 37.156102,10.433166 c -1.449711,0.363855 -7.267103,5.218963 -12.927538,10.78913 -9.143972,8.998151 -10.124574,10.294702 -8.793078,11.626198 1.331496,1.331496 2.599723,0.416811 11.372216,-8.201994 5.862435,-5.759729 10.688216,-9.700615 11.878812,-9.700615 3.447831,0 7.274935,3.794342 7.274935,7.212657 0,2.529244 -1.664895,4.762079 -9.488223,12.724911 -8.933265,9.092559 -9.388707,9.75693 -7.786773,11.358864 1.601934,1.601934 1.958639,1.452934 6.098641,-2.547491 2.418455,-2.336917 7.047503,-7.297996 10.286773,-11.024618 z M 20.243568,44.55131 c 1.769834,-0.767016 7.407067,-5.639768 12.527183,-10.828339 8.223928,-8.333878 9.123338,-9.5881 7.71428,-10.757515 -1.387314,-1.151368 -2.874359,-0.06683 -11.419226,8.328339 -11.100401,10.90593 -13.206314,11.696497 -17.515462,6.575365 -1.423892,-1.692199 -2.5888942,-3.782435 -2.5888942,-4.64497 0,-0.862534 4.5088982,-6.150211 10.0197732,-11.750393 9.53558,-9.69011 9.931944,-10.261632 8.202286,-11.8269512 -1.717047,-1.553906 -2.319947,-1.135176 -10.909762,7.5771182 -5.000752,5.072057 -9.5917812,10.204837 -10.2022872,11.40618 -2.73924,5.390228 0.339025,13.302752 6.1596852,15.833154 4.065039,1.767185 4.136052,1.767965 8.012424,0.08801 z"),y(n,"id","path116"),y(t,"id","g8"),y(e,"version","1.1"),y(e,"id","svg2"),y(e,"x","0"),y(e,"y","0"),y(e,"width",i[1]),y(e,"height",i[0]),y(e,"viewBox","0 0 56 56")},m(r,s){F(r,e,s),R(e,t),R(t,n)},p(r,[s]){s&2&&y(e,"width",r[1]),s&1&&y(e,"height",r[0])},i:fe,o:fe,d(r){r&&S(e)}}}function t0e(i,e,t){let{height:n="24px"}=e,{width:r="24px"}=e;return i.$$set=s=>{"height"in s&&t(0,n=s.height),"width"in s&&t(1,r=s.width)},[n,r]}class n0e extends Ue{constructor(e){super(),je(this,e,t0e,e0e,Ve,{height:0,width:1})}}function i0e(i){let e,t,n,r;return{c(){e=Ee("svg"),t=Ee("path"),n=Ee("path"),r=Ee("path"),this.h()},l(s){e=xe(s,"svg",{width:!0,height:!0,viewBox:!0,fill:!0,xmlns:!0});var o=M(e);t=xe(o,"path",{d:!0,fill:!0}),M(t).forEach(S),n=xe(o,"path",{"fill-rule":!0,"clip-rule":!0,d:!0,fill:!0}),M(n).forEach(S),r=xe(o,"path",{"fill-rule":!0,"clip-rule":!0,d:!0,fill:!0}),M(r).forEach(S),o.forEach(S),this.h()},h(){y(t,"d","M47.7805 70.052C47.7805 72.0948 48.0013 73.7511 48.3878 74.9657C48.8295 76.1803 49.3816 77.5054 50.1545 78.9408C50.4306 79.3825 50.541 79.8242 50.541 80.2106C50.541 80.7627 50.2097 81.3148 49.492 81.8669L46.0138 84.1858C45.5169 84.517 45.02 84.6826 44.5783 84.6826C44.0262 84.6826 43.4741 84.4066 42.922 83.9097C42.1491 83.0816 41.4866 82.1982 40.9345 81.3148C40.3824 80.3763 39.8303 79.3273 39.223 78.0575C34.9166 83.1368 29.506 85.6764 22.9913 85.6764C18.3536 85.6764 14.6546 84.3514 11.9493 81.7013C9.24402 79.0512 7.86377 75.5178 7.86377 71.101C7.86377 66.4082 9.52007 62.5987 12.8879 59.7278C16.2557 56.8569 20.7277 55.4214 26.4143 55.4214C28.2914 55.4214 30.2238 55.5871 32.2665 55.8631C34.3093 56.1392 36.4073 56.5808 38.6157 57.0777V53.0474C38.6157 48.8515 37.7323 45.9253 36.0208 44.2138C34.2541 42.5023 31.2727 41.6742 27.0216 41.6742C25.0892 41.6742 23.1017 41.895 21.0589 42.3919C19.0162 42.8888 17.0286 43.4961 15.0963 44.269C14.2129 44.6555 13.5504 44.8763 13.1639 44.9868C12.7774 45.0972 12.5014 45.1524 12.2806 45.1524C11.5076 45.1524 11.1212 44.6003 11.1212 43.4409V40.7356C11.1212 39.8522 11.2316 39.1897 11.5076 38.8033C11.7837 38.4168 12.2806 38.0303 13.0535 37.6439C14.9858 36.6501 17.3047 35.8219 20.0099 35.1594C22.7152 34.4417 25.5861 34.1104 28.6227 34.1104C35.1926 34.1104 39.9959 35.6011 43.0877 38.5824C46.1242 41.5637 47.6701 46.091 47.6701 52.164V70.052H47.7805ZM25.3653 78.4439C27.1872 78.4439 29.0644 78.1127 31.0519 77.4502C33.0395 76.7876 34.8062 75.573 36.2968 73.9167C37.1802 72.8677 37.8427 71.7083 38.174 70.3833C38.5052 69.0583 38.7261 67.4572 38.7261 65.58V63.2612C37.125 62.8748 35.4135 62.5435 33.6468 62.3227C31.8801 62.1018 30.1685 61.9914 28.457 61.9914C24.758 61.9914 22.0527 62.7091 20.2308 64.1998C18.4088 65.6905 17.5255 67.7884 17.5255 70.5489C17.5255 73.1438 18.188 75.0761 19.5683 76.4012C20.8933 77.7814 22.8256 78.4439 25.3653 78.4439ZM69.6988 84.4066C68.705 84.4066 68.0425 84.241 67.6008 83.8545C67.1591 83.5232 66.7727 82.7503 66.4414 81.7013L53.4671 39.0241C53.1358 37.9199 52.9702 37.2022 52.9702 36.8157C52.9702 35.9323 53.4119 35.4355 54.2952 35.4355H59.7058C60.7548 35.4355 61.4725 35.6011 61.859 35.9876C62.3007 36.3188 62.6319 37.0918 62.9632 38.1407L72.2384 74.6897L80.8512 38.1407C81.1272 37.0365 81.4585 36.3188 81.9002 35.9876C82.3418 35.6563 83.1148 35.4355 84.1086 35.4355H88.5253C89.5743 35.4355 90.2921 35.6011 90.7337 35.9876C91.1754 36.3188 91.5619 37.0918 91.7827 38.1407L100.506 75.1313L110.057 38.1407C110.388 37.0365 110.775 36.3188 111.161 35.9876C111.603 35.6563 112.321 35.4355 113.315 35.4355H118.449C119.332 35.4355 119.829 35.8771 119.829 36.8157C119.829 37.0918 119.774 37.3678 119.719 37.6991C119.664 38.0303 119.553 38.472 119.332 39.0793L106.027 81.7565C105.696 82.8607 105.309 83.5784 104.867 83.9097C104.426 84.241 103.708 84.4618 102.769 84.4618H98.0214C96.9725 84.4618 96.2547 84.2962 95.813 83.9097C95.3714 83.5232 94.9849 82.8055 94.7641 81.7013L86.2065 46.091L77.7042 81.6461C77.4282 82.7503 77.0969 83.468 76.6552 83.8545C76.2136 84.241 75.4406 84.4066 74.4468 84.4066H69.6988ZM140.643 85.8973C137.773 85.8973 134.902 85.566 132.141 84.9035C129.381 84.241 127.227 83.5232 125.792 82.6951C124.909 82.1982 124.301 81.6461 124.08 81.1492C123.86 80.6523 123.749 80.1002 123.749 79.6033V76.7876C123.749 75.6282 124.191 75.0761 125.019 75.0761C125.35 75.0761 125.682 75.1313 126.013 75.2418C126.344 75.3522 126.841 75.573 127.393 75.7939C129.27 76.622 131.313 77.2845 133.466 77.7262C135.675 78.1679 137.828 78.3887 140.036 78.3887C143.514 78.3887 146.22 77.7814 148.097 76.5668C149.974 75.3522 150.968 73.5855 150.968 71.3219C150.968 69.776 150.471 68.5062 149.477 67.4572C148.483 66.4082 146.606 65.4696 143.901 64.5863L135.895 62.1018C131.865 60.832 128.884 58.9549 127.062 56.4704C125.24 54.0412 124.301 51.3359 124.301 48.465C124.301 46.1462 124.798 44.1034 125.792 42.3367C126.786 40.57 128.111 39.0241 129.767 37.8095C131.423 36.5397 133.301 35.6011 135.509 34.9386C137.717 34.276 140.036 34 142.465 34C143.68 34 144.95 34.0552 146.164 34.2208C147.434 34.3865 148.594 34.6073 149.753 34.8281C150.857 35.1042 151.906 35.3802 152.9 35.7115C153.894 36.0428 154.667 36.374 155.219 36.7053C155.992 37.147 156.544 37.5886 156.875 38.0855C157.206 38.5272 157.372 39.1345 157.372 39.9075V42.5023C157.372 43.6617 156.93 44.269 156.102 44.269C155.661 44.269 154.943 44.0482 154.004 43.6065C150.857 42.1711 147.324 41.4533 143.404 41.4533C140.257 41.4533 137.773 41.9502 136.061 42.9992C134.35 44.0482 133.466 45.6493 133.466 47.9129C133.466 49.4588 134.018 50.7838 135.122 51.8328C136.227 52.8818 138.269 53.9308 141.196 54.8693L149.035 57.3538C153.01 58.6236 155.881 60.3903 157.593 62.6539C159.304 64.9175 160.133 67.5124 160.133 70.3833C160.133 72.7573 159.636 74.9105 158.697 76.7876C157.703 78.6648 156.378 80.3211 154.667 81.6461C152.955 83.0263 150.912 84.0201 148.538 84.7379C146.054 85.5108 143.459 85.8973 140.643 85.8973Z"),y(t,"fill","#252F3E"),y(n,"fill-rule","evenodd"),y(n,"clip-rule","evenodd"),y(n,"d","M151.078 112.729C132.914 126.145 106.524 133.267 83.8324 133.267C52.0316 133.267 23.3777 121.508 1.7354 101.963C0.0238993 100.417 1.56977 98.3195 3.61254 99.5341C27.0215 113.116 55.8963 121.342 85.7648 121.342C105.916 121.342 128.056 117.146 148.428 108.533C151.465 107.153 154.059 110.521 151.078 112.729Z"),y(n,"fill","#FF9900"),y(r,"fill-rule","evenodd"),y(r,"clip-rule","evenodd"),y(r,"d","M158.642 104.117C156.323 101.135 143.294 102.681 137.386 103.399C135.62 103.62 135.343 102.074 136.945 100.914C147.324 93.6267 164.384 95.7246 166.371 98.1539C168.359 100.638 165.819 117.698 156.102 125.869C154.612 127.139 153.176 126.477 153.839 124.82C156.047 119.354 160.961 107.043 158.642 104.117Z"),y(r,"fill","#FF9900"),y(e,"width",i[1]),y(e,"height",i[0]),y(e,"viewBox","0 0 168 168"),y(e,"fill","none"),y(e,"xmlns","http://www.w3.org/2000/svg")},m(s,o){F(s,e,o),R(e,t),R(e,n),R(e,r)},p(s,[o]){o&2&&y(e,"width",s[1]),o&1&&y(e,"height",s[0])},i:fe,o:fe,d(s){s&&S(e)}}}function r0e(i,e,t){let{height:n="24px"}=e,{width:r="24px"}=e;return i.$$set=s=>{"height"in s&&t(0,n=s.height),"width"in s&&t(1,r=s.width)},[n,r]}class s0e extends Ue{constructor(e){super(),je(this,e,r0e,i0e,Ve,{height:0,width:1})}}function o0e(i){let e,t,n,r,s;return{c(){e=Ee("svg"),t=Ee("path"),n=Ee("path"),r=Ee("path"),s=Ee("path"),this.h()},l(o){e=xe(o,"svg",{width:!0,height:!0,viewBox:!0,fill:!0,xmlns:!0});var a=M(e);t=xe(a,"path",{d:!0,stroke:!0,"stroke-width":!0,"stroke-linecap":!0,"stroke-linejoin":!0}),M(t).forEach(S),n=xe(a,"path",{d:!0,stroke:!0,"stroke-width":!0,"stroke-linecap":!0,"stroke-linejoin":!0}),M(n).forEach(S),r=xe(a,"path",{d:!0,stroke:!0,"stroke-width":!0,"stroke-linecap":!0,"stroke-linejoin":!0}),M(r).forEach(S),s=xe(a,"path",{d:!0,stroke:!0,"stroke-width":!0,"stroke-linecap":!0,"stroke-linejoin":!0}),M(s).forEach(S),a.forEach(S),this.h()},h(){y(t,"d","M28 63H140"),y(t,"stroke","black"),y(t,"stroke-width","14"),y(t,"stroke-linecap","round"),y(t,"stroke-linejoin","round"),y(n,"d","M28 105H140"),y(n,"stroke","black"),y(n,"stroke-width","14"),y(n,"stroke-linecap","round"),y(n,"stroke-linejoin","round"),y(r,"d","M70 21L56 147"),y(r,"stroke","black"),y(r,"stroke-width","14"),y(r,"stroke-linecap","round"),y(r,"stroke-linejoin","round"),y(s,"d","M112 21L98 147"),y(s,"stroke","black"),y(s,"stroke-width","14"),y(s,"stroke-linecap","round"),y(s,"stroke-linejoin","round"),y(e,"width",i[1]),y(e,"height",i[0]),y(e,"viewBox","0 0 168 168"),y(e,"fill","none"),y(e,"xmlns","http://www.w3.org/2000/svg")},m(o,a){F(o,e,a),R(e,t),R(e,n),R(e,r),R(e,s)},p(o,[a]){a&2&&y(e,"width",o[1]),a&1&&y(e,"height",o[0])},i:fe,o:fe,d(o){o&&S(e)}}}function a0e(i,e,t){let{height:n="24px"}=e,{width:r="24px"}=e;return i.$$set=s=>{"height"in s&&t(0,n=s.height),"width"in s&&t(1,r=s.width)},[n,r]}class l0e extends Ue{constructor(e){super(),je(this,e,a0e,o0e,Ve,{height:0,width:1})}}function c0e(i){let e,t,n,r,s;return{c(){e=Ee("svg"),t=Ee("path"),n=Ee("path"),r=Ee("path"),s=Ee("path"),this.h()},l(o){e=xe(o,"svg",{width:!0,height:!0,viewBox:!0,fill:!0,xmlns:!0});var a=M(e);t=xe(a,"path",{d:!0,fill:!0}),M(t).forEach(S),n=xe(a,"path",{d:!0,fill:!0}),M(n).forEach(S),r=xe(a,"path",{d:!0,fill:!0}),M(r).forEach(S),s=xe(a,"path",{d:!0,fill:!0}),M(s).forEach(S),a.forEach(S),this.h()},h(){y(t,"d","M157.92 85.75C157.92 80.29 157.43 75.04 156.52 70H84V99.82H125.44C123.62 109.41 118.16 117.53 109.97 122.99V142.38H134.96C149.52 128.94 157.92 109.2 157.92 85.75Z"),y(t,"fill","#4285F4"),y(n,"d","M83.9998 161C104.79 161 122.22 154.14 134.96 142.38L109.97 122.99C103.11 127.61 94.3598 130.41 83.9998 130.41C63.9798 130.41 46.9698 116.9 40.8798 98.7H15.2598V118.58C27.9298 143.71 53.8998 161 83.9998 161Z"),y(n,"fill","#34A853"),y(r,"d","M40.88 98.63C39.34 94.01 38.43 89.11 38.43 84C38.43 78.89 39.34 73.99 40.88 69.37V49.49H15.26C10.01 59.85 7 71.54 7 84C7 96.46 10.01 108.15 15.26 118.51L35.21 102.97L40.88 98.63Z"),y(r,"fill","#FBBC05"),y(s,"d","M83.9998 37.66C95.3398 37.66 105.42 41.58 113.47 49.14L135.52 27.09C122.15 14.63 104.79 7 83.9998 7C53.8998 7 27.9298 24.29 15.2598 49.49L40.8798 69.37C46.9698 51.17 63.9798 37.66 83.9998 37.66Z"),y(s,"fill","#EA4335"),y(e,"width",i[1]),y(e,"height",i[0]),y(e,"viewBox","0 0 168 168"),y(e,"fill","none"),y(e,"xmlns","http://www.w3.org/2000/svg")},m(o,a){F(o,e,a),R(e,t),R(e,n),R(e,r),R(e,s)},p(o,[a]){a&2&&y(e,"width",o[1]),a&1&&y(e,"height",o[0])},i:fe,o:fe,d(o){o&&S(e)}}}function u0e(i,e,t){let{height:n="24px"}=e,{width:r="24px"}=e;return i.$$set=s=>{"height"in s&&t(0,n=s.height),"width"in s&&t(1,r=s.width)},[n,r]}class d0e extends Ue{constructor(e){super(),je(this,e,u0e,c0e,Ve,{height:0,width:1})}}function h0e(i){let e,t,n,r,s,o,a;return{c(){e=Ee("svg"),t=Ee("g"),n=Ee("path"),r=Ee("path"),s=Ee("defs"),o=Ee("clipPath"),a=Ee("rect"),this.h()},l(l){e=xe(l,"svg",{width:!0,height:!0,viewBox:!0,fill:!0,xmlns:!0});var c=M(e);t=xe(c,"g",{"clip-path":!0});var u=M(t);n=xe(u,"path",{d:!0,fill:!0}),M(n).forEach(S),r=xe(u,"path",{d:!0,fill:!0}),M(r).forEach(S),u.forEach(S),s=xe(c,"defs",{});var d=M(s);o=xe(d,"clipPath",{id:!0});var h=M(o);a=xe(h,"rect",{width:!0,height:!0,fill:!0}),M(a).forEach(S),h.forEach(S),d.forEach(S),c.forEach(S),this.h()},h(){y(n,"d","M168 0H0V168H168V0Z"),y(n,"fill","#FB651E"),y(r,"d","M78.339 94.9894L49.5029 40.9707H62.6814L79.6438 75.1565C79.9048 75.7654 80.2092 76.396 80.5572 77.0484C80.9051 77.7008 81.2096 78.375 81.4705 79.0709C81.6445 79.3318 81.775 79.571 81.862 79.7885C81.949 80.006 82.0359 80.2017 82.1229 80.3757C82.5579 81.2455 82.9493 82.0936 83.2973 82.92C83.6452 83.7464 83.9496 84.5075 84.2106 85.2034C84.9065 83.7246 85.6676 82.1372 86.494 80.4409C87.3204 78.7447 88.1685 76.9832 89.0384 75.1565L106.262 40.9707H118.527L89.4298 95.6418V130.48H78.339V94.9894Z"),y(r,"fill","white"),y(t,"clip-path","url(#clip0_210_234)"),y(a,"width","168"),y(a,"height","168"),y(a,"fill","white"),y(o,"id","clip0_210_234"),y(e,"width",i[1]),y(e,"height",i[0]),y(e,"viewBox","0 0 168 168"),y(e,"fill","none"),y(e,"xmlns","http://www.w3.org/2000/svg")},m(l,c){F(l,e,c),R(e,t),R(t,n),R(t,r),R(e,s),R(s,o),R(o,a)},p(l,[c]){c&2&&y(e,"width",l[1]),c&1&&y(e,"height",l[0])},i:fe,o:fe,d(l){l&&S(e)}}}function f0e(i,e,t){let{height:n="24px"}=e,{width:r="24px"}=e;return i.$$set=s=>{"height"in s&&t(0,n=s.height),"width"in s&&t(1,r=s.width)},[n,r]}class g0e extends Ue{constructor(e){super(),je(this,e,f0e,h0e,Ve,{height:0,width:1})}}function p0e(i){let e,t;return{c(){e=Ee("svg"),t=Ee("path"),this.h()},l(n){e=xe(n,"svg",{width:!0,height:!0,viewBox:!0,fill:!0,xmlns:!0});var r=M(e);t=xe(r,"path",{d:!0,fill:!0}),M(t).forEach(S),r.forEach(S),this.h()},h(){y(t,"d","M98.4088 19.5019C91.411 11.2358 85.3852 2.8405 84.1541 1.09687C84.0245 0.967711 83.83 0.967711 83.7005 1.09687C82.4694 2.8405 76.4434 11.2358 69.4456 19.5019C9.38116 95.7693 78.9057 147.239 78.9057 147.239L79.4888 147.626C80.0072 155.57 81.303 167 81.303 167H83.8948H86.4866C86.4866 167 87.7826 155.634 88.3009 147.626L88.884 147.175C88.9488 147.175 158.473 95.7693 98.4088 19.5019ZM83.8948 146.076C83.8948 146.076 80.7847 143.429 79.9424 142.072V141.944L83.7005 58.8949C83.7005 58.6366 84.0893 58.6366 84.0893 58.8949L87.8473 141.944V142.072C87.005 143.429 83.8948 146.076 83.8948 146.076Z"),y(t,"fill","#00684A"),y(e,"width",i[1]),y(e,"height",i[0]),y(e,"viewBox","0 0 168 168"),y(e,"fill","none"),y(e,"xmlns","http://www.w3.org/2000/svg")},m(n,r){F(n,e,r),R(e,t)},p(n,[r]){r&2&&y(e,"width",n[1]),r&1&&y(e,"height",n[0])},i:fe,o:fe,d(n){n&&S(e)}}}function m0e(i,e,t){let{height:n="24px"}=e,{width:r="24px"}=e;return i.$$set=s=>{"height"in s&&t(0,n=s.height),"width"in s&&t(1,r=s.width)},[n,r]}class _0e extends Ue{constructor(e){super(),je(this,e,m0e,p0e,Ve,{height:0,width:1})}}function b0e(i){let e,t,n;return{c(){e=Ee("svg"),t=Ee("path"),n=Ee("path"),this.h()},l(r){e=xe(r,"svg",{width:!0,height:!0,viewBox:!0,fill:!0,xmlns:!0});var s=M(e);t=xe(s,"path",{d:!0,fill:!0}),M(t).forEach(S),n=xe(s,"path",{d:!0,fill:!0}),M(n).forEach(S),s.forEach(S),this.h()},h(){y(t,"d","M84 167C129.84 167 167 129.84 167 84C167 38.1604 129.84 1 84 1C38.1604 1 1 38.1604 1 84C1 129.84 38.1604 167 84 167Z"),y(t,"fill","#FF4500"),y(n,"d","M139.334 84C139.334 77.3018 133.898 71.8655 127.199 71.8655C123.899 71.8655 120.986 73.1275 118.851 75.2632C110.599 69.3415 99.1444 65.4585 86.5245 64.9731L92.0578 39.0538L110.017 42.8398C110.211 47.4024 113.997 51.0912 118.657 51.0912C123.413 51.0912 127.296 47.2082 127.296 42.4515C127.296 37.6948 123.413 33.8117 118.657 33.8117C115.259 33.8117 112.347 35.7532 110.988 38.6655L90.8929 34.3942C90.3105 34.2971 89.728 34.3942 89.2426 34.6854C88.7572 34.9766 88.466 35.462 88.2719 36.0445L82.1561 64.9731C69.245 65.3614 57.6929 69.1474 49.3444 75.2632C47.2087 73.2246 44.1993 71.8655 40.9958 71.8655C34.2976 71.8655 28.8613 77.3018 28.8613 84C28.8613 88.9509 31.7736 93.1252 36.045 95.0667C35.8508 96.2316 35.7537 97.4936 35.7537 98.7556C35.7537 117.394 57.4017 132.441 84.1947 132.441C110.988 132.441 132.636 117.394 132.636 98.7556C132.636 97.4936 132.539 96.3287 132.344 95.1638C136.324 93.2222 139.334 88.9509 139.334 84ZM56.3338 92.6398C56.3338 87.8831 60.2169 84 64.9736 84C69.7303 84 73.6134 87.8831 73.6134 92.6398C73.6134 97.3965 69.7303 101.28 64.9736 101.28C60.2169 101.28 56.3338 97.3965 56.3338 92.6398ZM104.581 115.453C98.659 121.374 87.3982 121.763 84.0976 121.763C80.797 121.763 69.4391 121.277 63.6145 115.453C62.7409 114.579 62.7409 113.123 63.6145 112.249C64.4882 111.375 65.9444 111.375 66.8181 112.249C70.5069 115.938 78.4672 117.297 84.1947 117.297C89.9222 117.297 97.7853 115.938 101.571 112.249C102.445 111.375 103.901 111.375 104.775 112.249C105.454 113.22 105.454 114.579 104.581 115.453ZM103.027 101.28C98.2707 101.28 94.3877 97.3965 94.3877 92.6398C94.3877 87.8831 98.2707 84 103.027 84C107.784 84 111.667 87.8831 111.667 92.6398C111.667 97.3965 107.784 101.28 103.027 101.28Z"),y(n,"fill","white"),y(e,"width",i[1]),y(e,"height",i[0]),y(e,"viewBox","0 0 168 168"),y(e,"fill","none"),y(e,"xmlns","http://www.w3.org/2000/svg")},m(r,s){F(r,e,s),R(e,t),R(e,n)},p(r,[s]){s&2&&y(e,"width",r[1]),s&1&&y(e,"height",r[0])},i:fe,o:fe,d(r){r&&S(e)}}}function v0e(i,e,t){let{height:n="24px"}=e,{width:r="24px"}=e;return i.$$set=s=>{"height"in s&&t(0,n=s.height),"width"in s&&t(1,r=s.width)},[n,r]}class w0e extends Ue{constructor(e){super(),je(this,e,v0e,b0e,Ve,{height:0,width:1})}}function C0e(i){let e,t,n,r,s,o,a,l,c,u,d;return{c(){e=Ee("svg"),t=Ee("path"),n=Ee("path"),r=Ee("path"),s=Ee("defs"),o=Ee("linearGradient"),a=Ee("stop"),l=Ee("stop"),c=Ee("linearGradient"),u=Ee("stop"),d=Ee("stop"),this.h()},l(h){e=xe(h,"svg",{width:!0,height:!0,viewBox:!0,fill:!0,xmlns:!0});var f=M(e);t=xe(f,"path",{d:!0,fill:!0}),M(t).forEach(S),n=xe(f,"path",{d:!0,fill:!0,"fill-opacity":!0}),M(n).forEach(S),r=xe(f,"path",{d:!0,fill:!0}),M(r).forEach(S),s=xe(f,"defs",{});var g=M(s);o=xe(g,"linearGradient",{id:!0,x1:!0,y1:!0,x2:!0,y2:!0,gradientUnits:!0});var p=M(o);a=xe(p,"stop",{"stop-color":!0}),M(a).forEach(S),l=xe(p,"stop",{offset:!0,"stop-color":!0}),M(l).forEach(S),p.forEach(S),c=xe(g,"linearGradient",{id:!0,x1:!0,y1:!0,x2:!0,y2:!0,gradientUnits:!0});var m=M(c);u=xe(m,"stop",{}),M(u).forEach(S),d=xe(m,"stop",{offset:!0,"stop-opacity":!0}),M(d).forEach(S),m.forEach(S),g.forEach(S),f.forEach(S),this.h()},h(){y(t,"d","M97.4434 164.242C93.2027 169.582 84.6042 166.656 84.502 159.837L83.0078 60.1013H150.07C162.217 60.1013 168.992 74.1309 161.439 83.644L97.4434 164.242Z"),y(t,"fill","url(#paint0_linear_210_201)"),y(n,"d","M97.4434 164.242C93.2027 169.582 84.6042 166.656 84.502 159.837L83.0078 60.1013H150.07C162.217 60.1013 168.992 74.1309 161.439 83.644L97.4434 164.242Z"),y(n,"fill","url(#paint1_linear_210_201)"),y(n,"fill-opacity","0.2"),y(r,"d","M70.1702 3.75823C74.411 -1.58278 83.0096 1.3437 83.1118 8.1628L83.7666 107.899H17.5434C5.39617 107.899 -1.37853 93.8692 6.17495 84.3561L70.1702 3.75823Z"),y(r,"fill","#3ECF8E"),y(a,"stop-color","#249361"),y(l,"offset","1"),y(l,"stop-color","#3ECF8E"),y(o,"id","paint0_linear_210_201"),y(o,"x1","83.0078"),y(o,"y1","82.2153"),y(o,"x2","142.611"),y(o,"y2","107.213"),y(o,"gradientUnits","userSpaceOnUse"),y(d,"offset","1"),y(d,"stop-opacity","0"),y(c,"id","paint1_linear_210_201"),y(c,"x1","56.5831"),y(c,"y1","46.0351"),y(c,"x2","83.765"),y(c,"y2","97.2037"),y(c,"gradientUnits","userSpaceOnUse"),y(e,"width",i[1]),y(e,"height",i[0]),y(e,"viewBox","0 0 168 168"),y(e,"fill","none"),y(e,"xmlns","http://www.w3.org/2000/svg")},m(h,f){F(h,e,f),R(e,t),R(e,n),R(e,r),R(e,s),R(s,o),R(o,a),R(o,l),R(s,c),R(c,u),R(c,d)},p(h,[f]){f&2&&y(e,"width",h[1]),f&1&&y(e,"height",h[0])},i:fe,o:fe,d(h){h&&S(e)}}}function y0e(i,e,t){let{height:n="24px"}=e,{width:r="24px"}=e;return i.$$set=s=>{"height"in s&&t(0,n=s.height),"width"in s&&t(1,r=s.width)},[n,r]}class S0e extends Ue{constructor(e){super(),je(this,e,y0e,C0e,Ve,{height:0,width:1})}}function k0e(i){let e,t;return{c(){e=Ee("svg"),t=Ee("path"),this.h()},l(n){e=xe(n,"svg",{width:!0,height:!0,viewBox:!0,fill:!0,xmlns:!0});var r=M(e);t=xe(r,"path",{"fill-rule":!0,"clip-rule":!0,d:!0,fill:!0}),M(t).forEach(S),r.forEach(S),this.h()},h(){y(t,"fill-rule","evenodd"),y(t,"clip-rule","evenodd"),y(t,"d","M20.6951 45.489C20.6951 49.068 5.05705 118.392 3.14105 123.309C2.47205 125.025 3.47205 125.103 22.3151 124.809C43.3111 124.483 44.513 124.249 52.462 118.957L55.7281 116.783L54.712 119.456C52.706 124.731 53.045 125 61.695 125C67.026 125 69.6951 124.619 69.6951 123.858C69.6951 123.23 70.6141 119.63 71.7371 115.858L73.7801 109H84.5741H95.368L97.1951 117L99.0221 125H109.926C120.781 125 120.827 124.99 120.107 122.75C119.008 119.332 106.174 78.372 101.143 62.226C98.6971 54.375 96.6951 46.837 96.6951 45.476V43H85.3241H73.9531L73.2951 47.959C72.9331 50.686 72.2721 53.144 71.8251 53.42C71.3781 53.696 70.0671 52.642 68.9111 51.079C67.7551 49.515 64.445 47.058 61.556 45.618C56.48 43.089 55.6991 43 38.4991 43H20.6951V45.489ZM99.6951 43.435C99.6951 43.674 100.177 45.137 100.766 46.685C104.356 56.115 123.695 119.739 123.695 122.117V125H134.312C144.879 125 144.925 124.99 144.17 122.75C142.547 117.932 143.651 113.382 154.491 80.216C160.653 61.359 165.695 45.272 165.695 44.466C165.695 43.302 164.073 43 157.834 43C150.031 43 149.976 43.018 150.441 45.449C151.076 48.776 136.427 98.563 135.495 96.242C135.11 95.284 132.492 84.6 129.677 72.5C126.861 60.4 124.122 48.813 123.588 46.75L122.618 43H111.156C104.853 43 99.6951 43.196 99.6951 43.435ZM52.0261 57.045C61.4741 64.478 56.0681 94.319 42.7751 108.112C38.1321 112.928 37.9711 113 31.8791 113C28.3001 113 25.6951 112.566 25.6951 111.969C25.6951 111.103 35.6211 70.742 38.7831 58.75C39.7531 55.071 39.864 55 44.599 55C47.947 55 50.2221 55.627 52.0261 57.045ZM88.6131 83.5C90.3341 89 91.9871 94.287 92.2861 95.25C92.7751 96.824 91.9571 97 84.1551 97C77.6371 97 75.5951 96.689 75.9411 95.75C76.1941 95.063 78.093 89.398 80.16 83.162C82.227 76.926 84.271 72.201 84.701 72.662C85.131 73.123 86.8911 78 88.6131 83.5Z"),y(t,"fill","black"),y(e,"width",i[1]),y(e,"height",i[0]),y(e,"viewBox","0 0 168 168"),y(e,"fill","none"),y(e,"xmlns","http://www.w3.org/2000/svg")},m(n,r){F(n,e,r),R(e,t)},p(n,[r]){r&2&&y(e,"width",n[1]),r&1&&y(e,"height",n[0])},i:fe,o:fe,d(n){n&&S(e)}}}function E0e(i,e,t){let{height:n="24px"}=e,{width:r="24px"}=e;return i.$$set=s=>{"height"in s&&t(0,n=s.height),"width"in s&&t(1,r=s.width)},[n,r]}class x0e extends Ue{constructor(e){super(),je(this,e,E0e,k0e,Ve,{height:0,width:1})}}function L0e(i){let e,t,n,r,s,o,a,l,c,u,d,h,f,g,p,m,_,b;return{c(){e=Ee("svg"),t=Ee("path"),n=Ee("path"),r=Ee("path"),s=Ee("path"),o=Ee("path"),a=Ee("path"),l=Ee("path"),c=Ee("path"),u=Ee("path"),d=Ee("path"),h=Ee("path"),f=Ee("path"),g=Ee("path"),p=Ee("path"),m=Ee("path"),_=Ee("path"),b=Ee("path"),this.h()},l(v){e=xe(v,"svg",{width:!0,height:!0,viewBox:!0,fill:!0,xmlns:!0});var w=M(e);t=xe(w,"path",{d:!0,fill:!0}),M(t).forEach(S),n=xe(w,"path",{d:!0,fill:!0}),M(n).forEach(S),r=xe(w,"path",{d:!0,fill:!0}),M(r).forEach(S),s=xe(w,"path",{d:!0,fill:!0}),M(s).forEach(S),o=xe(w,"path",{d:!0,fill:!0}),M(o).forEach(S),a=xe(w,"path",{d:!0,fill:!0}),M(a).forEach(S),l=xe(w,"path",{d:!0,fill:!0}),M(l).forEach(S),c=xe(w,"path",{d:!0,fill:!0}),M(c).forEach(S),u=xe(w,"path",{d:!0,fill:!0}),M(u).forEach(S),d=xe(w,"path",{d:!0,fill:!0}),M(d).forEach(S),h=xe(w,"path",{d:!0,fill:!0}),M(h).forEach(S),f=xe(w,"path",{d:!0,fill:!0}),M(f).forEach(S),g=xe(w,"path",{d:!0,fill:!0}),M(g).forEach(S),p=xe(w,"path",{d:!0,fill:!0}),M(p).forEach(S),m=xe(w,"path",{d:!0,fill:!0}),M(m).forEach(S),_=xe(w,"path",{d:!0,fill:!0}),M(_).forEach(S),b=xe(w,"path",{d:!0,fill:!0}),M(b).forEach(S),w.forEach(S),this.h()},h(){y(t,"d","M114.807 61.0046L154.093 48.9456L130.823 63.7367L114.807 61.0046Z"),y(t,"fill","#CA2317"),y(n,"d","M138.736 90.3985L130.823 63.7367L154.093 48.9456L147.121 72.8752L138.736 90.3985Z"),y(n,"fill","#E84F83"),y(r,"d","M165.586 41.6913L161.253 48.9455L147.121 72.8752L154.093 48.9455L165.586 41.6913Z"),y(r,"fill","#CA2317"),y(s,"d","M167 46.4019L156.072 57.613L161.253 48.9456L167 46.4019Z"),y(s,"fill","#E54011"),y(o,"d","M117.162 53.5619L149.288 50.3587L126.96 57.2361L117.162 53.5619Z"),y(o,"fill","#E54011"),y(a,"d","M118.387 71.7446L130.823 63.7366L138.737 90.3984L134.592 98.8774L118.387 71.7446Z"),y(a,"fill","#CA2317"),y(l,"d","M99.8274 103.4L93.8921 30.8569L134.591 98.8774L99.8274 103.4Z"),y(l,"fill","#B7DFF2"),y(c,"d","M82.9639 121.959L99.8277 103.4L134.592 98.8774L82.9639 121.959Z"),y(c,"fill","#E54011"),y(u,"d","M1 158.419L82.9637 121.959L99.8275 103.4L73.0715 100.667L1 158.419Z"),y(u,"fill","#FFCE33"),y(d,"d","M4.1084 128.648L46.2208 122.242L59.3161 111.69L52.9098 108.864L4.1084 128.648Z"),y(d,"fill","#D6B12D"),y(h,"d","M19.2769 94.2611L59.3166 111.69L73.0714 100.667L19.2769 94.2611Z"),y(h,"fill","#FFDE85"),y(f,"d","M90.8777 57.1418L85.7903 57.9898L73.0718 100.667L86.8266 92L90.8777 57.1418Z"),y(f,"fill","#009EC6"),y(g,"d","M98.3199 84.6515L86.8262 91.9999L93.892 30.8569L98.3199 84.6515Z"),y(g,"fill","#5EAFCE"),y(p,"d","M54.8887 62.8888L90.8773 57.1419L92.4789 42.916L54.8887 62.8888Z"),y(p,"fill","#045972"),y(m,"d","M51.0264 29.538L82.3045 48.3803L92.4793 42.916L92.7619 40.9376L51.0264 29.538Z"),y(m,"fill","#5A8591"),y(_,"d","M57.1504 9L85.6021 38.9591L92.7622 40.9376L93.8927 30.857L57.1504 9Z"),y(_,"fill","#009EC6"),y(b,"d","M73.0718 100.667L98.3204 84.6516L99.8277 103.4L73.0718 100.667Z"),y(b,"fill","#F39804"),y(e,"width",i[1]),y(e,"height",i[0]),y(e,"viewBox","0 0 168 168"),y(e,"fill","none"),y(e,"xmlns","http://www.w3.org/2000/svg")},m(v,w){F(v,e,w),R(e,t),R(e,n),R(e,r),R(e,s),R(e,o),R(e,a),R(e,l),R(e,c),R(e,u),R(e,d),R(e,h),R(e,f),R(e,g),R(e,p),R(e,m),R(e,_),R(e,b)},p(v,[w]){w&2&&y(e,"width",v[1]),w&1&&y(e,"height",v[0])},i:fe,o:fe,d(v){v&&S(e)}}}function T0e(i,e,t){let{height:n="24px"}=e,{width:r="24px"}=e;return i.$$set=s=>{"height"in s&&t(0,n=s.height),"width"in s&&t(1,r=s.width)},[n,r]}class I0e extends Ue{constructor(e){super(),je(this,e,T0e,L0e,Ve,{height:0,width:1})}}function D0e(i){let e,t,n,r,s,o;return{c(){e=Ee("svg"),t=Ee("path"),n=Ee("defs"),r=Ee("linearGradient"),s=Ee("stop"),o=Ee("stop"),this.h()},l(a){e=xe(a,"svg",{width:!0,height:!0,viewBox:!0,fill:!0,xmlns:!0});var l=M(e);t=xe(l,"path",{d:!0,fill:!0}),M(t).forEach(S),n=xe(l,"defs",{});var c=M(n);r=xe(c,"linearGradient",{id:!0,x1:!0,y1:!0,x2:!0,y2:!0,gradientUnits:!0});var u=M(r);s=xe(u,"stop",{"stop-color":!0}),M(s).forEach(S),o=xe(u,"stop",{offset:!0,"stop-color":!0}),M(o).forEach(S),u.forEach(S),c.forEach(S),l.forEach(S),this.h()},h(){y(t,"d","M84.1501 44.6726L123.672 66.5598V57.7846L84.1501 35.9483C78.2718 39.2008 49.8625 54.9047 44.6279 57.7846C49.4898 60.4781 100.549 88.684 131.584 105.828V114.569C127.365 116.907 84.1501 140.776 84.1501 140.776C72.3256 134.254 48.5242 121.108 36.7167 114.569V88.3622L84.1501 114.569L92.0613 110.198L28.8055 75.2672V118.957L84.1501 149.517C89.605 146.502 135.446 121.176 139.478 118.94V101.474L60.4334 57.7846L84.1501 44.6726ZM28.8055 49.0433V66.5259L107.85 110.215L84.1332 123.327L44.611 101.44V110.215L84.1332 132.052C90.0115 128.799 118.421 113.095 123.655 110.215C118.793 107.522 67.7517 79.316 36.7167 62.1552V53.4139C40.9349 51.0761 84.1501 27.207 84.1501 27.207C95.9576 33.746 119.759 46.8918 131.584 53.4139V79.6209L84.1501 53.4139L76.2389 57.7846L139.478 92.7328V49.0433L84.1501 18.4657C78.6783 21.498 32.8543 46.8241 28.8055 49.0433ZM84.1501 1L13 40.3189V127.681L84.1501 167L155.3 127.698V40.3189L84.1501 1ZM147.372 123.31L84.1501 158.259L20.9112 123.31V44.6896L84.1501 9.7413L147.389 44.6896L147.372 123.31Z"),y(t,"fill","url(#paint0_linear_215_188)"),y(s,"stop-color","#FF00A0"),y(o,"offset","1"),y(o,"stop-color","#9600FF"),y(r,"id","paint0_linear_215_188"),y(r,"x1","47.4481"),y(r,"y1","20.4303"),y(r,"x2","120.859"),y(r,"y2","147.582"),y(r,"gradientUnits","userSpaceOnUse"),y(e,"width",i[1]),y(e,"height",i[0]),y(e,"viewBox","0 0 168 168"),y(e,"fill","none"),y(e,"xmlns","http://www.w3.org/2000/svg")},m(a,l){F(a,e,l),R(e,t),R(e,n),R(n,r),R(r,s),R(r,o)},p(a,[l]){l&2&&y(e,"width",a[1]),l&1&&y(e,"height",a[0])},i:fe,o:fe,d(a){a&&S(e)}}}function N0e(i,e,t){let{height:n="24px"}=e,{width:r="24px"}=e;return i.$$set=s=>{"height"in s&&t(0,n=s.height),"width"in s&&t(1,r=s.width)},[n,r]}class A0e extends Ue{constructor(e){super(),je(this,e,N0e,D0e,Ve,{height:0,width:1})}}function R0e(i){let e,t;return{c(){e=Ee("svg"),t=Ee("path"),this.h()},l(n){e=xe(n,"svg",{xmlns:!0,x:!0,y:!0,width:!0,height:!0,viewBox:!0});var r=M(e);t=xe(r,"path",{d:!0}),M(t).forEach(S),r.forEach(S),this.h()},h(){y(t,"d","M 7 4 C 5.343 4 4 5.343 4 7 L 4 23 C 4 24.657 5.343 26 7 26 L 23 26 C 24.657 26 26 24.657 26 23 L 26 7 C 26 5.343 24.657 4 23 4 L 7 4 z M 8 8 L 22 8 L 22 22 L 8 22 L 8 8 z M 12 12 L 12 18 L 18 18 L 18 12 L 12 12 z"),y(e,"xmlns","http://www.w3.org/2000/svg"),y(e,"x","0px"),y(e,"y","0px"),y(e,"width",i[1]),y(e,"height",i[0]),y(e,"viewBox","0 0 30 30")},m(n,r){F(n,e,r),R(e,t)},p(n,[r]){r&2&&y(e,"width",n[1]),r&1&&y(e,"height",n[0])},i:fe,o:fe,d(n){n&&S(e)}}}function O0e(i,e,t){let{height:n="24px"}=e,{width:r="24px"}=e;return i.$$set=s=>{"height"in s&&t(0,n=s.height),"width"in s&&t(1,r=s.width)},[n,r]}class M0e extends Ue{constructor(e){super(),je(this,e,O0e,R0e,Ve,{height:0,width:1})}}const eH={postgresql:Y_e,mysql:q_e,smtp:F_e,slack:t1e,github:y_e,gmail:T_e,gsheets:N_e,gitlab:E_e,gcloud:m_e,gcal:f_e,gdrive:v_e,airtable:l_e,toggl:r1e,s3:Q_e,discord:QW,discord_webhook:QW,mastodon:W_e,matrix:$_e,windmill:h8,http:O_e,mailchimp:c1e,sendgrid:h1e,snowflake:p1e,qrcode:b1e,linkedin:C1e,hubspot:k1e,datadog:L1e,stripe:D1e,telegram:R1e,funkwhale:P1e,helper:h8,windmillhub:h8,gdocs:V1e,ocs:JW,faunadb:U1e,clickhouse:G1e,openai:Z1e,appwrite:J1e,linkding:n0e,aws:s0e,bcrypt:l0e,google:d0e,hackernews:g0e,mongodb:_0e,reddit:w0e,supabase:S0e,square:M0e,webdav:x0e,zammad:I0e,nextcloud:JW,surrealdb:A0e};function tH(i){let e;return{c(){e=me(i[0])},l(t){e=_e(t,i[0])},m(t,n){F(t,e,n)},p(t,n){n&1&&pt(e,t[0])},d(t){t&&S(e)}}}function P0e(i){let e;return{c(){e=V("span"),this.h()},l(t){e=W(t,"SPAN",{style:!0,class:!0}),M(e).forEach(S),this.h()},h(){Ye(e,"width",i[4]),Ye(e,"height",i[3]),y(e,"class","bg-gray-100 rounded-full")},m(t,n){F(t,e,n)},p(t,n){n&16&&Ye(e,"width",t[4]),n&8&&Ye(e,"height",t[3])},i:fe,o:fe,d(t){t&&S(e)}}}function F0e(i){let e,t,n;var r=i[6];function s(o){return{props:{height:o[3],width:o[4]}}}return r&&(t=Ym(r,s(i))),{c(){e=V("span"),t&&Q(t.$$.fragment),this.h()},l(o){e=W(o,"SPAN",{class:!0});var a=M(e);t&&J(t.$$.fragment,a),a.forEach(S),this.h()},h(){y(e,"class","text-gray-700 grayscale")},m(o,a){F(o,e,a),t&&Z(t,e,null),n=!0},p(o,a){const l={};if(a&8&&(l.height=o[3]),a&16&&(l.width=o[4]),r!==(r=o[6])){if(t){Fe();const c=t;A(c.$$.fragment,1,0,()=>{X(c,1)}),Be()}r?(t=Ym(r,s(o)),Q(t.$$.fragment),D(t.$$.fragment,1),Z(t,e,null)):t=null}else r&&t.$set(l)},i(o){n||(t&&D(t.$$.fragment,o),n=!0)},o(o){t&&A(t.$$.fragment,o),n=!1},d(o){o&&S(e),t&&X(t)}}}function nH(i){let e;return{c(){e=me(i[0])},l(t){e=_e(t,i[0])},m(t,n){F(t,e,n)},p(t,n){n&1&&pt(e,t[0])},d(t){t&&S(e)}}}function B0e(i){let e,t,n,r,s,o,a,l=!i[1]&&!i[2]&&tH(i);const c=[F0e,P0e],u=[];function d(f,g){return f[6]?0:1}n=d(i),r=u[n]=c[n](i);let h=!i[1]&&i[2]&&nH(i);return{c(){e=V("div"),l&&l.c(),t=ae(),r.c(),s=ae(),h&&h.c(),this.h()},l(f){e=W(f,"DIV",{class:!0});var g=M(e);l&&l.l(g),t=le(g),r.l(g),s=le(g),h&&h.l(g),g.forEach(S),this.h()},h(){y(e,"class",o="truncate flex flex-row gap-2 "+(i[5]?"justify-center items-center":"")+" -pl-2")},m(f,g){F(f,e,g),l&&l.m(e,null),R(e,t),u[n].m(e,null),R(e,s),h&&h.m(e,null),a=!0},p(f,[g]){!f[1]&&!f[2]?l?l.p(f,g):(l=tH(f),l.c(),l.m(e,t)):l&&(l.d(1),l=null);let p=n;n=d(f),n===p?u[n].p(f,g):(Fe(),A(u[p],1,1,()=>{u[p]=null}),Be(),r=u[n],r?r.p(f,g):(r=u[n]=c[n](f),r.c()),D(r,1),r.m(e,s)),!f[1]&&f[2]?h?h.p(f,g):(h=nH(f),h.c(),h.m(e,null)):h&&(h.d(1),h=null),(!a||g&32&&o!==(o="truncate flex flex-row gap-2 "+(f[5]?"justify-center items-center":"")+" -pl-2"))&&y(e,"class",o)},i(f){a||(D(r),a=!0)},o(f){A(r),a=!1},d(f){f&&S(e),l&&l.d(),u[n].d(),h&&h.d()}}}function V0e(i,e,t){let n,{name:r}=e,{silent:s=!1}=e,{after:o=!1}=e,{height:a="24px"}=e,{width:l="24px"}=e,{center:c=!1}=e;return i.$$set=u=>{"name"in u&&t(0,r=u.name),"silent"in u&&t(1,s=u.silent),"after"in u&&t(2,o=u.after),"height"in u&&t(3,a=u.height),"width"in u&&t(4,l=u.width),"center"in u&&t(5,c=u.center)},i.$$.update=()=>{i.$$.dirty&1&&t(6,n=eH[r]||eH[r.split("_")[0]])},[r,s,o,a,l,c,n]}class fb extends Ue{constructor(e){super(),je(this,e,V0e,B0e,Ve,{name:0,silent:1,after:2,height:3,width:4,center:5})}}function iH(i){const e=i.split("/");let t;if(e[0]=="g")t="group";else if(e[0]=="f")t="folder";else if(e[0]=="u")t="user";else return console.error("Not recognized owner:"+e[0]),{ownerKind:"user",owner:"",name:""};return{ownerKind:t,owner:e[1],name:e.slice(2).join("/")}}const W0e=i=>({}),rH=i=>({});function H0e(i){let e,t,n,r,s;const o=i[13].default,a=Ut(o,i,i[12],null);return{c(){e=V("button"),a&&a.c(),this.h()},l(l){e=W(l,"BUTTON",{class:!0});var c=M(e);a&&a.l(c),c.forEach(S),this.h()},h(){y(e,"class",t=i[9].class)},m(l,c){F(l,e,c),a&&a.m(e,null),n=!0,r||(s=[zs(i[4].call(null,e)),Pe(e,"mouseenter",i[7]),Pe(e,"mouseleave",i[8]),Pe(e,"click",i[14])],r=!0)},p(l,c){a&&a.p&&(!n||c&4096)&&qt(a,o,l,l[12],n?jt(o,l[12],c,null):Gt(l[12]),null),(!n||c&512&&t!==(t=l[9].class))&&y(e,"class",t)},i(l){n||(D(a,l),n=!0)},o(l){A(a,l),n=!1},d(l){l&&S(e),a&&a.d(l),r=!1,pn(s)}}}function z0e(i){let e,t,n,r,s;const o=i[13].default,a=Ut(o,i,i[12],null);return{c(){e=V("span"),a&&a.c(),this.h()},l(l){e=W(l,"SPAN",{class:!0});var c=M(e);a&&a.l(c),c.forEach(S),this.h()},h(){y(e,"class",t=i[9].class)},m(l,c){F(l,e,c),a&&a.m(e,null),n=!0,r||(s=[zs(i[4].call(null,e)),Pe(e,"mouseenter",i[7]),Pe(e,"mouseleave",i[8])],r=!0)},p(l,c){a&&a.p&&(!n||c&4096)&&qt(a,o,l,l[12],n?jt(o,l[12],c,null):Gt(l[12]),null),(!n||c&512&&t!==(t=l[9].class))&&y(e,"class",t)},i(l){n||(D(a,l),n=!0)},o(l){A(a,l),n=!1},d(l){l&&S(e),a&&a.d(l),r=!1,pn(s)}}}function sH(i){let e,t,n,r,s,o;const a=i[13].text,l=Ut(a,i,i[12],rH);return{c(){e=V("div"),t=V("div"),l&&l.c(),this.h()},l(c){e=W(c,"DIV",{class:!0});var u=M(e);t=W(u,"DIV",{class:!0});var d=M(t);l&&l.l(d),d.forEach(S),u.forEach(S),this.h()},h(){y(t,"class","max-w-sm"),y(e,"class",n="z-50 py-2 px-3 rounded-md text-sm font-normal !text-gray-300 bg-gray-800 whitespace-normal text-left "+i[1])},m(c,u){F(c,e,u),R(e,t),l&&l.m(t,null),r=!0,s||(o=[zs(i[5].call(null,e,i[6])),Pe(e,"mouseenter",i[7]),Pe(e,"mouseleave",i[8])],s=!0)},p(c,u){l&&l.p&&(!r||u&4096)&&qt(l,a,c,c[12],r?jt(a,c[12],u,W0e):Gt(c[12]),rH),(!r||u&2&&n!==(n="z-50 py-2 px-3 rounded-md text-sm font-normal !text-gray-300 bg-gray-800 whitespace-normal text-left "+c[1]))&&y(e,"class",n)},i(c){r||(D(l,c),r=!0)},o(c){A(l,c),r=!1},d(c){c&&S(e),l&&l.d(c),s=!1,pn(o)}}}function $0e(i){let e,t,n,r,s;const o=[z0e,H0e],a=[];function l(u,d){return u[0]?0:1}e=l(i),t=a[e]=o[e](i);let c=i[3]&&!i[2]&&sH(i);return{c(){t.c(),n=ae(),c&&c.c(),r=Me()},l(u){t.l(u),n=le(u),c&&c.l(u),r=Me()},m(u,d){a[e].m(u,d),F(u,n,d),c&&c.m(u,d),F(u,r,d),s=!0},p(u,[d]){let h=e;e=l(u),e===h?a[e].p(u,d):(Fe(),A(a[h],1,1,()=>{a[h]=null}),Be(),t=a[e],t?t.p(u,d):(t=a[e]=o[e](u),t.c()),D(t,1),t.m(n.parentNode,n)),u[3]&&!u[2]?c?(c.p(u,d),d&12&&D(c,1)):(c=sH(u),c.c(),D(c,1),c.m(r.parentNode,r)):c&&(Fe(),A(c,1,1,()=>{c=null}),Be())},i(u){s||(D(t),D(c),s=!0)},o(u){A(t),A(c),s=!1},d(u){a[e].d(u),u&&S(n),c&&c.d(u),u&&S(r)}}}function U0e(i,e,t){let{$$slots:n={},$$scope:r}=e,{placement:s="auto"}=e,{notClickable:o=!1}=e,{popupClass:a=""}=e,{disablePopup:l=!1}=e,{disapperTimoout:c=100}=e;const[u,d]=fpe({placement:s}),f={modifiers:[(v=>({name:"preventOverflow",options:v,effect:({state:w})=>{const{padding:E=0}=v;w.elements.popper.style.maxWidth=`calc(100vw - ${E*2}px)`}}))({padding:10}),{name:"offset",options:{offset:[8,8]}},{name:"arrow",options:{padding:10}}]};let g=!1,p;function m(){clearTimeout(p),t(3,g=!0)}function _(){p=setTimeout(()=>t(3,g=!1),c)}function b(v){hr.call(this,i,v)}return i.$$set=v=>{t(9,e=Qe(Qe({},e),Bt(v))),"placement"in v&&t(10,s=v.placement),"notClickable"in v&&t(0,o=v.notClickable),"popupClass"in v&&t(1,a=v.popupClass),"disablePopup"in v&&t(2,l=v.disablePopup),"disapperTimoout"in v&&t(11,c=v.disapperTimoout),"$$scope"in v&&t(12,r=v.$$scope)},e=Bt(e),[o,a,l,g,u,d,f,m,_,e,s,c,r,n,b]}class f8 extends Ue{constructor(e){super(),je(this,e,U0e,$0e,Ve,{placement:10,notClickable:0,popupClass:1,disablePopup:2,disapperTimoout:11})}}function j0e(i){let e,t;return e=new fr({props:{class:(i[0]?"text-gray-300":" text-gray-500")+" font-thin inline-block align-middle w-4 "+i[4].class,data:hV,scale:i[1]}}),{c(){Q(e.$$.fragment)},l(n){J(e.$$.fragment,n)},m(n,r){Z(e,n,r),t=!0},p(n,r){const s={};r&17&&(s.class=(n[0]?"text-gray-300":" text-gray-500")+" font-thin inline-block align-middle w-4 "+n[4].class),r&2&&(s.scale=n[1]),e.$set(s)},i(n){t||(D(e.$$.fragment,n),t=!0)},o(n){A(e.$$.fragment,n),t=!1},d(n){X(e,n)}}}function q0e(i){let e,t;const n=i[5].default,r=Ut(n,i,i[6],null);return{c(){e=V("span"),r&&r.c(),this.h()},l(s){e=W(s,"SPAN",{slot:!0});var o=M(e);r&&r.l(o),o.forEach(S),this.h()},h(){y(e,"slot","text")},m(s,o){F(s,e,o),r&&r.m(e,null),t=!0},p(s,o){r&&r.p&&(!t||o&64)&&qt(r,n,s,s[6],t?jt(n,s[6],o,null):Gt(s[6]),null)},i(s){t||(D(r,s),t=!0)},o(s){A(r,s),t=!1},d(s){s&&S(e),r&&r.d(s)}}}function G0e(i){let e,t;return e=new f8({props:{notClickable:!0,placement:i[3],class:i[2],$$slots:{text:[q0e],default:[j0e]},$$scope:{ctx:i}}}),{c(){Q(e.$$.fragment)},l(n){J(e.$$.fragment,n)},m(n,r){Z(e,n,r),t=!0},p(n,[r]){const s={};r&8&&(s.placement=n[3]),r&4&&(s.class=n[2]),r&83&&(s.$$scope={dirty:r,ctx:n}),e.$set(s)},i(n){t||(D(e.$$.fragment,n),t=!0)},o(n){A(e.$$.fragment,n),t=!1},d(n){X(e,n)}}}function K0e(i,e,t){let{$$slots:n={},$$scope:r}=e,{light:s=!1}=e,{scale:o=.8}=e,{wrapperClass:a=""}=e,{placement:l=void 0}=e;return i.$$set=c=>{t(4,e=Qe(Qe({},e),Bt(c))),"light"in c&&t(0,s=c.light),"scale"in c&&t(1,o=c.scale),"wrapperClass"in c&&t(2,a=c.wrapperClass),"placement"in c&&t(3,l=c.placement),"$$scope"in c&&t(6,r=c.$$scope)},e=Bt(e),[s,o,a,l,e,n,r]}let ed=class extends Ue{constructor(e){super(),je(this,e,K0e,G0e,Ve,{light:0,scale:1,wrapperClass:2,placement:3})}};const Fgt="",{window:oH}=sB,Y0e=i=>({noResultsText:i[0]&2048}),aH=i=>({noResultsText:i[11]}),Z0e=i=>({createText:i[0]&16384}),lH=i=>({createText:i[14]}),X0e=i=>({loadingText:i[0]&4096}),cH=i=>({loadingText:i[12]}),Q0e=i=>({nbItems:i[1]&2,maxItemsToShowInList:i[0]&16}),uH=i=>({nbItems:i[32].length,maxItemsToShowInList:i[4]});function dH(i,e,t){const n=i.slice();return n[143]=e[t],n[145]=t,n}const J0e=i=>({item:i[1]&2,label:i[1]&2}),hH=i=>({item:i[143].item,label:i[143].highlighted?i[143].highlighted:i[143].label}),ebe=i=>({nbItems:i[1]&2,maxItemsToShowInList:i[0]&16}),fH=i=>({nbItems:i[32].length,maxItemsToShowInList:i[4]});function gH(i,e,t){const n=i.slice();return n[146]=e[t],n[145]=t,n}const tbe=i=>({label:i[0]&2,item:i[0]&2}),pH=i=>({label:i[43](i[146]),item:i[146],unselectItem:i[50]});function mH(i,e,t){const n=i.slice();return n[145]=e[t],n}function nbe(i){let e,t=i[1],n=[];for(let r=0;ra[3](a[146],!0);for(let a=0;a{r||(r=ih(t,rh,{duration:200},!0)),r.run(1)}),a=!0)},o(_){A(h,_),r||(r=ih(t,rh,{duration:200},!1)),r.run(0),a=!1},d(_){_&&S(t),h&&h.d(_),_&&r&&r.end(),l=!1,pn(c)}}}function wH(i){let e,t,n;return{c(){e=V("span"),this.h()},l(r){e=W(r,"SPAN",{class:!0});var s=M(e);s.forEach(S),this.h()},h(){y(e,"class","autocomplete-clear-button svelte-r3u5g3")},m(r,s){F(r,e,s),e.innerHTML=i[9],t||(n=[Pe(e,"click",i[54]),Pe(e,"keypress",i[107])],t=!0)},p(r,s){s[0]&512&&(e.innerHTML=r[9])},d(r){r&&S(e),t=!1,pn(n)}}}function sbe(i){let e,t;const n=i[96]["no-results"],r=Ut(n,i,i[95],aH),s=r||cbe(i);return{c(){e=V("div"),s&&s.c(),this.h()},l(o){e=W(o,"DIV",{class:!0});var a=M(e);s&&s.l(a),a.forEach(S),this.h()},h(){y(e,"class","autocomplete-list-item-no-results svelte-r3u5g3")},m(o,a){F(o,e,a),s&&s.m(e,null),t=!0},p(o,a){r?r.p&&(!t||a[0]&2048|a[3]&4)&&qt(r,n,o,o[95],t?jt(n,o[95],a,Y0e):Gt(o[95]),aH):s&&s.p&&(!t||a[0]&2048)&&s.p(o,t?a:[-1,-1,-1,-1,-1])},i(o){t||(D(s,o),t=!0)},o(o){A(s,o),t=!1},d(o){o&&S(e),s&&s.d(o)}}}function obe(i){let e,t,n,r;const s=i[96].create,o=Ut(s,i,i[95],lH),a=o||ube(i);return{c(){e=V("div"),a&&a.c(),this.h()},l(l){e=W(l,"DIV",{class:!0});var c=M(e);a&&a.l(c),c.forEach(S),this.h()},h(){y(e,"class","autocomplete-list-item-create svelte-r3u5g3")},m(l,c){F(l,e,c),a&&a.m(e,null),t=!0,n||(r=[Pe(e,"click",i[44]),Pe(e,"keypress",i[112])],n=!0)},p(l,c){o?o.p&&(!t||c[0]&16384|c[3]&4)&&qt(o,s,l,l[95],t?jt(s,l[95],c,Z0e):Gt(l[95]),lH):a&&a.p&&(!t||c[0]&16384)&&a.p(l,t?c:[-1,-1,-1,-1,-1])},i(l){t||(D(a,l),t=!0)},o(l){A(a,l),t=!1},d(l){l&&S(e),a&&a.d(l),n=!1,pn(r)}}}function abe(i){let e,t;const n=i[96].loading,r=Ut(n,i,i[95],cH),s=r||dbe(i);return{c(){e=V("div"),s&&s.c(),this.h()},l(o){e=W(o,"DIV",{class:!0});var a=M(e);s&&s.l(a),a.forEach(S),this.h()},h(){y(e,"class","autocomplete-list-item-loading svelte-r3u5g3")},m(o,a){F(o,e,a),s&&s.m(e,null),t=!0},p(o,a){r?r.p&&(!t||a[0]&4096|a[3]&4)&&qt(r,n,o,o[95],t?jt(n,o[95],a,X0e):Gt(o[95]),cH):s&&s.p&&(!t||a[0]&4096)&&s.p(o,t?a:[-1,-1,-1,-1,-1])},i(o){t||(D(s,o),t=!0)},o(o){A(s,o),t=!1},d(o){o&&S(e),s&&s.d(o)}}}function lbe(i){let e,t,n;const r=i[96]["dropdown-header"],s=Ut(r,i,i[95],fH);let o=i[32],a=[];for(let h=0;hA(a[h],1,1,()=>{a[h]=null}),c=i[96]["dropdown-footer"],u=Ut(c,i,i[95],uH),d=u||pbe(i);return{c(){s&&s.c(),e=ae();for(let h=0;h{n=null}),Be())},i(r){t||(D(n),t=!0)},o(r){A(n),t=!1},d(r){n&&n.d(r),r&&S(e)}}}function SH(i){let e,t=i[13]&&kH(i);return{c(){t&&t.c(),e=Me()},l(n){t&&t.l(n),e=Me()},m(n,r){t&&t.m(n,r),F(n,e,r)},p(n,r){n[13]?t?t.p(n,r):(t=kH(n),t.c(),t.m(e.parentNode,e)):t&&(t.d(1),t=null)},d(n){t&&t.d(n),n&&S(e)}}}function kH(i){let e,t,n=i[32].length-i[4]+"",r,s,o;return{c(){e=V("div"),t=me("..."),r=me(n),s=ae(),o=me(i[13]),this.h()},l(a){e=W(a,"DIV",{class:!0});var l=M(e);t=_e(l,"..."),r=_e(l,n),s=le(l),o=_e(l,i[13]),l.forEach(S),this.h()},h(){y(e,"class","autocomplete-list-item-no-results svelte-r3u5g3")},m(a,l){F(a,e,l),R(e,t),R(e,r),R(e,s),R(e,o)},p(a,l){l[0]&16|l[1]&2&&n!==(n=a[32].length-a[4]+"")&&pt(r,n),l[0]&8192&&pt(o,a[13])},d(a){a&&S(e)}}}function pbe(i){let e,t=i[4]>0&&i[32].length>i[4]&&SH(i);return{c(){t&&t.c(),e=Me()},l(n){t&&t.l(n),e=Me()},m(n,r){t&&t.m(n,r),F(n,e,r)},p(n,r){n[4]>0&&n[32].length>n[4]?t?t.p(n,r):(t=SH(n),t.c(),t.m(e.parentNode,e)):t&&(t.d(1),t=null)},d(n){t&&t.d(n),n&&S(e)}}}function mbe(i){let e,t,n,r,s,o,a,l,c,u,d,h,f,g,p,m,_,b,v,w;function E(z,K){if(!z[5]&&z[33])return ibe;if(z[5]&&z[33])return nbe}let I=E(i),x=I&&I(i),T=i[5]&&i[33]&&bH(i),L=[{type:"text"},{class:a=(i[17]?i[17]:"")+" "+(i[28]?"":"input autocomplete-input")},{id:l=i[18]?i[18]:""},{autocomplete:c=i[23]?"on":i[24]},{placeholder:i[15]},{name:i[19]},{disabled:i[27]},{required:i[29]},{title:i[22]},{readOnly:u=i[25]||i[7]&&i[1]},{tabindex:i[30]},i[60]],O={};for(let z=0;z0?0:z[37]&&z[12]?1:z[6]?2:z[11]?3:-1}return~(g=ne(i))&&(p=$[g]=P[g](i)),{c(){e=V("div"),t=V("select"),x&&x.c(),n=ae(),r=V("div"),T&&T.c(),s=ae(),o=V("input"),d=ae(),N&&N.c(),h=ae(),f=V("div"),p&&p.c(),this.h()},l(z){e=W(z,"DIV",{class:!0});var K=M(e);t=W(K,"SELECT",{name:!0,id:!0,class:!0});var ce=M(t);x&&x.l(ce),ce.forEach(S),n=le(K),r=W(K,"DIV",{class:!0});var re=M(r);T&&T.l(re),s=le(re),o=W(re,"INPUT",{type:!0,class:!0,id:!0,autocomplete:!0,placeholder:!0,name:!0,title:!0,tabindex:!0}),d=le(re),N&&N.l(re),re.forEach(S),h=le(K),f=W(K,"DIV",{class:!0});var B=M(f);p&&p.l(B),B.forEach(S),K.forEach(S),this.h()},h(){y(t,"name",i[20]),y(t,"id",i[21]),t.multiple=i[5],y(t,"class","svelte-r3u5g3"),co(o,O),vt(o,"svelte-r3u5g3",!0),y(r,"class","input-container svelte-r3u5g3"),y(f,"class",m=(i[26]?i[26]:"")+" autocomplete-list "+(i[41]?"":"hidden")+" is-fullwidth svelte-r3u5g3"),y(e,"class",_=(i[16]?i[16]:"")+" autocomplete select is-fullwidth "+i[42]+" svelte-r3u5g3"),vt(e,"hide-arrow",i[8]||!i[0].length),vt(e,"is-multiple",i[5]),vt(e,"show-clear",i[40]),vt(e,"is-loading",i[10]&&i[37])},m(z,K){F(z,e,K),R(e,t),x&&x.m(t,null),R(e,n),R(e,r),T&&T.m(r,null),R(r,s),R(r,o),o.autofocus&&o.focus(),i[103](o),an(o,i[2]),R(r,d),N&&N.m(r,null),i[108](r),R(e,h),R(e,f),~g&&$[g].m(f,null),i[113](f),b=!0,v||(w=[Pe(oH,"click",i[46]),Pe(oH,"scroll",i[97]),Pe(o,"input",i[104]),Pe(o,"input",i[49]),Pe(o,"focus",i[52]),Pe(o,"blur",i[53]),Pe(o,"keydown",i[47]),Pe(o,"click",i[51]),Pe(o,"keypress",i[48]),Pe(o,"dragover",i[105]),Pe(o,"drop",i[106])],v=!0)},p(z,K){I===(I=E(z))&&x?x.p(z,K):(x&&x.d(1),x=I&&I(z),x&&(x.c(),x.m(t,null))),(!b||K[0]&1048576)&&y(t,"name",z[20]),(!b||K[0]&2097152)&&y(t,"id",z[21]),(!b||K[0]&32)&&(t.multiple=z[5]),z[5]&&z[33]?T?(T.p(z,K),K[0]&32|K[1]&4&&D(T,1)):(T=bH(z),T.c(),D(T,1),T.m(r,s)):T&&(Fe(),A(T,1,1,()=>{T=null}),Be()),co(o,O=dn(L,[{type:"text"},(!b||K[0]&268566528&&a!==(a=(z[17]?z[17]:"")+" "+(z[28]?"":"input autocomplete-input")))&&{class:a},(!b||K[0]&262144&&l!==(l=z[18]?z[18]:""))&&{id:l},(!b||K[0]&25165824&&c!==(c=z[23]?"on":z[24]))&&{autocomplete:c},(!b||K[0]&32768)&&{placeholder:z[15]},(!b||K[0]&524288)&&{name:z[19]},(!b||K[0]&134217728)&&{disabled:z[27]},(!b||K[0]&536870912)&&{required:z[29]},(!b||K[0]&4194304)&&{title:z[22]},(!b||K[0]&33554562&&u!==(u=z[25]||z[7]&&z[1]))&&{readOnly:u},(!b||K[0]&1073741824)&&{tabindex:z[30]},K[1]&536870912&&z[60]])),K[0]&4&&o.value!==z[2]&&an(o,z[2]),vt(o,"svelte-r3u5g3",!0),z[40]?N?N.p(z,K):(N=wH(z),N.c(),N.m(r,null)):N&&(N.d(1),N=null);let ce=g;g=ne(z),g===ce?~g&&$[g].p(z,K):(p&&(Fe(),A($[ce],1,1,()=>{$[ce]=null}),Be()),~g?(p=$[g],p?p.p(z,K):(p=$[g]=P[g](z),p.c()),D(p,1),p.m(f,null)):p=null),(!b||K[0]&67108864|K[1]&1024&&m!==(m=(z[26]?z[26]:"")+" autocomplete-list "+(z[41]?"":"hidden")+" is-fullwidth svelte-r3u5g3"))&&y(f,"class",m),(!b||K[0]&65536&&_!==(_=(z[16]?z[16]:"")+" autocomplete select is-fullwidth "+z[42]+" svelte-r3u5g3"))&&y(e,"class",_),(!b||K[0]&65793)&&vt(e,"hide-arrow",z[8]||!z[0].length),(!b||K[0]&65568)&&vt(e,"is-multiple",z[5]),(!b||K[0]&65536|K[1]&512)&&vt(e,"show-clear",z[40]),(!b||K[0]&66560|K[1]&64)&&vt(e,"is-loading",z[10]&&z[37])},i(z){b||(D(T),D(p),b=!0)},o(z){A(T),A(p),b=!1},d(z){z&&S(e),x&&x.d(),T&&T.d(),i[103](null),N&&N.d(),i[108](null),~g&&$[g].d(),i[113](null),v=!1,pn(w)}}}function _be(i,e){if(typeof i!="function"){console.error("Not a function: "+i+", argument: "+e);return}let t;try{t=i(e)}catch{console.warn("Error executing Autocomplete function on value: "+e+" function: "+i)}return t}function vy(i,e){let t=_be(i,e);return t==null&&(t=""),typeof t!="string"&&(t=t.toString()),t}function g8(i,e){if(!i)return 0;const t=i.keywords;let n=0;return e.forEach(r=>{t.includes(r)&&n++}),n}function bbe(i,e,t){return g8(e,t)-g8(i,t)}function wy(i){return i.normalize("NFD").replace(/[\u0300-\u036f]/g,"")}function vbe(i,e,t){let n,r,s;const o=["items","searchFunction","labelFieldName","keywordsFieldName","valueFieldName","labelFunction","keywordsFunction","valueFunction","keywordsCleanFunction","textCleanFunction","beforeChange","onChange","onFocus","onBlur","onCreate","selectFirstIfEmpty","minCharactersToSearch","maxItemsToShowInList","multiple","create","ignoreAccents","matchAllKeywords","sortByMatchedKeywords","itemFilterFunction","itemSortFunction","lock","delay","localFiltering","localSorting","cleanUserText","lowercaseKeywords","closeOnBlur","orderableSelection","hideArrow","showClear","clearText","showLoadingIndicator","noResultsText","loadingText","moreItemsText","createText","placeholder","className","inputClassName","inputId","name","selectName","selectId","title","html5autocomplete","autocompleteOffValue","readonly","dropdownClassName","disabled","noInputStyles","required","debug","tabindex","selectedItem","value","highlightedItem","text","highlightFilter"];let a=ea(e,o),{$$slots:l={},$$scope:c}=e,{items:u=[]}=e,{searchFunction:d=!1}=e,{labelFieldName:h=void 0}=e,{keywordsFieldName:f=h}=e,{valueFieldName:g=void 0}=e,{labelFunction:p=function(he){return he==null?"":h?he[h]:he}}=e,{keywordsFunction:m=function(he){return he==null?"":f?he[f]:p(he)}}=e,{valueFunction:_=function(he,At=!1){return he==null?he:!P||At?g?he[g]:he:he.map(Ht=>g?Ht[g]:Ht)}}=e,{keywordsCleanFunction:b=function(he){return he}}=e,{textCleanFunction:v=function(he){return he}}=e,{beforeChange:w=function(he,At){return!0}}=e,{onChange:E=function(he){}}=e,{onFocus:I=function(){}}=e,{onBlur:x=function(){}}=e,{onCreate:T=function(he){Ke&&console.log("onCreate: "+he)}}=e,{selectFirstIfEmpty:L=!1}=e,{minCharactersToSearch:O=1}=e,{maxItemsToShowInList:N=0}=e,{multiple:P=!1}=e,{create:$=!1}=e,{ignoreAccents:ne=!0}=e,{matchAllKeywords:z=!0}=e,{sortByMatchedKeywords:K=!1}=e,{itemFilterFunction:ce=void 0}=e,{itemSortFunction:re=void 0}=e,{lock:B=!1}=e,{delay:Ae=0}=e,{localFiltering:we=!0}=e,{localSorting:ke=!0}=e,{cleanUserText:ue=!0}=e,{lowercaseKeywords:De=!0}=e,{closeOnBlur:Ge=!1}=e,{orderableSelection:lt=!1}=e,{hideArrow:Et=!1}=e,{showClear:xt=!1}=e,{clearText:at="✖"}=e,{showLoadingIndicator:Rt=!1}=e,{noResultsText:bt="No results found"}=e,{loadingText:un="Loading results..."}=e,{moreItemsText:Lt="items not shown"}=e,{createText:Zt="Not found, add anyway?"}=e,{placeholder:ln=void 0}=e,{className:rn=void 0}=e,{inputClassName:Ct=void 0}=e,{inputId:gt=void 0}=e,{name:Re=void 0}=e,{selectName:G=void 0}=e,{selectId:ge=void 0}=e,{title:pe=void 0}=e,{html5autocomplete:q=void 0}=e,{autocompleteOffValue:ee="off"}=e,{readonly:te=void 0}=e,{dropdownClassName:j=void 0}=e,{disabled:Y=!1}=e,{noInputStyles:Oe=!1}=e,{required:dt=null}=e,{debug:Ke=!1}=e,{tabindex:Ot=0}=e,{selectedItem:ft=P?[]:void 0}=e,{value:yn=void 0}=e,{highlightedItem:hn=void 0}=e;const It="sautocomplete-"+Math.floor(Math.random()*1e3);let Bn,Sn,Ti,Hn=!1,Ii=!1,yi=-1,{text:Qn=void 0}=e,lr=0,Di,Ni=[],Io=0,Cr=0,$r,ao=!1;Y2(()=>{ao&&z0(),t(38,ao=!1)});function et(he){return vy(p,he)}function cr(he){const At=vy(m,he);let Ht=vy(b,At);return Ht=De?Ht.toLowerCase().trim():Ht,ne&&(Ht=wy(Ht)),Ke&&console.log("Extracted keywords: '"+Ht+"' from item: "+JSON.stringify(he)),Ht}function bs(){let he;Ke&&(he=`Autocomplete prepare list ${gt?`(id: ${gt})`:""}`,console.time(he),console.log("Prepare items to search"),console.log("items: "+JSON.stringify(u))),Array.isArray(u)||(console.warn("Autocomplete items / search function did not return array but",u),t(0,u=[]));const At=u?u.length:0;Ni=new Array(At),At>0&&u.forEach((Ht,ai)=>{const Ro=tn(Ht);Ro===void 0&&console.log("Undefined item for: ",Ht),Ni[ai]=Ro}),t(32,Di=Ni),Ke&&(console.log(Ni.length+" items to search"),console.timeEnd(he))}function tn(he){return{keywords:we?cr(he):[],label:et(he),item:he}}function ze(){t(61,yn=_(ft)),ft&&!P&&t(2,Qn=et(ft)),t(32,Di=Ni),E(ft)}function St(he){if(he==null)return"";if(!ue)return he;const At=he.replace(/[&/\\#,+()$~%.'":*?<>{}]/g," ").trim(),Ht=vy(v,At);return De?Ht.toLowerCase().trim():Ht.trim()}async function Kt(){let he;Ke&&(he=`Autocomplete search ${gt?`(id: ${gt})`:""}`,console.time(he),console.log("Searching user entered text: '"+Qn+"'"));let At=St(Qn);if(O>1&&At.lengthCr&&t(0,u=[]),Cr=Ht,t(0,u=[...u,...ai]),ni(At)}Cr=At.length:Ht>0}function ni(he){bs();const Ht=(ne?wy(he):he).split(/\s+/g).filter(hl=>hl!=="");let ai;we?(ce?ai=Ni.filter(hl=>ce(hl.item,Ht)):ai=Ni.filter(hl=>pi(hl,Ht)),ke&&(re?ai=ai.sort((hl,F2)=>re(hl.item,F2.item,Ht)):K&&(ai=ai.sort((hl,F2)=>bbe(hl,F2,Ht))))):ai=Ni;const Ro=ag(Ht,"label");return t(32,Di=ai.map(Ro)),Jd(),!0}function yr(he){let At;if(Ke&&console.log("createdItem",he),typeof he<"u"){bs(),t(32,Di=Ni);let Ht=Hm(he,Di);Ht<=0&&(t(0,u=[he]),bs(),t(32,Di=Ni),Ht=0),Ht>=0&&(t(31,yi=Ht),At=Di[yi])}return At}function ur(he){if(Ke&&console.log("selectListItem",he),typeof he>"u"&&$){const Ht=T(Qn);if(typeof Ht<"u"){if(typeof Ht.then=="function")return Ht.then(ai=>{if(typeof ai<"u"){const Ro=yr(ai);typeof Ro<"u"&&ur(Ro)}}),!0;he=yr(Ht)}}if(typeof he>"u")return Ke&&console.log("listItem is undefined. Can not select."),!1;if(B&&ft)return!0;const At=he.item;return w(ft,At)&&(P?ft?ft.includes(At)?t(1,ft=ft.filter(Ht=>Ht!==At)):t(1,ft=[...ft,At]):t(1,ft=[At]):(t(1,ft=void 0),t(1,ft=At))),!0}function Ns(){Ke&&console.log("selectItem",yi);const he=Di[yi];ur(he)?(Ke&&console.log("selectListItem true, closing"),No(),P&&(t(2,Qn=""),Bn.focus())):Ke&&console.log("selectListItem false, not closing")}function Na(){Ke&&console.log("up"),Qd(),yi>0&&t(31,yi--,yi),Ws()}function jl(){Ke&&console.log("down"),Qd(),yiAt.classList&&At.classList.contains(It))?(Ke&&console.log("onDocumentClick inside"),Ws()):(Ke&&console.log("onDocumentClick outside"),No())}function sg(he){Ke&&console.log("onKeyDown");let At=he.key;At==="Tab"&&he.shiftKey&&(At="ShiftTab");const ai={Tab:Hn?No:null,ShiftTab:Hn?No:null,ArrowDown:jl.bind(this),ArrowUp:Na.bind(this),Escape:Gl.bind(this),Backspace:P&&r&&!Qn?dl.bind(this):null}[At];typeof ai=="function"&&ai(he)}function Wm(he){Ke&&console.log("onKeyPress"),he.key==="Enter"&&M2(he)}function M2(he){Hn&&(he.preventDefault(),Ns())}function W0(he){Ke&&console.log("onInput"),t(2,Qn=he.target.value),$r&&clearTimeout($r),Ae?$r=setTimeout(Hs,Ae):Hs()}function Gu(he){Ke&&console.log("unselectItem",he),t(1,ft=ft.filter(At=>At!==he)),Bn.focus()}function Hs(){Kt()&&(t(31,yi=0),Qd())}function Ku(){Ke&&console.log("onInputClick"),Do()}function Gl(he){Ke&&console.log("onEsc"),he.stopPropagation(),Hn&&(Bn.focus(),No())}function dl(he){Ke&&console.log("onBackspace"),Gu(ft[ft.length-1])}function Rc(){Ke&&console.log("onFocus"),I(),Do()}function Aa(){Ke&&console.log("onBlur"),Ge&&No(),x()}function Do(){if(Ke&&console.log("resetListToAllItemsAndOpen"),d&&!Ni.length?Kt():Qn||t(32,Di=Ni),Qd(),ft){Ke&&console.log("Searching currently selected item: "+JSON.stringify(ft));const he=Hm(ft,Di);he>=0&&(t(31,yi=he),Ws())}}function Hm(he,At){Ke&&console.log("Finding index for item",he);let Ht=-1;for(let ai=0;ai"u"){Ke&&console.log(`listItem ${ai} is undefined. Skipping.`);continue}if(Ke&&console.log("Item "+ai+": "+JSON.stringify(Ro)),he===Ro.item){Ht=ai;break}}return Ke&&(Ht>=0?console.log("Found index for item: "+Ht):console.warn("Not found index for item: "+he)),Ht}function Qd(){Ke&&console.log("open"),!Ao()&&(t(38,ao=!0),t(93,Hn=!0))}function No(){Ke&&console.log("close"),t(93,Hn=!1),t(37,Ii=!1),!Qn&&L&&(t(31,yi=0),Ns())}function Ao(){return O>0&&lr0)}function Jd(){return Ao()?(No(),!0):!1}function og(){Ke&&console.log("clear"),t(2,Qn=""),t(1,ft=P?[]:void 0),setTimeout(()=>{Bn.focus(),No()})}function ag(he,At){return Ht=>{let ai=Ht[At];const Ro=Object.assign({highlighted:void 0},Ht);Ro.highlighted=ai;const hl=ai.toLowerCase(),F2=ne?wy(hl):hl;if(he&&he.length){const yL=[];for(let $0=0;$0=0){let SL=Mc+U0;yL.push([Mc,SL]),Mc=SL}while(Mc!==-1)}if(yL.length>0){const $0=new Set;for(let Oc=0;Oc$1");Ro.highlighted=Mc}}}return Ro}}function zm(he){return ft?P?ft.includes(he):he===ft:!1}let Yu=!1;function eh(he,At){lt&&he.dataTransfer.setData("source",At)}function Jo(he,At){lt&&(he.preventDefault(),t(39,Yu=At))}function H0(he,At){lt&&t(39,Yu=!1)}function lg(he,At){if(lt){he.preventDefault(),t(39,Yu=!1);let Ht=parseInt(he.dataTransfer.getData("source")),ai=At;Ht!=ai&&$m(Ht,ai)}}function $m(he,At){let Ht=[...ft];hehe?t(35,Sn.style.top=`-${Ht+ai}px`,Sn):t(35,Sn.style.top="0px",Sn)}const P2=()=>t(38,ao=!0),Se=(he,At)=>{At.key=="Enter"&&Gu(he)},U=(he,At)=>eh(At,he),se=(he,At)=>Jo(At,he),Ce=(he,At)=>H0(),qe=(he,At)=>lg(At,he);function ct(he){ve[he?"unshift":"push"](()=>{Bn=he,t(34,Bn)})}function Vt(){Qn=this.value,t(2,Qn)}const Jn=he=>Jo(he,ft.length-1),vs=he=>lg(he,ft.length-1),As=he=>{he.key=="Enter"&&og()};function lo(he){ve[he?"unshift":"push"](()=>{Ti=he,t(36,Ti)})}const Kl=he=>ul(he),vgt=(he,At)=>{At.key=="Enter"&&ul(he)},wgt=he=>{t(31,yi=he)},Cgt=he=>{he.key=="Enter"&&Ns()};function ygt(he){ve[he?"unshift":"push"](()=>{Sn=he,t(35,Sn)})}return i.$$set=he=>{e=Qe(Qe({},e),Bt(he)),t(60,a=ea(e,o)),"items"in he&&t(0,u=he.items),"searchFunction"in he&&t(63,d=he.searchFunction),"labelFieldName"in he&&t(64,h=he.labelFieldName),"keywordsFieldName"in he&&t(65,f=he.keywordsFieldName),"valueFieldName"in he&&t(66,g=he.valueFieldName),"labelFunction"in he&&t(67,p=he.labelFunction),"keywordsFunction"in he&&t(68,m=he.keywordsFunction),"valueFunction"in he&&t(3,_=he.valueFunction),"keywordsCleanFunction"in he&&t(69,b=he.keywordsCleanFunction),"textCleanFunction"in he&&t(70,v=he.textCleanFunction),"beforeChange"in he&&t(71,w=he.beforeChange),"onChange"in he&&t(72,E=he.onChange),"onFocus"in he&&t(73,I=he.onFocus),"onBlur"in he&&t(74,x=he.onBlur),"onCreate"in he&&t(75,T=he.onCreate),"selectFirstIfEmpty"in he&&t(76,L=he.selectFirstIfEmpty),"minCharactersToSearch"in he&&t(77,O=he.minCharactersToSearch),"maxItemsToShowInList"in he&&t(4,N=he.maxItemsToShowInList),"multiple"in he&&t(5,P=he.multiple),"create"in he&&t(6,$=he.create),"ignoreAccents"in he&&t(78,ne=he.ignoreAccents),"matchAllKeywords"in he&&t(79,z=he.matchAllKeywords),"sortByMatchedKeywords"in he&&t(80,K=he.sortByMatchedKeywords),"itemFilterFunction"in he&&t(81,ce=he.itemFilterFunction),"itemSortFunction"in he&&t(82,re=he.itemSortFunction),"lock"in he&&t(7,B=he.lock),"delay"in he&&t(83,Ae=he.delay),"localFiltering"in he&&t(84,we=he.localFiltering),"localSorting"in he&&t(85,ke=he.localSorting),"cleanUserText"in he&&t(86,ue=he.cleanUserText),"lowercaseKeywords"in he&&t(87,De=he.lowercaseKeywords),"closeOnBlur"in he&&t(88,Ge=he.closeOnBlur),"orderableSelection"in he&&t(89,lt=he.orderableSelection),"hideArrow"in he&&t(8,Et=he.hideArrow),"showClear"in he&&t(90,xt=he.showClear),"clearText"in he&&t(9,at=he.clearText),"showLoadingIndicator"in he&&t(10,Rt=he.showLoadingIndicator),"noResultsText"in he&&t(11,bt=he.noResultsText),"loadingText"in he&&t(12,un=he.loadingText),"moreItemsText"in he&&t(13,Lt=he.moreItemsText),"createText"in he&&t(14,Zt=he.createText),"placeholder"in he&&t(15,ln=he.placeholder),"className"in he&&t(16,rn=he.className),"inputClassName"in he&&t(17,Ct=he.inputClassName),"inputId"in he&&t(18,gt=he.inputId),"name"in he&&t(19,Re=he.name),"selectName"in he&&t(20,G=he.selectName),"selectId"in he&&t(21,ge=he.selectId),"title"in he&&t(22,pe=he.title),"html5autocomplete"in he&&t(23,q=he.html5autocomplete),"autocompleteOffValue"in he&&t(24,ee=he.autocompleteOffValue),"readonly"in he&&t(25,te=he.readonly),"dropdownClassName"in he&&t(26,j=he.dropdownClassName),"disabled"in he&&t(27,Y=he.disabled),"noInputStyles"in he&&t(28,Oe=he.noInputStyles),"required"in he&&t(29,dt=he.required),"debug"in he&&t(91,Ke=he.debug),"tabindex"in he&&t(30,Ot=he.tabindex),"selectedItem"in he&&t(1,ft=he.selectedItem),"value"in he&&t(61,yn=he.value),"highlightedItem"in he&&t(62,hn=he.highlightedItem),"text"in he&&t(2,Qn=he.text),"$$scope"in he&&t(95,c=he.$$scope)},i.$$.update=()=>{i.$$.dirty[0]&1|i.$$.dirty[2]&2&&(d||bs()),i.$$.dirty[0]&2&&ze(),i.$$.dirty[1]&3&&t(62,hn=Di&&yi&&yi>=0&&yi0||lr>0)),i.$$.dirty[0]&34&&t(33,r=P&&ft&&ft.length>0||!P&&ft),i.$$.dirty[0]&160|i.$$.dirty[1]&4|i.$$.dirty[2]&268435456&&t(40,s=xt||(B||P)&&r)},[u,ft,Qn,_,N,P,$,B,Et,at,Rt,bt,un,Lt,Zt,ln,rn,Ct,gt,Re,G,ge,pe,q,ee,te,j,Y,Oe,dt,Ot,yi,Di,r,Bn,Sn,Ti,Ii,ao,Yu,s,n,It,et,Ns,ul,ql,sg,Wm,W0,Gu,Ku,Rc,Aa,og,zm,eh,Jo,H0,lg,a,yn,hn,d,h,f,g,p,m,b,v,w,E,I,x,T,L,O,ne,z,K,ce,re,Ae,we,ke,ue,De,Ge,lt,xt,Ke,ag,Hn,lr,c,l,P2,Se,U,se,Ce,qe,ct,Vt,Jn,vs,As,lo,Kl,vgt,wgt,Cgt,ygt]}class EH extends Ue{constructor(e){super(),je(this,e,vbe,mbe,Ve,{items:0,searchFunction:63,labelFieldName:64,keywordsFieldName:65,valueFieldName:66,labelFunction:67,keywordsFunction:68,valueFunction:3,keywordsCleanFunction:69,textCleanFunction:70,beforeChange:71,onChange:72,onFocus:73,onBlur:74,onCreate:75,selectFirstIfEmpty:76,minCharactersToSearch:77,maxItemsToShowInList:4,multiple:5,create:6,ignoreAccents:78,matchAllKeywords:79,sortByMatchedKeywords:80,itemFilterFunction:81,itemSortFunction:82,lock:7,delay:83,localFiltering:84,localSorting:85,cleanUserText:86,lowercaseKeywords:87,closeOnBlur:88,orderableSelection:89,hideArrow:8,showClear:90,clearText:9,showLoadingIndicator:10,noResultsText:11,loadingText:12,moreItemsText:13,createText:14,placeholder:15,className:16,inputClassName:17,inputId:18,name:19,selectName:20,selectId:21,title:22,html5autocomplete:23,autocompleteOffValue:24,readonly:25,dropdownClassName:26,disabled:27,noInputStyles:28,required:29,debug:91,tabindex:30,selectedItem:1,value:61,highlightedItem:62,text:2,highlightFilter:92},null,[-1,-1,-1,-1,-1])}get highlightFilter(){return this.$$.ctx[92]}}const wbe=i=>({}),xH=i=>({}),Cbe=i=>({}),LH=i=>({});function TH(i){let e,t,n,r,s,o,a,l,c,u;return{c(){e=V("div"),t=V("button"),n=me("Next"),s=ae(),o=V("button"),a=me("Previous"),this.h()},l(d){e=W(d,"DIV",{class:!0});var h=M(e);t=W(h,"BUTTON",{class:!0});var f=M(t);n=_e(f,"Next"),f.forEach(S),s=le(h),o=W(h,"BUTTON",{class:!0});var g=M(o);a=_e(g,"Previous"),g.forEach(S),h.forEach(S),this.h()},h(){y(t,"class",r="ml-2 drop-shadow-md "+(i[2]?"visible":"invisible")),y(o,"class",l="mx-2 drop-shadow-md "+(i[1]===1?"hidden":"")),y(e,"class","sticky flex flex-row-reverse text-gray-500 mb-6")},m(d,h){F(d,e,h),R(e,t),R(t,n),R(e,s),R(e,o),R(o,a),c||(u=[Pe(t,"click",i[7]),Pe(o,"click",i[8])],c=!0)},p(d,h){h&4&&r!==(r="ml-2 drop-shadow-md "+(d[2]?"visible":"invisible"))&&y(t,"class",r),h&2&&l!==(l="mx-2 drop-shadow-md "+(d[1]===1?"hidden":""))&&y(o,"class",l)},d(d){d&&S(e),c=!1,pn(u)}}}function ybe(i){let e,t,n,r,s,o,a,l;const c=i[6]["header-row"],u=Ut(c,i,i[5],LH),d=i[6].body,h=Ut(d,i,i[5],xH);let f=i[0]&&TH(i);return{c(){e=V("div"),t=V("div"),n=V("table"),r=V("thead"),u&&u.c(),s=ae(),h&&h.c(),o=ae(),f&&f.c(),this.h()},l(g){e=W(g,"DIV",{class:!0});var p=M(e);t=W(p,"DIV",{class:!0});var m=M(t);n=W(m,"TABLE",{class:!0});var _=M(n);r=W(_,"THEAD",{});var b=M(r);u&&u.l(b),b.forEach(S),s=le(_),h&&h.l(_),_.forEach(S),m.forEach(S),o=le(p),f&&f.l(p),p.forEach(S),this.h()},h(){y(n,"class","table-custom min-w-full table-auto divide-y divide-gray-300"),y(t,"class","inline-block min-w-full py-2 align-middle"),y(e,"class",a="flex flex-col "+i[4].class+" min-w-full")},m(g,p){F(g,e,p),R(e,t),R(t,n),R(n,r),u&&u.m(r,null),R(n,s),h&&h.m(n,null),R(e,o),f&&f.m(e,null),l=!0},p(g,[p]){u&&u.p&&(!l||p&32)&&qt(u,c,g,g[5],l?jt(c,g[5],p,Cbe):Gt(g[5]),LH),h&&h.p&&(!l||p&32)&&qt(h,d,g,g[5],l?jt(d,g[5],p,wbe):Gt(g[5]),xH),g[0]?f?f.p(g,p):(f=TH(g),f.c(),f.m(e,null)):f&&(f.d(1),f=null),(!l||p&16&&a!==(a="flex flex-col "+g[4].class+" min-w-full"))&&y(e,"class",a)},i(g){l||(D(u,g),D(h,g),l=!0)},o(g){A(u,g),A(h,g),l=!1},d(g){g&&S(e),u&&u.d(g),h&&h.d(g),f&&f.d()}}}function Sbe(i,e,t){let{$$slots:n={},$$scope:r}=e,{paginated:s=!1}=e,{currentPage:o=1}=e,{showNext:a=!0}=e;const l=dr(),c=()=>l("next"),u=()=>l("previous");return i.$$set=d=>{t(4,e=Qe(Qe({},e),Bt(d))),"paginated"in d&&t(0,s=d.paginated),"currentPage"in d&&t(1,o=d.currentPage),"showNext"in d&&t(2,a=d.showNext),"$$scope"in d&&t(5,r=d.$$scope)},e=Bt(e),[s,o,a,l,e,r,n,c,u]}class p8 extends Ue{constructor(e){super(),je(this,e,Sbe,ybe,Ve,{paginated:0,currentPage:1,showNext:2})}}function kbe(i,e,t){const n=i.slice();return n[28]=e[t],n}function IH(i,e,t){const n=i.slice();return n[24]=e[t].owner_name,n[25]=e[t].role,n}function DH(i){let e,t,n,r,s,o,a,l=i[7],c,u,d;e=new ch({props:{role:"info",title:"New permissions may take up to 60s to apply",$$slots:{default:[Ebe]},$$scope:{ctx:i}}});function h(p){i[11](p)}let f={$$slots:{default:[Tbe]},$$scope:{ctx:i}};i[7]!==void 0&&(f.selected=i[7]),s=new lb({props:f}),ve.push(()=>Te(s,"selected",h)),s.$on("selected",i[12]);let g=NH(i);return u=new En({props:{disabled:i[6]=="",variant:"contained",color:"blue",size:"sm",$$slots:{default:[Ibe]},$$scope:{ctx:i}}}),u.$on("click",i[8]),{c(){Q(e.$$.fragment),t=ae(),n=V("div"),r=V("div"),Q(s.$$.fragment),a=ae(),g.c(),c=ae(),Q(u.$$.fragment),this.h()},l(p){J(e.$$.fragment,p),t=le(p),n=W(p,"DIV",{class:!0});var m=M(n);r=W(m,"DIV",{});var _=M(r);J(s.$$.fragment,_),_.forEach(S),a=le(m),g.l(m),c=le(m),J(u.$$.fragment,m),m.forEach(S),this.h()},h(){y(n,"class","flex items-center gap-1")},m(p,m){Z(e,p,m),F(p,t,m),F(p,n,m),R(n,r),Z(s,r,null),R(n,a),g.m(n,null),R(n,c),Z(u,n,null),d=!0},p(p,m){const _={};m[1]&1&&(_.$$scope={dirty:m,ctx:p}),e.$set(_);const b={};m[1]&1&&(b.$$scope={dirty:m,ctx:p}),!o&&m[0]&128&&(o=!0,b.selected=p[7],Le(()=>o=!1)),s.$set(b),m[0]&128&&Ve(l,l=p[7])?(Fe(),A(g,1,1,fe),Be(),g=NH(p),g.c(),D(g,1),g.m(n,c)):g.p(p,m);const v={};m[0]&64&&(v.disabled=p[6]==""),m[1]&1&&(v.$$scope={dirty:m,ctx:p}),u.$set(v)},i(p){d||(D(e.$$.fragment,p),D(s.$$.fragment,p),D(g),D(u.$$.fragment,p),d=!0)},o(p){A(e.$$.fragment,p),A(s.$$.fragment,p),A(g),A(u.$$.fragment,p),d=!1},d(p){X(e,p),p&&S(t),p&&S(n),X(s),g.d(p),X(u)}}}function Ebe(i){let e,t;return{c(){e=V("span"),t=me("Due to permissions cache invalidation"),this.h()},l(n){e=W(n,"SPAN",{class:!0});var r=M(e);t=_e(r,"Due to permissions cache invalidation"),r.forEach(S),this.h()},h(){y(e,"class","text-xs text-gray-500")},m(n,r){F(n,e,r),R(e,t)},p:fe,d(n){n&&S(e)}}}function xbe(i){let e;return{c(){e=me("User")},l(t){e=_e(t,"User")},m(t,n){F(t,e,n)},d(t){t&&S(e)}}}function Lbe(i){let e;return{c(){e=me("Group")},l(t){e=_e(t,"Group")},m(t,n){F(t,e,n)},d(t){t&&S(e)}}}function Tbe(i){let e,t,n,r;return e=new _l({props:{position:"left",value:"user",size:"xs",$$slots:{default:[xbe]},$$scope:{ctx:i}}}),n=new _l({props:{position:"right",value:"group",size:"xs",$$slots:{default:[Lbe]},$$scope:{ctx:i}}}),{c(){Q(e.$$.fragment),t=ae(),Q(n.$$.fragment)},l(s){J(e.$$.fragment,s),t=le(s),J(n.$$.fragment,s)},m(s,o){Z(e,s,o),F(s,t,o),Z(n,s,o),r=!0},p(s,o){const a={};o[1]&1&&(a.$$scope={dirty:o,ctx:s}),e.$set(a);const l={};o[1]&1&&(l.$$scope={dirty:o,ctx:s}),n.$set(l)},i(s){r||(D(e.$$.fragment,s),D(n.$$.fragment,s),r=!0)},o(s){A(e.$$.fragment,s),A(n.$$.fragment,s),r=!1},d(s){X(e,s),s&&S(t),X(n,s)}}}function NH(i){let e,t,n;function r(o){i[13](o)}let s={items:i[7]==="user"?i[4]:i[5]};return i[6]!==void 0&&(s.selectedItem=i[6]),e=new EH({props:s}),ve.push(()=>Te(e,"selectedItem",r)),{c(){Q(e.$$.fragment)},l(o){J(e.$$.fragment,o)},m(o,a){Z(e,o,a),n=!0},p(o,a){const l={};a[0]&176&&(l.items=o[7]==="user"?o[4]:o[5]),!t&&a[0]&64&&(t=!0,l.selectedItem=o[6],Le(()=>t=!1)),e.$set(l)},i(o){n||(D(e.$$.fragment,o),n=!0)},o(o){A(e.$$.fragment,o),n=!1},d(o){X(e,o)}}}function Ibe(i){let e;return{c(){e=me("Grant permission to folder")},l(t){e=_e(t,"Grant permission to folder")},m(t,n){F(t,e,n)},d(t){t&&S(e)}}}function Dbe(i){let e,t,n=new Array(6),r=[];for(let s=0;s{g[v]=null}),Be(),l=g[a],l?l.p(_,b):(l=g[a]=f[a](_),l.c()),D(l,1),l.m(o,null)),_[2]?m?m.p(_,b):(m=AH(_),m.c(),m.m(u,null)):m&&(m.d(1),m=null)},i(_){h||(D(l),h=!0)},o(_){A(l),h=!1},d(_){_&&S(e),g[a].d(),m&&m.d()}}}function $be(i){let e,t,n=i[3],r=[];for(let o=0;oA(r[o],1,1,()=>{r[o]=null});return{c(){e=V("tbody");for(let o=0;o{p=null}),Be());let I=h;h=b(w),h===I?_[h].p(w,E):(Fe(),A(_[I],1,1,()=>{_[I]=null}),Be(),f=_[h],f?f.p(w,E):(f=_[h]=m[h](w),f.c()),D(f,1),f.m(e,null))},i(w){g||(D(p),D(f),g=!0)},o(w){A(p),A(f),g=!1},d(w){w&&S(e),p&&p.d(),_[h].d()}}}function jbe(i,e,t){let n,r;zt(i,bg,L=>t(10,n=L)),zt(i,Oa,L=>t(1,r=L));let{name:s}=e,o=!1,a,l,c=[],u=[],d="";async function h(){t(4,c=await GL.listUsernames({workspace:r}))}async function f(){t(5,u=await Yl.listGroupNames({workspace:r}))}async function g(){h(),f(),p(),await _()}async function p(){(await oh.listFolders({workspace:r})).map(L=>L.name)}async function m(){await ah.addGranularAcls({workspace:r??"",path:s,kind:"folder",requestBody:{owner:(v=="user"?"u/":"g/")+d}}),_()}async function _(){a=await oh.getFolder({workspace:r,name:s}),t(2,o=n!=null&&((a==null?void 0:a.owners.includes("u/"+n.username))||(n.is_admin??!1)||n.pgroups.findIndex(L=>a==null?void 0:a.owners.includes(L))!=-1)),t(3,l=Array.from(new Set(Object.entries((a==null?void 0:a.extra_perms)??{}).map(L=>L[0]).concat((a==null?void 0:a.owners)??[]))).map(L=>({owner_name:L,role:b(L)}))),Object.entries((a==null?void 0:a.extra_perms)??{}).filter(([L,O])=>L.startsWith("g/")&&O).map(([L,O])=>L)}function b(L){var $;const N=L in((a==null?void 0:a.extra_perms)??{})&&((a==null?void 0:a.extra_perms)??{})[L];return(($=a==null?void 0:a.owners)==null?void 0:$.includes(L))?"admin":N?"writer":"viewer"}let v="user";function w(L){v=L,t(7,v)}const E=()=>t(6,d="");function I(L){d=L,t(6,d)}const x=async(L,O)=>{const N=O.detail;N=="admin"?(await oh.addOwnerToFolder({workspace:r??"",name:s,requestBody:{owner:L}}),await ah.addGranularAcls({workspace:r??"",path:s,kind:"folder",requestBody:{owner:L}})):N=="writer"?(await oh.removeOwnerToFolder({workspace:r??"",name:s,requestBody:{owner:L}}),await ah.addGranularAcls({workspace:r??"",path:s,kind:"folder",requestBody:{owner:L,write:!0}})):N=="viewer"&&(await oh.removeOwnerToFolder({workspace:r??"",name:s,requestBody:{owner:L}}),await ah.addGranularAcls({workspace:r??"",path:s,kind:"folder",requestBody:{owner:L,write:!1}})),_()},T=async L=>{await oh.removeOwnerToFolder({workspace:r??"",name:s,requestBody:{owner:L}}),await ah.removeGranularAcls({workspace:r??"",path:s,kind:"folder",requestBody:{owner:L}}),_()};return i.$$set=L=>{"name"in L&&t(0,s=L.name)},i.$$.update=()=>{i.$$.dirty[0]&1026&&r&&n&&g()},[s,r,o,l,c,u,d,v,m,_,n,w,E,I,x,T]}class OH extends Ue{constructor(e){super(),je(this,e,jbe,Ube,Ve,{name:0},null,[-1,-1])}}var kg,Cy,gb=typeof Map=="function"?new Map:(kg=[],Cy=[],{has:function(i){return kg.indexOf(i)>-1},get:function(i){return Cy[kg.indexOf(i)]},set:function(i,e){kg.indexOf(i)===-1&&(kg.push(i),Cy.push(e))},delete:function(i){var e=kg.indexOf(i);e>-1&&(kg.splice(e,1),Cy.splice(e,1))}}),MH=function(i){return new Event(i,{bubbles:!0})};try{new Event("test")}catch{MH=function(e){var t=document.createEvent("Event");return t.initEvent(e,!0,!1),t}}function qbe(i){var e=gb.get(i);e&&e.destroy()}function Gbe(i){var e=gb.get(i);e&&e.update()}var pb=null;typeof window>"u"||typeof window.getComputedStyle!="function"?((pb=function(i){return i}).destroy=function(i){return i},pb.update=function(i){return i}):((pb=function(i,e){return i&&Array.prototype.forEach.call(i.length?i:[i],function(t){return function(n){if(n&&n.nodeName&&n.nodeName==="TEXTAREA"&&!gb.has(n)){var r,s=null,o=null,a=null,l=function(){n.clientWidth!==o&&h()},c=function(f){window.removeEventListener("resize",l,!1),n.removeEventListener("input",h,!1),n.removeEventListener("keyup",h,!1),n.removeEventListener("autosize:destroy",c,!1),n.removeEventListener("autosize:update",h,!1),Object.keys(f).forEach(function(g){n.style[g]=f[g]}),gb.delete(n)}.bind(n,{height:n.style.height,resize:n.style.resize,overflowY:n.style.overflowY,overflowX:n.style.overflowX,wordWrap:n.style.wordWrap});n.addEventListener("autosize:destroy",c,!1),"onpropertychange"in n&&"oninput"in n&&n.addEventListener("keyup",h,!1),window.addEventListener("resize",l,!1),n.addEventListener("input",h,!1),n.addEventListener("autosize:update",h,!1),n.style.overflowX="hidden",n.style.wordWrap="break-word",gb.set(n,{destroy:c,update:h}),(r=window.getComputedStyle(n,null)).resize==="vertical"?n.style.resize="none":r.resize==="both"&&(n.style.resize="horizontal"),s=r.boxSizing==="content-box"?-(parseFloat(r.paddingTop)+parseFloat(r.paddingBottom)):parseFloat(r.borderTopWidth)+parseFloat(r.borderBottomWidth),isNaN(s)&&(s=0),h()}function u(f){var g=n.style.width;n.style.width="0px",n.style.width=g,n.style.overflowY=f}function d(){if(n.scrollHeight!==0){var f=function(g){for(var p=[];g&&g.parentNode&&g.parentNode instanceof Element;)g.parentNode.scrollTop&&(g.parentNode.style.scrollBehavior="auto",p.push([g.parentNode,g.parentNode.scrollTop])),g=g.parentNode;return function(){return p.forEach(function(m){var _=m[0];_.scrollTop=m[1],_.style.scrollBehavior=null})}}(n);n.style.height="",n.style.height=n.scrollHeight+s+"px",o=n.clientWidth,f()}}function h(){d();var f=Math.round(parseFloat(n.style.height)),g=window.getComputedStyle(n,null),p=g.boxSizing==="content-box"?Math.round(parseFloat(g.height)):n.offsetHeight;if(p(PH(i),{destroy(){PH.destroy(i)}});function Kbe(i,e,t){const n=i.slice();return n[26]=e[t],n}function FH(i,e,t){const n=i.slice();return n[22]=e[t].member_name,n[23]=e[t].role,n}function Ybe(i){let e,t;return e=new yg({props:{layout:[[4]]}}),{c(){Q(e.$$.fragment)},l(n){J(e.$$.fragment,n)},m(n,r){Z(e,n,r),t=!0},p:fe,i(n){t||(D(e.$$.fragment,n),t=!0)},o(n){A(e.$$.fragment,n),t=!1},d(n){X(e,n)}}}function Zbe(i){let e,t,n,r,s,o,a,l;return s=new En({props:{disabled:!i[2],size:"xs",$$slots:{default:[Xbe]},$$scope:{ctx:i}}}),s.$on("click",i[12]),{c(){e=V("div"),t=V("textarea"),r=ae(),Q(s.$$.fragment),this.h()},l(c){e=W(c,"DIV",{class:!0});var u=M(e);t=W(u,"TEXTAREA",{rows:!0,type:!0,placeholder:!0}),M(t).forEach(S),r=le(u),J(s.$$.fragment,u),u.forEach(S),this.h()},h(){t.disabled=n=!i[2],y(t,"rows","2"),y(t,"type","text"),y(t,"placeholder","Summary of the group"),y(e,"class","flex flex-col gap-1")},m(c,u){F(c,e,u),R(e,t),an(t,i[3].summary),R(e,r),Z(s,e,null),o=!0,a||(l=[zs(td.call(null,t)),Pe(t,"input",i[11])],a=!0)},p(c,u){(!o||u&4&&n!==(n=!c[2]))&&(t.disabled=n),u&8&&an(t,c[3].summary);const d={};u&4&&(d.disabled=!c[2]),u&536870912&&(d.$$scope={dirty:u,ctx:c}),s.$set(d)},i(c){o||(D(s.$$.fragment,c),o=!0)},o(c){A(s.$$.fragment,c),o=!1},d(c){c&&S(e),X(s),a=!1,pn(l)}}}function Xbe(i){let e;return{c(){e=me("Save Summary")},l(t){e=_e(t,"Save Summary")},m(t,n){F(t,e,n)},d(t){t&&S(e)}}}function BH(i){let e,t,n,r,s,o;function a(c){i[13](c)}let l={items:i[5]};return i[6]!==void 0&&(l.selectedItem=i[6]),t=new EH({props:l}),ve.push(()=>Te(t,"selectedItem",a)),s=new En({props:{variant:"contained",color:"blue",size:"sm",btnClasses:"!ml-4",$$slots:{default:[Qbe]},$$scope:{ctx:i}}}),s.$on("click",i[8]),{c(){e=V("div"),Q(t.$$.fragment),r=ae(),Q(s.$$.fragment),this.h()},l(c){e=W(c,"DIV",{class:!0});var u=M(e);J(t.$$.fragment,u),r=le(u),J(s.$$.fragment,u),u.forEach(S),this.h()},h(){y(e,"class","flex items-start")},m(c,u){F(c,e,u),Z(t,e,null),R(e,r),Z(s,e,null),o=!0},p(c,u){const d={};u&32&&(d.items=c[5]),!n&&u&64&&(n=!0,d.selectedItem=c[6],Le(()=>n=!1)),t.$set(d);const h={};u&536870912&&(h.$$scope={dirty:u,ctx:c}),s.$set(h)},i(c){o||(D(t.$$.fragment,c),D(s.$$.fragment,c),o=!0)},o(c){A(t.$$.fragment,c),A(s.$$.fragment,c),o=!1},d(c){c&&S(e),X(t),X(s)}}}function Qbe(i){let e;return{c(){e=me("Add member")},l(t){e=_e(t,"Add member")},m(t,n){F(t,e,n)},d(t){t&&S(e)}}}function Jbe(i){let e,t,n=new Array(6),r=[];for(let s=0;s{g[v]=null}),Be(),l=g[a],l?l.p(_,b):(l=g[a]=f[a](_),l.c()),D(l,1),l.m(o,null)),_[2]?m?m.p(_,b):(m=VH(_),m.c(),m.m(u,null)):m&&(m.d(1),m=null)},i(_){h||(D(l),h=!0)},o(_){A(l),h=!1},d(_){_&&S(e),g[a].d(),m&&m.d()}}}function uve(i){let e,t,n=i[4],r=[];for(let o=0;oA(r[o],1,1,()=>{r[o]=null});return{c(){e=V("tbody");for(let o=0;o{v[P]=null}),Be(),o=v[s],o?o.p(O,N):(o=v[s]=b[s](O),o.c()),D(o,1),o.m(e,a)),(!_||N&16)&&u!==(u=(((ne=O[4])==null?void 0:ne.length)??0)+"")&&pt(d,u),O[2]?E?(E.p(O,N),N&4&&D(E,1)):(E=BH(O),E.c(),D(E,1),E.m(e,g)):E&&(Fe(),A(E,1,1,()=>{E=null}),Be());let $=p;p=T(O),p===$?x[p].p(O,N):(Fe(),A(x[$],1,1,()=>{x[$]=null}),Be(),m=x[p],m?m.p(O,N):(m=x[p]=I[p](O),m.c()),D(m,1),m.m(e,null))},i(O){_||(D(o),D(E),D(m),_=!0)},o(O){A(o),A(E),A(m),_=!1},d(O){O&&S(e),v[s].d(),E&&E.d(),x[p].d()}}}function hve(i,e,t){let n,r;zt(i,bg,x=>t(10,n=x)),zt(i,Oa,x=>t(1,r=x));let{name:s}=e,o=!1,a,l,c=[],u="";const d=dr();async function h(){t(5,c=await GL.listUsernames({workspace:r}))}async function f(){g(),await m(),h()}async function g(){(await Yl.listGroups({workspace:r})).map(x=>x.name)}async function p(){await Yl.addUserToGroup({workspace:r??"",name:s,requestBody:{username:u}}),m()}async function m(){t(3,a=await Yl.getGroup({workspace:r,name:s})),t(2,o=KL(s,a.extra_perms??{},n)),t(4,l=Array.from(new Set(Object.entries((a==null?void 0:a.extra_perms)??{}).filter(([x,T])=>x.startsWith("u/")&&T).map(([x,T])=>x.split("/")[1]).concat((a==null?void 0:a.members)??[]))).map(x=>({member_name:x,role:_(x)}))),Object.entries((a==null?void 0:a.extra_perms)??{}).filter(([x,T])=>x.startsWith("g/")&&T).map(([x,T])=>x)}function _(x){var O;const T="u/"+x in((a==null?void 0:a.extra_perms)??{})&&((a==null?void 0:a.extra_perms)??{})["u/"+x],L=(O=a==null?void 0:a.members)==null?void 0:O.includes(x);return T&&L?"admin":T?"manager":"member"}function b(){a.summary=this.value,t(3,a)}const v=async()=>{await Yl.updateGroup({workspace:r??"",name:s,requestBody:{summary:a==null?void 0:a.summary}}),d("update"),Qu("New summary saved")};function w(x){u=x,t(6,u)}const E=async(x,T)=>{const L=T.detail;L=="member"?(await Yl.addUserToGroup({workspace:r??"",name:s,requestBody:{username:x}}),await ah.removeGranularAcls({workspace:r??"",path:s,kind:"group_",requestBody:{owner:"u/"+x}})):L=="manager"?(await Yl.removeUserToGroup({workspace:r??"",name:s,requestBody:{username:x}}),await ah.addGranularAcls({workspace:r??"",path:s,kind:"group_",requestBody:{owner:"u/"+x,write:!0}})):L=="admin"&&(await Yl.addUserToGroup({workspace:r??"",name:s,requestBody:{username:x}}),await ah.addGranularAcls({workspace:r??"",path:s,kind:"group_",requestBody:{owner:"u/"+x,write:!0}})),m()},I=async x=>{await Yl.removeUserToGroup({workspace:r??"",name:s,requestBody:{username:x}}),m()};return i.$$set=x=>{"name"in x&&t(0,s=x.name)},i.$$.update=()=>{i.$$.dirty&1026&&r&&n&&f()},[s,r,o,a,l,c,u,d,p,m,n,b,v,w,E,I]}class HH extends Ue{constructor(e){super(),je(this,e,hve,dve,Ve,{name:0})}}const Bgt="";function zH(i,e,t){const n=i.slice();return n[55]=e[t],n}function $H(i,e,t){const n=i.slice();return n[52]=e[t],n}function fve(i){let e;return{c(){e=me("New group")},l(t){e=_e(t,"New group")},m(t,n){F(t,e,n)},d(t){t&&S(e)}}}function UH(i){let e,t,n,r;return n=new HH({props:{name:i[16]}}),{c(){e=V("div"),t=ae(),Q(n.$$.fragment),this.h()},l(s){e=W(s,"DIV",{class:!0}),M(e).forEach(S),t=le(s),J(n.$$.fragment,s),this.h()},h(){y(e,"class","mt-8")},m(s,o){F(s,e,o),F(s,t,o),Z(n,s,o),r=!0},p(s,o){const a={};o[0]&65536&&(a.name=s[16]),n.$set(a)},i(s){r||(D(n.$$.fragment,s),r=!0)},o(s){A(n.$$.fragment,s),r=!1},d(s){s&&S(e),s&&S(t),X(n,s)}}}function gve(i){let e,t,n,r,s,o,a,l,c;r=new En({props:{size:"md",endIcon:{icon:lh},disabled:!i[15],$$slots:{default:[fve]},$$scope:{ctx:i}}}),r.$on("click",i[20]);let u=i[16]&&UH(i);return{c(){e=V("div"),t=V("input"),n=ae(),Q(r.$$.fragment),s=ae(),u&&u.c(),o=Me(),this.h()},l(d){e=W(d,"DIV",{class:!0});var h=M(e);t=W(h,"INPUT",{class:!0,placeholder:!0}),n=le(h),J(r.$$.fragment,h),h.forEach(S),s=le(d),u&&u.l(d),o=Me(),this.h()},h(){y(t,"class","mr-2 svelte-1renn9e"),y(t,"placeholder","New group name"),y(e,"class","flex flex-row")},m(d,h){F(d,e,h),R(e,t),an(t,i[15]),R(e,n),Z(r,e,null),F(d,s,h),u&&u.m(d,h),F(d,o,h),a=!0,l||(c=Pe(t,"input",i[27]),l=!0)},p(d,h){h[0]&32768&&t.value!==d[15]&&an(t,d[15]);const f={};h[0]&32768&&(f.disabled=!d[15]),h[1]&134217728&&(f.$$scope={dirty:h,ctx:d}),r.$set(f),d[16]?u?(u.p(d,h),h[0]&65536&&D(u,1)):(u=UH(d),u.c(),D(u,1),u.m(o.parentNode,o)):u&&(Fe(),A(u,1,1,()=>{u=null}),Be())},i(d){a||(D(r.$$.fragment,d),D(u),a=!0)},o(d){A(r.$$.fragment,d),A(u),a=!1},d(d){d&&S(e),X(r),d&&S(s),u&&u.d(d),d&&S(o),l=!1,c()}}}function pve(i){let e,t;return e=new hh({props:{title:"New Folder",$$slots:{default:[gve]},$$scope:{ctx:i}}}),e.$on("close",i[28]),{c(){Q(e.$$.fragment)},l(n){J(e.$$.fragment,n)},m(n,r){Z(e,n,r),t=!0},p(n,r){const s={};r[0]&98304|r[1]&134217728&&(s.$$scope={dirty:r,ctx:n}),e.$set(s)},i(n){t||(D(e.$$.fragment,n),t=!0)},o(n){A(e.$$.fragment,n),t=!1},d(n){X(e,n)}}}function mve(i){var n;let e,t;return e=new HH({props:{name:((n=i[4])==null?void 0:n.owner)??""}}),{c(){Q(e.$$.fragment)},l(r){J(e.$$.fragment,r)},m(r,s){Z(e,r,s),t=!0},p(r,s){var a;const o={};s[0]&16&&(o.name=((a=r[4])==null?void 0:a.owner)??""),e.$set(o)},i(r){t||(D(e.$$.fragment,r),t=!0)},o(r){A(e.$$.fragment,r),t=!1},d(r){X(e,r)}}}function _ve(i){var n;let e,t;return e=new hh({props:{title:"Folder "+((n=i[4])==null?void 0:n.owner),$$slots:{default:[mve]},$$scope:{ctx:i}}}),e.$on("close",function(){xr(i[14].closeDrawer)&&i[14].closeDrawer.apply(this,arguments)}),{c(){Q(e.$$.fragment)},l(r){J(e.$$.fragment,r)},m(r,s){Z(e,r,s),t=!0},p(r,s){var a;i=r;const o={};s[0]&16&&(o.title="Folder "+((a=i[4])==null?void 0:a.owner)),s[0]&16|s[1]&134217728&&(o.$$scope={dirty:s,ctx:i}),e.$set(o)},i(r){t||(D(e.$$.fragment,r),t=!0)},o(r){A(e.$$.fragment,r),t=!1},d(r){X(e,r)}}}function bve(i){let e;return{c(){e=me("New folder")},l(t){e=_e(t,"New folder")},m(t,n){F(t,e,n)},d(t){t&&S(e)}}}function jH(i){let e,t,n,r;return n=new OH({props:{name:i[12]}}),{c(){e=V("div"),t=ae(),Q(n.$$.fragment),this.h()},l(s){e=W(s,"DIV",{class:!0}),M(e).forEach(S),t=le(s),J(n.$$.fragment,s),this.h()},h(){y(e,"class","mt-8")},m(s,o){F(s,e,o),F(s,t,o),Z(n,s,o),r=!0},p(s,o){const a={};o[0]&4096&&(a.name=s[12]),n.$set(a)},i(s){r||(D(n.$$.fragment,s),r=!0)},o(s){A(n.$$.fragment,s),r=!1},d(s){s&&S(e),s&&S(t),X(n,s)}}}function vve(i){let e,t,n,r,s,o,a,l,c;r=new En({props:{size:"md",startIcon:{icon:lh},disabled:!i[11],$$slots:{default:[bve]},$$scope:{ctx:i}}}),r.$on("click",i[19]);let u=i[12]&&jH(i);return{c(){e=V("div"),t=V("input"),n=ae(),Q(r.$$.fragment),s=ae(),u&&u.c(),o=Me(),this.h()},l(d){e=W(d,"DIV",{class:!0});var h=M(e);t=W(h,"INPUT",{class:!0,placeholder:!0}),n=le(h),J(r.$$.fragment,h),h.forEach(S),s=le(d),u&&u.l(d),o=Me(),this.h()},h(){y(t,"class","mr-2 svelte-1renn9e"),y(t,"placeholder","New folder name"),y(e,"class","flex flex-row")},m(d,h){F(d,e,h),R(e,t),an(t,i[11]),R(e,n),Z(r,e,null),F(d,s,h),u&&u.m(d,h),F(d,o,h),a=!0,l||(c=Pe(t,"input",i[31]),l=!0)},p(d,h){h[0]&2048&&t.value!==d[11]&&an(t,d[11]);const f={};h[0]&2048&&(f.disabled=!d[11]),h[1]&134217728&&(f.$$scope={dirty:h,ctx:d}),r.$set(f),d[12]?u?(u.p(d,h),h[0]&4096&&D(u,1)):(u=jH(d),u.c(),D(u,1),u.m(o.parentNode,o)):u&&(Fe(),A(u,1,1,()=>{u=null}),Be())},i(d){a||(D(r.$$.fragment,d),D(u),a=!0)},o(d){A(r.$$.fragment,d),A(u),a=!1},d(d){d&&S(e),X(r),d&&S(s),u&&u.d(d),d&&S(o),l=!1,c()}}}function wve(i){let e,t;return e=new hh({props:{title:"New Folder",$$slots:{default:[vve]},$$scope:{ctx:i}}}),e.$on("close",i[32]),{c(){Q(e.$$.fragment)},l(n){J(e.$$.fragment,n)},m(n,r){Z(e,n,r),t=!0},p(n,r){const s={};r[0]&6144|r[1]&134217728&&(s.$$scope={dirty:r,ctx:n}),e.$set(s)},i(n){t||(D(e.$$.fragment,n),t=!0)},o(n){A(e.$$.fragment,n),t=!1},d(n){X(e,n)}}}function Cve(i){var n;let e,t;return e=new OH({props:{name:((n=i[4])==null?void 0:n.owner)??""}}),{c(){Q(e.$$.fragment)},l(r){J(e.$$.fragment,r)},m(r,s){Z(e,r,s),t=!0},p(r,s){var a;const o={};s[0]&16&&(o.name=((a=r[4])==null?void 0:a.owner)??""),e.$set(o)},i(r){t||(D(e.$$.fragment,r),t=!0)},o(r){A(e.$$.fragment,r),t=!1},d(r){X(e,r)}}}function yve(i){var n;let e,t;return e=new hh({props:{title:"Folder "+((n=i[4])==null?void 0:n.owner),$$slots:{default:[Cve]},$$scope:{ctx:i}}}),e.$on("close",function(){xr(i[10].closeDrawer)&&i[10].closeDrawer.apply(this,arguments)}),{c(){Q(e.$$.fragment)},l(r){J(e.$$.fragment,r)},m(r,s){Z(e,r,s),t=!0},p(r,s){var a;i=r;const o={};s[0]&16&&(o.title="Folder "+((a=i[4])==null?void 0:a.owner)),s[0]&16|s[1]&134217728&&(o.$$scope={dirty:s,ctx:i}),e.$set(o)},i(r){t||(D(e.$$.fragment,r),t=!0)},o(r){A(e.$$.fragment,r),t=!1},d(r){X(e,r)}}}function qH(i){let e,t,n,r,s,o,a,l,c,u,d,h,f,g,p,m,_,b,v,w,E;function I(N){i[35](N)}let x={class:"mt-0.5",$$slots:{default:[Eve]},$$scope:{ctx:i}};i[4].ownerKind!==void 0&&(x.selected=i[4].ownerKind),o=new lb({props:x}),ve.push(()=>Te(o,"selected",I)),o.$on("selected",i[36]);const T=[Tve,Lve,xve],L=[];function O(N,P){return N[4].ownerKind==="user"?0:N[4].ownerKind==="folder"?1:N[4].ownerKind==="group"?2:-1}return~(c=O(i))&&(u=L[c]=T[c](i)),p=new uy({props:{required:!0}}),{c(){e=V("div"),t=V("label"),n=V("span"),r=me(" "),s=ae(),Q(o.$$.fragment),l=ae(),u&&u.c(),d=ae(),h=V("label"),f=V("span"),g=me(`Name + `),Q(p.$$.fragment),m=ae(),_=V("input"),this.h()},l(N){e=W(N,"DIV",{class:!0});var P=M(e);t=W(P,"LABEL",{class:!0});var $=M(t);n=W($,"SPAN",{class:!0});var ne=M(n);r=_e(ne," "),ne.forEach(S),s=le($),J(o.$$.fragment,$),$.forEach(S),l=le(P),u&&u.l(P),P.forEach(S),d=le(N),h=W(N,"LABEL",{class:!0});var z=M(h);f=W(z,"SPAN",{class:!0});var K=M(f);g=_e(K,`Name + `),J(p.$$.fragment,K),K.forEach(S),m=le(z),_=W(z,"INPUT",{type:!0,id:!0,autocomplete:!0,placeholder:!0,class:!0}),z.forEach(S),this.h()},h(){y(n,"class","text-gray-700 text-sm whitespace-nowrap"),y(t,"class","block"),y(e,"class","flex gap-4 shrink"),y(f,"class","text-gray-700 text-sm"),_.disabled=i[3],y(_,"type","text"),y(_,"id","path"),_.autofocus=!0,y(_,"autocomplete","off"),y(_,"placeholder",i[2]),y(_,"class",b=zF(i[1]===""?"":"border border-red-700 bg-red-100 border-opacity-30 focus:border-red-700 focus:border-opacity-30 focus-visible:ring-red-700 focus-visible:ring-opacity-25 focus-visible:border-red-700")+" svelte-1renn9e"),y(h,"class","block grow w-full max-w-md")},m(N,P){F(N,e,P),R(e,t),R(t,n),R(n,r),R(t,s),Z(o,t,null),R(e,l),~c&&L[c].m(e,null),F(N,d,P),F(N,h,P),R(h,f),R(f,g),Z(p,f,null),R(h,m),R(h,_),i[40](_),an(_,i[4].name),v=!0,_.focus(),w||(E=[Pe(_,"keyup",i[18]),Pe(_,"input",i[41])],w=!0)},p(N,P){const $={};P[1]&134217728&&($.$$scope={dirty:P,ctx:N}),!a&&P[0]&16&&(a=!0,$.selected=N[4].ownerKind,Le(()=>a=!1)),o.$set($);let ne=c;c=O(N),c===ne?~c&&L[c].p(N,P):(u&&(Fe(),A(L[ne],1,1,()=>{L[ne]=null}),Be()),~c?(u=L[c],u?u.p(N,P):(u=L[c]=T[c](N),u.c()),D(u,1),u.m(e,null)):u=null),(!v||P[0]&8)&&(_.disabled=N[3]),(!v||P[0]&4)&&y(_,"placeholder",N[2]),(!v||P[0]&2&&b!==(b=zF(N[1]===""?"":"border border-red-700 bg-red-100 border-opacity-30 focus:border-red-700 focus:border-opacity-30 focus-visible:ring-red-700 focus-visible:ring-opacity-25 focus-visible:border-red-700")+" svelte-1renn9e"))&&y(_,"class",b),P[0]&272&&_.value!==N[4].name&&an(_,N[4].name)},i(N){v||(D(o.$$.fragment,N),D(u),D(p.$$.fragment,N),v=!0)},o(N){A(o.$$.fragment,N),A(u),A(p.$$.fragment,N),v=!1},d(N){N&&S(e),X(o),~c&&L[c].d(),N&&S(d),N&&S(h),X(p),i[40](null),w=!1,pn(E)}}}function Sve(i){let e;return{c(){e=me("User")},l(t){e=_e(t,"User")},m(t,n){F(t,e,n)},d(t){t&&S(e)}}}function kve(i){let e;return{c(){e=me("Folder")},l(t){e=_e(t,"Folder")},m(t,n){F(t,e,n)},d(t){t&&S(e)}}}function Eve(i){let e,t,n,r;return e=new _l({props:{light:!0,size:"xs",value:"user",position:"left",$$slots:{default:[Sve]},$$scope:{ctx:i}}}),n=new _l({props:{light:!0,size:"xs",value:"folder",position:"right",$$slots:{default:[kve]},$$scope:{ctx:i}}}),{c(){Q(e.$$.fragment),t=ae(),Q(n.$$.fragment)},l(s){J(e.$$.fragment,s),t=le(s),J(n.$$.fragment,s)},m(s,o){Z(e,s,o),F(s,t,o),Z(n,s,o),r=!0},p(s,o){const a={};o[1]&134217728&&(a.$$scope={dirty:o,ctx:s}),e.$set(a);const l={};o[1]&134217728&&(l.$$scope={dirty:o,ctx:s}),n.$set(l)},i(s){r||(D(e.$$.fragment,s),D(n.$$.fragment,s),r=!0)},o(s){A(e.$$.fragment,s),A(n.$$.fragment,s),r=!1},d(s){X(e,s),s&&S(t),X(n,s)}}}function xve(i){let e,t,n,r,s,o,a,l,c,u,d,h,f,g;r=new ed({props:{$$slots:{default:[Ive]},$$scope:{ctx:i}}});let p=i[8],m=[];for(let _=0;_i[39].call(a)),y(o,"class","flex flex-row gap-1"),y(e,"class","block grow w-48")},m(_,b){F(_,e,b),R(e,t),R(t,n),Z(r,t,null),R(e,s),R(e,o),R(o,a);for(let v=0;vi[38].call(a)),y(o,"class","flex flex-row gap-1 w-full"),y(e,"class","block grow w-48")},m(_,b){F(_,e,b),R(e,t),R(t,n),Z(r,t,null),R(e,s),R(e,o),R(o,a);for(let v=0;v{T=null}),Be()),(!v||O[0]&1)&&pt(p,L[0]),(!v||O[0]&2)&&pt(b,L[1])},i(L){v||(D(e.$$.fragment,L),D(n.$$.fragment,L),D(s.$$.fragment,L),D(a.$$.fragment,L),D(T),v=!0)},o(L){A(e.$$.fragment,L),A(n.$$.fragment,L),A(s.$$.fragment,L),A(a.$$.fragment,L),A(T),v=!1},d(L){i[29](null),X(e,L),L&&S(t),i[30](null),X(n,L),L&&S(r),i[33](null),X(s,L),L&&S(o),i[34](null),X(a,L),L&&S(l),L&&S(c),T&&T.d()}}}function m8(i){var e;return[((e=i.ownerKind)==null?void 0:e.charAt(0))??"",i.owner,i.name].join("/")}function Pve(i,e,t){let n,r,s;zt(i,Oa,Re=>t(26,n=Re)),zt(i,bg,Re=>t(5,r=Re)),zt(i,zB,Re=>t(17,s=Re));let o,{namePlaceholder:a=""}=e,{initialPath:l}=e,{path:c=""}=e,{error:u=""}=e,{disabled:d=!1}=e,{checkInitialPathExistence:h=!1}=e,{kind:f}=e,g;const p=dr();let m=[],_=[];function b(){o&&(t(0,c=m8(o)),T(o,c,f))}function v(){g==null||g.focus()}function w(Re){Re.key==="Enter"&&(Re.preventDefault(),p("enter"))}async function E(){if(c==""||c=="u//"){t(4,o={ownerKind:"user",name:a,owner:""}),t(4,o.owner=r.username.split("@")[0],o);let Re=1;for(;await N(m8(o),f);)t(4,o.name=`${a}_${Re}`,o),Re+=1;t(0,c=m8(o))}else t(4,o=iH(c))}async function I(){var ge,pe;let Re=[],G="";((ge=l==null?void 0:l.split("/"))==null?void 0:ge[0])=="f"&&(G=(pe=l==null?void 0:l.split("/"))==null?void 0:pe[1],Re.push(G)),t(7,m=Re.concat((await oh.listFolderNames({workspace:n})).filter(q=>q!=G)))}async function x(){var G,ge;let Re=[];((G=l==null?void 0:l.split("/"))==null?void 0:G[0])=="f"&&Re.push((ge=l==null?void 0:l.split("/"))==null?void 0:ge[1]),t(8,_=Re.concat(await Yl.listGroupNames({workspace:n})))}async function T(Re,G,ge){t(1,u=""),P(Re)&&O(G,ge)}let L;async function O(Re,G){L&&clearTimeout(L),L=setTimeout(async()=>{(Re==""||h||Re!=l)&&await N(Re,G)?t(1,u="path already used"):o&&P(o)&&t(1,u=""),L=void 0},500)}async function N(Re,G){return G=="flow"?await Hde.existsFlowByPath({workspace:n,path:Re}):G=="script"?await $de.existsScriptByPath({workspace:n,path:Re}):G=="resource"?await Zl.existsResource({workspace:n,path:Re}):G=="variable"?await Xu.existsVariable({workspace:n,path:Re}):G=="schedule"?await zde.existsSchedule({workspace:n,path:Re}):G=="app"?await FB.existsApp({workspace:n,path:Re}):!1}function P(Re){return Re.name==null||Re.name==""?(t(1,u="Choose a name"),!1):/^[\w-]+(\/[\w-]+)*$/.test(Re.name)?Re.owner==""&&Re.ownerKind=="folder"?(t(1,u="Folder need to be chosen"),!1):Re.owner==""&&Re.ownerKind=="group"?(t(1,u="Group need to be chosen"),!1):!0:(t(1,u="This name is not valid"),!1)}function $(){l==null||l==""?E():(t(4,o=iH(l)),b(),t(0,c=l))}let ne,z,K,ce;async function re(){await oh.createFolder({workspace:n??"",requestBody:{name:K}}),t(12,ce=K),o&&t(4,o.owner=K,o),I()}let B,Ae,we,ke;async function ue(){await Yl.createGroup({workspace:n??"",requestBody:{name:we}}),t(16,ke=we),o&&t(4,o.owner=we,o),x()}function De(){we=this.value,t(15,we)}const Ge=()=>{B.closeDrawer(),t(16,ke=void 0)};function lt(Re){ve[Re?"unshift":"push"](()=>{B=Re,t(13,B)})}function Et(Re){ve[Re?"unshift":"push"](()=>{Ae=Re,t(14,Ae)})}function xt(){K=this.value,t(11,K)}const at=()=>{ne.closeDrawer(),t(12,ce=void 0)};function Rt(Re){ve[Re?"unshift":"push"](()=>{ne=Re,t(9,ne)})}function bt(Re){ve[Re?"unshift":"push"](()=>{z=Re,t(10,z)})}function un(Re){i.$$.not_equal(o.ownerKind,Re)&&(o.ownerKind=Re,t(4,o))}const Lt=Re=>{var ge,pe;const G=Re.detail;o&&(G==="folder"?t(4,o.owner=((ge=r==null?void 0:r.folders)==null?void 0:ge[0])??"",o):G==="group"?t(4,o.owner="all",o):t(4,o.owner=((pe=r==null?void 0:r.username)==null?void 0:pe.split("@")[0])??"",o))};function Zt(){o.owner=this.value,t(4,o),t(8,_)}function ln(){o.owner=G0(this),t(4,o),t(8,_)}function rn(){o.owner=G0(this),t(4,o),t(8,_)}function Ct(Re){ve[Re?"unshift":"push"](()=>{g=Re,t(6,g)})}function gt(){o.name=this.value,t(4,o),t(8,_)}return i.$$set=Re=>{"namePlaceholder"in Re&&t(2,a=Re.namePlaceholder),"initialPath"in Re&&t(21,l=Re.initialPath),"path"in Re&&t(0,c=Re.path),"error"in Re&&t(1,u=Re.error),"disabled"in Re&&t(3,d=Re.disabled),"checkInitialPathExistence"in Re&&t(22,h=Re.checkInitialPathExistence),"kind"in Re&&t(23,f=Re.kind)},i.$$.update=()=>{i.$$.dirty[0]&16&&o&&b(),i.$$.dirty[0]&67108896&&n&&r&&(I(),x(),$())},[c,u,a,d,o,r,g,m,_,ne,z,K,ce,B,Ae,we,ke,s,w,re,ue,l,h,f,v,E,n,De,Ge,lt,Et,xt,at,Rt,bt,un,Lt,Zt,ln,rn,Ct,gt]}class yy extends Ue{constructor(e){super(),je(this,e,Pve,Mve,Ve,{namePlaceholder:2,initialPath:21,path:0,error:1,disabled:3,checkInitialPathExistence:22,kind:23,focus:24,reset:25},null,[-1,-1])}get focus(){return this.$$.ctx[24]}get reset(){return this.$$.ctx[25]}}function Fve(i,e){let t;return e.length===0?t=i:t=i.replace(/\{(\d+)\}/g,function(n,r){const s=r[0];return typeof e[s]<"u"?e[s]:n}),t}function C(i,e,...t){return Fve(e,t)}var _8;const Sy="en";let ky=!1,Ey=!1,xy=!1,YH=!1,b8=!1,v8=!1,Ly,Ty=Sy,Bve,_h;const Ki=typeof self=="object"?self:typeof global=="object"?global:{};let Us;typeof Ki.vscode<"u"&&typeof Ki.vscode.process<"u"?Us=Ki.vscode.process:typeof process<"u"&&(Us=process);const Vve=typeof((_8=Us==null?void 0:Us.versions)===null||_8===void 0?void 0:_8.electron)=="string"&&(Us==null?void 0:Us.type)==="renderer";if(typeof navigator=="object"&&!Vve)_h=navigator.userAgent,ky=_h.indexOf("Windows")>=0,Ey=_h.indexOf("Macintosh")>=0,v8=(_h.indexOf("Macintosh")>=0||_h.indexOf("iPad")>=0||_h.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,xy=_h.indexOf("Linux")>=0,b8=!0,Ly=navigator.language,Ty=Ly;else if(typeof Us=="object"){ky=Us.platform==="win32",Ey=Us.platform==="darwin",xy=Us.platform==="linux",xy&&Us.env.SNAP&&Us.env.SNAP_REVISION,Us.env.CI||Us.env.BUILD_ARTIFACTSTAGINGDIRECTORY,Ly=Sy,Ty=Sy;const i=Us.env.VSCODE_NLS_CONFIG;if(i)try{const e=JSON.parse(i),t=e.availableLanguages["*"];Ly=e.locale,Ty=t||Sy,Bve=e._translationsConfigFile}catch{}YH=!0}else console.error("Unable to resolve platform.");const Gr=ky,gn=Ey,ws=xy,ec=YH,bh=b8,Wve=b8&&typeof Ki.importScripts=="function",tc=v8,Wc=_h,Hve=Ty,ZH=(()=>{if(typeof Ki.postMessage=="function"&&!Ki.importScripts){let i=[];Ki.addEventListener("message",t=>{if(t.data&&t.data.vscodeScheduleAsyncWork)for(let n=0,r=i.length;n{const n=++e;i.push({id:n,callback:t}),Ki.postMessage({vscodeScheduleAsyncWork:n},"*")}}return i=>setTimeout(i)})(),Pa=Ey||v8?2:ky?1:3;let XH=!0,QH=!1;function JH(){if(!QH){QH=!0;const i=new Uint8Array(2);i[0]=1,i[1]=2,XH=new Uint16Array(i.buffer)[0]===(2<<8)+1}return XH}const ez=!!(Wc&&Wc.indexOf("Chrome")>=0),zve=!!(Wc&&Wc.indexOf("Firefox")>=0),$ve=!!(!ez&&Wc&&Wc.indexOf("Safari")>=0),Uve=!!(Wc&&Wc.indexOf("Edg/")>=0);Wc&&Wc.indexOf("Android")>=0;const tz="`~!@#$%^&*()-=+[{]}\\|;:'\",.<>/?";function jve(i=""){let e="(-?\\d*\\.\\d\\w*)|([^";for(const t of tz)i.indexOf(t)>=0||(e+="\\"+t);return e+="\\s]+)",new RegExp(e,"g")}const w8=jve();function nz(i){let e=w8;if(i&&i instanceof RegExp)if(i.global)e=i;else{let t="g";i.ignoreCase&&(t+="i"),i.multiline&&(t+="m"),i.unicode&&(t+="u"),e=new RegExp(i.source,t)}return e.lastIndex=0,e}const qve={maxLen:1e3,windowSize:15,timeBudget:150};function mb(i,e,t,n,r=qve){if(t.length>r.maxLen){let c=i-r.maxLen/2;return c<0?c=0:n+=c,t=t.substring(c,i+r.maxLen/2),mb(i,e,t,n,r)}const s=Date.now(),o=i-1-n;let a=-1,l=null;for(let c=1;!(Date.now()-s>=r.timeBudget);c++){const u=o-r.windowSize*c;e.lastIndex=Math.max(0,u);const d=Gve(e,t,o,a);if(!d&&l||(l=d,u<=0))break;a=u}if(l){const c={word:l[0],startColumn:n+1+l.index,endColumn:n+1+l.index+l[0].length};return e.lastIndex=0,c}return null}function Gve(i,e,t,n){let r;for(;r=i.exec(e);){const s=r.index||0;if(s<=t&&i.lastIndex>=t)return r;if(n>0&&s>n)return null}return null}function Fa(i,e=0){return i[i.length-(1+e)]}function Kve(i){if(i.length===0)throw new Error("Invalid tail call");return[i.slice(0,i.length-1),i[i.length-1]]}function ra(i,e,t=(n,r)=>n===r){if(i===e)return!0;if(!i||!e||i.length!==e.length)return!1;for(let n=0,r=i.length;n0)r=s-1;else return s}return-(n+1)}function iz(i,e){let t=0,n=i.length;if(n===0)return 0;for(;t=e.length)throw new TypeError("invalid index");let n=e[Math.floor(e.length*Math.random())],r=[],s=[],o=[];for(let a of e){const l=t(a,n);l<0?r.push(a):l>0?s.push(a):o.push(a)}return i!!e)}function sz(i){return!Array.isArray(i)||i.length===0}function Mo(i){return Array.isArray(i)&&i.length>0}function vh(i,e=t=>t){const t=new Set;return i.filter(n=>{const r=e(n);return t.has(r)?!1:(t.add(r),!0)})}function Yve(i,e){const t=Zve(i,e);if(t!==-1)return i[t]}function Zve(i,e){for(let t=i.length-1;t>=0;t--){const n=i[t];if(e(n))return t}return-1}function oz(i,e){return i.length>0?i[0]:e}function S8(i){return[].concat(...i)}function js(i,e){let t=typeof e=="number"?i:0;typeof e=="number"?t=i:(t=0,e=i);const n=[];if(t<=e)for(let r=t;re;r--)n.push(r);return n}function Iy(i,e,t){const n=i.slice(0,e),r=i.slice(e);return n.concat(t,r)}function k8(i,e){const t=i.indexOf(e);t>-1&&(i.splice(t,1),i.unshift(e))}function Dy(i,e){const t=i.indexOf(e);t>-1&&(i.splice(t,1),i.push(e))}function E8(i){return Array.isArray(i)?i:[i]}function Xve(i,e,t){const n=lz(i,e),r=i.length,s=t.length;i.length=r+s;for(let o=r-1;o>=n;o--)i[o+s]=i[o];for(let o=0;oe(i(t),i(n))}const Qve=(i,e)=>i-e;function cz(i,e){if(i.length===0)return;let t=i[0];for(let n=1;n0&&(t=r)}return t}function Jve(i,e){if(i.length===0)return;let t=i[0];for(let n=1;n=0&&(t=r)}return t}function ewe(i,e){return cz(i,(t,n)=>-e(t,n))}class s_{constructor(e){this.items=e,this.firstIdx=0,this.lastIdx=this.items.length-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(){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}}function uz(i){return Array.isArray(i)}function Ba(i){return typeof i=="string"}function uo(i){return typeof i=="object"&&i!==null&&!Array.isArray(i)&&!(i instanceof RegExp)&&!(i instanceof Date)}function xg(i){return typeof i=="number"&&!isNaN(i)}function dz(i){return!!i&&typeof i[Symbol.iterator]=="function"}function hz(i){return i===!0||i===!1}function Po(i){return typeof i>"u"}function twe(i){return!sa(i)}function sa(i){return Po(i)||i===null}function ci(i,e){if(!i)throw new Error(e?`Unexpected type, expected '${e}'`:"Unexpected type")}function Ay(i){if(sa(i))throw new Error("Assertion Failed: argument is undefined or null");return i}function Ry(i){return typeof i=="function"}function nwe(i,e){const t=Math.min(i.length,e.length);for(let n=0;nfunction(){const s=Array.prototype.slice.call(arguments,0);return e(r,s)};let n={};for(const r of i)n[r]=t(r);return n}function Fo(i){return i===null?void 0:i}function L8(i,e="Unreachable"){throw new Error(e)}function nd(i){if(!i||typeof i!="object"||i instanceof RegExp)return i;const e=Array.isArray(i)?[]:{};return Object.keys(i).forEach(t=>{i[t]&&typeof i[t]=="object"?e[t]=nd(i[t]):e[t]=i[t]}),e}function owe(i){if(!i||typeof i!="object")return i;const e=[i];for(;e.length>0;){const t=e.shift();Object.freeze(t);for(const n in t)if(fz.call(t,n)){const r=t[n];typeof r=="object"&&!Object.isFrozen(r)&&e.push(r)}}return i}const fz=Object.prototype.hasOwnProperty;function awe(i,e){return T8(i,e,new Set)}function T8(i,e,t){if(sa(i))return i;const n=e(i);if(typeof n<"u")return n;if(uz(i)){const r=[];for(const s of i)r.push(T8(s,e,t));return r}if(uo(i)){if(t.has(i))throw new Error("Cannot clone recursive data-structure");t.add(i);const r={};for(let s in i)fz.call(i,s)&&(r[s]=T8(i[s],e,t));return t.delete(i),r}return i}function Hc(i,e,t=!0){return uo(i)?(uo(e)&&Object.keys(e).forEach(n=>{n in i?t&&(uo(i[n])&&uo(e[n])?Hc(i[n],e[n],t):i[n]=e[n]):i[n]=e[n]}),i):e}function Va(i,e){if(i===e)return!0;if(i==null||e===null||e===void 0||typeof i!=typeof e||typeof i!="object"||Array.isArray(i)!==Array.isArray(e))return!1;let t,n;if(Array.isArray(i)){if(i.length!==e.length)return!1;for(t=0;t"u"?t:n}const Os={tabSize:4,indentSize:4,insertSpaces:!0,detectIndentation:!0,trimAutoWhitespace:!0,largeFileOptimizations:!0,bracketPairColorizationOptions:{enabled:!1}},wh=8;class gz{constructor(e){this._values=e}hasChanged(e){return this._values[e]}}class pz{constructor(){this.stableMinimapLayoutInput=null,this.stableFitMaxMinimapScale=0,this.stableFitRemainingWidth=0}}class Lr{constructor(e,t,n,r){this.id=e,this.name=t,this.defaultValue=n,this.schema=r}applyUpdate(e,t){return Oy(e,t)}compute(e,t,n){return n}}class _b{constructor(e,t){this.newValue=e,this.didChange=t}}function Oy(i,e){if(typeof i!="object"||typeof e!="object"||!i||!e)return new _b(e,i!==e);if(Array.isArray(i)||Array.isArray(e)){const n=Array.isArray(i)&&Array.isArray(e)&&ra(i,e);return new _b(e,n)}let t=!1;for(const n in e)if(e.hasOwnProperty(n)){const r=Oy(i[n],e[n]);r.didChange&&(i[n]=r.newValue,t=!0)}return new _b(i,t)}class o_{constructor(e){this.schema=void 0,this.id=e,this.name="_never_",this.defaultValue=void 0}applyUpdate(e,t){return Oy(e,t)}validate(e){return this.defaultValue}}class Lg{constructor(e,t,n,r){this.id=e,this.name=t,this.defaultValue=n,this.schema=r}applyUpdate(e,t){return Oy(e,t)}validate(e){return typeof e>"u"?this.defaultValue:e}compute(e,t,n){return n}}function Mt(i,e){return typeof i>"u"?e:i==="false"?!1:Boolean(i)}class xn extends Lg{constructor(e,t,n,r=void 0){typeof r<"u"&&(r.type="boolean",r.default=n),super(e,t,n,r)}validate(e){return Mt(e,this.defaultValue)}}function I8(i,e,t,n){if(typeof i>"u")return e;let r=parseInt(i,10);return isNaN(r)?e:(r=Math.max(t,r),r=Math.min(n,r),r|0)}class Si extends Lg{constructor(e,t,n,r,s,o=void 0){typeof o<"u"&&(o.type="integer",o.default=n,o.minimum=r,o.maximum=s),super(e,t,n,o),this.minimum=r,this.maximum=s}static clampedInt(e,t,n,r){return I8(e,t,n,r)}validate(e){return Si.clampedInt(e,this.defaultValue,this.minimum,this.maximum)}}class $c extends Lg{constructor(e,t,n,r,s){typeof s<"u"&&(s.type="number",s.default=n),super(e,t,n,s),this.validationFn=r}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}validate(e){return this.validationFn($c.float(e,this.defaultValue))}}class Bo extends Lg{static string(e,t){return typeof e!="string"?t:e}constructor(e,t,n,r=void 0){typeof r<"u"&&(r.type="string",r.default=n),super(e,t,n,r)}validate(e){return Bo.string(e,this.defaultValue)}}function ho(i,e,t){return typeof i!="string"||t.indexOf(i)===-1?e:i}class Sr extends Lg{constructor(e,t,n,r,s=void 0){typeof s<"u"&&(s.type="string",s.enum=r,s.default=n),super(e,t,n,s),this._allowedValues=r}validate(e){return ho(e,this.defaultValue,this._allowedValues)}}class bb extends Lr{constructor(e,t,n,r,s,o,a=void 0){typeof a<"u"&&(a.type="string",a.enum=s,a.default=r),super(e,t,n,a),this._allowedValues=s,this._convert=o}validate(e){return typeof e!="string"?this.defaultValue:this._allowedValues.indexOf(e)===-1?this.defaultValue:this._convert(e)}}function lwe(i){switch(i){case"none":return 0;case"keep":return 1;case"brackets":return 2;case"advanced":return 3;case"full":return 4}}class cwe extends Lr{constructor(){super(2,"accessibilitySupport",0,{type:"string",enum:["auto","on","off"],enumDescriptions:[C("accessibilitySupport.auto","The editor will use platform APIs to detect when a Screen Reader is attached."),C("accessibilitySupport.on","The editor will be permanently optimized for usage with a Screen Reader. Word wrapping will be disabled."),C("accessibilitySupport.off","The editor will never be optimized for usage with a Screen Reader.")],default:"auto",description:C("accessibilitySupport","Controls whether the editor should run in a mode where it is optimized for screen readers. Setting to on will disable word wrapping.")})}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 uwe extends Lr{constructor(){const e={insertSpace:!0,ignoreEmptyLines:!0};super(19,"comments",e,{"editor.comments.insertSpace":{type:"boolean",default:e.insertSpace,description:C("comments.insertSpace","Controls whether a space character is inserted when commenting.")},"editor.comments.ignoreEmptyLines":{type:"boolean",default:e.ignoreEmptyLines,description:C("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:Mt(t.insertSpace,this.defaultValue.insertSpace),ignoreEmptyLines:Mt(t.ignoreEmptyLines,this.defaultValue.ignoreEmptyLines)}}}function dwe(i){switch(i){case"blink":return 1;case"smooth":return 2;case"phase":return 3;case"expand":return 4;case"solid":return 5}}var Kr;(function(i){i[i.Line=1]="Line",i[i.Block=2]="Block",i[i.Underline=3]="Underline",i[i.LineThin=4]="LineThin",i[i.BlockOutline=5]="BlockOutline",i[i.UnderlineThin=6]="UnderlineThin"})(Kr||(Kr={}));function hwe(i){switch(i){case"line":return Kr.Line;case"block":return Kr.Block;case"underline":return Kr.Underline;case"line-thin":return Kr.LineThin;case"block-outline":return Kr.BlockOutline;case"underline-thin":return Kr.UnderlineThin}}class fwe extends o_{constructor(){super(128)}compute(e,t,n){const r=["monaco-editor"];return t.get(33)&&r.push(t.get(33)),e.extraEditorClassName&&r.push(e.extraEditorClassName),t.get(66)==="default"?r.push("mouse-default"):t.get(66)==="copy"&&r.push("mouse-copy"),t.get(100)&&r.push("showUnused"),t.get(126)&&r.push("showDeprecated"),r.join(" ")}}class gwe extends xn{constructor(){super(32,"emptySelectionClipboard",!0,{description:C("emptySelectionClipboard","Controls whether copying without a selection copies the current line.")})}compute(e,t,n){return n&&e.emptySelectionClipboard}}class pwe extends Lr{constructor(){const e={cursorMoveOnType:!0,seedSearchStringFromSelection:"always",autoFindInSelection:"never",globalFindClipboard:!1,addExtraSpaceOnTop:!0,loop:!0};super(35,"find",e,{"editor.find.cursorMoveOnType":{type:"boolean",default:e.cursorMoveOnType,description:C("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:[C("editor.find.seedSearchStringFromSelection.never","Never seed search string from the editor selection."),C("editor.find.seedSearchStringFromSelection.always","Always seed search string from the editor selection, including word at cursor position."),C("editor.find.seedSearchStringFromSelection.selection","Only seed search string from the editor selection.")],description:C("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:[C("editor.find.autoFindInSelection.never","Never turn on Find in Selection automatically (default)."),C("editor.find.autoFindInSelection.always","Always turn on Find in Selection automatically."),C("editor.find.autoFindInSelection.multiline","Turn on Find in Selection automatically when multiple lines of content are selected.")],description:C("find.autoFindInSelection","Controls the condition for turning on Find in Selection automatically.")},"editor.find.globalFindClipboard":{type:"boolean",default:e.globalFindClipboard,description:C("find.globalFindClipboard","Controls whether the Find Widget should read or modify the shared find clipboard on macOS."),included:gn},"editor.find.addExtraSpaceOnTop":{type:"boolean",default:e.addExtraSpaceOnTop,description:C("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:C("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:Mt(t.cursorMoveOnType,this.defaultValue.cursorMoveOnType),seedSearchStringFromSelection:typeof e.seedSearchStringFromSelection=="boolean"?e.seedSearchStringFromSelection?"always":"never":ho(t.seedSearchStringFromSelection,this.defaultValue.seedSearchStringFromSelection,["never","always","selection"]),autoFindInSelection:typeof e.autoFindInSelection=="boolean"?e.autoFindInSelection?"always":"never":ho(t.autoFindInSelection,this.defaultValue.autoFindInSelection,["never","always","multiline"]),globalFindClipboard:Mt(t.globalFindClipboard,this.defaultValue.globalFindClipboard),addExtraSpaceOnTop:Mt(t.addExtraSpaceOnTop,this.defaultValue.addExtraSpaceOnTop),loop:Mt(t.loop,this.defaultValue.loop)}}}class oa extends Lr{constructor(){super(45,"fontLigatures",oa.OFF,{anyOf:[{type:"boolean",description:C("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:C("fontFeatureSettings","Explicit 'font-feature-settings' CSS property. A boolean can be passed instead if one only needs to turn on/off ligatures.")}],description:C("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"?oa.OFF:e==="true"?oa.ON:e:Boolean(e)?oa.ON:oa.OFF}}oa.OFF='"liga" off, "calt" off',oa.ON='"liga" on, "calt" on';class mwe extends o_{constructor(){super(44)}compute(e,t,n){return e.fontInfo}}class _we extends Lg{constructor(){super(46,"fontSize",Ms.fontSize,{type:"number",minimum:6,maximum:100,default:Ms.fontSize,description:C("fontSize","Controls the font size in pixels.")})}validate(e){const t=$c.float(e,this.defaultValue);return t===0?Ms.fontSize:$c.clamp(t,6,100)}compute(e,t,n){return e.fontInfo.fontSize}}class Uc extends Lr{constructor(){super(47,"fontWeight",Ms.fontWeight,{anyOf:[{type:"number",minimum:Uc.MINIMUM_VALUE,maximum:Uc.MAXIMUM_VALUE,errorMessage:C("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:Uc.SUGGESTION_VALUES}],default:Ms.fontWeight,description:C("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(Si.clampedInt(e,Ms.fontWeight,Uc.MINIMUM_VALUE,Uc.MAXIMUM_VALUE))}}Uc.SUGGESTION_VALUES=["normal","bold","100","200","300","400","500","600","700","800","900"],Uc.MINIMUM_VALUE=1,Uc.MAXIMUM_VALUE=1e3;class bwe extends Lr{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:[C("editor.gotoLocation.multiple.peek","Show peek view of the results (default)"),C("editor.gotoLocation.multiple.gotoAndPeek","Go to the primary result and show a peek view"),C("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(51,"gotoLocation",e,{"editor.gotoLocation.multiple":{deprecationMessage:C("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:C("editor.editor.gotoLocation.multipleDefinitions","Controls the behavior the 'Go to Definition'-command when multiple target locations exist.")},t),"editor.gotoLocation.multipleTypeDefinitions":Object.assign({description:C("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:C("editor.editor.gotoLocation.multipleDeclarations","Controls the behavior the 'Go to Declaration'-command when multiple target locations exist.")},t),"editor.gotoLocation.multipleImplementations":Object.assign({description:C("editor.editor.gotoLocation.multipleImplemenattions","Controls the behavior the 'Go to Implementations'-command when multiple target locations exist.")},t),"editor.gotoLocation.multipleReferences":Object.assign({description:C("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:C("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:C("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:C("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:C("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:C("alternativeReferenceCommand","Alternative command id that is being executed when the result of 'Go to Reference' is the current location.")}})}validate(e){var t,n,r,s,o;if(!e||typeof e!="object")return this.defaultValue;const a=e;return{multiple:ho(a.multiple,this.defaultValue.multiple,["peek","gotoAndPeek","goto"]),multipleDefinitions:(t=a.multipleDefinitions)!==null&&t!==void 0?t:ho(a.multipleDefinitions,"peek",["peek","gotoAndPeek","goto"]),multipleTypeDefinitions:(n=a.multipleTypeDefinitions)!==null&&n!==void 0?n:ho(a.multipleTypeDefinitions,"peek",["peek","gotoAndPeek","goto"]),multipleDeclarations:(r=a.multipleDeclarations)!==null&&r!==void 0?r:ho(a.multipleDeclarations,"peek",["peek","gotoAndPeek","goto"]),multipleImplementations:(s=a.multipleImplementations)!==null&&s!==void 0?s:ho(a.multipleImplementations,"peek",["peek","gotoAndPeek","goto"]),multipleReferences:(o=a.multipleReferences)!==null&&o!==void 0?o:ho(a.multipleReferences,"peek",["peek","gotoAndPeek","goto"]),alternativeDefinitionCommand:Bo.string(a.alternativeDefinitionCommand,this.defaultValue.alternativeDefinitionCommand),alternativeTypeDefinitionCommand:Bo.string(a.alternativeTypeDefinitionCommand,this.defaultValue.alternativeTypeDefinitionCommand),alternativeDeclarationCommand:Bo.string(a.alternativeDeclarationCommand,this.defaultValue.alternativeDeclarationCommand),alternativeImplementationCommand:Bo.string(a.alternativeImplementationCommand,this.defaultValue.alternativeImplementationCommand),alternativeReferenceCommand:Bo.string(a.alternativeReferenceCommand,this.defaultValue.alternativeReferenceCommand)}}}class vwe extends Lr{constructor(){const e={enabled:!0,delay:300,sticky:!0,above:!0};super(53,"hover",e,{"editor.hover.enabled":{type:"boolean",default:e.enabled,description:C("hover.enabled","Controls whether the hover is shown.")},"editor.hover.delay":{type:"number",default:e.delay,minimum:0,maximum:1e4,description:C("hover.delay","Controls the delay in milliseconds after which the hover is shown.")},"editor.hover.sticky":{type:"boolean",default:e.sticky,description:C("hover.sticky","Controls whether the hover should remain visible when mouse is moved over it.")},"editor.hover.above":{type:"boolean",default:e.above,description:C("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:Mt(t.enabled,this.defaultValue.enabled),delay:Si.clampedInt(t.delay,this.defaultValue.delay,0,1e4),sticky:Mt(t.sticky,this.defaultValue.sticky),above:Mt(t.above,this.defaultValue.above)}}}class a_ extends o_{constructor(){super(131)}compute(e,t,n){return a_.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})}static computeContainedMinimapLineCount(e){const t=e.height/e.lineHeight,n=e.scrollBeyondLastLine?t-1:0,r=(e.viewLineCount+n)/(e.pixelRatio*e.height),s=Math.floor(e.viewLineCount/r);return{typicalViewportLineCount:t,extraLinesBeyondLastLine:n,desiredRatio:r,minimapLineCount:s}}static _computeMinimapLayout(e,t){const n=e.outerWidth,r=e.outerHeight,s=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(s*r),minimapCanvasOuterWidth:0,minimapCanvasOuterHeight:r};const o=t.stableMinimapLayoutInput,a=o&&e.outerHeight===o.outerHeight&&e.lineHeight===o.lineHeight&&e.typicalHalfwidthCharacterWidth===o.typicalHalfwidthCharacterWidth&&e.pixelRatio===o.pixelRatio&&e.scrollBeyondLastLine===o.scrollBeyondLastLine&&e.minimap.enabled===o.minimap.enabled&&e.minimap.side===o.minimap.side&&e.minimap.size===o.minimap.size&&e.minimap.showSlider===o.minimap.showSlider&&e.minimap.renderCharacters===o.minimap.renderCharacters&&e.minimap.maxColumn===o.minimap.maxColumn&&e.minimap.scale===o.minimap.scale&&e.verticalScrollbarWidth===o.verticalScrollbarWidth&&e.isViewportWrapping===o.isViewportWrapping,l=e.lineHeight,c=e.typicalHalfwidthCharacterWidth,u=e.scrollBeyondLastLine,d=e.minimap.renderCharacters;let h=s>=2?Math.round(e.minimap.scale*2):e.minimap.scale;const f=e.minimap.maxColumn,g=e.minimap.size,p=e.minimap.side,m=e.verticalScrollbarWidth,_=e.viewLineCount,b=e.remainingWidth,v=e.isViewportWrapping,w=d?2:3;let E=Math.floor(s*r);const I=E/s;let x=!1,T=!1,L=w*h,O=h/s,N=1;if(g==="fill"||g==="fit"){const{typicalViewportLineCount:re,extraLinesBeyondLastLine:B,desiredRatio:Ae,minimapLineCount:we}=a_.computeContainedMinimapLineCount({viewLineCount:_,scrollBeyondLastLine:u,height:r,lineHeight:l,pixelRatio:s});if(_/we>1)x=!0,T=!0,h=1,L=1,O=h/s;else{let ue=!1,De=h+1;if(g==="fit"){const Ge=Math.ceil((_+B)*L);v&&a&&b<=t.stableFitRemainingWidth?(ue=!0,De=t.stableFitMaxMinimapScale):ue=Ge>E}if(g==="fill"||ue){x=!0;const Ge=h;L=Math.min(l*s,Math.max(1,Math.floor(1/Ae))),v&&a&&b<=t.stableFitRemainingWidth&&(De=t.stableFitMaxMinimapScale),h=Math.min(De,Math.max(1,Math.floor(L/w))),h>Ge&&(N=Math.min(2,h/Ge)),O=h/s/N,E=Math.ceil(Math.max(re,_+B)*L),v?(t.stableMinimapLayoutInput=e,t.stableFitRemainingWidth=b,t.stableFitMaxMinimapScale=h):(t.stableMinimapLayoutInput=null,t.stableFitRemainingWidth=0)}}}const P=Math.floor(f*O),$=Math.min(P,Math.max(0,Math.floor((b-m-2)*O/(c+O)))+wh);let ne=Math.floor(s*$);const z=ne/s;ne=Math.floor(ne*N);const K=d?1:2,ce=p==="left"?0:n-$-m;return{renderMinimap:K,minimapLeft:ce,minimapWidth:$,minimapHeightIsEditorHeight:x,minimapIsSampling:T,minimapScale:h,minimapLineHeight:L,minimapCanvasInnerWidth:ne,minimapCanvasInnerHeight:E,minimapCanvasOuterWidth:z,minimapCanvasOuterHeight:I}}static computeLayout(e,t){const n=t.outerWidth|0,r=t.outerHeight|0,s=t.lineHeight|0,o=t.lineNumbersDigitCount|0,a=t.typicalHalfwidthCharacterWidth,l=t.maxDigitWidth,c=t.pixelRatio,u=t.viewLineCount,d=e.get(123),h=d==="inherit"?e.get(122):d,f=h==="inherit"?e.get(118):h,g=e.get(121),p=e.get(2),m=t.isDominatedByLongLines,_=e.get(50),b=e.get(60).renderType!==0,v=e.get(61),w=e.get(94),E=e.get(65),I=e.get(92),x=I.verticalScrollbarSize,T=I.verticalHasArrows,L=I.arrowSize,O=I.horizontalScrollbarSize,N=e.get(58),P=e.get(37);let $;if(typeof N=="string"&&/^\d+(\.\d+)?ch$/.test(N)){const xt=parseFloat(N.substr(0,N.length-2));$=Si.clampedInt(xt*a,0,0,1e3)}else $=Si.clampedInt(N,0,0,1e3);P&&($+=16);let ne=0;if(b){const xt=Math.max(o,v);ne=Math.round(xt*l)}let z=0;_&&(z=s);let K=0,ce=K+z,re=ce+ne,B=re+$;const Ae=n-z-ne-$;let we=!1,ke=!1,ue=-1;p!==2&&(h==="inherit"&&m?(we=!0,ke=!0):f==="on"||f==="bounded"?ke=!0:f==="wordWrapColumn"&&(ue=g));const De=a_._computeMinimapLayout({outerWidth:n,outerHeight:r,lineHeight:s,typicalHalfwidthCharacterWidth:a,pixelRatio:c,scrollBeyondLastLine:w,minimap:E,verticalScrollbarWidth:x,viewLineCount:u,remainingWidth:Ae,isViewportWrapping:ke},t.memory||new pz);De.renderMinimap!==0&&De.minimapLeft===0&&(K+=De.minimapWidth,ce+=De.minimapWidth,re+=De.minimapWidth,B+=De.minimapWidth);const Ge=Ae-De.minimapWidth,lt=Math.max(1,Math.floor((Ge-x-2)/a)),Et=T?L:0;return ke&&(ue=Math.max(1,lt),f==="bounded"&&(ue=Math.min(ue,g))),{width:n,height:r,glyphMarginLeft:K,glyphMarginWidth:z,lineNumbersLeft:ce,lineNumbersWidth:ne,decorationsLeft:re,decorationsWidth:$,contentLeft:B,contentWidth:Ge,minimap:De,viewportColumn:lt,isWordWrapMinified:we,isViewportWrapping:ke,wrappingColumn:ue,verticalScrollbarWidth:x,horizontalScrollbarHeight:O,overviewRuler:{top:Et,width:x,height:r-2*Et,right:0}}}}class wwe extends Lr{constructor(){const e={enabled:!0};super(57,"lightbulb",e,{"editor.lightbulb.enabled":{type:"boolean",default:e.enabled,description:C("codeActions","Enables the code action lightbulb in the editor.")}})}validate(e){return!e||typeof e!="object"?this.defaultValue:{enabled:Mt(e.enabled,this.defaultValue.enabled)}}}class Cwe extends Lr{constructor(){const e={enabled:!0,fontSize:0,fontFamily:""};super(127,"inlayHints",e,{"editor.inlayHints.enabled":{type:"boolean",default:e.enabled,description:C("inlayHints.enable","Enables the inlay hints in the editor.")},"editor.inlayHints.fontSize":{type:"number",default:e.fontSize,markdownDescription:C("inlayHints.fontSize","Controls font size of inlay hints in the editor. A default of 90% of `#editor.fontSize#` is used when the configured value is less than `5` or greater than the editor font size.")},"editor.inlayHints.fontFamily":{type:"string",default:e.fontFamily,markdownDescription:C("inlayHints.fontFamily","Controls font family of inlay hints in the editor. When set to empty, the `#editor.fontFamily#` is used.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e;return{enabled:Mt(t.enabled,this.defaultValue.enabled),fontSize:Si.clampedInt(t.fontSize,this.defaultValue.fontSize,0,100),fontFamily:Bo.string(t.fontFamily,this.defaultValue.fontFamily)}}}class ywe extends $c{constructor(){super(59,"lineHeight",Ms.lineHeight,e=>$c.clamp(e,0,150),{markdownDescription:C("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 Swe extends Lr{constructor(){const e={enabled:!0,size:"proportional",side:"right",showSlider:"mouseover",renderCharacters:!0,maxColumn:120,scale:1};super(65,"minimap",e,{"editor.minimap.enabled":{type:"boolean",default:e.enabled,description:C("minimap.enabled","Controls whether the minimap is shown.")},"editor.minimap.size":{type:"string",enum:["proportional","fill","fit"],enumDescriptions:[C("minimap.size.proportional","The minimap has the same size as the editor contents (and might scroll)."),C("minimap.size.fill","The minimap will stretch or shrink as necessary to fill the height of the editor (no scrolling)."),C("minimap.size.fit","The minimap will shrink as necessary to never be larger than the editor (no scrolling).")],default:e.size,description:C("minimap.size","Controls the size of the minimap.")},"editor.minimap.side":{type:"string",enum:["left","right"],default:e.side,description:C("minimap.side","Controls the side where to render the minimap.")},"editor.minimap.showSlider":{type:"string",enum:["always","mouseover"],default:e.showSlider,description:C("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:C("minimap.scale","Scale of content drawn in the minimap: 1, 2 or 3.")},"editor.minimap.renderCharacters":{type:"boolean",default:e.renderCharacters,description:C("minimap.renderCharacters","Render the actual characters on a line as opposed to color blocks.")},"editor.minimap.maxColumn":{type:"number",default:e.maxColumn,description:C("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:Mt(t.enabled,this.defaultValue.enabled),size:ho(t.size,this.defaultValue.size,["proportional","fill","fit"]),side:ho(t.side,this.defaultValue.side,["right","left"]),showSlider:ho(t.showSlider,this.defaultValue.showSlider,["always","mouseover"]),renderCharacters:Mt(t.renderCharacters,this.defaultValue.renderCharacters),scale:Si.clampedInt(t.scale,1,1,3),maxColumn:Si.clampedInt(t.maxColumn,this.defaultValue.maxColumn,1,1e4)}}}function kwe(i){return i==="ctrlCmd"?gn?"metaKey":"ctrlKey":"altKey"}class Ewe extends Lr{constructor(){super(75,"padding",{top:0,bottom:0},{"editor.padding.top":{type:"number",default:0,minimum:0,maximum:1e3,description:C("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:C("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:Si.clampedInt(t.top,0,0,1e3),bottom:Si.clampedInt(t.bottom,0,0,1e3)}}}class xwe extends Lr{constructor(){const e={enabled:!0,cycle:!1};super(76,"parameterHints",e,{"editor.parameterHints.enabled":{type:"boolean",default:e.enabled,description:C("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:C("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:Mt(t.enabled,this.defaultValue.enabled),cycle:Mt(t.cycle,this.defaultValue.cycle)}}}class Lwe extends o_{constructor(){super(129)}compute(e,t,n){return e.pixelRatio}}class Twe extends Lr{constructor(){const e={other:!0,comments:!1,strings:!1};super(79,"quickSuggestions",e,{anyOf:[{type:"boolean"},{type:"object",properties:{strings:{type:"boolean",default:e.strings,description:C("quickSuggestions.strings","Enable quick suggestions inside strings.")},comments:{type:"boolean",default:e.comments,description:C("quickSuggestions.comments","Enable quick suggestions inside comments.")},other:{type:"boolean",default:e.other,description:C("quickSuggestions.other","Enable quick suggestions outside of strings and comments.")}}}],default:e,description:C("quickSuggestions","Controls whether suggestions should automatically show up while typing.")}),this.defaultValue=e}validate(e){if(typeof e=="boolean")return e;if(e&&typeof e=="object"){const t=e,n={other:Mt(t.other,this.defaultValue.other),comments:Mt(t.comments,this.defaultValue.comments),strings:Mt(t.strings,this.defaultValue.strings)};return n.other&&n.comments&&n.strings?!0:!n.other&&!n.comments&&!n.strings?!1:n}return this.defaultValue}}class Iwe extends Lr{constructor(){super(60,"lineNumbers",{renderType:1,renderFn:null},{type:"string",enum:["off","on","relative","interval"],enumDescriptions:[C("lineNumbers.off","Line numbers are not rendered."),C("lineNumbers.on","Line numbers are rendered as absolute number."),C("lineNumbers.relative","Line numbers are rendered as distance in lines to cursor position."),C("lineNumbers.interval","Line numbers are rendered every 10 lines.")],default:"on",description:C("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 My(i){const e=i.get(87);return e==="editable"?i.get(81):e!=="on"}class Dwe extends Lr{constructor(){const e=[],t={type:"number",description:C("rulers.size","Number of monospace characters at which this editor ruler will render.")};super(91,"rulers",e,{type:"array",items:{anyOf:[t,{type:["object"],properties:{column:t,color:{type:"string",description:C("rulers.color","Color of this editor ruler."),format:"color-hex"}}}]},default:e,description:C("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(let n of e)if(typeof n=="number")t.push({column:Si.clampedInt(n,0,0,1e4),color:null});else if(n&&typeof n=="object"){const r=n;t.push({column:Si.clampedInt(r.column,0,0,1e4),color:r.color})}return t.sort((n,r)=>n.column-r.column),t}return this.defaultValue}}function mz(i,e){if(typeof i!="string")return e;switch(i){case"hidden":return 2;case"visible":return 3;default:return 1}}let Nwe=class extends Lr{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(92,"scrollbar",e,{"editor.scrollbar.vertical":{type:"string",enum:["auto","visible","hidden"],enumDescriptions:[C("scrollbar.vertical.auto","The vertical scrollbar will be visible only when necessary."),C("scrollbar.vertical.visible","The vertical scrollbar will always be visible."),C("scrollbar.vertical.fit","The vertical scrollbar will always be hidden.")],default:"auto",description:C("scrollbar.vertical","Controls the visibility of the vertical scrollbar.")},"editor.scrollbar.horizontal":{type:"string",enum:["auto","visible","hidden"],enumDescriptions:[C("scrollbar.horizontal.auto","The horizontal scrollbar will be visible only when necessary."),C("scrollbar.horizontal.visible","The horizontal scrollbar will always be visible."),C("scrollbar.horizontal.fit","The horizontal scrollbar will always be hidden.")],default:"auto",description:C("scrollbar.horizontal","Controls the visibility of the horizontal scrollbar.")},"editor.scrollbar.verticalScrollbarSize":{type:"number",default:e.verticalScrollbarSize,description:C("scrollbar.verticalScrollbarSize","The width of the vertical scrollbar.")},"editor.scrollbar.horizontalScrollbarSize":{type:"number",default:e.horizontalScrollbarSize,description:C("scrollbar.horizontalScrollbarSize","The height of the horizontal scrollbar.")},"editor.scrollbar.scrollByPage":{type:"boolean",default:e.scrollByPage,description:C("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=Si.clampedInt(t.horizontalScrollbarSize,this.defaultValue.horizontalScrollbarSize,0,1e3),r=Si.clampedInt(t.verticalScrollbarSize,this.defaultValue.verticalScrollbarSize,0,1e3);return{arrowSize:Si.clampedInt(t.arrowSize,this.defaultValue.arrowSize,0,1e3),vertical:mz(t.vertical,this.defaultValue.vertical),horizontal:mz(t.horizontal,this.defaultValue.horizontal),useShadows:Mt(t.useShadows,this.defaultValue.useShadows),verticalHasArrows:Mt(t.verticalHasArrows,this.defaultValue.verticalHasArrows),horizontalHasArrows:Mt(t.horizontalHasArrows,this.defaultValue.horizontalHasArrows),handleMouseWheel:Mt(t.handleMouseWheel,this.defaultValue.handleMouseWheel),alwaysConsumeMouseWheel:Mt(t.alwaysConsumeMouseWheel,this.defaultValue.alwaysConsumeMouseWheel),horizontalScrollbarSize:n,horizontalSliderSize:Si.clampedInt(t.horizontalSliderSize,n,0,1e3),verticalScrollbarSize:r,verticalSliderSize:Si.clampedInt(t.verticalSliderSize,r,0,1e3),scrollByPage:Mt(t.scrollByPage,this.defaultValue.scrollByPage)}}};const aa="inUntrustedWorkspace",fo={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 Awe extends Lr{constructor(){const e={nonBasicASCII:aa,invisibleCharacters:!0,ambiguousCharacters:!0,includeComments:aa,includeStrings:!0,allowedCharacters:{},allowedLocales:{_os:!0,_vscode:!0}};super(113,"unicodeHighlight",e,{[fo.nonBasicASCII]:{restricted:!0,type:["boolean","string"],enum:[!0,!1,aa],default:e.nonBasicASCII,description:C("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.")},[fo.invisibleCharacters]:{restricted:!0,type:"boolean",default:e.invisibleCharacters,description:C("unicodeHighlight.invisibleCharacters","Controls whether characters that just reserve space or have no width at all are highlighted.")},[fo.ambiguousCharacters]:{restricted:!0,type:"boolean",default:e.ambiguousCharacters,description:C("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.")},[fo.includeComments]:{restricted:!0,type:["boolean","string"],enum:[!0,!1,aa],default:e.includeComments,description:C("unicodeHighlight.includeComments","Controls whether characters in comments should also be subject to unicode highlighting.")},[fo.includeStrings]:{restricted:!0,type:["boolean","string"],enum:[!0,!1,aa],default:e.includeStrings,description:C("unicodeHighlight.includeStrings","Controls whether characters in strings should also be subject to unicode highlighting.")},[fo.allowedCharacters]:{restricted:!0,type:"object",default:e.allowedCharacters,description:C("unicodeHighlight.allowedCharacters","Defines allowed characters that are not being highlighted."),additionalProperties:{type:"boolean"}},[fo.allowedLocales]:{restricted:!0,type:"object",additionalProperties:{type:"boolean"},default:e.allowedLocales,description:C("unicodeHighlight.allowedLocales","Unicode characters that are common in allowed locales are not being highlighted.")}})}applyUpdate(e,t){let n=!1;t.allowedCharacters&&(Va(e.allowedCharacters,t.allowedCharacters)||(e=Object.assign(Object.assign({},e),{allowedCharacters:t.allowedCharacters}),n=!0)),t.allowedLocales&&(Va(e.allowedLocales,t.allowedLocales)||(e=Object.assign(Object.assign({},e),{allowedLocales:t.allowedLocales}),n=!0));const r=super.applyUpdate(e,t);return n?new _b(r.newValue,!0):r}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e;return{nonBasicASCII:vb(t.nonBasicASCII,aa,[!0,!1,aa]),invisibleCharacters:Mt(t.invisibleCharacters,this.defaultValue.invisibleCharacters),ambiguousCharacters:Mt(t.ambiguousCharacters,this.defaultValue.ambiguousCharacters),includeComments:vb(t.includeComments,aa,[!0,!1,aa]),includeStrings:vb(t.includeStrings,aa,[!0,!1,aa]),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[r,s]of Object.entries(e))s===!0&&(n[r]=!0);return n}}class Rwe extends Lr{constructor(){const e={enabled:!0,mode:"subwordSmart"};super(55,"inlineSuggest",e,{"editor.inlineSuggest.enabled":{type:"boolean",default:e.enabled,description:C("inlineSuggest.enabled","Controls whether to automatically show inline suggestions in the editor.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e;return{enabled:Mt(t.enabled,this.defaultValue.enabled),mode:ho(t.mode,this.defaultValue.mode,["prefix","subword","subwordSmart"])}}}class Owe extends Lr{constructor(){const e={enabled:Os.bracketPairColorizationOptions.enabled};super(12,"bracketPairColorization",e,{"editor.bracketPairColorization.enabled":{type:"boolean",default:e.enabled,description:C("bracketPairColorization.enabled","Controls whether bracket pair colorization is enabled or not. Use 'workbench.colorCustomizations' to override the bracket highlight colors.")}})}validate(e){return!e||typeof e!="object"?this.defaultValue:{enabled:Mt(e.enabled,this.defaultValue.enabled)}}}class Mwe extends Lr{constructor(){const e={bracketPairs:!1,bracketPairsHorizontal:"active",highlightActiveBracketPair:!0,indentation:!0,highlightActiveIndentation:!0};super(13,"guides",e,{"editor.guides.bracketPairs":{type:["boolean","string"],enum:[!0,"active",!1],enumDescriptions:[C("editor.guides.bracketPairs.true","Enables bracket pair guides."),C("editor.guides.bracketPairs.active","Enables bracket pair guides only for the active bracket pair."),C("editor.guides.bracketPairs.false","Disables bracket pair guides.")],default:e.bracketPairs,description:C("editor.guides.bracketPairs","Controls whether bracket pair guides are enabled or not.")},"editor.guides.bracketPairsHorizontal":{type:["boolean","string"],enum:[!0,"active",!1],enumDescriptions:[C("editor.guides.bracketPairsHorizontal.true","Enables horizontal guides as addition to vertical bracket pair guides."),C("editor.guides.bracketPairsHorizontal.active","Enables horizontal guides only for the active bracket pair."),C("editor.guides.bracketPairsHorizontal.false","Disables horizontal bracket pair guides.")],default:e.bracketPairsHorizontal,description:C("editor.guides.bracketPairsHorizontal","Controls whether horizontal bracket pair guides are enabled or not.")},"editor.guides.highlightActiveBracketPair":{type:"boolean",default:e.highlightActiveBracketPair,description:C("editor.guides.highlightActiveBracketPair","Controls whether the editor should highlight the active bracket pair.")},"editor.guides.indentation":{type:"boolean",default:e.indentation,description:C("editor.guides.indentation","Controls whether the editor should render indent guides.")},"editor.guides.highlightActiveIndentation":{type:"boolean",default:e.highlightActiveIndentation,description:C("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:vb(t.bracketPairs,this.defaultValue.bracketPairs,[!0,!1,"active"]),bracketPairsHorizontal:vb(t.bracketPairsHorizontal,this.defaultValue.bracketPairsHorizontal,[!0,!1,"active"]),highlightActiveBracketPair:Mt(t.highlightActiveBracketPair,this.defaultValue.highlightActiveBracketPair),indentation:Mt(t.indentation,this.defaultValue.indentation),highlightActiveIndentation:Mt(t.highlightActiveIndentation,this.defaultValue.highlightActiveIndentation)}}}function vb(i,e,t){const n=t.indexOf(i);return n===-1?e:t[n]}class Pwe extends Lr{constructor(){const e={insertMode:"insert",filterGraceful:!0,snippetsPreventQuickSuggestions:!0,localityBonus:!1,shareSuggestSelections:!1,showIcons:!0,showStatusBar:!1,preview:!1,previewMode:"subwordSmart",showInlineDetails:!0,showMethods:!0,showFunctions:!0,showConstructors:!0,showDeprecated:!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(106,"suggest",e,{"editor.suggest.insertMode":{type:"string",enum:["insert","replace"],enumDescriptions:[C("suggest.insertMode.insert","Insert suggestion without overwriting text right of the cursor."),C("suggest.insertMode.replace","Insert suggestion and overwrite text right of the cursor.")],default:e.insertMode,description:C("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:C("suggest.filterGraceful","Controls whether filtering and sorting suggestions accounts for small typos.")},"editor.suggest.localityBonus":{type:"boolean",default:e.localityBonus,description:C("suggest.localityBonus","Controls whether sorting favors words that appear close to the cursor.")},"editor.suggest.shareSuggestSelections":{type:"boolean",default:e.shareSuggestSelections,markdownDescription:C("suggest.shareSuggestSelections","Controls whether remembered suggestion selections are shared between multiple workspaces and windows (needs `#editor.suggestSelection#`).")},"editor.suggest.snippetsPreventQuickSuggestions":{type:"boolean",default:e.snippetsPreventQuickSuggestions,description:C("suggest.snippetsPreventQuickSuggestions","Controls whether an active snippet prevents quick suggestions.")},"editor.suggest.showIcons":{type:"boolean",default:e.showIcons,description:C("suggest.showIcons","Controls whether to show or hide icons in suggestions.")},"editor.suggest.showStatusBar":{type:"boolean",default:e.showStatusBar,description:C("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:C("suggest.preview","Controls whether to preview the suggestion outcome in the editor.")},"editor.suggest.showInlineDetails":{type:"boolean",default:e.showInlineDetails,description:C("suggest.showInlineDetails","Controls whether suggest details show inline with the label or only in the details widget")},"editor.suggest.maxVisibleSuggestions":{type:"number",deprecationMessage:C("suggest.maxVisibleSuggestions.dep","This setting is deprecated. The suggest widget can now be resized.")},"editor.suggest.filteredTypes":{type:"object",deprecationMessage:C("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:C("editor.suggest.showMethods","When enabled IntelliSense shows `method`-suggestions.")},"editor.suggest.showFunctions":{type:"boolean",default:!0,markdownDescription:C("editor.suggest.showFunctions","When enabled IntelliSense shows `function`-suggestions.")},"editor.suggest.showConstructors":{type:"boolean",default:!0,markdownDescription:C("editor.suggest.showConstructors","When enabled IntelliSense shows `constructor`-suggestions.")},"editor.suggest.showDeprecated":{type:"boolean",default:!0,markdownDescription:C("editor.suggest.showDeprecated","When enabled IntelliSense shows `deprecated`-suggestions.")},"editor.suggest.showFields":{type:"boolean",default:!0,markdownDescription:C("editor.suggest.showFields","When enabled IntelliSense shows `field`-suggestions.")},"editor.suggest.showVariables":{type:"boolean",default:!0,markdownDescription:C("editor.suggest.showVariables","When enabled IntelliSense shows `variable`-suggestions.")},"editor.suggest.showClasses":{type:"boolean",default:!0,markdownDescription:C("editor.suggest.showClasss","When enabled IntelliSense shows `class`-suggestions.")},"editor.suggest.showStructs":{type:"boolean",default:!0,markdownDescription:C("editor.suggest.showStructs","When enabled IntelliSense shows `struct`-suggestions.")},"editor.suggest.showInterfaces":{type:"boolean",default:!0,markdownDescription:C("editor.suggest.showInterfaces","When enabled IntelliSense shows `interface`-suggestions.")},"editor.suggest.showModules":{type:"boolean",default:!0,markdownDescription:C("editor.suggest.showModules","When enabled IntelliSense shows `module`-suggestions.")},"editor.suggest.showProperties":{type:"boolean",default:!0,markdownDescription:C("editor.suggest.showPropertys","When enabled IntelliSense shows `property`-suggestions.")},"editor.suggest.showEvents":{type:"boolean",default:!0,markdownDescription:C("editor.suggest.showEvents","When enabled IntelliSense shows `event`-suggestions.")},"editor.suggest.showOperators":{type:"boolean",default:!0,markdownDescription:C("editor.suggest.showOperators","When enabled IntelliSense shows `operator`-suggestions.")},"editor.suggest.showUnits":{type:"boolean",default:!0,markdownDescription:C("editor.suggest.showUnits","When enabled IntelliSense shows `unit`-suggestions.")},"editor.suggest.showValues":{type:"boolean",default:!0,markdownDescription:C("editor.suggest.showValues","When enabled IntelliSense shows `value`-suggestions.")},"editor.suggest.showConstants":{type:"boolean",default:!0,markdownDescription:C("editor.suggest.showConstants","When enabled IntelliSense shows `constant`-suggestions.")},"editor.suggest.showEnums":{type:"boolean",default:!0,markdownDescription:C("editor.suggest.showEnums","When enabled IntelliSense shows `enum`-suggestions.")},"editor.suggest.showEnumMembers":{type:"boolean",default:!0,markdownDescription:C("editor.suggest.showEnumMembers","When enabled IntelliSense shows `enumMember`-suggestions.")},"editor.suggest.showKeywords":{type:"boolean",default:!0,markdownDescription:C("editor.suggest.showKeywords","When enabled IntelliSense shows `keyword`-suggestions.")},"editor.suggest.showWords":{type:"boolean",default:!0,markdownDescription:C("editor.suggest.showTexts","When enabled IntelliSense shows `text`-suggestions.")},"editor.suggest.showColors":{type:"boolean",default:!0,markdownDescription:C("editor.suggest.showColors","When enabled IntelliSense shows `color`-suggestions.")},"editor.suggest.showFiles":{type:"boolean",default:!0,markdownDescription:C("editor.suggest.showFiles","When enabled IntelliSense shows `file`-suggestions.")},"editor.suggest.showReferences":{type:"boolean",default:!0,markdownDescription:C("editor.suggest.showReferences","When enabled IntelliSense shows `reference`-suggestions.")},"editor.suggest.showCustomcolors":{type:"boolean",default:!0,markdownDescription:C("editor.suggest.showCustomcolors","When enabled IntelliSense shows `customcolor`-suggestions.")},"editor.suggest.showFolders":{type:"boolean",default:!0,markdownDescription:C("editor.suggest.showFolders","When enabled IntelliSense shows `folder`-suggestions.")},"editor.suggest.showTypeParameters":{type:"boolean",default:!0,markdownDescription:C("editor.suggest.showTypeParameters","When enabled IntelliSense shows `typeParameter`-suggestions.")},"editor.suggest.showSnippets":{type:"boolean",default:!0,markdownDescription:C("editor.suggest.showSnippets","When enabled IntelliSense shows `snippet`-suggestions.")},"editor.suggest.showUsers":{type:"boolean",default:!0,markdownDescription:C("editor.suggest.showUsers","When enabled IntelliSense shows `user`-suggestions.")},"editor.suggest.showIssues":{type:"boolean",default:!0,markdownDescription:C("editor.suggest.showIssues","When enabled IntelliSense shows `issues`-suggestions.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e;return{insertMode:ho(t.insertMode,this.defaultValue.insertMode,["insert","replace"]),filterGraceful:Mt(t.filterGraceful,this.defaultValue.filterGraceful),snippetsPreventQuickSuggestions:Mt(t.snippetsPreventQuickSuggestions,this.defaultValue.filterGraceful),localityBonus:Mt(t.localityBonus,this.defaultValue.localityBonus),shareSuggestSelections:Mt(t.shareSuggestSelections,this.defaultValue.shareSuggestSelections),showIcons:Mt(t.showIcons,this.defaultValue.showIcons),showStatusBar:Mt(t.showStatusBar,this.defaultValue.showStatusBar),preview:Mt(t.preview,this.defaultValue.preview),previewMode:ho(t.previewMode,this.defaultValue.previewMode,["prefix","subword","subwordSmart"]),showInlineDetails:Mt(t.showInlineDetails,this.defaultValue.showInlineDetails),showMethods:Mt(t.showMethods,this.defaultValue.showMethods),showFunctions:Mt(t.showFunctions,this.defaultValue.showFunctions),showConstructors:Mt(t.showConstructors,this.defaultValue.showConstructors),showDeprecated:Mt(t.showDeprecated,this.defaultValue.showDeprecated),showFields:Mt(t.showFields,this.defaultValue.showFields),showVariables:Mt(t.showVariables,this.defaultValue.showVariables),showClasses:Mt(t.showClasses,this.defaultValue.showClasses),showStructs:Mt(t.showStructs,this.defaultValue.showStructs),showInterfaces:Mt(t.showInterfaces,this.defaultValue.showInterfaces),showModules:Mt(t.showModules,this.defaultValue.showModules),showProperties:Mt(t.showProperties,this.defaultValue.showProperties),showEvents:Mt(t.showEvents,this.defaultValue.showEvents),showOperators:Mt(t.showOperators,this.defaultValue.showOperators),showUnits:Mt(t.showUnits,this.defaultValue.showUnits),showValues:Mt(t.showValues,this.defaultValue.showValues),showConstants:Mt(t.showConstants,this.defaultValue.showConstants),showEnums:Mt(t.showEnums,this.defaultValue.showEnums),showEnumMembers:Mt(t.showEnumMembers,this.defaultValue.showEnumMembers),showKeywords:Mt(t.showKeywords,this.defaultValue.showKeywords),showWords:Mt(t.showWords,this.defaultValue.showWords),showColors:Mt(t.showColors,this.defaultValue.showColors),showFiles:Mt(t.showFiles,this.defaultValue.showFiles),showReferences:Mt(t.showReferences,this.defaultValue.showReferences),showFolders:Mt(t.showFolders,this.defaultValue.showFolders),showTypeParameters:Mt(t.showTypeParameters,this.defaultValue.showTypeParameters),showSnippets:Mt(t.showSnippets,this.defaultValue.showSnippets),showUsers:Mt(t.showUsers,this.defaultValue.showUsers),showIssues:Mt(t.showIssues,this.defaultValue.showIssues)}}}class Fwe extends Lr{constructor(){super(102,"smartSelect",{selectLeadingAndTrailingWhitespace:!0},{"editor.smartSelect.selectLeadingAndTrailingWhitespace":{description:C("selectLeadingAndTrailingWhitespace","Whether leading and trailing whitespace should always be selected."),default:!0,type:"boolean"}})}validate(e){return!e||typeof e!="object"?this.defaultValue:{selectLeadingAndTrailingWhitespace:Mt(e.selectLeadingAndTrailingWhitespace,this.defaultValue.selectLeadingAndTrailingWhitespace)}}}class Bwe extends o_{constructor(){super(130)}compute(e,t,n){return t.get(81)?!0:e.tabFocusMode}}function Vwe(i){switch(i){case"none":return 0;case"same":return 1;case"indent":return 2;case"deepIndent":return 3}}class Wwe extends o_{constructor(){super(132)}compute(e,t,n){const r=t.get(131);return{isDominatedByLongLines:e.isDominatedByLongLines,isWordWrapMinified:r.isWordWrapMinified,isViewportWrapping:r.isViewportWrapping,wrappingColumn:r.wrappingColumn}}}const Ms={fontFamily:gn?"Menlo, Monaco, 'Courier New', monospace":ws?"'Droid Sans Mono', 'monospace', monospace":"Consolas, 'Courier New', monospace",fontWeight:"normal",fontSize:gn?12:14,lineHeight:0,letterSpacing:0},l_=[];function tt(i){return l_[i.id]=i,i}const nc={acceptSuggestionOnCommitCharacter:tt(new xn(0,"acceptSuggestionOnCommitCharacter",!0,{markdownDescription:C("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:tt(new Sr(1,"acceptSuggestionOnEnter","on",["on","smart","off"],{markdownEnumDescriptions:["",C("acceptSuggestionOnEnterSmart","Only accept a suggestion with `Enter` when it makes a textual change."),""],markdownDescription:C("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:tt(new cwe),accessibilityPageSize:tt(new Si(3,"accessibilityPageSize",10,1,1073741824,{description:C("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.")})),ariaLabel:tt(new Bo(4,"ariaLabel",C("editorViewAccessibleLabel","Editor content"))),autoClosingBrackets:tt(new Sr(5,"autoClosingBrackets","languageDefined",["always","languageDefined","beforeWhitespace","never"],{enumDescriptions:["",C("editor.autoClosingBrackets.languageDefined","Use language configurations to determine when to autoclose brackets."),C("editor.autoClosingBrackets.beforeWhitespace","Autoclose brackets only when the cursor is to the left of whitespace."),""],description:C("autoClosingBrackets","Controls whether the editor should automatically close brackets after the user adds an opening bracket.")})),autoClosingDelete:tt(new Sr(6,"autoClosingDelete","auto",["always","auto","never"],{enumDescriptions:["",C("editor.autoClosingDelete.auto","Remove adjacent closing quotes or brackets only if they were automatically inserted."),""],description:C("autoClosingDelete","Controls whether the editor should remove adjacent closing quotes or brackets when deleting.")})),autoClosingOvertype:tt(new Sr(7,"autoClosingOvertype","auto",["always","auto","never"],{enumDescriptions:["",C("editor.autoClosingOvertype.auto","Type over closing quotes or brackets only if they were automatically inserted."),""],description:C("autoClosingOvertype","Controls whether the editor should type over closing quotes or brackets.")})),autoClosingQuotes:tt(new Sr(8,"autoClosingQuotes","languageDefined",["always","languageDefined","beforeWhitespace","never"],{enumDescriptions:["",C("editor.autoClosingQuotes.languageDefined","Use language configurations to determine when to autoclose quotes."),C("editor.autoClosingQuotes.beforeWhitespace","Autoclose quotes only when the cursor is to the left of whitespace."),""],description:C("autoClosingQuotes","Controls whether the editor should automatically close quotes after the user adds an opening quote.")})),autoIndent:tt(new bb(9,"autoIndent",4,"full",["none","keep","brackets","advanced","full"],lwe,{enumDescriptions:[C("editor.autoIndent.none","The editor will not insert indentation automatically."),C("editor.autoIndent.keep","The editor will keep the current line's indentation."),C("editor.autoIndent.brackets","The editor will keep the current line's indentation and honor language defined brackets."),C("editor.autoIndent.advanced","The editor will keep the current line's indentation, honor language defined brackets and invoke special onEnterRules defined by languages."),C("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:C("autoIndent","Controls whether the editor should automatically adjust the indentation when users type, paste, move or indent lines.")})),automaticLayout:tt(new xn(10,"automaticLayout",!1)),autoSurround:tt(new Sr(11,"autoSurround","languageDefined",["languageDefined","quotes","brackets","never"],{enumDescriptions:[C("editor.autoSurround.languageDefined","Use language configurations to determine when to automatically surround selections."),C("editor.autoSurround.quotes","Surround with quotes but not brackets."),C("editor.autoSurround.brackets","Surround with brackets but not quotes."),""],description:C("autoSurround","Controls whether the editor should automatically surround selections when typing quotes or brackets.")})),bracketPairColorization:tt(new Owe),bracketPairGuides:tt(new Mwe),stickyTabStops:tt(new xn(104,"stickyTabStops",!1,{description:C("stickyTabStops","Emulate selection behavior of tab characters when using spaces for indentation. Selection will stick to tab stops.")})),codeLens:tt(new xn(14,"codeLens",!0,{description:C("codeLens","Controls whether the editor shows CodeLens.")})),codeLensFontFamily:tt(new Bo(15,"codeLensFontFamily","",{description:C("codeLensFontFamily","Controls the font family for CodeLens.")})),codeLensFontSize:tt(new Si(16,"codeLensFontSize",0,0,100,{type:"number",default:0,minimum:0,maximum:100,markdownDescription:C("codeLensFontSize","Controls the font size in pixels for CodeLens. When set to `0`, 90% of `#editor.fontSize#` is used.")})),colorDecorators:tt(new xn(17,"colorDecorators",!0,{description:C("colorDecorators","Controls whether the editor should render the inline color decorators and color picker.")})),columnSelection:tt(new xn(18,"columnSelection",!1,{description:C("columnSelection","Enable that the selection with the mouse and keys is doing column selection.")})),comments:tt(new uwe),contextmenu:tt(new xn(20,"contextmenu",!0)),copyWithSyntaxHighlighting:tt(new xn(21,"copyWithSyntaxHighlighting",!0,{description:C("copyWithSyntaxHighlighting","Controls whether syntax highlighting should be copied into the clipboard.")})),cursorBlinking:tt(new bb(22,"cursorBlinking",1,"blink",["blink","smooth","phase","expand","solid"],dwe,{description:C("cursorBlinking","Control the cursor animation style.")})),cursorSmoothCaretAnimation:tt(new xn(23,"cursorSmoothCaretAnimation",!1,{description:C("cursorSmoothCaretAnimation","Controls whether the smooth caret animation should be enabled.")})),cursorStyle:tt(new bb(24,"cursorStyle",Kr.Line,"line",["line","block","underline","line-thin","block-outline","underline-thin"],hwe,{description:C("cursorStyle","Controls the cursor style.")})),cursorSurroundingLines:tt(new Si(25,"cursorSurroundingLines",0,0,1073741824,{description:C("cursorSurroundingLines","Controls the minimal number of visible leading and trailing lines surrounding the cursor. Known as 'scrollOff' or 'scrollOffset' in some other editors.")})),cursorSurroundingLinesStyle:tt(new Sr(26,"cursorSurroundingLinesStyle","default",["default","all"],{enumDescriptions:[C("cursorSurroundingLinesStyle.default","`cursorSurroundingLines` is enforced only when triggered via the keyboard or API."),C("cursorSurroundingLinesStyle.all","`cursorSurroundingLines` is enforced always.")],description:C("cursorSurroundingLinesStyle","Controls when `cursorSurroundingLines` should be enforced.")})),cursorWidth:tt(new Si(27,"cursorWidth",0,0,1073741824,{markdownDescription:C("cursorWidth","Controls the width of the cursor when `#editor.cursorStyle#` is set to `line`.")})),disableLayerHinting:tt(new xn(28,"disableLayerHinting",!1)),disableMonospaceOptimizations:tt(new xn(29,"disableMonospaceOptimizations",!1)),domReadOnly:tt(new xn(30,"domReadOnly",!1)),dragAndDrop:tt(new xn(31,"dragAndDrop",!0,{description:C("dragAndDrop","Controls whether the editor should allow moving selections via drag and drop.")})),emptySelectionClipboard:tt(new gwe),extraEditorClassName:tt(new Bo(33,"extraEditorClassName","")),fastScrollSensitivity:tt(new $c(34,"fastScrollSensitivity",5,i=>i<=0?5:i,{markdownDescription:C("fastScrollSensitivity","Scrolling speed multiplier when pressing `Alt`.")})),find:tt(new pwe),fixedOverflowWidgets:tt(new xn(36,"fixedOverflowWidgets",!1)),folding:tt(new xn(37,"folding",!0,{description:C("folding","Controls whether the editor has code folding enabled.")})),foldingStrategy:tt(new Sr(38,"foldingStrategy","auto",["auto","indentation"],{enumDescriptions:[C("foldingStrategy.auto","Use a language-specific folding strategy if available, else the indentation-based one."),C("foldingStrategy.indentation","Use the indentation-based folding strategy.")],description:C("foldingStrategy","Controls the strategy for computing folding ranges.")})),foldingHighlight:tt(new xn(39,"foldingHighlight",!0,{description:C("foldingHighlight","Controls whether the editor should highlight folded ranges.")})),foldingImportsByDefault:tt(new xn(40,"foldingImportsByDefault",!1,{description:C("foldingImportsByDefault","Controls whether the editor automatically collapses import ranges.")})),foldingMaximumRegions:tt(new Si(41,"foldingMaximumRegions",5e3,10,65e3,{description:C("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:tt(new xn(42,"unfoldOnClickAfterEndOfLine",!1,{description:C("unfoldOnClickAfterEndOfLine","Controls whether clicking on the empty content after a folded line will unfold the line.")})),fontFamily:tt(new Bo(43,"fontFamily",Ms.fontFamily,{description:C("fontFamily","Controls the font family.")})),fontInfo:tt(new mwe),fontLigatures2:tt(new oa),fontSize:tt(new _we),fontWeight:tt(new Uc),formatOnPaste:tt(new xn(48,"formatOnPaste",!1,{description:C("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:tt(new xn(49,"formatOnType",!1,{description:C("formatOnType","Controls whether the editor should automatically format the line after typing.")})),glyphMargin:tt(new xn(50,"glyphMargin",!0,{description:C("glyphMargin","Controls whether the editor should render the vertical glyph margin. Glyph margin is mostly used for debugging.")})),gotoLocation:tt(new bwe),hideCursorInOverviewRuler:tt(new xn(52,"hideCursorInOverviewRuler",!1,{description:C("hideCursorInOverviewRuler","Controls whether the cursor should be hidden in the overview ruler.")})),hover:tt(new vwe),inDiffEditor:tt(new xn(54,"inDiffEditor",!1)),letterSpacing:tt(new $c(56,"letterSpacing",Ms.letterSpacing,i=>$c.clamp(i,-5,20),{description:C("letterSpacing","Controls the letter spacing in pixels.")})),lightbulb:tt(new wwe),lineDecorationsWidth:tt(new Lg(58,"lineDecorationsWidth",10)),lineHeight:tt(new ywe),lineNumbers:tt(new Iwe),lineNumbersMinChars:tt(new Si(61,"lineNumbersMinChars",5,1,300)),linkedEditing:tt(new xn(62,"linkedEditing",!1,{description:C("linkedEditing","Controls whether the editor has linked editing enabled. Depending on the language, related symbols, e.g. HTML tags, are updated while editing.")})),links:tt(new xn(63,"links",!0,{description:C("links","Controls whether the editor should detect links and make them clickable.")})),matchBrackets:tt(new Sr(64,"matchBrackets","always",["always","near","never"],{description:C("matchBrackets","Highlight matching brackets.")})),minimap:tt(new Swe),mouseStyle:tt(new Sr(66,"mouseStyle","text",["text","default","copy"])),mouseWheelScrollSensitivity:tt(new $c(67,"mouseWheelScrollSensitivity",1,i=>i===0?1:i,{markdownDescription:C("mouseWheelScrollSensitivity","A multiplier to be used on the `deltaX` and `deltaY` of mouse wheel scroll events.")})),mouseWheelZoom:tt(new xn(68,"mouseWheelZoom",!1,{markdownDescription:C("mouseWheelZoom","Zoom the font of the editor when using mouse wheel and holding `Ctrl`.")})),multiCursorMergeOverlapping:tt(new xn(69,"multiCursorMergeOverlapping",!0,{description:C("multiCursorMergeOverlapping","Merge multiple cursors when they are overlapping.")})),multiCursorModifier:tt(new bb(70,"multiCursorModifier","altKey","alt",["ctrlCmd","alt"],kwe,{markdownEnumDescriptions:[C("multiCursorModifier.ctrlCmd","Maps to `Control` on Windows and Linux and to `Command` on macOS."),C("multiCursorModifier.alt","Maps to `Alt` on Windows and Linux and to `Option` on macOS.")],markdownDescription:C({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. [Read more](https://code.visualstudio.com/docs/editor/codebasics#_multicursor-modifier).")})),multiCursorPaste:tt(new Sr(71,"multiCursorPaste","spread",["spread","full"],{markdownEnumDescriptions:[C("multiCursorPaste.spread","Each cursor pastes a single line of the text."),C("multiCursorPaste.full","Each cursor pastes the full text.")],markdownDescription:C("multiCursorPaste","Controls pasting when the line count of the pasted text matches the cursor count.")})),occurrencesHighlight:tt(new xn(72,"occurrencesHighlight",!0,{description:C("occurrencesHighlight","Controls whether the editor should highlight semantic symbol occurrences.")})),overviewRulerBorder:tt(new xn(73,"overviewRulerBorder",!0,{description:C("overviewRulerBorder","Controls whether a border should be drawn around the overview ruler.")})),overviewRulerLanes:tt(new Si(74,"overviewRulerLanes",3,0,3)),padding:tt(new Ewe),parameterHints:tt(new xwe),peekWidgetDefaultFocus:tt(new Sr(77,"peekWidgetDefaultFocus","tree",["tree","editor"],{enumDescriptions:[C("peekWidgetDefaultFocus.tree","Focus the tree when opening peek"),C("peekWidgetDefaultFocus.editor","Focus the editor when opening peek")],description:C("peekWidgetDefaultFocus","Controls whether to focus the inline editor or the tree in the peek widget.")})),definitionLinkOpensInPeek:tt(new xn(78,"definitionLinkOpensInPeek",!1,{description:C("definitionLinkOpensInPeek","Controls whether the Go to Definition mouse gesture always opens the peek widget.")})),quickSuggestions:tt(new Twe),quickSuggestionsDelay:tt(new Si(80,"quickSuggestionsDelay",10,0,1073741824,{description:C("quickSuggestionsDelay","Controls the delay in milliseconds after which quick suggestions will show up.")})),readOnly:tt(new xn(81,"readOnly",!1)),renameOnType:tt(new xn(82,"renameOnType",!1,{description:C("renameOnType","Controls whether the editor auto renames on type."),markdownDeprecationMessage:C("renameOnTypeDeprecate","Deprecated, use `editor.linkedEditing` instead.")})),renderControlCharacters:tt(new xn(83,"renderControlCharacters",!0,{description:C("renderControlCharacters","Controls whether the editor should render control characters."),restricted:!0})),renderFinalNewline:tt(new xn(84,"renderFinalNewline",!0,{description:C("renderFinalNewline","Render last line number when the file ends with a newline.")})),renderLineHighlight:tt(new Sr(85,"renderLineHighlight","line",["none","gutter","line","all"],{enumDescriptions:["","","",C("renderLineHighlight.all","Highlights both the gutter and the current line.")],description:C("renderLineHighlight","Controls how the editor should render the current line highlight.")})),renderLineHighlightOnlyWhenFocus:tt(new xn(86,"renderLineHighlightOnlyWhenFocus",!1,{description:C("renderLineHighlightOnlyWhenFocus","Controls if the editor should render the current line highlight only when the editor is focused.")})),renderValidationDecorations:tt(new Sr(87,"renderValidationDecorations","editable",["editable","on","off"])),renderWhitespace:tt(new Sr(88,"renderWhitespace","selection",["none","boundary","selection","trailing","all"],{enumDescriptions:["",C("renderWhitespace.boundary","Render whitespace characters except for single spaces between words."),C("renderWhitespace.selection","Render whitespace characters only on selected text."),C("renderWhitespace.trailing","Render only trailing whitespace characters."),""],description:C("renderWhitespace","Controls how the editor should render whitespace characters.")})),revealHorizontalRightPadding:tt(new Si(89,"revealHorizontalRightPadding",30,0,1e3)),roundedSelection:tt(new xn(90,"roundedSelection",!0,{description:C("roundedSelection","Controls whether selections should have rounded corners.")})),rulers:tt(new Dwe),scrollbar:tt(new Nwe),scrollBeyondLastColumn:tt(new Si(93,"scrollBeyondLastColumn",5,0,1073741824,{description:C("scrollBeyondLastColumn","Controls the number of extra characters beyond which the editor will scroll horizontally.")})),scrollBeyondLastLine:tt(new xn(94,"scrollBeyondLastLine",!0,{description:C("scrollBeyondLastLine","Controls whether the editor will scroll beyond the last line.")})),scrollPredominantAxis:tt(new xn(95,"scrollPredominantAxis",!0,{description:C("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:tt(new xn(96,"selectionClipboard",!0,{description:C("selectionClipboard","Controls whether the Linux primary clipboard should be supported."),included:ws})),selectionHighlight:tt(new xn(97,"selectionHighlight",!0,{description:C("selectionHighlight","Controls whether the editor should highlight matches similar to the selection.")})),selectOnLineNumbers:tt(new xn(98,"selectOnLineNumbers",!0)),showFoldingControls:tt(new Sr(99,"showFoldingControls","mouseover",["always","mouseover"],{enumDescriptions:[C("showFoldingControls.always","Always show the folding controls."),C("showFoldingControls.mouseover","Only show the folding controls when the mouse is over the gutter.")],description:C("showFoldingControls","Controls when the folding controls on the gutter are shown.")})),showUnused:tt(new xn(100,"showUnused",!0,{description:C("showUnused","Controls fading out of unused code.")})),showDeprecated:tt(new xn(126,"showDeprecated",!0,{description:C("showDeprecated","Controls strikethrough deprecated variables.")})),inlayHints:tt(new Cwe),snippetSuggestions:tt(new Sr(101,"snippetSuggestions","inline",["top","bottom","inline","none"],{enumDescriptions:[C("snippetSuggestions.top","Show snippet suggestions on top of other suggestions."),C("snippetSuggestions.bottom","Show snippet suggestions below other suggestions."),C("snippetSuggestions.inline","Show snippets suggestions with other suggestions."),C("snippetSuggestions.none","Do not show snippet suggestions.")],description:C("snippetSuggestions","Controls whether snippets are shown with other suggestions and how they are sorted.")})),smartSelect:tt(new Fwe),smoothScrolling:tt(new xn(103,"smoothScrolling",!1,{description:C("smoothScrolling","Controls whether the editor will scroll using an animation.")})),stopRenderingLineAfter:tt(new Si(105,"stopRenderingLineAfter",1e4,-1,1073741824)),suggest:tt(new Pwe),inlineSuggest:tt(new Rwe),suggestFontSize:tt(new Si(107,"suggestFontSize",0,0,1e3,{markdownDescription:C("suggestFontSize","Font size for the suggest widget. When set to `0`, the value of `#editor.fontSize#` is used.")})),suggestLineHeight:tt(new Si(108,"suggestLineHeight",0,0,1e3,{markdownDescription:C("suggestLineHeight","Line height for the suggest widget. When set to `0`, the value of `#editor.lineHeight#` is used. The minimum value is 8.")})),suggestOnTriggerCharacters:tt(new xn(109,"suggestOnTriggerCharacters",!0,{description:C("suggestOnTriggerCharacters","Controls whether suggestions should automatically show up when typing trigger characters.")})),suggestSelection:tt(new Sr(110,"suggestSelection","first",["first","recentlyUsed","recentlyUsedByPrefix"],{markdownEnumDescriptions:[C("suggestSelection.first","Always select the first suggestion."),C("suggestSelection.recentlyUsed","Select recent suggestions unless further typing selects one, e.g. `console.| -> console.log` because `log` has been completed recently."),C("suggestSelection.recentlyUsedByPrefix","Select suggestions based on previous prefixes that have completed those suggestions, e.g. `co -> console` and `con -> const`.")],description:C("suggestSelection","Controls how suggestions are pre-selected when showing the suggest list.")})),tabCompletion:tt(new Sr(111,"tabCompletion","off",["on","off","onlySnippets"],{enumDescriptions:[C("tabCompletion.on","Tab complete will insert the best matching suggestion when pressing tab."),C("tabCompletion.off","Disable tab completions."),C("tabCompletion.onlySnippets","Tab complete snippets when their prefix match. Works best when 'quickSuggestions' aren't enabled.")],description:C("tabCompletion","Enables tab completions.")})),tabIndex:tt(new Si(112,"tabIndex",0,-1,1073741824)),unicodeHighlight:tt(new Awe),unusualLineTerminators:tt(new Sr(114,"unusualLineTerminators","prompt",["auto","off","prompt"],{enumDescriptions:[C("unusualLineTerminators.auto","Unusual line terminators are automatically removed."),C("unusualLineTerminators.off","Unusual line terminators are ignored."),C("unusualLineTerminators.prompt","Unusual line terminators prompt to be removed.")],description:C("unusualLineTerminators","Remove unusual line terminators that might cause problems.")})),useShadowDOM:tt(new xn(115,"useShadowDOM",!0)),useTabStops:tt(new xn(116,"useTabStops",!0,{description:C("useTabStops","Inserting and deleting whitespace follows tab stops.")})),wordSeparators:tt(new Bo(117,"wordSeparators",tz,{description:C("wordSeparators","Characters that will be used as word separators when doing word related navigations or operations.")})),wordWrap:tt(new Sr(118,"wordWrap","off",["off","on","wordWrapColumn","bounded"],{markdownEnumDescriptions:[C("wordWrap.off","Lines will never wrap."),C("wordWrap.on","Lines will wrap at the viewport width."),C({key:"wordWrap.wordWrapColumn",comment:["- `editor.wordWrapColumn` refers to a different setting and should not be localized."]},"Lines will wrap at `#editor.wordWrapColumn#`."),C({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:C({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:tt(new Bo(119,"wordWrapBreakAfterCharacters"," })]?|/&.,;¢°′″‰℃、。。、¢,.:;?!%・・ゝゞヽヾーァィゥェォッャュョヮヵヶぁぃぅぇぉっゃゅょゎゕゖㇰㇱㇲㇳㇴㇵㇶㇷㇸㇹㇺㇻㇼㇽㇾㇿ々〻ァィゥェォャュョッー”〉》」』】〕)]}」")),wordWrapBreakBeforeCharacters:tt(new Bo(120,"wordWrapBreakBeforeCharacters","([{‘“〈《「『【〔([{「£¥$£¥++")),wordWrapColumn:tt(new Si(121,"wordWrapColumn",80,1,1073741824,{markdownDescription:C({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:tt(new Sr(122,"wordWrapOverride1","inherit",["off","on","inherit"])),wordWrapOverride2:tt(new Sr(123,"wordWrapOverride2","inherit",["off","on","inherit"])),wrappingIndent:tt(new bb(124,"wrappingIndent",1,"same",["none","same","indent","deepIndent"],Vwe,{enumDescriptions:[C("wrappingIndent.none","No indentation. Wrapped lines begin at column 1."),C("wrappingIndent.same","Wrapped lines get the same indentation as the parent."),C("wrappingIndent.indent","Wrapped lines get +1 indentation toward the parent."),C("wrappingIndent.deepIndent","Wrapped lines get +2 indentation toward the parent.")],description:C("wrappingIndent","Controls the indentation of wrapped lines.")})),wrappingStrategy:tt(new Sr(125,"wrappingStrategy","simple",["simple","advanced"],{enumDescriptions:[C("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."),C("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.")],description:C("wrappingStrategy","Controls the algorithm that computes wrapping points.")})),editorClassName:tt(new fwe),pixelRatio:tt(new Lwe),tabFocusMode:tt(new Bwe),layoutInfo:tt(new a_),wrappingInfo:tt(new Wwe)};class Hwe{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(e){setTimeout(()=>{throw 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 _z=new Hwe;function Jt(i){jc(i)||_z.onUnexpectedError(i)}function Or(i){jc(i)||_z.onUnexpectedExternalError(i)}function bz(i){if(i instanceof Error){let{name:e,message:t}=i;const n=i.stacktrace||i.stack;return{$isError:!0,name:e,message:t,stack:n}}return i}const Py="Canceled";function jc(i){return i instanceof Tg?!0:i instanceof Error&&i.name===Py&&i.message===Py}class Tg extends Error{constructor(){super(Py),this.name=this.message}}function D8(){const i=new Error(Py);return i.name=i.message,i}function ic(i){return i?new Error(`Illegal argument: ${i}`):new Error("Illegal argument")}function zwe(i){return i?new Error(`Illegal state: ${i}`):new Error("Illegal state")}class $we extends Error{constructor(e){super("NotSupported"),e&&(this.message=e)}}function id(i){const e=this;let t=!1,n;return function(){return t||(t=!0,n=i.apply(e,arguments)),n}}var Dn;(function(i){function e(b){return b&&typeof b=="object"&&typeof b[Symbol.iterator]=="function"}i.is=e;const t=Object.freeze([]);function n(){return t}i.empty=n;function*r(b){yield b}i.single=r;function s(b){return b||t}i.from=s;function o(b){return!b||b[Symbol.iterator]().next().done===!0}i.isEmpty=o;function a(b){return b[Symbol.iterator]().next().value}i.first=a;function l(b,v){for(const w of b)if(v(w))return!0;return!1}i.some=l;function c(b,v){for(const w of b)if(v(w))return w}i.find=c;function*u(b,v){for(const w of b)v(w)&&(yield w)}i.filter=u;function*d(b,v){let w=0;for(const E of b)yield v(E,w++)}i.map=d;function*h(...b){for(const v of b)for(const w of v)yield w}i.concat=h;function*f(b){for(const v of b)for(const w of v)yield w}i.concatNested=f;function g(b,v,w){let E=w;for(const I of b)E=v(E,I);return E}i.reduce=g;function*p(b,v,w=b.length){for(v<0&&(v+=b.length),w<0?w+=b.length:w>b.length&&(w=b.length);vE===I){const E=b[Symbol.iterator](),I=v[Symbol.iterator]();for(;;){const x=E.next(),T=I.next();if(x.done!==T.done)return!1;if(x.done)return!0;if(!w(x.value,T.value))return!1}}i.equals=_})(Dn||(Dn={}));function $gt(i){return i}function Ugt(i,e){}function jgt(i){return i}class Uwe extends Error{constructor(e){super(`Encountered errors while disposing of store. Errors: [${e.join(", ")}]`),this.errors=e}}function N8(i){return typeof i.dispose=="function"&&i.dispose.length===0}function Nn(i){if(Dn.is(i)){let e=[];for(const t of i)if(t)try{t.dispose()}catch(n){e.push(n)}if(e.length===1)throw e[0];if(e.length>1)throw new Uwe(e);return Array.isArray(i)?[]:i}else if(i)return i.dispose(),i}function rd(...i){return fn(()=>Nn(i))}function fn(i){return{dispose:id(()=>{i()})}}class Je{constructor(){this._toDispose=new Set,this._isDisposed=!1}dispose(){this._isDisposed||(this._isDisposed=!0,this.clear())}get isDisposed(){return this._isDisposed}clear(){try{Nn(this._toDispose.values())}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?Je.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}}Je.DISABLE_DISPOSED_WARNING=!1;class Ne{constructor(){this._store=new Je,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 qs{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}clearAndLeak(){const e=this._value;return this._value=void 0,e}}class jwe{constructor(){this.dispose=()=>{},this.unset=()=>{},this.isset=()=>!1}set(e){let t=e;return this.unset=()=>t=void 0,this.isset=()=>t!==void 0,this.dispose=()=>{t&&(t(),t=void 0)},this}}class qwe{constructor(e){this.object=e}dispose(){}}let Yi=class{constructor(e){this.element=e,this.next=Yi.Undefined,this.prev=Yi.Undefined}};Yi.Undefined=new Yi(void 0);class la{constructor(){this._first=Yi.Undefined,this._last=Yi.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===Yi.Undefined}clear(){let e=this._first;for(;e!==Yi.Undefined;){const t=e.next;e.prev=Yi.Undefined,e.next=Yi.Undefined,e=t}this._first=Yi.Undefined,this._last=Yi.Undefined,this._size=0}unshift(e){return this._insert(e,!1)}push(e){return this._insert(e,!0)}_insert(e,t){const n=new Yi(e);if(this._first===Yi.Undefined)this._first=n,this._last=n;else if(t){const s=this._last;this._last=n,n.prev=s,s.next=n}else{const s=this._first;this._first=n,n.next=s,s.prev=n}this._size+=1;let r=!1;return()=>{r||(r=!0,this._remove(n))}}shift(){if(this._first!==Yi.Undefined){const e=this._first.element;return this._remove(this._first),e}}pop(){if(this._last!==Yi.Undefined){const e=this._last.element;return this._remove(this._last),e}}_remove(e){if(e.prev!==Yi.Undefined&&e.next!==Yi.Undefined){const t=e.prev;t.next=e.next,e.next.prev=t}else e.prev===Yi.Undefined&&e.next===Yi.Undefined?(this._first=Yi.Undefined,this._last=Yi.Undefined):e.next===Yi.Undefined?(this._last=this._last.prev,this._last.next=Yi.Undefined):e.prev===Yi.Undefined&&(this._first=this._first.next,this._first.prev=Yi.Undefined);this._size-=1}*[Symbol.iterator](){let e=this._first;for(;e!==Yi.Undefined;)yield e.element,e=e.next}}const Gwe=Ki.performance&&typeof Ki.performance.now=="function";class go{constructor(e){this._highResolution=Gwe&&e,this._startTime=this._now(),this._stopTime=-1}static create(e=!0){return new go(e)}stop(){this._stopTime=this._now()}elapsed(){return this._stopTime!==-1?this._stopTime-this._startTime:this._now()-this._startTime}_now(){return this._highResolution?Ki.performance.now():Date.now()}}var kt;(function(i){i.None=()=>Ne.None;function e(w){return(E,I=null,x)=>{let T=!1,L;return L=w(O=>{if(!T)return L?L.dispose():T=!0,E.call(I,O)},null,x),T&&L.dispose(),L}}i.once=e;function t(w,E,I){return l((x,T=null,L)=>w(O=>x.call(T,E(O)),null,L),I)}i.map=t;function n(w,E,I){return l((x,T=null,L)=>w(O=>{E(O),x.call(T,O)},null,L),I)}i.forEach=n;function r(w,E,I){return l((x,T=null,L)=>w(O=>E(O)&&x.call(T,O),null,L),I)}i.filter=r;function s(w){return w}i.signal=s;function o(...w){return(E,I=null,x)=>rd(...w.map(T=>T(L=>E.call(I,L),null,x)))}i.any=o;function a(w,E,I,x){let T=I;return t(w,L=>(T=E(T,L),T),x)}i.reduce=a;function l(w,E){let I;const x={onFirstListenerAdd(){I=w(T.fire,T)},onLastListenerRemove(){I.dispose()}},T=new be(x);return E&&E.add(T),T.event}function c(w,E,I=100,x=!1,T,L){let O,N,P,$=0;const ne={leakWarningThreshold:T,onFirstListenerAdd(){O=w(K=>{$++,N=E(N,K),x&&!P&&(z.fire(N),N=void 0),clearTimeout(P),P=setTimeout(()=>{const ce=N;N=void 0,P=void 0,(!x||$>1)&&z.fire(ce),$=0},I)})},onLastListenerRemove(){O.dispose()}},z=new be(ne);return L&&L.add(z),z.event}i.debounce=c;function u(w,E=(x,T)=>x===T,I){let x=!0,T;return r(w,L=>{const O=x||!E(L,T);return x=!1,T=L,O},I)}i.latch=u;function d(w,E,I){return[i.filter(w,E,I),i.filter(w,x=>!E(x),I)]}i.split=d;function h(w,E=!1,I=[]){let x=I.slice(),T=w(N=>{x?x.push(N):O.fire(N)});const L=()=>{x&&x.forEach(N=>O.fire(N)),x=null},O=new be({onFirstListenerAdd(){T||(T=w(N=>O.fire(N)))},onFirstListenerDidAdd(){x&&(E?setTimeout(L):L())},onLastListenerRemove(){T&&T.dispose(),T=null}});return O.event}i.buffer=h;class f{constructor(E){this.event=E}map(E){return new f(t(this.event,E))}forEach(E){return new f(n(this.event,E))}filter(E){return new f(r(this.event,E))}reduce(E,I){return new f(a(this.event,E,I))}latch(){return new f(u(this.event))}debounce(E,I=100,x=!1,T){return new f(c(this.event,E,I,x,T))}on(E,I,x){return this.event(E,I,x)}once(E,I,x){return e(this.event)(E,I,x)}}function g(w){return new f(w)}i.chain=g;function p(w,E,I=x=>x){const x=(...N)=>O.fire(I(...N)),T=()=>w.on(E,x),L=()=>w.removeListener(E,x),O=new be({onFirstListenerAdd:T,onLastListenerRemove:L});return O.event}i.fromNodeEventEmitter=p;function m(w,E,I=x=>x){const x=(...N)=>O.fire(I(...N)),T=()=>w.addEventListener(E,x),L=()=>w.removeEventListener(E,x),O=new be({onFirstListenerAdd:T,onLastListenerRemove:L});return O.event}i.fromDOMEventEmitter=m;function _(w){return new Promise(E=>e(w)(E))}i.toPromise=_;function b(w,E){return E(void 0),w(I=>E(I))}i.runAndSubscribe=b;function v(w,E){let I=null;function x(L){I==null||I.dispose(),I=new Je,E(L,I)}x(void 0);const T=w(L=>x(L));return fn(()=>{T.dispose(),I==null||I.dispose()})}i.runAndSubscribeWithStore=v})(kt||(kt={}));class Fy{constructor(e){this._listenerCount=0,this._invocationCount=0,this._elapsedOverall=0,this._name=`${e}_${Fy._idPool++}`}start(e){this._stopWatch=new go(!0),this._listenerCount=e}stop(){if(this._stopWatch){const e=this._stopWatch.elapsed();this._elapsedOverall+=e,this._invocationCount+=1,console.info(`did FIRE ${this._name}: elapsed_ms: ${e.toFixed(5)}, listener: ${this._listenerCount} (elapsed_overall: ${this._elapsedOverall.toFixed(2)}, invocations: ${this._invocationCount})`),this._stopWatch=void 0}}}Fy._idPool=0;class A8{constructor(e){this.value=e}static create(){var e;return new A8((e=new Error().stack)!==null&&e!==void 0?e:"")}print(){console.warn(this.value.split(` +`).slice(2).join(` +`))}}class Kwe{constructor(e,t,n){this.callback=e,this.callbackThis=t,this.stack=n,this.subscription=new jwe}invoke(e){this.callback.call(this.callbackThis,e)}}let be=class{constructor(e){var t;this._disposed=!1,this._options=e,this._leakageMon=void 0,this._perfMon=!((t=this._options)===null||t===void 0)&&t._profName?new Fy(this._options._profName):void 0}dispose(){var e,t,n,r;this._disposed||(this._disposed=!0,this._listeners&&this._listeners.clear(),(e=this._deliveryQueue)===null||e===void 0||e.clear(),(n=(t=this._options)===null||t===void 0?void 0:t.onLastListenerRemove)===null||n===void 0||n.call(t),(r=this._leakageMon)===null||r===void 0||r.dispose())}get event(){return this._event||(this._event=(e,t,n)=>{var r,s,o;this._listeners||(this._listeners=new la);const a=this._listeners.isEmpty();a&&(!((r=this._options)===null||r===void 0)&&r.onFirstListenerAdd)&&this._options.onFirstListenerAdd(this);let l,c;this._leakageMon&&this._listeners.size>=30&&(c=A8.create(),l=this._leakageMon.check(c,this._listeners.size+1));const u=new Kwe(e,t,c),d=this._listeners.push(u);a&&(!((s=this._options)===null||s===void 0)&&s.onFirstListenerDidAdd)&&this._options.onFirstListenerDidAdd(this),!((o=this._options)===null||o===void 0)&&o.onListenerDidAdd&&this._options.onListenerDidAdd(this,e,t);const h=u.subscription.set(()=>{l&&l(),this._disposed||(d(),this._options&&this._options.onLastListenerRemove&&(this._listeners&&!this._listeners.isEmpty()||this._options.onLastListenerRemove(this)))});return n instanceof Je?n.add(h):Array.isArray(n)&&n.push(h),h}),this._event}fire(e){var t,n;if(this._listeners){this._deliveryQueue||(this._deliveryQueue=new la);for(let r of this._listeners)this._deliveryQueue.push([r,e]);for((t=this._perfMon)===null||t===void 0||t.start(this._deliveryQueue.size);this._deliveryQueue.size>0;){const[r,s]=this._deliveryQueue.shift();try{r.invoke(s)}catch(o){Jt(o)}}(n=this._perfMon)===null||n===void 0||n.stop()}}};class By extends be{constructor(e){super(e),this._isPaused=0,this._eventQueue=new la,this._mergeFn=e==null?void 0:e.merge}pause(){this._isPaused++}resume(){if(this._isPaused!==0&&--this._isPaused===0)if(this._mergeFn){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._listeners&&(this._isPaused!==0?this._eventQueue.push(e):super.fire(e))}}class Ywe extends By{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 R8{constructor(){this.buffers=[]}wrapEvent(e){return(t,n,r)=>e(s=>{const o=this.buffers[this.buffers.length-1];o?o.push(()=>t.call(n,s)):t.call(n,s)},void 0,r)}bufferEvents(e){const t=[];this.buffers.push(t);const n=e();return this.buffers.pop(),t.forEach(r=>r()),n}}class vz{constructor(){this.listening=!1,this.inputEvent=kt.None,this.inputEventListener=Ne.None,this.emitter=new be({onFirstListenerDidAdd:()=>{this.listening=!0,this.inputEventListener=this.inputEvent(this.emitter.fire,this.emitter)},onLastListenerRemove:()=>{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 wz=Object.freeze(function(i,e){const t=setTimeout(i.bind(e),0);return{dispose(){clearTimeout(t)}}});var mn;(function(i){function e(t){return t===i.None||t===i.Cancelled||t instanceof Vy?!0:!t||typeof t!="object"?!1:typeof t.isCancellationRequested=="boolean"&&typeof t.onCancellationRequested=="function"}i.isCancellationToken=e,i.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:kt.None}),i.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:wz})})(mn||(mn={}));class Vy{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?wz:(this._emitter||(this._emitter=new be),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=null)}}let rs=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 Vy),this._token}cancel(){this._token?this._token instanceof Vy&&this._token.cancel():this._token=mn.Cancelled}dispose(e=!1){e&&this.cancel(),this._parentListener&&this._parentListener.dispose(),this._token?this._token instanceof Vy&&this._token.dispose():this._token=mn.None}};class O8{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 Wy=new O8,M8=new O8,P8=new O8,Cz=new Array(230),Zwe=Object.create(null),Xwe=Object.create(null),F8=[];for(let i=0;i<=193;i++)F8[i]=-1;(function(){const i="",e=[[0,1,0,"None",0,"unknown",0,"VK_UNKNOWN",i,i],[0,1,1,"Hyper",0,i,0,i,i,i],[0,1,2,"Super",0,i,0,i,i,i],[0,1,3,"Fn",0,i,0,i,i,i],[0,1,4,"FnLock",0,i,0,i,i,i],[0,1,5,"Suspend",0,i,0,i,i,i],[0,1,6,"Resume",0,i,0,i,i,i],[0,1,7,"Turbo",0,i,0,i,i,i],[0,1,8,"Sleep",0,i,0,"VK_SLEEP",i,i],[0,1,9,"WakeUp",0,i,0,i,i,i],[31,0,10,"KeyA",31,"A",65,"VK_A",i,i],[32,0,11,"KeyB",32,"B",66,"VK_B",i,i],[33,0,12,"KeyC",33,"C",67,"VK_C",i,i],[34,0,13,"KeyD",34,"D",68,"VK_D",i,i],[35,0,14,"KeyE",35,"E",69,"VK_E",i,i],[36,0,15,"KeyF",36,"F",70,"VK_F",i,i],[37,0,16,"KeyG",37,"G",71,"VK_G",i,i],[38,0,17,"KeyH",38,"H",72,"VK_H",i,i],[39,0,18,"KeyI",39,"I",73,"VK_I",i,i],[40,0,19,"KeyJ",40,"J",74,"VK_J",i,i],[41,0,20,"KeyK",41,"K",75,"VK_K",i,i],[42,0,21,"KeyL",42,"L",76,"VK_L",i,i],[43,0,22,"KeyM",43,"M",77,"VK_M",i,i],[44,0,23,"KeyN",44,"N",78,"VK_N",i,i],[45,0,24,"KeyO",45,"O",79,"VK_O",i,i],[46,0,25,"KeyP",46,"P",80,"VK_P",i,i],[47,0,26,"KeyQ",47,"Q",81,"VK_Q",i,i],[48,0,27,"KeyR",48,"R",82,"VK_R",i,i],[49,0,28,"KeyS",49,"S",83,"VK_S",i,i],[50,0,29,"KeyT",50,"T",84,"VK_T",i,i],[51,0,30,"KeyU",51,"U",85,"VK_U",i,i],[52,0,31,"KeyV",52,"V",86,"VK_V",i,i],[53,0,32,"KeyW",53,"W",87,"VK_W",i,i],[54,0,33,"KeyX",54,"X",88,"VK_X",i,i],[55,0,34,"KeyY",55,"Y",89,"VK_Y",i,i],[56,0,35,"KeyZ",56,"Z",90,"VK_Z",i,i],[22,0,36,"Digit1",22,"1",49,"VK_1",i,i],[23,0,37,"Digit2",23,"2",50,"VK_2",i,i],[24,0,38,"Digit3",24,"3",51,"VK_3",i,i],[25,0,39,"Digit4",25,"4",52,"VK_4",i,i],[26,0,40,"Digit5",26,"5",53,"VK_5",i,i],[27,0,41,"Digit6",27,"6",54,"VK_6",i,i],[28,0,42,"Digit7",28,"7",55,"VK_7",i,i],[29,0,43,"Digit8",29,"8",56,"VK_8",i,i],[30,0,44,"Digit9",30,"9",57,"VK_9",i,i],[21,0,45,"Digit0",21,"0",48,"VK_0",i,i],[3,1,46,"Enter",3,"Enter",13,"VK_RETURN",i,i],[9,1,47,"Escape",9,"Escape",27,"VK_ESCAPE",i,i],[1,1,48,"Backspace",1,"Backspace",8,"VK_BACK",i,i],[2,1,49,"Tab",2,"Tab",9,"VK_TAB",i,i],[10,1,50,"Space",10,"Space",32,"VK_SPACE",i,i],[83,0,51,"Minus",83,"-",189,"VK_OEM_MINUS","-","OEM_MINUS"],[81,0,52,"Equal",81,"=",187,"VK_OEM_PLUS","=","OEM_PLUS"],[87,0,53,"BracketLeft",87,"[",219,"VK_OEM_4","[","OEM_4"],[89,0,54,"BracketRight",89,"]",221,"VK_OEM_6","]","OEM_6"],[88,0,55,"Backslash",88,"\\",220,"VK_OEM_5","\\","OEM_5"],[0,0,56,"IntlHash",0,i,0,i,i,i],[80,0,57,"Semicolon",80,";",186,"VK_OEM_1",";","OEM_1"],[90,0,58,"Quote",90,"'",222,"VK_OEM_7","'","OEM_7"],[86,0,59,"Backquote",86,"`",192,"VK_OEM_3","`","OEM_3"],[82,0,60,"Comma",82,",",188,"VK_OEM_COMMA",",","OEM_COMMA"],[84,0,61,"Period",84,".",190,"VK_OEM_PERIOD",".","OEM_PERIOD"],[85,0,62,"Slash",85,"/",191,"VK_OEM_2","/","OEM_2"],[8,1,63,"CapsLock",8,"CapsLock",20,"VK_CAPITAL",i,i],[59,1,64,"F1",59,"F1",112,"VK_F1",i,i],[60,1,65,"F2",60,"F2",113,"VK_F2",i,i],[61,1,66,"F3",61,"F3",114,"VK_F3",i,i],[62,1,67,"F4",62,"F4",115,"VK_F4",i,i],[63,1,68,"F5",63,"F5",116,"VK_F5",i,i],[64,1,69,"F6",64,"F6",117,"VK_F6",i,i],[65,1,70,"F7",65,"F7",118,"VK_F7",i,i],[66,1,71,"F8",66,"F8",119,"VK_F8",i,i],[67,1,72,"F9",67,"F9",120,"VK_F9",i,i],[68,1,73,"F10",68,"F10",121,"VK_F10",i,i],[69,1,74,"F11",69,"F11",122,"VK_F11",i,i],[70,1,75,"F12",70,"F12",123,"VK_F12",i,i],[0,1,76,"PrintScreen",0,i,0,i,i,i],[79,1,77,"ScrollLock",79,"ScrollLock",145,"VK_SCROLL",i,i],[7,1,78,"Pause",7,"PauseBreak",19,"VK_PAUSE",i,i],[19,1,79,"Insert",19,"Insert",45,"VK_INSERT",i,i],[14,1,80,"Home",14,"Home",36,"VK_HOME",i,i],[11,1,81,"PageUp",11,"PageUp",33,"VK_PRIOR",i,i],[20,1,82,"Delete",20,"Delete",46,"VK_DELETE",i,i],[13,1,83,"End",13,"End",35,"VK_END",i,i],[12,1,84,"PageDown",12,"PageDown",34,"VK_NEXT",i,i],[17,1,85,"ArrowRight",17,"RightArrow",39,"VK_RIGHT","Right",i],[15,1,86,"ArrowLeft",15,"LeftArrow",37,"VK_LEFT","Left",i],[18,1,87,"ArrowDown",18,"DownArrow",40,"VK_DOWN","Down",i],[16,1,88,"ArrowUp",16,"UpArrow",38,"VK_UP","Up",i],[78,1,89,"NumLock",78,"NumLock",144,"VK_NUMLOCK",i,i],[108,1,90,"NumpadDivide",108,"NumPad_Divide",111,"VK_DIVIDE",i,i],[103,1,91,"NumpadMultiply",103,"NumPad_Multiply",106,"VK_MULTIPLY",i,i],[106,1,92,"NumpadSubtract",106,"NumPad_Subtract",109,"VK_SUBTRACT",i,i],[104,1,93,"NumpadAdd",104,"NumPad_Add",107,"VK_ADD",i,i],[3,1,94,"NumpadEnter",3,i,0,i,i,i],[94,1,95,"Numpad1",94,"NumPad1",97,"VK_NUMPAD1",i,i],[95,1,96,"Numpad2",95,"NumPad2",98,"VK_NUMPAD2",i,i],[96,1,97,"Numpad3",96,"NumPad3",99,"VK_NUMPAD3",i,i],[97,1,98,"Numpad4",97,"NumPad4",100,"VK_NUMPAD4",i,i],[98,1,99,"Numpad5",98,"NumPad5",101,"VK_NUMPAD5",i,i],[99,1,100,"Numpad6",99,"NumPad6",102,"VK_NUMPAD6",i,i],[100,1,101,"Numpad7",100,"NumPad7",103,"VK_NUMPAD7",i,i],[101,1,102,"Numpad8",101,"NumPad8",104,"VK_NUMPAD8",i,i],[102,1,103,"Numpad9",102,"NumPad9",105,"VK_NUMPAD9",i,i],[93,1,104,"Numpad0",93,"NumPad0",96,"VK_NUMPAD0",i,i],[107,1,105,"NumpadDecimal",107,"NumPad_Decimal",110,"VK_DECIMAL",i,i],[92,0,106,"IntlBackslash",92,"OEM_102",226,"VK_OEM_102",i,i],[58,1,107,"ContextMenu",58,"ContextMenu",93,i,i,i],[0,1,108,"Power",0,i,0,i,i,i],[0,1,109,"NumpadEqual",0,i,0,i,i,i],[71,1,110,"F13",71,"F13",124,"VK_F13",i,i],[72,1,111,"F14",72,"F14",125,"VK_F14",i,i],[73,1,112,"F15",73,"F15",126,"VK_F15",i,i],[74,1,113,"F16",74,"F16",127,"VK_F16",i,i],[75,1,114,"F17",75,"F17",128,"VK_F17",i,i],[76,1,115,"F18",76,"F18",129,"VK_F18",i,i],[77,1,116,"F19",77,"F19",130,"VK_F19",i,i],[0,1,117,"F20",0,i,0,"VK_F20",i,i],[0,1,118,"F21",0,i,0,"VK_F21",i,i],[0,1,119,"F22",0,i,0,"VK_F22",i,i],[0,1,120,"F23",0,i,0,"VK_F23",i,i],[0,1,121,"F24",0,i,0,"VK_F24",i,i],[0,1,122,"Open",0,i,0,i,i,i],[0,1,123,"Help",0,i,0,i,i,i],[0,1,124,"Select",0,i,0,i,i,i],[0,1,125,"Again",0,i,0,i,i,i],[0,1,126,"Undo",0,i,0,i,i,i],[0,1,127,"Cut",0,i,0,i,i,i],[0,1,128,"Copy",0,i,0,i,i,i],[0,1,129,"Paste",0,i,0,i,i,i],[0,1,130,"Find",0,i,0,i,i,i],[0,1,131,"AudioVolumeMute",112,"AudioVolumeMute",173,"VK_VOLUME_MUTE",i,i],[0,1,132,"AudioVolumeUp",113,"AudioVolumeUp",175,"VK_VOLUME_UP",i,i],[0,1,133,"AudioVolumeDown",114,"AudioVolumeDown",174,"VK_VOLUME_DOWN",i,i],[105,1,134,"NumpadComma",105,"NumPad_Separator",108,"VK_SEPARATOR",i,i],[110,0,135,"IntlRo",110,"ABNT_C1",193,"VK_ABNT_C1",i,i],[0,1,136,"KanaMode",0,i,0,i,i,i],[0,0,137,"IntlYen",0,i,0,i,i,i],[0,1,138,"Convert",0,i,0,i,i,i],[0,1,139,"NonConvert",0,i,0,i,i,i],[0,1,140,"Lang1",0,i,0,i,i,i],[0,1,141,"Lang2",0,i,0,i,i,i],[0,1,142,"Lang3",0,i,0,i,i,i],[0,1,143,"Lang4",0,i,0,i,i,i],[0,1,144,"Lang5",0,i,0,i,i,i],[0,1,145,"Abort",0,i,0,i,i,i],[0,1,146,"Props",0,i,0,i,i,i],[0,1,147,"NumpadParenLeft",0,i,0,i,i,i],[0,1,148,"NumpadParenRight",0,i,0,i,i,i],[0,1,149,"NumpadBackspace",0,i,0,i,i,i],[0,1,150,"NumpadMemoryStore",0,i,0,i,i,i],[0,1,151,"NumpadMemoryRecall",0,i,0,i,i,i],[0,1,152,"NumpadMemoryClear",0,i,0,i,i,i],[0,1,153,"NumpadMemoryAdd",0,i,0,i,i,i],[0,1,154,"NumpadMemorySubtract",0,i,0,i,i,i],[0,1,155,"NumpadClear",126,"Clear",12,"VK_CLEAR",i,i],[0,1,156,"NumpadClearEntry",0,i,0,i,i,i],[5,1,0,i,5,"Ctrl",17,"VK_CONTROL",i,i],[4,1,0,i,4,"Shift",16,"VK_SHIFT",i,i],[6,1,0,i,6,"Alt",18,"VK_MENU",i,i],[57,1,0,i,57,"Meta",0,"VK_COMMAND",i,i],[5,1,157,"ControlLeft",5,i,0,"VK_LCONTROL",i,i],[4,1,158,"ShiftLeft",4,i,0,"VK_LSHIFT",i,i],[6,1,159,"AltLeft",6,i,0,"VK_LMENU",i,i],[57,1,160,"MetaLeft",57,i,0,"VK_LWIN",i,i],[5,1,161,"ControlRight",5,i,0,"VK_RCONTROL",i,i],[4,1,162,"ShiftRight",4,i,0,"VK_RSHIFT",i,i],[6,1,163,"AltRight",6,i,0,"VK_RMENU",i,i],[57,1,164,"MetaRight",57,i,0,"VK_RWIN",i,i],[0,1,165,"BrightnessUp",0,i,0,i,i,i],[0,1,166,"BrightnessDown",0,i,0,i,i,i],[0,1,167,"MediaPlay",0,i,0,i,i,i],[0,1,168,"MediaRecord",0,i,0,i,i,i],[0,1,169,"MediaFastForward",0,i,0,i,i,i],[0,1,170,"MediaRewind",0,i,0,i,i,i],[114,1,171,"MediaTrackNext",119,"MediaTrackNext",176,"VK_MEDIA_NEXT_TRACK",i,i],[115,1,172,"MediaTrackPrevious",120,"MediaTrackPrevious",177,"VK_MEDIA_PREV_TRACK",i,i],[116,1,173,"MediaStop",121,"MediaStop",178,"VK_MEDIA_STOP",i,i],[0,1,174,"Eject",0,i,0,i,i,i],[117,1,175,"MediaPlayPause",122,"MediaPlayPause",179,"VK_MEDIA_PLAY_PAUSE",i,i],[0,1,176,"MediaSelect",123,"LaunchMediaPlayer",181,"VK_MEDIA_LAUNCH_MEDIA_SELECT",i,i],[0,1,177,"LaunchMail",124,"LaunchMail",180,"VK_MEDIA_LAUNCH_MAIL",i,i],[0,1,178,"LaunchApp2",125,"LaunchApp2",183,"VK_MEDIA_LAUNCH_APP2",i,i],[0,1,179,"LaunchApp1",0,i,0,"VK_MEDIA_LAUNCH_APP1",i,i],[0,1,180,"SelectTask",0,i,0,i,i,i],[0,1,181,"LaunchScreenSaver",0,i,0,i,i,i],[0,1,182,"BrowserSearch",115,"BrowserSearch",170,"VK_BROWSER_SEARCH",i,i],[0,1,183,"BrowserHome",116,"BrowserHome",172,"VK_BROWSER_HOME",i,i],[112,1,184,"BrowserBack",117,"BrowserBack",166,"VK_BROWSER_BACK",i,i],[113,1,185,"BrowserForward",118,"BrowserForward",167,"VK_BROWSER_FORWARD",i,i],[0,1,186,"BrowserStop",0,i,0,"VK_BROWSER_STOP",i,i],[0,1,187,"BrowserRefresh",0,i,0,"VK_BROWSER_REFRESH",i,i],[0,1,188,"BrowserFavorites",0,i,0,"VK_BROWSER_FAVORITES",i,i],[0,1,189,"ZoomToggle",0,i,0,i,i,i],[0,1,190,"MailReply",0,i,0,i,i,i],[0,1,191,"MailForward",0,i,0,i,i,i],[0,1,192,"MailSend",0,i,0,i,i,i],[109,1,0,i,109,"KeyInComposition",229,i,i,i],[111,1,0,i,111,"ABNT_C2",194,"VK_ABNT_C2",i,i],[91,1,0,i,91,"OEM_8",223,"VK_OEM_8",i,i],[0,1,0,i,0,i,0,"VK_KANA",i,i],[0,1,0,i,0,i,0,"VK_HANGUL",i,i],[0,1,0,i,0,i,0,"VK_JUNJA",i,i],[0,1,0,i,0,i,0,"VK_FINAL",i,i],[0,1,0,i,0,i,0,"VK_HANJA",i,i],[0,1,0,i,0,i,0,"VK_KANJI",i,i],[0,1,0,i,0,i,0,"VK_CONVERT",i,i],[0,1,0,i,0,i,0,"VK_NONCONVERT",i,i],[0,1,0,i,0,i,0,"VK_ACCEPT",i,i],[0,1,0,i,0,i,0,"VK_MODECHANGE",i,i],[0,1,0,i,0,i,0,"VK_SELECT",i,i],[0,1,0,i,0,i,0,"VK_PRINT",i,i],[0,1,0,i,0,i,0,"VK_EXECUTE",i,i],[0,1,0,i,0,i,0,"VK_SNAPSHOT",i,i],[0,1,0,i,0,i,0,"VK_HELP",i,i],[0,1,0,i,0,i,0,"VK_APPS",i,i],[0,1,0,i,0,i,0,"VK_PROCESSKEY",i,i],[0,1,0,i,0,i,0,"VK_PACKET",i,i],[0,1,0,i,0,i,0,"VK_DBE_SBCSCHAR",i,i],[0,1,0,i,0,i,0,"VK_DBE_DBCSCHAR",i,i],[0,1,0,i,0,i,0,"VK_ATTN",i,i],[0,1,0,i,0,i,0,"VK_CRSEL",i,i],[0,1,0,i,0,i,0,"VK_EXSEL",i,i],[0,1,0,i,0,i,0,"VK_EREOF",i,i],[0,1,0,i,0,i,0,"VK_PLAY",i,i],[0,1,0,i,0,i,0,"VK_ZOOM",i,i],[0,1,0,i,0,i,0,"VK_NONAME",i,i],[0,1,0,i,0,i,0,"VK_PA1",i,i],[0,1,0,i,0,i,0,"VK_OEM_CLEAR",i,i]];let t=[],n=[];for(const r of e){const[s,o,a,l,c,u,d,h,f,g]=r;if(n[a]||(n[a]=!0,Zwe[l]=a,Xwe[l.toLowerCase()]=a,o&&(F8[a]=c)),!t[c]){if(t[c]=!0,!u)throw new Error(`String representation missing for key code ${c} around scan code ${l}`);Wy.define(c,u),M8.define(c,f||u),P8.define(c,g||f||u)}d&&(Cz[d]=c)}})();var Ig;(function(i){function e(a){return Wy.keyCodeToStr(a)}i.toString=e;function t(a){return Wy.strToKeyCode(a)}i.fromString=t;function n(a){return M8.keyCodeToStr(a)}i.toUserSettingsUS=n;function r(a){return P8.keyCodeToStr(a)}i.toUserSettingsGeneral=r;function s(a){return M8.strToKeyCode(a)||P8.strToKeyCode(a)}i.fromUserSettings=s;function o(a){if(a>=93&&a<=108)return null;switch(a){case 16:return"Up";case 18:return"Down";case 15:return"Left";case 17:return"Right"}return Wy.keyCodeToStr(a)}i.toElectronAccelerator=o})(Ig||(Ig={}));function Mr(i,e){const t=(e&65535)<<16>>>0;return(i|t)>>>0}let c_;if(typeof Ki.vscode<"u"&&typeof Ki.vscode.process<"u"){const i=Ki.vscode.process;c_={get platform(){return i.platform},get arch(){return i.arch},get env(){return i.env},cwd(){return i.cwd()}}}else typeof process<"u"?c_={get platform(){return process.platform},get arch(){return process.arch},get env(){return process.env},cwd(){return process.env.VSCODE_CWD||process.cwd()}}:c_={get platform(){return Gr?"win32":gn?"darwin":"linux"},get arch(){},get env(){return{}},cwd(){return"/"}};const B8=c_.cwd,Qwe=c_.env,Dg=c_.platform,Jwe=65,eCe=97,tCe=90,nCe=122,Ch=46,Ps=47,ca=92,yh=58,iCe=63;class yz extends Error{constructor(e,t,n){let r;typeof t=="string"&&t.indexOf("not ")===0?(r="must not be",t=t.replace(/^not /,"")):r="must be";const s=e.indexOf(".")!==-1?"property":"argument";let o=`The "${e}" ${s} ${r} of type ${t}`;o+=`. Received type ${typeof n}`,super(o),this.code="ERR_INVALID_ARG_TYPE"}}function Pr(i,e){if(typeof i!="string")throw new yz(e,"string",i)}function qn(i){return i===Ps||i===ca}function V8(i){return i===Ps}function Sh(i){return i>=Jwe&&i<=tCe||i>=eCe&&i<=nCe}function Hy(i,e,t,n){let r="",s=0,o=-1,a=0,l=0;for(let c=0;c<=i.length;++c){if(c2){const u=r.lastIndexOf(t);u===-1?(r="",s=0):(r=r.slice(0,u),s=r.length-1-r.lastIndexOf(t)),o=c,a=0;continue}else if(r.length!==0){r="",s=0,o=c,a=0;continue}}e&&(r+=r.length>0?`${t}..`:"..",s=2)}else r.length>0?r+=`${t}${i.slice(o+1,c)}`:r=i.slice(o+1,c),s=c-o-1;o=c,a=0}else l===Ch&&a!==-1?++a:a=-1}return r}function Sz(i,e){if(e===null||typeof e!="object")throw new yz("pathObject","Object",e);const t=e.dir||e.root,n=e.base||`${e.name||""}${e.ext||""}`;return t?t===e.root?`${t}${n}`:`${t}${i}${n}`:n}const Vo={resolve(...i){let e="",t="",n=!1;for(let r=i.length-1;r>=-1;r--){let s;if(r>=0){if(s=i[r],Pr(s,"path"),s.length===0)continue}else e.length===0?s=B8():(s=Qwe[`=${e}`]||B8(),(s===void 0||s.slice(0,2).toLowerCase()!==e.toLowerCase()&&s.charCodeAt(2)===ca)&&(s=`${e}\\`));const o=s.length;let a=0,l="",c=!1;const u=s.charCodeAt(0);if(o===1)qn(u)&&(a=1,c=!0);else if(qn(u))if(c=!0,qn(s.charCodeAt(1))){let d=2,h=d;for(;d2&&qn(s.charCodeAt(2))&&(c=!0,a=3));if(l.length>0)if(e.length>0){if(l.toLowerCase()!==e.toLowerCase())continue}else e=l;if(n){if(e.length>0)break}else if(t=`${s.slice(a)}\\${t}`,n=c,c&&e.length>0)break}return t=Hy(t,!n,"\\",qn),n?`${e}\\${t}`:`${e}${t}`||"."},normalize(i){Pr(i,"path");const e=i.length;if(e===0)return".";let t=0,n,r=!1;const s=i.charCodeAt(0);if(e===1)return V8(s)?"\\":i;if(qn(s))if(r=!0,qn(i.charCodeAt(1))){let a=2,l=a;for(;a2&&qn(i.charCodeAt(2))&&(r=!0,t=3));let o=t0&&qn(i.charCodeAt(e-1))&&(o+="\\"),n===void 0?r?`\\${o}`:o:r?`${n}\\${o}`:`${n}${o}`},isAbsolute(i){Pr(i,"path");const e=i.length;if(e===0)return!1;const t=i.charCodeAt(0);return qn(t)||e>2&&Sh(t)&&i.charCodeAt(1)===yh&&qn(i.charCodeAt(2))},join(...i){if(i.length===0)return".";let e,t;for(let s=0;s0&&(e===void 0?e=t=o:e+=`\\${o}`)}if(e===void 0)return".";let n=!0,r=0;if(typeof t=="string"&&qn(t.charCodeAt(0))){++r;const s=t.length;s>1&&qn(t.charCodeAt(1))&&(++r,s>2&&(qn(t.charCodeAt(2))?++r:n=!1))}if(n){for(;r=2&&(e=`\\${e.slice(r)}`)}return Vo.normalize(e)},relative(i,e){if(Pr(i,"from"),Pr(e,"to"),i===e)return"";const t=Vo.resolve(i),n=Vo.resolve(e);if(t===n||(i=t.toLowerCase(),e=n.toLowerCase(),i===e))return"";let r=0;for(;rr&&i.charCodeAt(s-1)===ca;)s--;const o=s-r;let a=0;for(;aa&&e.charCodeAt(l-1)===ca;)l--;const c=l-a,u=ou){if(e.charCodeAt(a+h)===ca)return n.slice(a+h+1);if(h===2)return n.slice(a+h)}o>u&&(i.charCodeAt(r+h)===ca?d=h:h===2&&(d=3)),d===-1&&(d=0)}let f="";for(h=r+d+1;h<=s;++h)(h===s||i.charCodeAt(h)===ca)&&(f+=f.length===0?"..":"\\..");return a+=d,f.length>0?`${f}${n.slice(a,l)}`:(n.charCodeAt(a)===ca&&++a,n.slice(a,l))},toNamespacedPath(i){if(typeof i!="string")return i;if(i.length===0)return"";const e=Vo.resolve(i);if(e.length<=2)return i;if(e.charCodeAt(0)===ca){if(e.charCodeAt(1)===ca){const t=e.charCodeAt(2);if(t!==iCe&&t!==Ch)return`\\\\?\\UNC\\${e.slice(2)}`}}else if(Sh(e.charCodeAt(0))&&e.charCodeAt(1)===yh&&e.charCodeAt(2)===ca)return`\\\\?\\${e}`;return i},dirname(i){Pr(i,"path");const e=i.length;if(e===0)return".";let t=-1,n=0;const r=i.charCodeAt(0);if(e===1)return qn(r)?i:".";if(qn(r)){if(t=n=1,qn(i.charCodeAt(1))){let a=2,l=a;for(;a2&&qn(i.charCodeAt(2))?3:2,n=t);let s=-1,o=!0;for(let a=e-1;a>=n;--a)if(qn(i.charCodeAt(a))){if(!o){s=a;break}}else o=!1;if(s===-1){if(t===-1)return".";s=t}return i.slice(0,s)},basename(i,e){e!==void 0&&Pr(e,"ext"),Pr(i,"path");let t=0,n=-1,r=!0,s;if(i.length>=2&&Sh(i.charCodeAt(0))&&i.charCodeAt(1)===yh&&(t=2),e!==void 0&&e.length>0&&e.length<=i.length){if(e===i)return"";let o=e.length-1,a=-1;for(s=i.length-1;s>=t;--s){const l=i.charCodeAt(s);if(qn(l)){if(!r){t=s+1;break}}else a===-1&&(r=!1,a=s+1),o>=0&&(l===e.charCodeAt(o)?--o===-1&&(n=s):(o=-1,n=a))}return t===n?n=a:n===-1&&(n=i.length),i.slice(t,n)}for(s=i.length-1;s>=t;--s)if(qn(i.charCodeAt(s))){if(!r){t=s+1;break}}else n===-1&&(r=!1,n=s+1);return n===-1?"":i.slice(t,n)},extname(i){Pr(i,"path");let e=0,t=-1,n=0,r=-1,s=!0,o=0;i.length>=2&&i.charCodeAt(1)===yh&&Sh(i.charCodeAt(0))&&(e=n=2);for(let a=i.length-1;a>=e;--a){const l=i.charCodeAt(a);if(qn(l)){if(!s){n=a+1;break}continue}r===-1&&(s=!1,r=a+1),l===Ch?t===-1?t=a:o!==1&&(o=1):t!==-1&&(o=-1)}return t===-1||r===-1||o===0||o===1&&t===r-1&&t===n+1?"":i.slice(t,r)},format:Sz.bind(null,"\\"),parse(i){Pr(i,"path");const e={root:"",dir:"",base:"",ext:"",name:""};if(i.length===0)return e;const t=i.length;let n=0,r=i.charCodeAt(0);if(t===1)return qn(r)?(e.root=e.dir=i,e):(e.base=e.name=i,e);if(qn(r)){if(n=1,qn(i.charCodeAt(1))){let d=2,h=d;for(;d0&&(e.root=i.slice(0,n));let s=-1,o=n,a=-1,l=!0,c=i.length-1,u=0;for(;c>=n;--c){if(r=i.charCodeAt(c),qn(r)){if(!l){o=c+1;break}continue}a===-1&&(l=!1,a=c+1),r===Ch?s===-1?s=c:u!==1&&(u=1):s!==-1&&(u=-1)}return a!==-1&&(s===-1||u===0||u===1&&s===a-1&&s===o+1?e.base=e.name=i.slice(o,a):(e.name=i.slice(o,s),e.base=i.slice(o,a),e.ext=i.slice(s,a))),o>0&&o!==n?e.dir=i.slice(0,o-1):e.dir=e.root,e},sep:"\\",delimiter:";",win32:null,posix:null},tr={resolve(...i){let e="",t=!1;for(let n=i.length-1;n>=-1&&!t;n--){const r=n>=0?i[n]:B8();Pr(r,"path"),r.length!==0&&(e=`${r}/${e}`,t=r.charCodeAt(0)===Ps)}return e=Hy(e,!t,"/",V8),t?`/${e}`:e.length>0?e:"."},normalize(i){if(Pr(i,"path"),i.length===0)return".";const e=i.charCodeAt(0)===Ps,t=i.charCodeAt(i.length-1)===Ps;return i=Hy(i,!e,"/",V8),i.length===0?e?"/":t?"./":".":(t&&(i+="/"),e?`/${i}`:i)},isAbsolute(i){return Pr(i,"path"),i.length>0&&i.charCodeAt(0)===Ps},join(...i){if(i.length===0)return".";let e;for(let t=0;t0&&(e===void 0?e=n:e+=`/${n}`)}return e===void 0?".":tr.normalize(e)},relative(i,e){if(Pr(i,"from"),Pr(e,"to"),i===e||(i=tr.resolve(i),e=tr.resolve(e),i===e))return"";const t=1,n=i.length,r=n-t,s=1,o=e.length-s,a=ra){if(e.charCodeAt(s+c)===Ps)return e.slice(s+c+1);if(c===0)return e.slice(s+c)}else r>a&&(i.charCodeAt(t+c)===Ps?l=c:c===0&&(l=0));let u="";for(c=t+l+1;c<=n;++c)(c===n||i.charCodeAt(c)===Ps)&&(u+=u.length===0?"..":"/..");return`${u}${e.slice(s+l)}`},toNamespacedPath(i){return i},dirname(i){if(Pr(i,"path"),i.length===0)return".";const e=i.charCodeAt(0)===Ps;let t=-1,n=!0;for(let r=i.length-1;r>=1;--r)if(i.charCodeAt(r)===Ps){if(!n){t=r;break}}else n=!1;return t===-1?e?"/":".":e&&t===1?"//":i.slice(0,t)},basename(i,e){e!==void 0&&Pr(e,"ext"),Pr(i,"path");let t=0,n=-1,r=!0,s;if(e!==void 0&&e.length>0&&e.length<=i.length){if(e===i)return"";let o=e.length-1,a=-1;for(s=i.length-1;s>=0;--s){const l=i.charCodeAt(s);if(l===Ps){if(!r){t=s+1;break}}else a===-1&&(r=!1,a=s+1),o>=0&&(l===e.charCodeAt(o)?--o===-1&&(n=s):(o=-1,n=a))}return t===n?n=a:n===-1&&(n=i.length),i.slice(t,n)}for(s=i.length-1;s>=0;--s)if(i.charCodeAt(s)===Ps){if(!r){t=s+1;break}}else n===-1&&(r=!1,n=s+1);return n===-1?"":i.slice(t,n)},extname(i){Pr(i,"path");let e=-1,t=0,n=-1,r=!0,s=0;for(let o=i.length-1;o>=0;--o){const a=i.charCodeAt(o);if(a===Ps){if(!r){t=o+1;break}continue}n===-1&&(r=!1,n=o+1),a===Ch?e===-1?e=o:s!==1&&(s=1):e!==-1&&(s=-1)}return e===-1||n===-1||s===0||s===1&&e===n-1&&e===t+1?"":i.slice(e,n)},format:Sz.bind(null,"/"),parse(i){Pr(i,"path");const e={root:"",dir:"",base:"",ext:"",name:""};if(i.length===0)return e;const t=i.charCodeAt(0)===Ps;let n;t?(e.root="/",n=1):n=0;let r=-1,s=0,o=-1,a=!0,l=i.length-1,c=0;for(;l>=n;--l){const u=i.charCodeAt(l);if(u===Ps){if(!a){s=l+1;break}continue}o===-1&&(a=!1,o=l+1),u===Ch?r===-1?r=l:c!==1&&(c=1):r!==-1&&(c=-1)}if(o!==-1){const u=s===0&&t?1:s;r===-1||c===0||c===1&&r===o-1&&r===s+1?e.base=e.name=i.slice(u,o):(e.name=i.slice(u,r),e.base=i.slice(u,o),e.ext=i.slice(r,o))}return s>0?e.dir=i.slice(0,s-1):t&&(e.dir="/"),e},sep:"/",delimiter:":",win32:null,posix:null};tr.win32=Vo.win32=Vo,tr.posix=Vo.posix=tr;const W8=Dg==="win32"?Vo.normalize:tr.normalize,rCe=Dg==="win32"?Vo.resolve:tr.resolve,sCe=Dg==="win32"?Vo.relative:tr.relative,kz=Dg==="win32"?Vo.dirname:tr.dirname,Ng=Dg==="win32"?Vo.basename:tr.basename,oCe=Dg==="win32"?Vo.extname:tr.extname,qc=Dg==="win32"?Vo.sep:tr.sep,aCe=/^\w[\w\d+.-]*$/,lCe=/^\//,cCe=/^\/\//;function Ez(i,e){if(!i.scheme&&e)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${i.authority}", path: "${i.path}", query: "${i.query}", fragment: "${i.fragment}"}`);if(i.scheme&&!aCe.test(i.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(i.path){if(i.authority){if(!lCe.test(i.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(cCe.test(i.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}}function uCe(i,e){return!i&&!e?"file":i}function dCe(i,e){switch(i){case"https":case"http":case"file":e?e[0]!==rc&&(e=rc+e):e=rc;break}return e}const Zi="",rc="/",hCe=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class Pt{constructor(e,t,n,r,s,o=!1){typeof e=="object"?(this.scheme=e.scheme||Zi,this.authority=e.authority||Zi,this.path=e.path||Zi,this.query=e.query||Zi,this.fragment=e.fragment||Zi):(this.scheme=uCe(e,o),this.authority=t||Zi,this.path=dCe(this.scheme,n||Zi),this.query=r||Zi,this.fragment=s||Zi,Ez(this,o))}static isUri(e){return e instanceof Pt?!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}get fsPath(){return zy(this,!1)}with(e){if(!e)return this;let{scheme:t,authority:n,path:r,query:s,fragment:o}=e;return t===void 0?t=this.scheme:t===null&&(t=Zi),n===void 0?n=this.authority:n===null&&(n=Zi),r===void 0?r=this.path:r===null&&(r=Zi),s===void 0?s=this.query:s===null&&(s=Zi),o===void 0?o=this.fragment:o===null&&(o=Zi),t===this.scheme&&n===this.authority&&r===this.path&&s===this.query&&o===this.fragment?this:new u_(t,n,r,s,o)}static parse(e,t=!1){const n=hCe.exec(e);return n?new u_(n[2]||Zi,$y(n[4]||Zi),$y(n[5]||Zi),$y(n[7]||Zi),$y(n[9]||Zi),t):new u_(Zi,Zi,Zi,Zi,Zi)}static file(e){let t=Zi;if(Gr&&(e=e.replace(/\\/g,rc)),e[0]===rc&&e[1]===rc){const n=e.indexOf(rc,2);n===-1?(t=e.substring(2),e=rc):(t=e.substring(2,n),e=e.substring(n)||rc)}return new u_("file",t,e,Zi,Zi)}static from(e){const t=new u_(e.scheme,e.authority,e.path,e.query,e.fragment);return Ez(t,!0),t}static joinPath(e,...t){if(!e.path)throw new Error("[UriError]: cannot call joinPath on URI without path");let n;return Gr&&e.scheme==="file"?n=Pt.file(Vo.join(zy(e,!0),...t)).path:n=tr.join(e.path,...t),e.with({path:n})}toString(e=!1){return H8(this,e)}toJSON(){return this}static revive(e){if(e){if(e instanceof Pt)return e;{const t=new u_(e);return t._formatted=e.external,t._fsPath=e._sep===xz?e.fsPath:null,t}}else return e}}const xz=Gr?1:void 0;let u_=class extends Pt{constructor(){super(...arguments),this._formatted=null,this._fsPath=null}get fsPath(){return this._fsPath||(this._fsPath=zy(this,!1)),this._fsPath}toString(e=!1){return e?H8(this,!0):(this._formatted||(this._formatted=H8(this,!1)),this._formatted)}toJSON(){const e={$mid:1};return this._fsPath&&(e.fsPath=this._fsPath,e._sep=xz),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 Lz={[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 Tz(i,e){let t,n=-1;for(let r=0;r=97&&s<=122||s>=65&&s<=90||s>=48&&s<=57||s===45||s===46||s===95||s===126||e&&s===47)n!==-1&&(t+=encodeURIComponent(i.substring(n,r)),n=-1),t!==void 0&&(t+=i.charAt(r));else{t===void 0&&(t=i.substr(0,r));const o=Lz[s];o!==void 0?(n!==-1&&(t+=encodeURIComponent(i.substring(n,r)),n=-1),t+=o):n===-1&&(n=r)}}return n!==-1&&(t+=encodeURIComponent(i.substring(n))),t!==void 0?t:i}function fCe(i){let e;for(let t=0;t1&&i.scheme==="file"?t=`//${i.authority}${i.path}`:i.path.charCodeAt(0)===47&&(i.path.charCodeAt(1)>=65&&i.path.charCodeAt(1)<=90||i.path.charCodeAt(1)>=97&&i.path.charCodeAt(1)<=122)&&i.path.charCodeAt(2)===58?e?t=i.path.substr(1):t=i.path[1].toLowerCase()+i.path.substr(2):t=i.path,Gr&&(t=t.replace(/\//g,"\\")),t}function H8(i,e){const t=e?fCe:Tz;let n="",{scheme:r,authority:s,path:o,query:a,fragment:l}=i;if(r&&(n+=r,n+=":"),(s||r==="file")&&(n+=rc,n+=rc),s){let c=s.indexOf("@");if(c!==-1){const u=s.substr(0,c);s=s.substr(c+1),c=u.indexOf(":"),c===-1?n+=t(u,!1):(n+=t(u.substr(0,c),!1),n+=":",n+=t(u.substr(c+1),!1)),n+="@"}s=s.toLowerCase(),c=s.indexOf(":"),c===-1?n+=t(s,!1):(n+=t(s.substr(0,c),!1),n+=s.substr(c))}if(o){if(o.length>=3&&o.charCodeAt(0)===47&&o.charCodeAt(2)===58){const c=o.charCodeAt(1);c>=65&&c<=90&&(o=`/${String.fromCharCode(c+32)}:${o.substr(3)}`)}else if(o.length>=2&&o.charCodeAt(1)===58){const c=o.charCodeAt(0);c>=65&&c<=90&&(o=`${String.fromCharCode(c+32)}:${o.substr(2)}`)}n+=t(o,!0)}return a&&(n+="?",n+=t(a,!1)),l&&(n+="#",n+=e?l:Tz(l,!1)),n}function Iz(i){try{return decodeURIComponent(i)}catch{return i.length>3?i.substr(0,3)+Iz(i.substr(3)):i}}const Dz=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function $y(i){return i.match(Dz)?i.replace(Dz,e=>Iz(e)):i}let ye=class{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 ye(e,t)}delta(e=0,t=0){return this.with(this.lineNumber+e,this.column+t)}equals(e){return ye.equals(this,e)}static equals(e,t){return!e&&!t?!0:!!e&&!!t&&e.lineNumber===t.lineNumber&&e.column===t.column}isBefore(e){return ye.isBefore(this,e)}static isBefore(e,t){return e.lineNumbern||e===n&&t>r?(this.startLineNumber=n,this.startColumn=r,this.endLineNumber=e,this.endColumn=t):(this.startLineNumber=e,this.startColumn=t,this.endLineNumber=n,this.endColumn=r)}isEmpty(){return H.isEmpty(this)}static isEmpty(e){return e.startLineNumber===e.endLineNumber&&e.startColumn===e.endColumn}containsPosition(e){return H.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 H.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 H.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 H.plusRange(this,e)}static plusRange(e,t){let n,r,s,o;return t.startLineNumbere.endLineNumber?(s=t.endLineNumber,o=t.endColumn):t.endLineNumber===e.endLineNumber?(s=t.endLineNumber,o=Math.max(t.endColumn,e.endColumn)):(s=e.endLineNumber,o=e.endColumn),new H(n,r,s,o)}intersectRanges(e){return H.intersectRanges(this,e)}static intersectRanges(e,t){let n=e.startLineNumber,r=e.startColumn,s=e.endLineNumber,o=e.endColumn,a=t.startLineNumber,l=t.startColumn,c=t.endLineNumber,u=t.endColumn;return nc?(s=c,o=u):s===c&&(o=Math.min(o,u)),n>s||n===s&&r>o?null:new H(n,r,s,o)}equalsRange(e){return H.equalsRange(this,e)}static equalsRange(e,t){return!!e&&!!t&&e.startLineNumber===t.startLineNumber&&e.startColumn===t.startColumn&&e.endLineNumber===t.endLineNumber&&e.endColumn===t.endColumn}getEndPosition(){return H.getEndPosition(this)}static getEndPosition(e){return new ye(e.endLineNumber,e.endColumn)}getStartPosition(){return H.getStartPosition(this)}static getStartPosition(e){return new ye(e.startLineNumber,e.startColumn)}toString(){return"["+this.startLineNumber+","+this.startColumn+" -> "+this.endLineNumber+","+this.endColumn+"]"}setEndPosition(e,t){return new H(this.startLineNumber,this.startColumn,e,t)}setStartPosition(e,t){return new H(e,t,this.endLineNumber,this.endColumn)}collapseToStart(){return H.collapseToStart(this)}static collapseToStart(e){return new H(e.startLineNumber,e.startColumn,e.startLineNumber,e.startColumn)}static fromPositions(e,t=e){return new H(e.lineNumber,e.column,t.lineNumber,t.column)}static lift(e){return e?new H(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}},ut=class extends H{constructor(e,t,n,r){super(e,t,n,r),this.selectionStartLineNumber=e,this.selectionStartColumn=t,this.positionLineNumber=n,this.positionColumn=r}toString(){return"["+this.selectionStartLineNumber+","+this.selectionStartColumn+" -> "+this.positionLineNumber+","+this.positionColumn+"]"}equalsSelection(e){return ut.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 ut(this.startLineNumber,this.startColumn,e,t):new ut(e,t,this.startLineNumber,this.startColumn)}getPosition(){return new ye(this.positionLineNumber,this.positionColumn)}getSelectionStart(){return new ye(this.selectionStartLineNumber,this.selectionStartColumn)}setStartPosition(e,t){return this.getDirection()===0?new ut(e,t,this.endLineNumber,this.endColumn):new ut(this.endLineNumber,this.endColumn,e,t)}static fromPositions(e,t=e){return new ut(e.lineNumber,e.column,t.lineNumber,t.column)}static fromRange(e,t){return t===0?new ut(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn):new ut(e.endLineNumber,e.endColumn,e.startLineNumber,e.startColumn)}static liftSelection(e){return new ut(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,r=e.length;n{this._map.get(e)===t&&(this._map.delete(e),this.fire([e]))})}registerFactory(e,t){var n;(n=this._factories.get(e))===null||n===void 0||n.dispose();const r=new pCe(this,e,t);return this._factories.set(e,r),fn(()=>{const s=this._factories.get(e);!s||s!==r||(this._factories.delete(e),s.dispose())})}getOrCreate(e){return z8(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))})}get(e){return this._map.get(e)||null}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._map.keys()),changedColorMap:!0})}getColorMap(){return this._colorMap}getDefaultBackground(){return this._colorMap&&this._colorMap.length>2?this._colorMap[2]:null}};class pCe extends Ne{constructor(e,t,n){super(),this._registry=e,this._languageId=t,this._factory=n,this._isDisposed=!1,this._resolvePromise=null,this._isResolved=!1}get isResolved(){return this._isResolved}dispose(){this._isDisposed=!0,super.dispose()}resolve(){return z8(this,void 0,void 0,function*(){return this._resolvePromise||(this._resolvePromise=this._create()),this._resolvePromise})}_create(){return z8(this,void 0,void 0,function*(){const e=yield Promise.resolve(this._factory.createTokenizationSupport());this._isResolved=!0,e&&!this._isDisposed&&this._register(this._registry.register(this._languageId,e))})}}function mCe(i){return i?i.replace(/\$\((.*?)\)/g,(e,t)=>` ${t} `).trim():""}class k{constructor(e,t,n){this.id=e,this.definition=t,this.description=n,k._allCodicons.push(this)}get classNames(){return"codicon codicon-"+this.id}get classNamesArray(){return["codicon","codicon-"+this.id]}get cssSelector(){return".codicon.codicon-"+this.id}static getAll(){return k._allCodicons}}k._allCodicons=[],k.add=new k("add",{fontCharacter:"\\ea60"}),k.plus=new k("plus",k.add.definition),k.gistNew=new k("gist-new",k.add.definition),k.repoCreate=new k("repo-create",k.add.definition),k.lightbulb=new k("lightbulb",{fontCharacter:"\\ea61"}),k.lightBulb=new k("light-bulb",{fontCharacter:"\\ea61"}),k.repo=new k("repo",{fontCharacter:"\\ea62"}),k.repoDelete=new k("repo-delete",{fontCharacter:"\\ea62"}),k.gistFork=new k("gist-fork",{fontCharacter:"\\ea63"}),k.repoForked=new k("repo-forked",{fontCharacter:"\\ea63"}),k.gitPullRequest=new k("git-pull-request",{fontCharacter:"\\ea64"}),k.gitPullRequestAbandoned=new k("git-pull-request-abandoned",{fontCharacter:"\\ea64"}),k.recordKeys=new k("record-keys",{fontCharacter:"\\ea65"}),k.keyboard=new k("keyboard",{fontCharacter:"\\ea65"}),k.tag=new k("tag",{fontCharacter:"\\ea66"}),k.tagAdd=new k("tag-add",{fontCharacter:"\\ea66"}),k.tagRemove=new k("tag-remove",{fontCharacter:"\\ea66"}),k.person=new k("person",{fontCharacter:"\\ea67"}),k.personFollow=new k("person-follow",{fontCharacter:"\\ea67"}),k.personOutline=new k("person-outline",{fontCharacter:"\\ea67"}),k.personFilled=new k("person-filled",{fontCharacter:"\\ea67"}),k.gitBranch=new k("git-branch",{fontCharacter:"\\ea68"}),k.gitBranchCreate=new k("git-branch-create",{fontCharacter:"\\ea68"}),k.gitBranchDelete=new k("git-branch-delete",{fontCharacter:"\\ea68"}),k.sourceControl=new k("source-control",{fontCharacter:"\\ea68"}),k.mirror=new k("mirror",{fontCharacter:"\\ea69"}),k.mirrorPublic=new k("mirror-public",{fontCharacter:"\\ea69"}),k.star=new k("star",{fontCharacter:"\\ea6a"}),k.starAdd=new k("star-add",{fontCharacter:"\\ea6a"}),k.starDelete=new k("star-delete",{fontCharacter:"\\ea6a"}),k.starEmpty=new k("star-empty",{fontCharacter:"\\ea6a"}),k.comment=new k("comment",{fontCharacter:"\\ea6b"}),k.commentAdd=new k("comment-add",{fontCharacter:"\\ea6b"}),k.alert=new k("alert",{fontCharacter:"\\ea6c"}),k.warning=new k("warning",{fontCharacter:"\\ea6c"}),k.search=new k("search",{fontCharacter:"\\ea6d"}),k.searchSave=new k("search-save",{fontCharacter:"\\ea6d"}),k.logOut=new k("log-out",{fontCharacter:"\\ea6e"}),k.signOut=new k("sign-out",{fontCharacter:"\\ea6e"}),k.logIn=new k("log-in",{fontCharacter:"\\ea6f"}),k.signIn=new k("sign-in",{fontCharacter:"\\ea6f"}),k.eye=new k("eye",{fontCharacter:"\\ea70"}),k.eyeUnwatch=new k("eye-unwatch",{fontCharacter:"\\ea70"}),k.eyeWatch=new k("eye-watch",{fontCharacter:"\\ea70"}),k.circleFilled=new k("circle-filled",{fontCharacter:"\\ea71"}),k.primitiveDot=new k("primitive-dot",{fontCharacter:"\\ea71"}),k.closeDirty=new k("close-dirty",{fontCharacter:"\\ea71"}),k.debugBreakpoint=new k("debug-breakpoint",{fontCharacter:"\\ea71"}),k.debugBreakpointDisabled=new k("debug-breakpoint-disabled",{fontCharacter:"\\ea71"}),k.debugHint=new k("debug-hint",{fontCharacter:"\\ea71"}),k.primitiveSquare=new k("primitive-square",{fontCharacter:"\\ea72"}),k.edit=new k("edit",{fontCharacter:"\\ea73"}),k.pencil=new k("pencil",{fontCharacter:"\\ea73"}),k.info=new k("info",{fontCharacter:"\\ea74"}),k.issueOpened=new k("issue-opened",{fontCharacter:"\\ea74"}),k.gistPrivate=new k("gist-private",{fontCharacter:"\\ea75"}),k.gitForkPrivate=new k("git-fork-private",{fontCharacter:"\\ea75"}),k.lock=new k("lock",{fontCharacter:"\\ea75"}),k.mirrorPrivate=new k("mirror-private",{fontCharacter:"\\ea75"}),k.close=new k("close",{fontCharacter:"\\ea76"}),k.removeClose=new k("remove-close",{fontCharacter:"\\ea76"}),k.x=new k("x",{fontCharacter:"\\ea76"}),k.repoSync=new k("repo-sync",{fontCharacter:"\\ea77"}),k.sync=new k("sync",{fontCharacter:"\\ea77"}),k.clone=new k("clone",{fontCharacter:"\\ea78"}),k.desktopDownload=new k("desktop-download",{fontCharacter:"\\ea78"}),k.beaker=new k("beaker",{fontCharacter:"\\ea79"}),k.microscope=new k("microscope",{fontCharacter:"\\ea79"}),k.vm=new k("vm",{fontCharacter:"\\ea7a"}),k.deviceDesktop=new k("device-desktop",{fontCharacter:"\\ea7a"}),k.file=new k("file",{fontCharacter:"\\ea7b"}),k.fileText=new k("file-text",{fontCharacter:"\\ea7b"}),k.more=new k("more",{fontCharacter:"\\ea7c"}),k.ellipsis=new k("ellipsis",{fontCharacter:"\\ea7c"}),k.kebabHorizontal=new k("kebab-horizontal",{fontCharacter:"\\ea7c"}),k.mailReply=new k("mail-reply",{fontCharacter:"\\ea7d"}),k.reply=new k("reply",{fontCharacter:"\\ea7d"}),k.organization=new k("organization",{fontCharacter:"\\ea7e"}),k.organizationFilled=new k("organization-filled",{fontCharacter:"\\ea7e"}),k.organizationOutline=new k("organization-outline",{fontCharacter:"\\ea7e"}),k.newFile=new k("new-file",{fontCharacter:"\\ea7f"}),k.fileAdd=new k("file-add",{fontCharacter:"\\ea7f"}),k.newFolder=new k("new-folder",{fontCharacter:"\\ea80"}),k.fileDirectoryCreate=new k("file-directory-create",{fontCharacter:"\\ea80"}),k.trash=new k("trash",{fontCharacter:"\\ea81"}),k.trashcan=new k("trashcan",{fontCharacter:"\\ea81"}),k.history=new k("history",{fontCharacter:"\\ea82"}),k.clock=new k("clock",{fontCharacter:"\\ea82"}),k.folder=new k("folder",{fontCharacter:"\\ea83"}),k.fileDirectory=new k("file-directory",{fontCharacter:"\\ea83"}),k.symbolFolder=new k("symbol-folder",{fontCharacter:"\\ea83"}),k.logoGithub=new k("logo-github",{fontCharacter:"\\ea84"}),k.markGithub=new k("mark-github",{fontCharacter:"\\ea84"}),k.github=new k("github",{fontCharacter:"\\ea84"}),k.terminal=new k("terminal",{fontCharacter:"\\ea85"}),k.console=new k("console",{fontCharacter:"\\ea85"}),k.repl=new k("repl",{fontCharacter:"\\ea85"}),k.zap=new k("zap",{fontCharacter:"\\ea86"}),k.symbolEvent=new k("symbol-event",{fontCharacter:"\\ea86"}),k.error=new k("error",{fontCharacter:"\\ea87"}),k.stop=new k("stop",{fontCharacter:"\\ea87"}),k.variable=new k("variable",{fontCharacter:"\\ea88"}),k.symbolVariable=new k("symbol-variable",{fontCharacter:"\\ea88"}),k.array=new k("array",{fontCharacter:"\\ea8a"}),k.symbolArray=new k("symbol-array",{fontCharacter:"\\ea8a"}),k.symbolModule=new k("symbol-module",{fontCharacter:"\\ea8b"}),k.symbolPackage=new k("symbol-package",{fontCharacter:"\\ea8b"}),k.symbolNamespace=new k("symbol-namespace",{fontCharacter:"\\ea8b"}),k.symbolObject=new k("symbol-object",{fontCharacter:"\\ea8b"}),k.symbolMethod=new k("symbol-method",{fontCharacter:"\\ea8c"}),k.symbolFunction=new k("symbol-function",{fontCharacter:"\\ea8c"}),k.symbolConstructor=new k("symbol-constructor",{fontCharacter:"\\ea8c"}),k.symbolBoolean=new k("symbol-boolean",{fontCharacter:"\\ea8f"}),k.symbolNull=new k("symbol-null",{fontCharacter:"\\ea8f"}),k.symbolNumeric=new k("symbol-numeric",{fontCharacter:"\\ea90"}),k.symbolNumber=new k("symbol-number",{fontCharacter:"\\ea90"}),k.symbolStructure=new k("symbol-structure",{fontCharacter:"\\ea91"}),k.symbolStruct=new k("symbol-struct",{fontCharacter:"\\ea91"}),k.symbolParameter=new k("symbol-parameter",{fontCharacter:"\\ea92"}),k.symbolTypeParameter=new k("symbol-type-parameter",{fontCharacter:"\\ea92"}),k.symbolKey=new k("symbol-key",{fontCharacter:"\\ea93"}),k.symbolText=new k("symbol-text",{fontCharacter:"\\ea93"}),k.symbolReference=new k("symbol-reference",{fontCharacter:"\\ea94"}),k.goToFile=new k("go-to-file",{fontCharacter:"\\ea94"}),k.symbolEnum=new k("symbol-enum",{fontCharacter:"\\ea95"}),k.symbolValue=new k("symbol-value",{fontCharacter:"\\ea95"}),k.symbolRuler=new k("symbol-ruler",{fontCharacter:"\\ea96"}),k.symbolUnit=new k("symbol-unit",{fontCharacter:"\\ea96"}),k.activateBreakpoints=new k("activate-breakpoints",{fontCharacter:"\\ea97"}),k.archive=new k("archive",{fontCharacter:"\\ea98"}),k.arrowBoth=new k("arrow-both",{fontCharacter:"\\ea99"}),k.arrowDown=new k("arrow-down",{fontCharacter:"\\ea9a"}),k.arrowLeft=new k("arrow-left",{fontCharacter:"\\ea9b"}),k.arrowRight=new k("arrow-right",{fontCharacter:"\\ea9c"}),k.arrowSmallDown=new k("arrow-small-down",{fontCharacter:"\\ea9d"}),k.arrowSmallLeft=new k("arrow-small-left",{fontCharacter:"\\ea9e"}),k.arrowSmallRight=new k("arrow-small-right",{fontCharacter:"\\ea9f"}),k.arrowSmallUp=new k("arrow-small-up",{fontCharacter:"\\eaa0"}),k.arrowUp=new k("arrow-up",{fontCharacter:"\\eaa1"}),k.bell=new k("bell",{fontCharacter:"\\eaa2"}),k.bold=new k("bold",{fontCharacter:"\\eaa3"}),k.book=new k("book",{fontCharacter:"\\eaa4"}),k.bookmark=new k("bookmark",{fontCharacter:"\\eaa5"}),k.debugBreakpointConditionalUnverified=new k("debug-breakpoint-conditional-unverified",{fontCharacter:"\\eaa6"}),k.debugBreakpointConditional=new k("debug-breakpoint-conditional",{fontCharacter:"\\eaa7"}),k.debugBreakpointConditionalDisabled=new k("debug-breakpoint-conditional-disabled",{fontCharacter:"\\eaa7"}),k.debugBreakpointDataUnverified=new k("debug-breakpoint-data-unverified",{fontCharacter:"\\eaa8"}),k.debugBreakpointData=new k("debug-breakpoint-data",{fontCharacter:"\\eaa9"}),k.debugBreakpointDataDisabled=new k("debug-breakpoint-data-disabled",{fontCharacter:"\\eaa9"}),k.debugBreakpointLogUnverified=new k("debug-breakpoint-log-unverified",{fontCharacter:"\\eaaa"}),k.debugBreakpointLog=new k("debug-breakpoint-log",{fontCharacter:"\\eaab"}),k.debugBreakpointLogDisabled=new k("debug-breakpoint-log-disabled",{fontCharacter:"\\eaab"}),k.briefcase=new k("briefcase",{fontCharacter:"\\eaac"}),k.broadcast=new k("broadcast",{fontCharacter:"\\eaad"}),k.browser=new k("browser",{fontCharacter:"\\eaae"}),k.bug=new k("bug",{fontCharacter:"\\eaaf"}),k.calendar=new k("calendar",{fontCharacter:"\\eab0"}),k.caseSensitive=new k("case-sensitive",{fontCharacter:"\\eab1"}),k.check=new k("check",{fontCharacter:"\\eab2"}),k.checklist=new k("checklist",{fontCharacter:"\\eab3"}),k.chevronDown=new k("chevron-down",{fontCharacter:"\\eab4"}),k.dropDownButton=new k("drop-down-button",k.chevronDown.definition),k.chevronLeft=new k("chevron-left",{fontCharacter:"\\eab5"}),k.chevronRight=new k("chevron-right",{fontCharacter:"\\eab6"}),k.chevronUp=new k("chevron-up",{fontCharacter:"\\eab7"}),k.chromeClose=new k("chrome-close",{fontCharacter:"\\eab8"}),k.chromeMaximize=new k("chrome-maximize",{fontCharacter:"\\eab9"}),k.chromeMinimize=new k("chrome-minimize",{fontCharacter:"\\eaba"}),k.chromeRestore=new k("chrome-restore",{fontCharacter:"\\eabb"}),k.circleOutline=new k("circle-outline",{fontCharacter:"\\eabc"}),k.debugBreakpointUnverified=new k("debug-breakpoint-unverified",{fontCharacter:"\\eabc"}),k.circleSlash=new k("circle-slash",{fontCharacter:"\\eabd"}),k.circuitBoard=new k("circuit-board",{fontCharacter:"\\eabe"}),k.clearAll=new k("clear-all",{fontCharacter:"\\eabf"}),k.clippy=new k("clippy",{fontCharacter:"\\eac0"}),k.closeAll=new k("close-all",{fontCharacter:"\\eac1"}),k.cloudDownload=new k("cloud-download",{fontCharacter:"\\eac2"}),k.cloudUpload=new k("cloud-upload",{fontCharacter:"\\eac3"}),k.code=new k("code",{fontCharacter:"\\eac4"}),k.collapseAll=new k("collapse-all",{fontCharacter:"\\eac5"}),k.colorMode=new k("color-mode",{fontCharacter:"\\eac6"}),k.commentDiscussion=new k("comment-discussion",{fontCharacter:"\\eac7"}),k.compareChanges=new k("compare-changes",{fontCharacter:"\\eafd"}),k.creditCard=new k("credit-card",{fontCharacter:"\\eac9"}),k.dash=new k("dash",{fontCharacter:"\\eacc"}),k.dashboard=new k("dashboard",{fontCharacter:"\\eacd"}),k.database=new k("database",{fontCharacter:"\\eace"}),k.debugContinue=new k("debug-continue",{fontCharacter:"\\eacf"}),k.debugDisconnect=new k("debug-disconnect",{fontCharacter:"\\ead0"}),k.debugPause=new k("debug-pause",{fontCharacter:"\\ead1"}),k.debugRestart=new k("debug-restart",{fontCharacter:"\\ead2"}),k.debugStart=new k("debug-start",{fontCharacter:"\\ead3"}),k.debugStepInto=new k("debug-step-into",{fontCharacter:"\\ead4"}),k.debugStepOut=new k("debug-step-out",{fontCharacter:"\\ead5"}),k.debugStepOver=new k("debug-step-over",{fontCharacter:"\\ead6"}),k.debugStop=new k("debug-stop",{fontCharacter:"\\ead7"}),k.debug=new k("debug",{fontCharacter:"\\ead8"}),k.deviceCameraVideo=new k("device-camera-video",{fontCharacter:"\\ead9"}),k.deviceCamera=new k("device-camera",{fontCharacter:"\\eada"}),k.deviceMobile=new k("device-mobile",{fontCharacter:"\\eadb"}),k.diffAdded=new k("diff-added",{fontCharacter:"\\eadc"}),k.diffIgnored=new k("diff-ignored",{fontCharacter:"\\eadd"}),k.diffModified=new k("diff-modified",{fontCharacter:"\\eade"}),k.diffRemoved=new k("diff-removed",{fontCharacter:"\\eadf"}),k.diffRenamed=new k("diff-renamed",{fontCharacter:"\\eae0"}),k.diff=new k("diff",{fontCharacter:"\\eae1"}),k.discard=new k("discard",{fontCharacter:"\\eae2"}),k.editorLayout=new k("editor-layout",{fontCharacter:"\\eae3"}),k.emptyWindow=new k("empty-window",{fontCharacter:"\\eae4"}),k.exclude=new k("exclude",{fontCharacter:"\\eae5"}),k.extensions=new k("extensions",{fontCharacter:"\\eae6"}),k.eyeClosed=new k("eye-closed",{fontCharacter:"\\eae7"}),k.fileBinary=new k("file-binary",{fontCharacter:"\\eae8"}),k.fileCode=new k("file-code",{fontCharacter:"\\eae9"}),k.fileMedia=new k("file-media",{fontCharacter:"\\eaea"}),k.filePdf=new k("file-pdf",{fontCharacter:"\\eaeb"}),k.fileSubmodule=new k("file-submodule",{fontCharacter:"\\eaec"}),k.fileSymlinkDirectory=new k("file-symlink-directory",{fontCharacter:"\\eaed"}),k.fileSymlinkFile=new k("file-symlink-file",{fontCharacter:"\\eaee"}),k.fileZip=new k("file-zip",{fontCharacter:"\\eaef"}),k.files=new k("files",{fontCharacter:"\\eaf0"}),k.filter=new k("filter",{fontCharacter:"\\eaf1"}),k.flame=new k("flame",{fontCharacter:"\\eaf2"}),k.foldDown=new k("fold-down",{fontCharacter:"\\eaf3"}),k.foldUp=new k("fold-up",{fontCharacter:"\\eaf4"}),k.fold=new k("fold",{fontCharacter:"\\eaf5"}),k.folderActive=new k("folder-active",{fontCharacter:"\\eaf6"}),k.folderOpened=new k("folder-opened",{fontCharacter:"\\eaf7"}),k.gear=new k("gear",{fontCharacter:"\\eaf8"}),k.gift=new k("gift",{fontCharacter:"\\eaf9"}),k.gistSecret=new k("gist-secret",{fontCharacter:"\\eafa"}),k.gist=new k("gist",{fontCharacter:"\\eafb"}),k.gitCommit=new k("git-commit",{fontCharacter:"\\eafc"}),k.gitCompare=new k("git-compare",{fontCharacter:"\\eafd"}),k.gitMerge=new k("git-merge",{fontCharacter:"\\eafe"}),k.githubAction=new k("github-action",{fontCharacter:"\\eaff"}),k.githubAlt=new k("github-alt",{fontCharacter:"\\eb00"}),k.globe=new k("globe",{fontCharacter:"\\eb01"}),k.grabber=new k("grabber",{fontCharacter:"\\eb02"}),k.graph=new k("graph",{fontCharacter:"\\eb03"}),k.gripper=new k("gripper",{fontCharacter:"\\eb04"}),k.heart=new k("heart",{fontCharacter:"\\eb05"}),k.home=new k("home",{fontCharacter:"\\eb06"}),k.horizontalRule=new k("horizontal-rule",{fontCharacter:"\\eb07"}),k.hubot=new k("hubot",{fontCharacter:"\\eb08"}),k.inbox=new k("inbox",{fontCharacter:"\\eb09"}),k.issueClosed=new k("issue-closed",{fontCharacter:"\\eba4"}),k.issueReopened=new k("issue-reopened",{fontCharacter:"\\eb0b"}),k.issues=new k("issues",{fontCharacter:"\\eb0c"}),k.italic=new k("italic",{fontCharacter:"\\eb0d"}),k.jersey=new k("jersey",{fontCharacter:"\\eb0e"}),k.json=new k("json",{fontCharacter:"\\eb0f"}),k.kebabVertical=new k("kebab-vertical",{fontCharacter:"\\eb10"}),k.key=new k("key",{fontCharacter:"\\eb11"}),k.law=new k("law",{fontCharacter:"\\eb12"}),k.lightbulbAutofix=new k("lightbulb-autofix",{fontCharacter:"\\eb13"}),k.linkExternal=new k("link-external",{fontCharacter:"\\eb14"}),k.link=new k("link",{fontCharacter:"\\eb15"}),k.listOrdered=new k("list-ordered",{fontCharacter:"\\eb16"}),k.listUnordered=new k("list-unordered",{fontCharacter:"\\eb17"}),k.liveShare=new k("live-share",{fontCharacter:"\\eb18"}),k.loading=new k("loading",{fontCharacter:"\\eb19"}),k.location=new k("location",{fontCharacter:"\\eb1a"}),k.mailRead=new k("mail-read",{fontCharacter:"\\eb1b"}),k.mail=new k("mail",{fontCharacter:"\\eb1c"}),k.markdown=new k("markdown",{fontCharacter:"\\eb1d"}),k.megaphone=new k("megaphone",{fontCharacter:"\\eb1e"}),k.mention=new k("mention",{fontCharacter:"\\eb1f"}),k.milestone=new k("milestone",{fontCharacter:"\\eb20"}),k.mortarBoard=new k("mortar-board",{fontCharacter:"\\eb21"}),k.move=new k("move",{fontCharacter:"\\eb22"}),k.multipleWindows=new k("multiple-windows",{fontCharacter:"\\eb23"}),k.mute=new k("mute",{fontCharacter:"\\eb24"}),k.noNewline=new k("no-newline",{fontCharacter:"\\eb25"}),k.note=new k("note",{fontCharacter:"\\eb26"}),k.octoface=new k("octoface",{fontCharacter:"\\eb27"}),k.openPreview=new k("open-preview",{fontCharacter:"\\eb28"}),k.package_=new k("package",{fontCharacter:"\\eb29"}),k.paintcan=new k("paintcan",{fontCharacter:"\\eb2a"}),k.pin=new k("pin",{fontCharacter:"\\eb2b"}),k.play=new k("play",{fontCharacter:"\\eb2c"}),k.run=new k("run",{fontCharacter:"\\eb2c"}),k.plug=new k("plug",{fontCharacter:"\\eb2d"}),k.preserveCase=new k("preserve-case",{fontCharacter:"\\eb2e"}),k.preview=new k("preview",{fontCharacter:"\\eb2f"}),k.project=new k("project",{fontCharacter:"\\eb30"}),k.pulse=new k("pulse",{fontCharacter:"\\eb31"}),k.question=new k("question",{fontCharacter:"\\eb32"}),k.quote=new k("quote",{fontCharacter:"\\eb33"}),k.radioTower=new k("radio-tower",{fontCharacter:"\\eb34"}),k.reactions=new k("reactions",{fontCharacter:"\\eb35"}),k.references=new k("references",{fontCharacter:"\\eb36"}),k.refresh=new k("refresh",{fontCharacter:"\\eb37"}),k.regex=new k("regex",{fontCharacter:"\\eb38"}),k.remoteExplorer=new k("remote-explorer",{fontCharacter:"\\eb39"}),k.remote=new k("remote",{fontCharacter:"\\eb3a"}),k.remove=new k("remove",{fontCharacter:"\\eb3b"}),k.replaceAll=new k("replace-all",{fontCharacter:"\\eb3c"}),k.replace=new k("replace",{fontCharacter:"\\eb3d"}),k.repoClone=new k("repo-clone",{fontCharacter:"\\eb3e"}),k.repoForcePush=new k("repo-force-push",{fontCharacter:"\\eb3f"}),k.repoPull=new k("repo-pull",{fontCharacter:"\\eb40"}),k.repoPush=new k("repo-push",{fontCharacter:"\\eb41"}),k.report=new k("report",{fontCharacter:"\\eb42"}),k.requestChanges=new k("request-changes",{fontCharacter:"\\eb43"}),k.rocket=new k("rocket",{fontCharacter:"\\eb44"}),k.rootFolderOpened=new k("root-folder-opened",{fontCharacter:"\\eb45"}),k.rootFolder=new k("root-folder",{fontCharacter:"\\eb46"}),k.rss=new k("rss",{fontCharacter:"\\eb47"}),k.ruby=new k("ruby",{fontCharacter:"\\eb48"}),k.saveAll=new k("save-all",{fontCharacter:"\\eb49"}),k.saveAs=new k("save-as",{fontCharacter:"\\eb4a"}),k.save=new k("save",{fontCharacter:"\\eb4b"}),k.screenFull=new k("screen-full",{fontCharacter:"\\eb4c"}),k.screenNormal=new k("screen-normal",{fontCharacter:"\\eb4d"}),k.searchStop=new k("search-stop",{fontCharacter:"\\eb4e"}),k.server=new k("server",{fontCharacter:"\\eb50"}),k.settingsGear=new k("settings-gear",{fontCharacter:"\\eb51"}),k.settings=new k("settings",{fontCharacter:"\\eb52"}),k.shield=new k("shield",{fontCharacter:"\\eb53"}),k.smiley=new k("smiley",{fontCharacter:"\\eb54"}),k.sortPrecedence=new k("sort-precedence",{fontCharacter:"\\eb55"}),k.splitHorizontal=new k("split-horizontal",{fontCharacter:"\\eb56"}),k.splitVertical=new k("split-vertical",{fontCharacter:"\\eb57"}),k.squirrel=new k("squirrel",{fontCharacter:"\\eb58"}),k.starFull=new k("star-full",{fontCharacter:"\\eb59"}),k.starHalf=new k("star-half",{fontCharacter:"\\eb5a"}),k.symbolClass=new k("symbol-class",{fontCharacter:"\\eb5b"}),k.symbolColor=new k("symbol-color",{fontCharacter:"\\eb5c"}),k.symbolCustomColor=new k("symbol-customcolor",{fontCharacter:"\\eb5c"}),k.symbolConstant=new k("symbol-constant",{fontCharacter:"\\eb5d"}),k.symbolEnumMember=new k("symbol-enum-member",{fontCharacter:"\\eb5e"}),k.symbolField=new k("symbol-field",{fontCharacter:"\\eb5f"}),k.symbolFile=new k("symbol-file",{fontCharacter:"\\eb60"}),k.symbolInterface=new k("symbol-interface",{fontCharacter:"\\eb61"}),k.symbolKeyword=new k("symbol-keyword",{fontCharacter:"\\eb62"}),k.symbolMisc=new k("symbol-misc",{fontCharacter:"\\eb63"}),k.symbolOperator=new k("symbol-operator",{fontCharacter:"\\eb64"}),k.symbolProperty=new k("symbol-property",{fontCharacter:"\\eb65"}),k.wrench=new k("wrench",{fontCharacter:"\\eb65"}),k.wrenchSubaction=new k("wrench-subaction",{fontCharacter:"\\eb65"}),k.symbolSnippet=new k("symbol-snippet",{fontCharacter:"\\eb66"}),k.tasklist=new k("tasklist",{fontCharacter:"\\eb67"}),k.telescope=new k("telescope",{fontCharacter:"\\eb68"}),k.textSize=new k("text-size",{fontCharacter:"\\eb69"}),k.threeBars=new k("three-bars",{fontCharacter:"\\eb6a"}),k.thumbsdown=new k("thumbsdown",{fontCharacter:"\\eb6b"}),k.thumbsup=new k("thumbsup",{fontCharacter:"\\eb6c"}),k.tools=new k("tools",{fontCharacter:"\\eb6d"}),k.triangleDown=new k("triangle-down",{fontCharacter:"\\eb6e"}),k.triangleLeft=new k("triangle-left",{fontCharacter:"\\eb6f"}),k.triangleRight=new k("triangle-right",{fontCharacter:"\\eb70"}),k.triangleUp=new k("triangle-up",{fontCharacter:"\\eb71"}),k.twitter=new k("twitter",{fontCharacter:"\\eb72"}),k.unfold=new k("unfold",{fontCharacter:"\\eb73"}),k.unlock=new k("unlock",{fontCharacter:"\\eb74"}),k.unmute=new k("unmute",{fontCharacter:"\\eb75"}),k.unverified=new k("unverified",{fontCharacter:"\\eb76"}),k.verified=new k("verified",{fontCharacter:"\\eb77"}),k.versions=new k("versions",{fontCharacter:"\\eb78"}),k.vmActive=new k("vm-active",{fontCharacter:"\\eb79"}),k.vmOutline=new k("vm-outline",{fontCharacter:"\\eb7a"}),k.vmRunning=new k("vm-running",{fontCharacter:"\\eb7b"}),k.watch=new k("watch",{fontCharacter:"\\eb7c"}),k.whitespace=new k("whitespace",{fontCharacter:"\\eb7d"}),k.wholeWord=new k("whole-word",{fontCharacter:"\\eb7e"}),k.window=new k("window",{fontCharacter:"\\eb7f"}),k.wordWrap=new k("word-wrap",{fontCharacter:"\\eb80"}),k.zoomIn=new k("zoom-in",{fontCharacter:"\\eb81"}),k.zoomOut=new k("zoom-out",{fontCharacter:"\\eb82"}),k.listFilter=new k("list-filter",{fontCharacter:"\\eb83"}),k.listFlat=new k("list-flat",{fontCharacter:"\\eb84"}),k.listSelection=new k("list-selection",{fontCharacter:"\\eb85"}),k.selection=new k("selection",{fontCharacter:"\\eb85"}),k.listTree=new k("list-tree",{fontCharacter:"\\eb86"}),k.debugBreakpointFunctionUnverified=new k("debug-breakpoint-function-unverified",{fontCharacter:"\\eb87"}),k.debugBreakpointFunction=new k("debug-breakpoint-function",{fontCharacter:"\\eb88"}),k.debugBreakpointFunctionDisabled=new k("debug-breakpoint-function-disabled",{fontCharacter:"\\eb88"}),k.debugStackframeActive=new k("debug-stackframe-active",{fontCharacter:"\\eb89"}),k.debugStackframeDot=new k("debug-stackframe-dot",{fontCharacter:"\\eb8a"}),k.debugStackframe=new k("debug-stackframe",{fontCharacter:"\\eb8b"}),k.debugStackframeFocused=new k("debug-stackframe-focused",{fontCharacter:"\\eb8b"}),k.debugBreakpointUnsupported=new k("debug-breakpoint-unsupported",{fontCharacter:"\\eb8c"}),k.symbolString=new k("symbol-string",{fontCharacter:"\\eb8d"}),k.debugReverseContinue=new k("debug-reverse-continue",{fontCharacter:"\\eb8e"}),k.debugStepBack=new k("debug-step-back",{fontCharacter:"\\eb8f"}),k.debugRestartFrame=new k("debug-restart-frame",{fontCharacter:"\\eb90"}),k.callIncoming=new k("call-incoming",{fontCharacter:"\\eb92"}),k.callOutgoing=new k("call-outgoing",{fontCharacter:"\\eb93"}),k.menu=new k("menu",{fontCharacter:"\\eb94"}),k.expandAll=new k("expand-all",{fontCharacter:"\\eb95"}),k.feedback=new k("feedback",{fontCharacter:"\\eb96"}),k.groupByRefType=new k("group-by-ref-type",{fontCharacter:"\\eb97"}),k.ungroupByRefType=new k("ungroup-by-ref-type",{fontCharacter:"\\eb98"}),k.account=new k("account",{fontCharacter:"\\eb99"}),k.bellDot=new k("bell-dot",{fontCharacter:"\\eb9a"}),k.debugConsole=new k("debug-console",{fontCharacter:"\\eb9b"}),k.library=new k("library",{fontCharacter:"\\eb9c"}),k.output=new k("output",{fontCharacter:"\\eb9d"}),k.runAll=new k("run-all",{fontCharacter:"\\eb9e"}),k.syncIgnored=new k("sync-ignored",{fontCharacter:"\\eb9f"}),k.pinned=new k("pinned",{fontCharacter:"\\eba0"}),k.githubInverted=new k("github-inverted",{fontCharacter:"\\eba1"}),k.debugAlt=new k("debug-alt",{fontCharacter:"\\eb91"}),k.serverProcess=new k("server-process",{fontCharacter:"\\eba2"}),k.serverEnvironment=new k("server-environment",{fontCharacter:"\\eba3"}),k.pass=new k("pass",{fontCharacter:"\\eba4"}),k.stopCircle=new k("stop-circle",{fontCharacter:"\\eba5"}),k.playCircle=new k("play-circle",{fontCharacter:"\\eba6"}),k.record=new k("record",{fontCharacter:"\\eba7"}),k.debugAltSmall=new k("debug-alt-small",{fontCharacter:"\\eba8"}),k.vmConnect=new k("vm-connect",{fontCharacter:"\\eba9"}),k.cloud=new k("cloud",{fontCharacter:"\\ebaa"}),k.merge=new k("merge",{fontCharacter:"\\ebab"}),k.exportIcon=new k("export",{fontCharacter:"\\ebac"}),k.graphLeft=new k("graph-left",{fontCharacter:"\\ebad"}),k.magnet=new k("magnet",{fontCharacter:"\\ebae"}),k.notebook=new k("notebook",{fontCharacter:"\\ebaf"}),k.redo=new k("redo",{fontCharacter:"\\ebb0"}),k.checkAll=new k("check-all",{fontCharacter:"\\ebb1"}),k.pinnedDirty=new k("pinned-dirty",{fontCharacter:"\\ebb2"}),k.passFilled=new k("pass-filled",{fontCharacter:"\\ebb3"}),k.circleLargeFilled=new k("circle-large-filled",{fontCharacter:"\\ebb4"}),k.circleLargeOutline=new k("circle-large-outline",{fontCharacter:"\\ebb5"}),k.combine=new k("combine",{fontCharacter:"\\ebb6"}),k.gather=new k("gather",{fontCharacter:"\\ebb6"}),k.table=new k("table",{fontCharacter:"\\ebb7"}),k.variableGroup=new k("variable-group",{fontCharacter:"\\ebb8"}),k.typeHierarchy=new k("type-hierarchy",{fontCharacter:"\\ebb9"}),k.typeHierarchySub=new k("type-hierarchy-sub",{fontCharacter:"\\ebba"}),k.typeHierarchySuper=new k("type-hierarchy-super",{fontCharacter:"\\ebbb"}),k.gitPullRequestCreate=new k("git-pull-request-create",{fontCharacter:"\\ebbc"}),k.runAbove=new k("run-above",{fontCharacter:"\\ebbd"}),k.runBelow=new k("run-below",{fontCharacter:"\\ebbe"}),k.notebookTemplate=new k("notebook-template",{fontCharacter:"\\ebbf"}),k.debugRerun=new k("debug-rerun",{fontCharacter:"\\ebc0"}),k.workspaceTrusted=new k("workspace-trusted",{fontCharacter:"\\ebc1"}),k.workspaceUntrusted=new k("workspace-untrusted",{fontCharacter:"\\ebc2"}),k.workspaceUnspecified=new k("workspace-unspecified",{fontCharacter:"\\ebc3"}),k.terminalCmd=new k("terminal-cmd",{fontCharacter:"\\ebc4"}),k.terminalDebian=new k("terminal-debian",{fontCharacter:"\\ebc5"}),k.terminalLinux=new k("terminal-linux",{fontCharacter:"\\ebc6"}),k.terminalPowershell=new k("terminal-powershell",{fontCharacter:"\\ebc7"}),k.terminalTmux=new k("terminal-tmux",{fontCharacter:"\\ebc8"}),k.terminalUbuntu=new k("terminal-ubuntu",{fontCharacter:"\\ebc9"}),k.terminalBash=new k("terminal-bash",{fontCharacter:"\\ebca"}),k.arrowSwap=new k("arrow-swap",{fontCharacter:"\\ebcb"}),k.copy=new k("copy",{fontCharacter:"\\ebcc"}),k.personAdd=new k("person-add",{fontCharacter:"\\ebcd"}),k.filterFilled=new k("filter-filled",{fontCharacter:"\\ebce"}),k.wand=new k("wand",{fontCharacter:"\\ebcf"}),k.debugLineByLine=new k("debug-line-by-line",{fontCharacter:"\\ebd0"}),k.inspect=new k("inspect",{fontCharacter:"\\ebd1"}),k.layers=new k("layers",{fontCharacter:"\\ebd2"}),k.layersDot=new k("layers-dot",{fontCharacter:"\\ebd3"}),k.layersActive=new k("layers-active",{fontCharacter:"\\ebd4"}),k.compass=new k("compass",{fontCharacter:"\\ebd5"}),k.compassDot=new k("compass-dot",{fontCharacter:"\\ebd6"}),k.compassActive=new k("compass-active",{fontCharacter:"\\ebd7"}),k.azure=new k("azure",{fontCharacter:"\\ebd8"}),k.issueDraft=new k("issue-draft",{fontCharacter:"\\ebd9"}),k.gitPullRequestClosed=new k("git-pull-request-closed",{fontCharacter:"\\ebda"}),k.gitPullRequestDraft=new k("git-pull-request-draft",{fontCharacter:"\\ebdb"}),k.debugAll=new k("debug-all",{fontCharacter:"\\ebdc"}),k.debugCoverage=new k("debug-coverage",{fontCharacter:"\\ebdd"}),k.runErrors=new k("run-errors",{fontCharacter:"\\ebde"}),k.folderLibrary=new k("folder-library",{fontCharacter:"\\ebdf"}),k.debugContinueSmall=new k("debug-continue-small",{fontCharacter:"\\ebe0"}),k.beakerStop=new k("beaker-stop",{fontCharacter:"\\ebe1"}),k.graphLine=new k("graph-line",{fontCharacter:"\\ebe2"}),k.graphScatter=new k("graph-scatter",{fontCharacter:"\\ebe3"}),k.pieChart=new k("pie-chart",{fontCharacter:"\\ebe4"}),k.bracket=new k("bracket",k.json.definition),k.bracketDot=new k("bracket-dot",{fontCharacter:"\\ebe5"}),k.bracketError=new k("bracket-error",{fontCharacter:"\\ebe6"}),k.lockSmall=new k("lock-small",{fontCharacter:"\\ebe7"}),k.azureDevops=new k("azure-devops",{fontCharacter:"\\ebe8"}),k.verifiedFilled=new k("verified-filled",{fontCharacter:"\\ebe9"}),k.newLine=new k("newline",{fontCharacter:"\\ebea"}),k.layout=new k("layout",{fontCharacter:"\\ebeb"}),k.layoutActivitybarLeft=new k("layout-activitybar-left",{fontCharacter:"\\ebec"}),k.layoutActivitybarRight=new k("layout-activitybar-right",{fontCharacter:"\\ebed"}),k.layoutPanelLeft=new k("layout-panel-left",{fontCharacter:"\\ebee"}),k.layoutPanelCenter=new k("layout-panel-center",{fontCharacter:"\\ebef"}),k.layoutPanelJustify=new k("layout-panel-justify",{fontCharacter:"\\ebf0"}),k.layoutPanelRight=new k("layout-panel-right",{fontCharacter:"\\ebf1"}),k.layoutPanel=new k("layout-panel",{fontCharacter:"\\ebf2"}),k.layoutSidebarLeft=new k("layout-sidebar-left",{fontCharacter:"\\ebf3"}),k.layoutSidebarRight=new k("layout-sidebar-right",{fontCharacter:"\\ebf4"}),k.layoutStatusbar=new k("layout-statusbar",{fontCharacter:"\\ebf5"}),k.layoutMenubar=new k("layout-menubar",{fontCharacter:"\\ebf6"}),k.layoutCentered=new k("layout-centered",{fontCharacter:"\\ebf7"}),k.target=new k("target",{fontCharacter:"\\ebf8"}),k.indent=new k("indent",{fontCharacter:"\\ebf9"}),k.recordSmall=new k("record-small",{fontCharacter:"\\ebfa"}),k.errorSmall=new k("error-small",{fontCharacter:"\\ebfb"}),k.arrowCircleDown=new k("arrow-circle-down",{fontCharacter:"\\ebfc"}),k.arrowCircleLeft=new k("arrow-circle-left",{fontCharacter:"\\ebfd"}),k.arrowCircleRight=new k("arrow-circle-right",{fontCharacter:"\\ebfe"}),k.arrowCircleUp=new k("arrow-circle-up",{fontCharacter:"\\ebff"}),k.dialogError=new k("dialog-error",k.error.definition),k.dialogWarning=new k("dialog-warning",k.warning.definition),k.dialogInfo=new k("dialog-info",k.info.definition),k.dialogClose=new k("dialog-close",k.close.definition),k.treeItemExpanded=new k("tree-item-expanded",k.chevronDown.definition),k.treeFilterOnTypeOn=new k("tree-filter-on-type-on",k.listFilter.definition),k.treeFilterOnTypeOff=new k("tree-filter-on-type-off",k.listSelection.definition),k.treeFilterClear=new k("tree-filter-clear",k.close.definition),k.treeItemLoading=new k("tree-item-loading",k.loading.definition),k.menuSelection=new k("menu-selection",k.check.definition),k.menuSubmenu=new k("menu-submenu",k.chevronRight.definition),k.menuBarMore=new k("menubar-more",k.more.definition),k.scrollbarButtonLeft=new k("scrollbar-button-left",k.triangleLeft.definition),k.scrollbarButtonRight=new k("scrollbar-button-right",k.triangleRight.definition),k.scrollbarButtonUp=new k("scrollbar-button-up",k.triangleUp.definition),k.scrollbarButtonDown=new k("scrollbar-button-down",k.triangleDown.definition),k.toolBarMore=new k("toolbar-more",k.more.definition),k.quickInputBack=new k("quick-input-back",k.arrowLeft.definition);var Gs;(function(i){i.iconNameSegment="[A-Za-z0-9]+",i.iconNameExpression="[A-Za-z0-9-]+",i.iconModifierExpression="~[A-Za-z]+",i.iconNameCharacter="[A-Za-z0-9~-]";const e=new RegExp(`^(${i.iconNameExpression})(${i.iconModifierExpression})?$`);function t(s){if(s instanceof k)return["codicon","codicon-"+s.id];const o=e.exec(s.id);if(!o)return t(k.error);let[,a,l]=o;const c=["codicon","codicon-"+a];return l&&c.push("codicon-modifier-"+l.substr(1)),c}i.asClassNameArray=t;function n(s){return t(s).join(" ")}i.asClassName=n;function r(s){return"."+t(s).join(".")}i.asCSSSelector=r})(Gs||(Gs={}));class Cs{static getLanguageId(e){return(e&255)>>>0}static getTokenType(e){return(e&768)>>>8}static getFontStyle(e){return(e&15360)>>>10}static getForeground(e){return(e&8372224)>>>14}static getBackground(e){return(e&4286578688)>>>23}static getClassNameFromMetadata(e){let n="mtk"+this.getForeground(e);const r=this.getFontStyle(e);return r&1&&(n+=" mtki"),r&2&&(n+=" mtkb"),r&4&&(n+=" mtku"),r&8&&(n+=" mtks"),n}static getInlineStyleFromMetadata(e,t){const n=this.getForeground(e),r=this.getFontStyle(e);let s=`color: ${t[n]};`;r&1&&(s+="font-style: italic;"),r&2&&(s+="font-weight: bold;");let o="";return r&4&&(o+=" underline"),r&8&&(o+=" line-through"),o&&(s+=`text-decoration:${o};`),s}static getPresentationFromMetadata(e){const t=this.getForeground(e),n=this.getFontStyle(e);return{foreground:t,italic:Boolean(n&1),bold:Boolean(n&2),underline:Boolean(n&4),strikethrough:Boolean(n&8)}}}let wb=class{constructor(e,t,n){this._tokenBrand=void 0,this.offset=e,this.type=t,this.language=n}toString(){return"("+this.offset+", "+this.type+")"}};class $8{constructor(e,t){this._tokenizationResultBrand=void 0,this.tokens=e,this.endState=t}}class Uy{constructor(e,t){this._encodedTokenizationResultBrand=void 0,this.tokens=e,this.endState=t}}var Cb;(function(i){const e=new Map;e.set(0,k.symbolMethod),e.set(1,k.symbolFunction),e.set(2,k.symbolConstructor),e.set(3,k.symbolField),e.set(4,k.symbolVariable),e.set(5,k.symbolClass),e.set(6,k.symbolStruct),e.set(7,k.symbolInterface),e.set(8,k.symbolModule),e.set(9,k.symbolProperty),e.set(10,k.symbolEvent),e.set(11,k.symbolOperator),e.set(12,k.symbolUnit),e.set(13,k.symbolValue),e.set(15,k.symbolEnum),e.set(14,k.symbolConstant),e.set(15,k.symbolEnum),e.set(16,k.symbolEnumMember),e.set(17,k.symbolKeyword),e.set(27,k.symbolSnippet),e.set(18,k.symbolText),e.set(19,k.symbolColor),e.set(20,k.symbolFile),e.set(21,k.symbolReference),e.set(22,k.symbolCustomColor),e.set(23,k.symbolFolder),e.set(24,k.symbolTypeParameter),e.set(25,k.account),e.set(26,k.issues);function t(s){let o=e.get(s);return o||(console.info("No codicon found for CompletionItemKind "+s),o=k.symbolProperty),o}i.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 r(s,o){let a=n.get(s);return typeof a>"u"&&!o&&(a=9),a}i.fromString=r})(Cb||(Cb={}));var Wa;(function(i){i[i.Automatic=0]="Automatic",i[i.Explicit=1]="Explicit"})(Wa||(Wa={}));var Gc;(function(i){i[i.Invoke=1]="Invoke",i[i.TriggerCharacter=2]="TriggerCharacter",i[i.ContentChange=3]="ContentChange"})(Gc||(Gc={}));var yb;(function(i){i[i.Text=0]="Text",i[i.Read=1]="Read",i[i.Write=2]="Write"})(yb||(yb={}));function _Ce(i){return i&&Pt.isUri(i.uri)&&H.isIRange(i.range)&&(H.isIRange(i.originSelectionRange)||H.isIRange(i.targetSelectionRange))}var U8;(function(i){const e=new Map;e.set(0,k.symbolFile),e.set(1,k.symbolModule),e.set(2,k.symbolNamespace),e.set(3,k.symbolPackage),e.set(4,k.symbolClass),e.set(5,k.symbolMethod),e.set(6,k.symbolProperty),e.set(7,k.symbolField),e.set(8,k.symbolConstructor),e.set(9,k.symbolEnum),e.set(10,k.symbolInterface),e.set(11,k.symbolFunction),e.set(12,k.symbolVariable),e.set(13,k.symbolConstant),e.set(14,k.symbolString),e.set(15,k.symbolNumber),e.set(16,k.symbolBoolean),e.set(17,k.symbolArray),e.set(18,k.symbolObject),e.set(19,k.symbolKey),e.set(20,k.symbolNull),e.set(21,k.symbolEnumMember),e.set(22,k.symbolStruct),e.set(23,k.symbolEvent),e.set(24,k.symbolOperator),e.set(25,k.symbolTypeParameter);function t(n){let r=e.get(n);return r||(console.info("No codicon found for SymbolKind "+n),r=k.symbolProperty),r}i.toIcon=t})(U8||(U8={}));let sc=class{constructor(e){this.value=e}};sc.Comment=new sc("comment"),sc.Imports=new sc("imports"),sc.Region=new sc("region");var j8;(function(i){function e(t){return!t||typeof t!="object"?!1:typeof t.id=="string"&&typeof t.title=="string"}i.is=e})(j8||(j8={}));var jy;(function(i){i[i.Type=1]="Type",i[i.Parameter=2]="Parameter"})(jy||(jy={}));const Oi=new gCe;var q8;(function(i){i[i.Unknown=0]="Unknown",i[i.Disabled=1]="Disabled",i[i.Enabled=2]="Enabled"})(q8||(q8={}));var G8;(function(i){i[i.KeepWhitespace=1]="KeepWhitespace",i[i.InsertAsSnippet=4]="InsertAsSnippet"})(G8||(G8={}));var K8;(function(i){i[i.Method=0]="Method",i[i.Function=1]="Function",i[i.Constructor=2]="Constructor",i[i.Field=3]="Field",i[i.Variable=4]="Variable",i[i.Class=5]="Class",i[i.Struct=6]="Struct",i[i.Interface=7]="Interface",i[i.Module=8]="Module",i[i.Property=9]="Property",i[i.Event=10]="Event",i[i.Operator=11]="Operator",i[i.Unit=12]="Unit",i[i.Value=13]="Value",i[i.Constant=14]="Constant",i[i.Enum=15]="Enum",i[i.EnumMember=16]="EnumMember",i[i.Keyword=17]="Keyword",i[i.Text=18]="Text",i[i.Color=19]="Color",i[i.File=20]="File",i[i.Reference=21]="Reference",i[i.Customcolor=22]="Customcolor",i[i.Folder=23]="Folder",i[i.TypeParameter=24]="TypeParameter",i[i.User=25]="User",i[i.Issue=26]="Issue",i[i.Snippet=27]="Snippet"})(K8||(K8={}));var Y8;(function(i){i[i.Deprecated=1]="Deprecated"})(Y8||(Y8={}));var Z8;(function(i){i[i.Invoke=0]="Invoke",i[i.TriggerCharacter=1]="TriggerCharacter",i[i.TriggerForIncompleteCompletions=2]="TriggerForIncompleteCompletions"})(Z8||(Z8={}));var X8;(function(i){i[i.EXACT=0]="EXACT",i[i.ABOVE=1]="ABOVE",i[i.BELOW=2]="BELOW"})(X8||(X8={}));var Q8;(function(i){i[i.NotSet=0]="NotSet",i[i.ContentFlush=1]="ContentFlush",i[i.RecoverFromMarkers=2]="RecoverFromMarkers",i[i.Explicit=3]="Explicit",i[i.Paste=4]="Paste",i[i.Undo=5]="Undo",i[i.Redo=6]="Redo"})(Q8||(Q8={}));var J8;(function(i){i[i.LF=1]="LF",i[i.CRLF=2]="CRLF"})(J8||(J8={}));var eT;(function(i){i[i.Text=0]="Text",i[i.Read=1]="Read",i[i.Write=2]="Write"})(eT||(eT={}));var tT;(function(i){i[i.None=0]="None",i[i.Keep=1]="Keep",i[i.Brackets=2]="Brackets",i[i.Advanced=3]="Advanced",i[i.Full=4]="Full"})(tT||(tT={}));var nT;(function(i){i[i.acceptSuggestionOnCommitCharacter=0]="acceptSuggestionOnCommitCharacter",i[i.acceptSuggestionOnEnter=1]="acceptSuggestionOnEnter",i[i.accessibilitySupport=2]="accessibilitySupport",i[i.accessibilityPageSize=3]="accessibilityPageSize",i[i.ariaLabel=4]="ariaLabel",i[i.autoClosingBrackets=5]="autoClosingBrackets",i[i.autoClosingDelete=6]="autoClosingDelete",i[i.autoClosingOvertype=7]="autoClosingOvertype",i[i.autoClosingQuotes=8]="autoClosingQuotes",i[i.autoIndent=9]="autoIndent",i[i.automaticLayout=10]="automaticLayout",i[i.autoSurround=11]="autoSurround",i[i.bracketPairColorization=12]="bracketPairColorization",i[i.guides=13]="guides",i[i.codeLens=14]="codeLens",i[i.codeLensFontFamily=15]="codeLensFontFamily",i[i.codeLensFontSize=16]="codeLensFontSize",i[i.colorDecorators=17]="colorDecorators",i[i.columnSelection=18]="columnSelection",i[i.comments=19]="comments",i[i.contextmenu=20]="contextmenu",i[i.copyWithSyntaxHighlighting=21]="copyWithSyntaxHighlighting",i[i.cursorBlinking=22]="cursorBlinking",i[i.cursorSmoothCaretAnimation=23]="cursorSmoothCaretAnimation",i[i.cursorStyle=24]="cursorStyle",i[i.cursorSurroundingLines=25]="cursorSurroundingLines",i[i.cursorSurroundingLinesStyle=26]="cursorSurroundingLinesStyle",i[i.cursorWidth=27]="cursorWidth",i[i.disableLayerHinting=28]="disableLayerHinting",i[i.disableMonospaceOptimizations=29]="disableMonospaceOptimizations",i[i.domReadOnly=30]="domReadOnly",i[i.dragAndDrop=31]="dragAndDrop",i[i.emptySelectionClipboard=32]="emptySelectionClipboard",i[i.extraEditorClassName=33]="extraEditorClassName",i[i.fastScrollSensitivity=34]="fastScrollSensitivity",i[i.find=35]="find",i[i.fixedOverflowWidgets=36]="fixedOverflowWidgets",i[i.folding=37]="folding",i[i.foldingStrategy=38]="foldingStrategy",i[i.foldingHighlight=39]="foldingHighlight",i[i.foldingImportsByDefault=40]="foldingImportsByDefault",i[i.foldingMaximumRegions=41]="foldingMaximumRegions",i[i.unfoldOnClickAfterEndOfLine=42]="unfoldOnClickAfterEndOfLine",i[i.fontFamily=43]="fontFamily",i[i.fontInfo=44]="fontInfo",i[i.fontLigatures=45]="fontLigatures",i[i.fontSize=46]="fontSize",i[i.fontWeight=47]="fontWeight",i[i.formatOnPaste=48]="formatOnPaste",i[i.formatOnType=49]="formatOnType",i[i.glyphMargin=50]="glyphMargin",i[i.gotoLocation=51]="gotoLocation",i[i.hideCursorInOverviewRuler=52]="hideCursorInOverviewRuler",i[i.hover=53]="hover",i[i.inDiffEditor=54]="inDiffEditor",i[i.inlineSuggest=55]="inlineSuggest",i[i.letterSpacing=56]="letterSpacing",i[i.lightbulb=57]="lightbulb",i[i.lineDecorationsWidth=58]="lineDecorationsWidth",i[i.lineHeight=59]="lineHeight",i[i.lineNumbers=60]="lineNumbers",i[i.lineNumbersMinChars=61]="lineNumbersMinChars",i[i.linkedEditing=62]="linkedEditing",i[i.links=63]="links",i[i.matchBrackets=64]="matchBrackets",i[i.minimap=65]="minimap",i[i.mouseStyle=66]="mouseStyle",i[i.mouseWheelScrollSensitivity=67]="mouseWheelScrollSensitivity",i[i.mouseWheelZoom=68]="mouseWheelZoom",i[i.multiCursorMergeOverlapping=69]="multiCursorMergeOverlapping",i[i.multiCursorModifier=70]="multiCursorModifier",i[i.multiCursorPaste=71]="multiCursorPaste",i[i.occurrencesHighlight=72]="occurrencesHighlight",i[i.overviewRulerBorder=73]="overviewRulerBorder",i[i.overviewRulerLanes=74]="overviewRulerLanes",i[i.padding=75]="padding",i[i.parameterHints=76]="parameterHints",i[i.peekWidgetDefaultFocus=77]="peekWidgetDefaultFocus",i[i.definitionLinkOpensInPeek=78]="definitionLinkOpensInPeek",i[i.quickSuggestions=79]="quickSuggestions",i[i.quickSuggestionsDelay=80]="quickSuggestionsDelay",i[i.readOnly=81]="readOnly",i[i.renameOnType=82]="renameOnType",i[i.renderControlCharacters=83]="renderControlCharacters",i[i.renderFinalNewline=84]="renderFinalNewline",i[i.renderLineHighlight=85]="renderLineHighlight",i[i.renderLineHighlightOnlyWhenFocus=86]="renderLineHighlightOnlyWhenFocus",i[i.renderValidationDecorations=87]="renderValidationDecorations",i[i.renderWhitespace=88]="renderWhitespace",i[i.revealHorizontalRightPadding=89]="revealHorizontalRightPadding",i[i.roundedSelection=90]="roundedSelection",i[i.rulers=91]="rulers",i[i.scrollbar=92]="scrollbar",i[i.scrollBeyondLastColumn=93]="scrollBeyondLastColumn",i[i.scrollBeyondLastLine=94]="scrollBeyondLastLine",i[i.scrollPredominantAxis=95]="scrollPredominantAxis",i[i.selectionClipboard=96]="selectionClipboard",i[i.selectionHighlight=97]="selectionHighlight",i[i.selectOnLineNumbers=98]="selectOnLineNumbers",i[i.showFoldingControls=99]="showFoldingControls",i[i.showUnused=100]="showUnused",i[i.snippetSuggestions=101]="snippetSuggestions",i[i.smartSelect=102]="smartSelect",i[i.smoothScrolling=103]="smoothScrolling",i[i.stickyTabStops=104]="stickyTabStops",i[i.stopRenderingLineAfter=105]="stopRenderingLineAfter",i[i.suggest=106]="suggest",i[i.suggestFontSize=107]="suggestFontSize",i[i.suggestLineHeight=108]="suggestLineHeight",i[i.suggestOnTriggerCharacters=109]="suggestOnTriggerCharacters",i[i.suggestSelection=110]="suggestSelection",i[i.tabCompletion=111]="tabCompletion",i[i.tabIndex=112]="tabIndex",i[i.unicodeHighlighting=113]="unicodeHighlighting",i[i.unusualLineTerminators=114]="unusualLineTerminators",i[i.useShadowDOM=115]="useShadowDOM",i[i.useTabStops=116]="useTabStops",i[i.wordSeparators=117]="wordSeparators",i[i.wordWrap=118]="wordWrap",i[i.wordWrapBreakAfterCharacters=119]="wordWrapBreakAfterCharacters",i[i.wordWrapBreakBeforeCharacters=120]="wordWrapBreakBeforeCharacters",i[i.wordWrapColumn=121]="wordWrapColumn",i[i.wordWrapOverride1=122]="wordWrapOverride1",i[i.wordWrapOverride2=123]="wordWrapOverride2",i[i.wrappingIndent=124]="wrappingIndent",i[i.wrappingStrategy=125]="wrappingStrategy",i[i.showDeprecated=126]="showDeprecated",i[i.inlayHints=127]="inlayHints",i[i.editorClassName=128]="editorClassName",i[i.pixelRatio=129]="pixelRatio",i[i.tabFocusMode=130]="tabFocusMode",i[i.layoutInfo=131]="layoutInfo",i[i.wrappingInfo=132]="wrappingInfo"})(nT||(nT={}));var iT;(function(i){i[i.TextDefined=0]="TextDefined",i[i.LF=1]="LF",i[i.CRLF=2]="CRLF"})(iT||(iT={}));var rT;(function(i){i[i.LF=0]="LF",i[i.CRLF=1]="CRLF"})(rT||(rT={}));var sT;(function(i){i[i.None=0]="None",i[i.Indent=1]="Indent",i[i.IndentOutdent=2]="IndentOutdent",i[i.Outdent=3]="Outdent"})(sT||(sT={}));var oT;(function(i){i[i.Both=0]="Both",i[i.Right=1]="Right",i[i.Left=2]="Left",i[i.None=3]="None"})(oT||(oT={}));var aT;(function(i){i[i.Type=1]="Type",i[i.Parameter=2]="Parameter"})(aT||(aT={}));var lT;(function(i){i[i.Automatic=0]="Automatic",i[i.Explicit=1]="Explicit"})(lT||(lT={}));var cT;(function(i){i[i.DependsOnKbLayout=-1]="DependsOnKbLayout",i[i.Unknown=0]="Unknown",i[i.Backspace=1]="Backspace",i[i.Tab=2]="Tab",i[i.Enter=3]="Enter",i[i.Shift=4]="Shift",i[i.Ctrl=5]="Ctrl",i[i.Alt=6]="Alt",i[i.PauseBreak=7]="PauseBreak",i[i.CapsLock=8]="CapsLock",i[i.Escape=9]="Escape",i[i.Space=10]="Space",i[i.PageUp=11]="PageUp",i[i.PageDown=12]="PageDown",i[i.End=13]="End",i[i.Home=14]="Home",i[i.LeftArrow=15]="LeftArrow",i[i.UpArrow=16]="UpArrow",i[i.RightArrow=17]="RightArrow",i[i.DownArrow=18]="DownArrow",i[i.Insert=19]="Insert",i[i.Delete=20]="Delete",i[i.Digit0=21]="Digit0",i[i.Digit1=22]="Digit1",i[i.Digit2=23]="Digit2",i[i.Digit3=24]="Digit3",i[i.Digit4=25]="Digit4",i[i.Digit5=26]="Digit5",i[i.Digit6=27]="Digit6",i[i.Digit7=28]="Digit7",i[i.Digit8=29]="Digit8",i[i.Digit9=30]="Digit9",i[i.KeyA=31]="KeyA",i[i.KeyB=32]="KeyB",i[i.KeyC=33]="KeyC",i[i.KeyD=34]="KeyD",i[i.KeyE=35]="KeyE",i[i.KeyF=36]="KeyF",i[i.KeyG=37]="KeyG",i[i.KeyH=38]="KeyH",i[i.KeyI=39]="KeyI",i[i.KeyJ=40]="KeyJ",i[i.KeyK=41]="KeyK",i[i.KeyL=42]="KeyL",i[i.KeyM=43]="KeyM",i[i.KeyN=44]="KeyN",i[i.KeyO=45]="KeyO",i[i.KeyP=46]="KeyP",i[i.KeyQ=47]="KeyQ",i[i.KeyR=48]="KeyR",i[i.KeyS=49]="KeyS",i[i.KeyT=50]="KeyT",i[i.KeyU=51]="KeyU",i[i.KeyV=52]="KeyV",i[i.KeyW=53]="KeyW",i[i.KeyX=54]="KeyX",i[i.KeyY=55]="KeyY",i[i.KeyZ=56]="KeyZ",i[i.Meta=57]="Meta",i[i.ContextMenu=58]="ContextMenu",i[i.F1=59]="F1",i[i.F2=60]="F2",i[i.F3=61]="F3",i[i.F4=62]="F4",i[i.F5=63]="F5",i[i.F6=64]="F6",i[i.F7=65]="F7",i[i.F8=66]="F8",i[i.F9=67]="F9",i[i.F10=68]="F10",i[i.F11=69]="F11",i[i.F12=70]="F12",i[i.F13=71]="F13",i[i.F14=72]="F14",i[i.F15=73]="F15",i[i.F16=74]="F16",i[i.F17=75]="F17",i[i.F18=76]="F18",i[i.F19=77]="F19",i[i.NumLock=78]="NumLock",i[i.ScrollLock=79]="ScrollLock",i[i.Semicolon=80]="Semicolon",i[i.Equal=81]="Equal",i[i.Comma=82]="Comma",i[i.Minus=83]="Minus",i[i.Period=84]="Period",i[i.Slash=85]="Slash",i[i.Backquote=86]="Backquote",i[i.BracketLeft=87]="BracketLeft",i[i.Backslash=88]="Backslash",i[i.BracketRight=89]="BracketRight",i[i.Quote=90]="Quote",i[i.OEM_8=91]="OEM_8",i[i.IntlBackslash=92]="IntlBackslash",i[i.Numpad0=93]="Numpad0",i[i.Numpad1=94]="Numpad1",i[i.Numpad2=95]="Numpad2",i[i.Numpad3=96]="Numpad3",i[i.Numpad4=97]="Numpad4",i[i.Numpad5=98]="Numpad5",i[i.Numpad6=99]="Numpad6",i[i.Numpad7=100]="Numpad7",i[i.Numpad8=101]="Numpad8",i[i.Numpad9=102]="Numpad9",i[i.NumpadMultiply=103]="NumpadMultiply",i[i.NumpadAdd=104]="NumpadAdd",i[i.NUMPAD_SEPARATOR=105]="NUMPAD_SEPARATOR",i[i.NumpadSubtract=106]="NumpadSubtract",i[i.NumpadDecimal=107]="NumpadDecimal",i[i.NumpadDivide=108]="NumpadDivide",i[i.KEY_IN_COMPOSITION=109]="KEY_IN_COMPOSITION",i[i.ABNT_C1=110]="ABNT_C1",i[i.ABNT_C2=111]="ABNT_C2",i[i.AudioVolumeMute=112]="AudioVolumeMute",i[i.AudioVolumeUp=113]="AudioVolumeUp",i[i.AudioVolumeDown=114]="AudioVolumeDown",i[i.BrowserSearch=115]="BrowserSearch",i[i.BrowserHome=116]="BrowserHome",i[i.BrowserBack=117]="BrowserBack",i[i.BrowserForward=118]="BrowserForward",i[i.MediaTrackNext=119]="MediaTrackNext",i[i.MediaTrackPrevious=120]="MediaTrackPrevious",i[i.MediaStop=121]="MediaStop",i[i.MediaPlayPause=122]="MediaPlayPause",i[i.LaunchMediaPlayer=123]="LaunchMediaPlayer",i[i.LaunchMail=124]="LaunchMail",i[i.LaunchApp2=125]="LaunchApp2",i[i.Clear=126]="Clear",i[i.MAX_VALUE=127]="MAX_VALUE"})(cT||(cT={}));var uT;(function(i){i[i.Hint=1]="Hint",i[i.Info=2]="Info",i[i.Warning=4]="Warning",i[i.Error=8]="Error"})(uT||(uT={}));var dT;(function(i){i[i.Unnecessary=1]="Unnecessary",i[i.Deprecated=2]="Deprecated"})(dT||(dT={}));var hT;(function(i){i[i.Inline=1]="Inline",i[i.Gutter=2]="Gutter"})(hT||(hT={}));var fT;(function(i){i[i.UNKNOWN=0]="UNKNOWN",i[i.TEXTAREA=1]="TEXTAREA",i[i.GUTTER_GLYPH_MARGIN=2]="GUTTER_GLYPH_MARGIN",i[i.GUTTER_LINE_NUMBERS=3]="GUTTER_LINE_NUMBERS",i[i.GUTTER_LINE_DECORATIONS=4]="GUTTER_LINE_DECORATIONS",i[i.GUTTER_VIEW_ZONE=5]="GUTTER_VIEW_ZONE",i[i.CONTENT_TEXT=6]="CONTENT_TEXT",i[i.CONTENT_EMPTY=7]="CONTENT_EMPTY",i[i.CONTENT_VIEW_ZONE=8]="CONTENT_VIEW_ZONE",i[i.CONTENT_WIDGET=9]="CONTENT_WIDGET",i[i.OVERVIEW_RULER=10]="OVERVIEW_RULER",i[i.SCROLLBAR=11]="SCROLLBAR",i[i.OVERLAY_WIDGET=12]="OVERLAY_WIDGET",i[i.OUTSIDE_EDITOR=13]="OUTSIDE_EDITOR"})(fT||(fT={}));var gT;(function(i){i[i.TOP_RIGHT_CORNER=0]="TOP_RIGHT_CORNER",i[i.BOTTOM_RIGHT_CORNER=1]="BOTTOM_RIGHT_CORNER",i[i.TOP_CENTER=2]="TOP_CENTER"})(gT||(gT={}));var pT;(function(i){i[i.Left=1]="Left",i[i.Center=2]="Center",i[i.Right=4]="Right",i[i.Full=7]="Full"})(pT||(pT={}));var mT;(function(i){i[i.Left=0]="Left",i[i.Right=1]="Right",i[i.None=2]="None"})(mT||(mT={}));var _T;(function(i){i[i.Off=0]="Off",i[i.On=1]="On",i[i.Relative=2]="Relative",i[i.Interval=3]="Interval",i[i.Custom=4]="Custom"})(_T||(_T={}));var bT;(function(i){i[i.None=0]="None",i[i.Text=1]="Text",i[i.Blocks=2]="Blocks"})(bT||(bT={}));var vT;(function(i){i[i.Smooth=0]="Smooth",i[i.Immediate=1]="Immediate"})(vT||(vT={}));var wT;(function(i){i[i.Auto=1]="Auto",i[i.Hidden=2]="Hidden",i[i.Visible=3]="Visible"})(wT||(wT={}));var CT;(function(i){i[i.LTR=0]="LTR",i[i.RTL=1]="RTL"})(CT||(CT={}));var yT;(function(i){i[i.Invoke=1]="Invoke",i[i.TriggerCharacter=2]="TriggerCharacter",i[i.ContentChange=3]="ContentChange"})(yT||(yT={}));var ST;(function(i){i[i.File=0]="File",i[i.Module=1]="Module",i[i.Namespace=2]="Namespace",i[i.Package=3]="Package",i[i.Class=4]="Class",i[i.Method=5]="Method",i[i.Property=6]="Property",i[i.Field=7]="Field",i[i.Constructor=8]="Constructor",i[i.Enum=9]="Enum",i[i.Interface=10]="Interface",i[i.Function=11]="Function",i[i.Variable=12]="Variable",i[i.Constant=13]="Constant",i[i.String=14]="String",i[i.Number=15]="Number",i[i.Boolean=16]="Boolean",i[i.Array=17]="Array",i[i.Object=18]="Object",i[i.Key=19]="Key",i[i.Null=20]="Null",i[i.EnumMember=21]="EnumMember",i[i.Struct=22]="Struct",i[i.Event=23]="Event",i[i.Operator=24]="Operator",i[i.TypeParameter=25]="TypeParameter"})(ST||(ST={}));var kT;(function(i){i[i.Deprecated=1]="Deprecated"})(kT||(kT={}));var ET;(function(i){i[i.Hidden=0]="Hidden",i[i.Blink=1]="Blink",i[i.Smooth=2]="Smooth",i[i.Phase=3]="Phase",i[i.Expand=4]="Expand",i[i.Solid=5]="Solid"})(ET||(ET={}));var xT;(function(i){i[i.Line=1]="Line",i[i.Block=2]="Block",i[i.Underline=3]="Underline",i[i.LineThin=4]="LineThin",i[i.BlockOutline=5]="BlockOutline",i[i.UnderlineThin=6]="UnderlineThin"})(xT||(xT={}));var LT;(function(i){i[i.AlwaysGrowsWhenTypingAtEdges=0]="AlwaysGrowsWhenTypingAtEdges",i[i.NeverGrowsWhenTypingAtEdges=1]="NeverGrowsWhenTypingAtEdges",i[i.GrowsOnlyWhenTypingBefore=2]="GrowsOnlyWhenTypingBefore",i[i.GrowsOnlyWhenTypingAfter=3]="GrowsOnlyWhenTypingAfter"})(LT||(LT={}));var TT;(function(i){i[i.None=0]="None",i[i.Same=1]="Same",i[i.Indent=2]="Indent",i[i.DeepIndent=3]="DeepIndent"})(TT||(TT={}));let Sb=class{static chord(e,t){return Mr(e,t)}};Sb.CtrlCmd=2048,Sb.Shift=1024,Sb.Alt=512,Sb.WinCtrl=256;function Nz(){return{editor:void 0,languages:void 0,CancellationTokenSource:rs,Emitter:be,KeyCode:cT,KeyMod:Sb,Position:ye,Range:H,Selection:ut,SelectionDirection:CT,MarkerSeverity:uT,MarkerTag:dT,Uri:Pt,Token:wb}}const qgt="";class bCe{constructor(e){this.computeFn=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.computeFn(e)),this.lastCache}}class d_{constructor(e){this.executor=e,this._didRun=!1}getValue(){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 Az;function Rz(i){return!i||typeof i!="string"?!0:i.trim().length===0}const vCe=/{(\d+)}/g;function Ha(i,...e){return e.length===0?i:i.replace(vCe,function(t,n){const r=parseInt(n,10);return isNaN(r)||r<0||r>=e.length?t:e[r]})}function IT(i){return i.replace(/[<>&]/g,function(e){switch(e){case"<":return"<";case">":return">";case"&":return"&";default:return e}})}function za(i){return i.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g,"\\$&")}function wCe(i,e=" "){const t=DT(i,e);return Oz(t,e)}function DT(i,e){if(!i||!e)return i;const t=e.length;if(t===0||i.length===0)return i;let n=0;for(;i.indexOf(e,n)===n;)n=n+t;return i.substring(n)}function Oz(i,e){if(!i||!e)return i;const t=e.length,n=i.length;if(t===0||n===0)return i;let r=n,s=-1;for(;s=i.lastIndexOf(e,r-1),!(s===-1||s+t!==r);){if(s===0)return"";r=s}return i.substring(0,r)}function CCe(i){return i.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&").replace(/[\*]/g,".*")}function yCe(i){return i.replace(/\*/g,"")}function Mz(i,e,t={}){if(!i)throw new Error("Cannot create regex from empty string");e||(i=za(i)),t.wholeWord&&(/\B/.test(i.charAt(0))||(i="\\b"+i),/\B/.test(i.charAt(i.length-1))||(i=i+"\\b"));let n="";return t.global&&(n+="g"),t.matchCase||(n+="i"),t.multiline&&(n+="m"),t.unicode&&(n+="u"),new RegExp(i,n)}function SCe(i){return i.source==="^"||i.source==="^$"||i.source==="$"||i.source==="^\\s*$"?!1:!!(i.exec("")&&i.lastIndex===0)}function NT(i){return(i.global?"g":"")+(i.ignoreCase?"i":"")+(i.multiline?"m":"")+(i.unicode?"u":"")}function Kc(i){return i.split(/\r\n|\r|\n/)}function Ks(i){for(let e=0,t=i.length;e=0;t--){const n=i.charCodeAt(t);if(n!==32&&n!==9)return t}return-1}function kb(i,e){return ie?1:0}function AT(i,e,t=0,n=i.length,r=0,s=e.length){for(;tc)return 1}const o=n-t,a=s-r;return oa?1:0}function RT(i,e){return Eb(i,e,0,i.length,0,e.length)}function Eb(i,e,t=0,n=i.length,r=0,s=e.length){for(;t=128||c>=128)return AT(i.toLowerCase(),e.toLowerCase(),t,n,r,s);kh(l)&&(l-=32),kh(c)&&(c-=32);const u=l-c;if(u!==0)return u}const o=n-t,a=s-r;return oa?1:0}function kh(i){return i>=97&&i<=122}function Zc(i){return i>=65&&i<=90}function h_(i,e){return i.length===e.length&&Eb(i,e)===0}function OT(i,e){const t=e.length;return e.length>i.length?!1:Eb(i,e,0,t)===0}function f_(i,e){let t,n=Math.min(i.length,e.length);for(t=0;t1){const n=i.charCodeAt(e-2);if(Tr(n))return MT(n,t)}return t}class PT{constructor(e,t=0){this._str=e,this._len=e.length,this._offset=t}get offset(){return this._offset}setOffset(e){this._offset=e}prevCodePoint(){const e=kCe(this._str,this._offset);return this._offset-=e>=65536?2:1,e}nextCodePoint(){const e=Gy(this._str,this._len,this._offset);return this._offset+=e>=65536?2:1,e}eol(){return this._offset>=this._len}}class Ky{constructor(e,t=0){this._iterator=new PT(e,t)}get offset(){return this._iterator.offset}nextGraphemeLength(){const e=xh.getInstance(),t=this._iterator,n=t.offset;let r=e.getGraphemeBreakType(t.nextCodePoint());for(;!t.eol();){const s=t.offset,o=e.getGraphemeBreakType(t.nextCodePoint());if(Wz(r,o)){t.setOffset(s);break}r=o}return t.offset-n}prevGraphemeLength(){const e=xh.getInstance(),t=this._iterator,n=t.offset;let r=e.getGraphemeBreakType(t.prevCodePoint());for(;t.offset>0;){const s=t.offset,o=e.getGraphemeBreakType(t.prevCodePoint());if(Wz(o,r)){t.setOffset(s);break}r=o}return n-t.offset}eol(){return this._iterator.eol()}}function FT(i,e){return new Ky(i,e).nextGraphemeLength()}function Pz(i,e){return new Ky(i,e).prevGraphemeLength()}function ECe(i,e){e>0&&Ag(i.charCodeAt(e))&&e--;const t=e+FT(i,e);return[t-Pz(i,t),t]}const xCe=/(?:[\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 Yy(i){return xCe.test(i)}const LCe=/^[\t\n\r\x20-\x7E]*$/;function Zy(i){return LCe.test(i)}const Fz=/[\u2028\u2029]/;function Bz(i){return Fz.test(i)}function Eh(i){return i>=11904&&i<=55215||i>=63744&&i<=64255||i>=65281&&i<=65374}function BT(i){return i>=127462&&i<=127487||i===8986||i===8987||i===9200||i===9203||i>=9728&&i<=10175||i===11088||i===11093||i>=127744&&i<=128591||i>=128640&&i<=128764||i>=128992&&i<=129008||i>=129280&&i<=129535||i>=129648&&i<=129782}const TCe=String.fromCharCode(65279);function VT(i){return!!(i&&i.length>0&&i.charCodeAt(0)===65279)}function ICe(i,e=!1){return i?(e&&(i=i.replace(/\\./g,"")),i.toLowerCase()!==i):!1}function Vz(i){return i=i%(2*26),i<26?String.fromCharCode(97+i):String.fromCharCode(65+i-26)}function Wz(i,e){return i===0?e!==5&&e!==7:i===2&&e===3?!1:i===4||i===2||i===3||e===4||e===2||e===3?!0:!(i===8&&(e===8||e===9||e===11||e===12)||(i===11||i===9)&&(e===9||e===10)||(i===12||i===10)&&e===10||e===5||e===13||e===7||i===1||i===13&&e===14||i===6&&e===6)}class xh{constructor(){this._data=DCe()}static getInstance(){return xh._INSTANCE||(xh._INSTANCE=new xh),xh._INSTANCE}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 r=1;for(;r<=n;)if(et[3*r+1])r=2*r+1;else return t[3*r+2];return 0}}xh._INSTANCE=null;function DCe(){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 NCe(i,e){if(i===0)return 0;const t=ACe(i,e);if(t!==void 0)return t;const n=new PT(e,i);return n.prevCodePoint(),n.offset}function ACe(i,e){const t=new PT(e,i);let n=t.prevCodePoint();for(;RCe(n)||n===65039||n===8419;){if(t.offset===0)return;n=t.prevCodePoint()}if(!BT(n))return;let r=t.offset;return r>0&&t.prevCodePoint()===8205&&(r=t.offset),r}function RCe(i){return 127995<=i&&i<=127999}const OCe=" ";class vl{constructor(e){this.confusableDictionary=e}static getInstance(e){return vl.cache.get(Array.from(e))}static getLocales(){return vl._locales.getValue()}isAmbiguous(e){return this.confusableDictionary.has(e)}getPrimaryConfusable(e){return this.confusableDictionary.get(e)}getConfusableCodePoints(){return new Set(this.confusableDictionary.keys())}}Az=vl,vl.ambiguousCharacterData=new d_(()=>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],"_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]}')),vl.cache=new bCe(i=>{function e(c){const u=new Map;for(let d=0;d!c.startsWith("_")&&c in r);s.length===0&&(s=["_default"]);let o;for(const c of s){const u=e(r[c]);o=n(o,u)}const a=e(r._common),l=t(a,o);return new vl(l)}),vl._locales=new d_(()=>Object.keys(vl.ambiguousCharacterData.getValue()).filter(i=>!i.startsWith("_")));class Xc{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(Xc.getRawData())),this._data}static isInvisibleCharacter(e){return Xc.getData().has(e)}static get codePoints(){return Xc.getData()}}Xc._data=void 0;class WT{constructor(){this._zoomFactor=1}getZoomFactor(){return this._zoomFactor}}WT.INSTANCE=new WT;class MCe extends Ne{constructor(){super(),this._onDidChange=this._register(new be),this.onDidChange=this._onDidChange.event,this._listener=()=>this._handleChange(!0),this._mediaQueryList=null,this._handleChange(!1)}_handleChange(e){this._mediaQueryList&&this._mediaQueryList.removeEventListener("change",this._listener),this._mediaQueryList=matchMedia(`(resolution: ${window.devicePixelRatio}dppx)`),this._mediaQueryList.addEventListener("change",this._listener),e&&this._onDidChange.fire()}}class PCe extends Ne{constructor(){super(),this._onDidChange=this._register(new be),this.onDidChange=this._onDidChange.event,this._value=this._getPixelRatio();const e=this._register(new MCe);this._register(e.onDidChange(()=>{this._value=this._getPixelRatio(),this._onDidChange.fire(this._value)}))}get value(){return 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 FCe{constructor(){this._pixelRatioMonitor=null}_getOrCreatePixelRatioMonitor(){return this._pixelRatioMonitor||(this._pixelRatioMonitor=new PCe),this._pixelRatioMonitor}get value(){return this._getOrCreatePixelRatioMonitor().value}get onDidChange(){return this._getOrCreatePixelRatioMonitor().onDidChange}}const g_=new FCe;function Hz(){return WT.INSTANCE.getZoomFactor()}const p_=navigator.userAgent,ua=p_.indexOf("Firefox")>=0,Lh=p_.indexOf("AppleWebKit")>=0,HT=p_.indexOf("Chrome")>=0,wl=!HT&&p_.indexOf("Safari")>=0,zT=!HT&&!wl&&Lh,BCe=p_.indexOf("Electron/")>=0,zz=p_.indexOf("Android")>=0,$T=window.matchMedia&&window.matchMedia("(display-mode: standalone)").matches,VCe=Object.freeze(Object.defineProperty({__proto__:null,PixelRatio:g_,getZoomFactor:Hz,isFirefox:ua,isWebKit:Lh,isChrome:HT,isSafari:wl,isWebkitWebView:zT,isElectron:BCe,isAndroid:zz,isStandalone:$T},Symbol.toStringTag,{value:"Module"}));class $z{constructor(e){this.domNode=e,this._maxWidth=-1,this._width=-1,this._height=-1,this._top=-1,this._left=-1,this._bottom=-1,this._right=-1,this._fontFamily="",this._fontWeight="",this._fontSize=-1,this._fontStyle="",this._fontFeatureSettings="",this._textDecoration="",this._lineHeight=-1,this._letterSpacing=-100,this._className="",this._display="",this._position="",this._visibility="",this._color="",this._backgroundColor="",this._layerHint=!1,this._contain="none",this._boxShadow=""}setMaxWidth(e){this._maxWidth!==e&&(this._maxWidth=e,this.domNode.style.maxWidth=this._maxWidth+"px")}setWidth(e){this._width!==e&&(this._width=e,this.domNode.style.width=this._width+"px")}setHeight(e){this._height!==e&&(this._height=e,this.domNode.style.height=this._height+"px")}setTop(e){this._top!==e&&(this._top=e,this.domNode.style.top=this._top+"px")}unsetTop(){this._top!==-1&&(this._top=-1,this.domNode.style.top="")}setLeft(e){this._left!==e&&(this._left=e,this.domNode.style.left=this._left+"px")}setBottom(e){this._bottom!==e&&(this._bottom=e,this.domNode.style.bottom=this._bottom+"px")}setRight(e){this._right!==e&&(this._right=e,this.domNode.style.right=this._right+"px")}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){this._fontSize!==e&&(this._fontSize=e,this.domNode.style.fontSize=this._fontSize+"px")}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)}setTextDecoration(e){this._textDecoration!==e&&(this._textDecoration=e,this.domNode.style.textDecoration=this._textDecoration)}setLineHeight(e){this._lineHeight!==e&&(this._lineHeight=e,this.domNode.style.lineHeight=this._lineHeight+"px")}setLetterSpacing(e){this._letterSpacing!==e&&(this._letterSpacing=e,this.domNode.style.letterSpacing=this._letterSpacing+"px")}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 Rn(i){return new $z(i)}function ys(i,e){i instanceof $z?(i.setFontFamily(e.getMassagedFontFamily(wl?Ms.fontFamily:null)),i.setFontWeight(e.fontWeight),i.setFontSize(e.fontSize),i.setFontFeatureSettings(e.fontFeatureSettings),i.setLineHeight(e.lineHeight),i.setLetterSpacing(e.letterSpacing)):(i.style.fontFamily=e.getMassagedFontFamily(wl?Ms.fontFamily:null),i.style.fontWeight=e.fontWeight,i.style.fontSize=e.fontSize+"px",i.style.fontFeatureSettings=e.fontFeatureSettings,i.style.lineHeight=e.lineHeight+"px",i.style.letterSpacing=e.letterSpacing+"px")}class WCe{constructor(e,t){this.chr=e,this.type=t,this.width=0}fulfill(e){this.width=e}}class UT{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");ys(t,this._bareFontInfo),e.appendChild(t);const n=document.createElement("div");ys(n,this._bareFontInfo),n.style.fontWeight="bold",e.appendChild(n);const r=document.createElement("div");ys(r,this._bareFontInfo),r.style.fontStyle="italic",e.appendChild(r);const s=[];for(const o of this._requests){let a;o.type===0&&(a=t),o.type===2&&(a=n),o.type===1&&(a=r),a.appendChild(document.createElement("br"));const l=document.createElement("span");UT._render(l,o),a.appendChild(l),s.push(l)}this._container=e,this._testElements=s}static _render(e,t){if(t.chr===" "){let n=" ";for(let r=0;r<8;r++)n+=n;e.innerText=n}else{let n=t.chr;for(let r=0;r<8;r++)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 qT({pixelRatio:g_.value,fontFamily:t.fontFamily,fontWeight:t.fontWeight,fontSize:t.fontSize,fontFeatureSettings:t.fontFeatureSettings,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,r){const s=new WCe(e,t);return n.push(s),r&&r.push(s),s}_actualReadFontInfo(e){const t=[],n=[],r=this._createRequest("n",0,t,n),s=this._createRequest("m",0,t,null),o=this._createRequest(" ",0,t,n),a=this._createRequest("0",0,t,n),l=this._createRequest("1",0,t,n),c=this._createRequest("2",0,t,n),u=this._createRequest("3",0,t,n),d=this._createRequest("4",0,t,n),h=this._createRequest("5",0,t,n),f=this._createRequest("6",0,t,n),g=this._createRequest("7",0,t,n),p=this._createRequest("8",0,t,n),m=this._createRequest("9",0,t,n),_=this._createRequest("→",0,t,n),b=this._createRequest("→",0,t,null),v=this._createRequest("·",0,t,n),w=this._createRequest(String.fromCharCode(11825),0,t,null),E="|/-_ilm%";for(let O=0,N=E.length;O.001){x=!1;break}}let L=!0;return x&&b.width!==T&&(L=!1),b.width>_.width&&(L=!1),new qT({pixelRatio:g_.value,fontFamily:e.fontFamily,fontWeight:e.fontWeight,fontSize:e.fontSize,fontFeatureSettings:e.fontFeatureSettings,lineHeight:e.lineHeight,letterSpacing:e.letterSpacing,isMonospace:x,typicalHalfwidthCharacterWidth:r.width,typicalFullwidthCharacterWidth:s.width,canUseHalfwidthRightwardsArrow:L,spaceWidth:o.width,middotWidth:v.width,wsmiddotWidth:w.width,maxDigitWidth:I},!0)}}class Uz{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 GT=new UCe;var oc;(function(i){i.serviceIds=new Map,i.DI_TARGET="$di$target",i.DI_DEPENDENCIES="$di$dependencies";function e(t){return t[i.DI_DEPENDENCIES]||[]}i.getServiceDependencies=e})(oc||(oc={}));const _n=Ln("instantiationService");function jCe(i,e,t){e[oc.DI_TARGET]===e?e[oc.DI_DEPENDENCIES].push({id:i,index:t}):(e[oc.DI_DEPENDENCIES]=[{id:i,index:t}],e[oc.DI_TARGET]=e)}function Ln(i){if(oc.serviceIds.has(i))return oc.serviceIds.get(i);const e=function(t,n,r){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");jCe(e,t,r)};return e.toString=()=>i,oc.serviceIds.set(i,e),e}const Zn=Ln("codeEditorService");function Xy(i,e){if(!i)throw new Error(e?`Assertion failed (${e})`:"Assertion Failed")}const qCe={followsCaret:!0,ignoreCharChanges:!0,alwaysRevealFirst:!0};class GCe extends Ne{constructor(e,t={}){super(),this._onDidUpdate=this._register(new be),this._editor=e,this._options=Hc(t,qCe,!1),this.disposed=!1,this.nextIdx=-1,this.ranges=[],this.ignoreSelectionChange=!1,this.revealFirst=Boolean(this._options.alwaysRevealFirst),this._register(this._editor.onDidDispose(()=>this.dispose())),this._register(this._editor.onDidUpdateDiff(()=>this._onDiffUpdated())),this._options.followsCaret&&this._register(this._editor.getModifiedEditor().onDidChangeCursorPosition(n=>{this.ignoreSelectionChange||(this.nextIdx=-1)})),this._options.alwaysRevealFirst&&this._register(this._editor.getModifiedEditor().onDidChangeModel(n=>{this.revealFirst=!0})),this._init()}_init(){this._editor.getLineChanges()}_onDiffUpdated(){this._init(),this._compute(this._editor.getLineChanges()),this.revealFirst&&this._editor.getLineChanges()!==null&&(this.revealFirst=!1,this.nextIdx=-1,this.next(1))}_compute(e){this.ranges=[],e&&e.forEach(t=>{!this._options.ignoreCharChanges&&t.charChanges?t.charChanges.forEach(n=>{this.ranges.push({rhs:!0,range:new H(n.modifiedStartLineNumber,n.modifiedStartColumn,n.modifiedEndLineNumber,n.modifiedEndColumn)})}):t.modifiedEndLineNumber===0?this.ranges.push({rhs:!0,range:new H(t.modifiedStartLineNumber,1,t.modifiedStartLineNumber+1,1)}):this.ranges.push({rhs:!0,range:new H(t.modifiedStartLineNumber,1,t.modifiedEndLineNumber+1,1)})}),this.ranges.sort((t,n)=>H.compareRangesUsingStarts(t.range,n.range)),this._onDidUpdate.fire(this)}_initIdx(e){let t=!1;const n=this._editor.getPosition();if(!n){this.nextIdx=0;return}for(let r=0,s=this.ranges.length;r=this.ranges.length&&(this.nextIdx=0)):(this.nextIdx-=1,this.nextIdx<0&&(this.nextIdx=this.ranges.length-1));const n=this.ranges[this.nextIdx];this.ignoreSelectionChange=!0;try{const r=n.range.getStartPosition();this._editor.setPosition(r),this._editor.revealRangeInCenter(n.range,t)}finally{this.ignoreSelectionChange=!1}}canNavigate(){return this.ranges&&this.ranges.length>0}next(e=0){this._move(!0,e)}previous(e=0){this._move(!1,e)}dispose(){super.dispose(),this.ranges=[],this.disposed=!0}}const xb={ICodeEditor:"vs.editor.ICodeEditor",IDiffEditor:"vs.editor.IDiffEditor"};var $a;(function(i){i[i.Left=1]="Left",i[i.Center=2]="Center",i[i.Right=4]="Right",i[i.Full=7]="Full"})($a||($a={}));var Ua;(function(i){i[i.Inline=1]="Inline",i[i.Gutter=2]="Gutter"})(Ua||(Ua={}));var Qc;(function(i){i[i.Both=0]="Both",i[i.Right=1]="Right",i[i.Left=2]="Left",i[i.None=3]="None"})(Qc||(Qc={}));class Qy{constructor(e){this._textModelResolvedOptionsBrand=void 0,this.tabSize=Math.max(1,e.tabSize|0),this.indentSize=e.tabSize|0,this.insertSpaces=Boolean(e.insertSpaces),this.defaultEOL=e.defaultEOL|0,this.trimAutoWhitespace=Boolean(e.trimAutoWhitespace),this.bracketPairColorizationOptions=e.bracketPairColorizationOptions}equals(e){return this.tabSize===e.tabSize&&this.indentSize===e.indentSize&&this.insertSpaces===e.insertSpaces&&this.defaultEOL===e.defaultEOL&&this.trimAutoWhitespace===e.trimAutoWhitespace&&Va(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 Lb{constructor(e,t){this._findMatchBrand=void 0,this.range=e,this.matches=t}}class KT{constructor(e,t,n,r,s,o){this.identifier=e,this.range=t,this.text=n,this.forceMoveMarkers=r,this.isAutoWhitespaceEdit=s,this._isTracked=o}}class KCe{constructor(e,t,n){this.regex=e,this.wordSeparators=t,this.simpleSearch=n}}class YCe{constructor(e,t,n){this.reverseEdits=e,this.changes=t,this.trimAutoWhitespaceLineNumbers=n}}function ZCe(i){return!i.isTooLargeForSyncing()&&!i.isForSimpleWidget}var nr;(function(i){i[i.None=0]="None",i[i.Indent=1]="Indent",i[i.IndentOutdent=2]="IndentOutdent",i[i.Outdent=3]="Outdent"})(nr||(nr={}));class YT{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&&i.getLanguageId(o-1)===r;)o--;return new QCe(i,r,o,s+1,i.getStartOffset(o),i.getEndOffset(s))}class QCe{constructor(e,t,n,r,s,o){this._scopedLineTokensBrand=void 0,this._actual=e,this.languageId=t,this._firstTokenIndex=n,this._lastTokenIndex=r,this.firstCharOffset=s,this._lastCharOffset=o}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 Jc(i){return(i&3)!==0}class eS{constructor(e){if(e.autoClosingPairs?this._autoClosingPairs=e.autoClosingPairs.map(t=>new YT(t)):e.brackets?this._autoClosingPairs=e.brackets.map(t=>new YT({open:t[0],close:t[1]})):this._autoClosingPairs=[],e.colorizedBracketPairs?this._colorizedBracketPairs=jz(e.colorizedBracketPairs.map(t=>[t[0],t[1]])):e.brackets?this._colorizedBracketPairs=jz(e.brackets.map(t=>[t[0],t[1]]).filter(t=>!(t[0]==="<"&&t[1]===">"))):this._colorizedBracketPairs=[],e.__electricCharacterSupport&&e.__electricCharacterSupport.docComment){const t=e.__electricCharacterSupport.docComment;this._autoClosingPairs.push(new YT({open:t.open,close:t.close||""}))}this._autoCloseBefore=typeof e.autoCloseBefore=="string"?e.autoCloseBefore:eS.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED,this._surroundingPairs=e.surroundingPairs||this._autoClosingPairs}getAutoClosingPairs(){return this._autoClosingPairs}getAutoCloseBeforeSet(){return this._autoCloseBefore}getSurroundingPairs(){return this._surroundingPairs}getColorizedBrackets(){return this._colorizedBracketPairs}}eS.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED=`;:.,=}])> + `;function jz(i){return i.filter(([e,t])=>e!==""&&t!=="")}const qz=typeof Buffer<"u";let ZT;class tS{constructor(e){this.buffer=e,this.byteLength=this.buffer.byteLength}static wrap(e){return qz&&!Buffer.isBuffer(e)&&(e=Buffer.from(e.buffer,e.byteOffset,e.byteLength)),new tS(e)}toString(){return qz?this.buffer.toString():(ZT||(ZT=new TextDecoder),ZT.decode(this.buffer))}}function JCe(i,e){return i[e+0]<<0>>>0|i[e+1]<<8>>>0}function e2e(i,e,t){i[t+0]=e&255,e=e>>>8,i[t+1]=e&255}function ac(i,e){return i[e]*Math.pow(2,24)+i[e+1]*Math.pow(2,16)+i[e+2]*Math.pow(2,8)+i[e+3]}function lc(i,e,t){i[t+3]=e,e=e>>>8,i[t+2]=e,e=e>>>8,i[t+1]=e,e=e>>>8,i[t]=e}function Gz(i,e){return i[e]}function Kz(i,e,t){i[t]=e}let XT;function Yz(){return XT||(XT=new TextDecoder("UTF-16LE")),XT}let QT;function t2e(){return QT||(QT=new TextDecoder("UTF-16BE")),QT}let JT;function Zz(){return JT||(JT=JH()?Yz():t2e()),JT}const Xz=typeof TextDecoder<"u";let Og,eI;Xz?(Og=i=>new i2e(i),eI=n2e):(Og=i=>new r2e,eI=Qz);function n2e(i,e,t){const n=new Uint16Array(i.buffer,e,t);return t>0&&(n[0]===65279||n[0]===65534)?Qz(i,e,t):Yz().decode(n)}function Qz(i,e,t){const n=[];let r=0;for(let s=0;s=this._capacity){this._flushBuffer(),this._completedStrings[this._completedStrings.length]=e;return}for(let n=0;n[o[0].toLowerCase(),o[1].toLowerCase()]);const t=[];for(let o=0;o{const[l,c]=o,[u,d]=a;return l===u||l===d||c===u||c===d},r=(o,a)=>{const l=Math.min(o,a),c=Math.max(o,a);for(let u=0;u0&&s.push({open:a,close:l})}return s}class o2e{constructor(e,t){this._richEditBracketsBrand=void 0;const n=s2e(t);this.brackets=n.map((r,s)=>new nS(e,s,r.open,r.close,a2e(r.open,r.close,n,s),l2e(r.open,r.close,n,s))),this.forwardRegex=c2e(this.brackets),this.reversedRegex=u2e(this.brackets),this.textIsBracket={},this.textIsOpenBracket={},this.maxBracketLength=0;for(const r of this.brackets){for(const s of r.open)this.textIsBracket[s]=r,this.textIsOpenBracket[s]=!0,this.maxBracketLength=Math.max(this.maxBracketLength,s.length);for(const s of r.close)this.textIsBracket[s]=r,this.textIsOpenBracket[s]=!1,this.maxBracketLength=Math.max(this.maxBracketLength,s.length)}}}function Jz(i,e,t,n){for(let r=0,s=e.length;r=0&&n.push(a);for(const a of o.close)a.indexOf(i)>=0&&n.push(a)}}function e$(i,e){return i.length-e.length}function iS(i){if(i.length<=1)return i;const e=[],t=new Set;for(const n of i)t.has(n)||(e.push(n),t.add(n));return e}function a2e(i,e,t,n){let r=[];r=r.concat(i),r=r.concat(e);for(let s=0,o=r.length;s=0;o--)r[s++]=n.charCodeAt(o);return Zz().decode(r)}else{const r=[];let s=0;for(let o=n.length-1;o>=0;o--)r[s++]=n.charAt(o);return r.join("")}}let e=null,t=null;return function(r){return e!==r&&(e=r,t=i(e)),t}}();class Cl{static _findPrevBracketInText(e,t,n,r){const s=n.match(e);if(!s)return null;const o=n.length-(s.index||0),a=s[0].length,l=r+o;return new H(t,l-a+1,t,l+1)}static findPrevBracketInRange(e,t,n,r,s){const a=tI(n).substring(n.length-s,n.length-r);return this._findPrevBracketInText(e,t,a,r)}static findNextBracketInText(e,t,n,r){const s=n.match(e);if(!s)return null;const o=s.index||0,a=s[0].length;if(a===0)return null;const l=r+o;return new H(t,l+1,t,l+1+a)}static findNextBracketInRange(e,t,n,r,s){const o=n.substring(r,s);return this.findNextBracketInText(e,t,o,r)}}class h2e{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 r=n.charAt(n.length-1);e.push(r)}return vh(e)}onElectricCharacter(e,t,n){if(!this._richEditBrackets||this._richEditBrackets.brackets.length===0)return null;const r=t.findTokenIndexAtOffset(n-1);if(Jc(t.getStandardTokenType(r)))return null;const s=this._richEditBrackets.reversedRegex,o=t.getLineContent().substring(0,n-1)+e,a=Cl.findPrevBracketInRange(s,1,o,0,o.length);if(!a)return null;const l=o.substring(a.startColumn-1,a.endColumn-1).toLowerCase();if(this._richEditBrackets.textIsOpenBracket[l])return null;const u=t.getActualLineContentBefore(a.startColumn-1);return/^\s*$/.test(u)?{matchOpenBracket:l}:null}}function sS(i){return i.global&&(i.lastIndex=0),!0}class f2e{constructor(e){this._indentationRules=e}shouldIncrease(e){return!!(this._indentationRules&&this._indentationRules.increaseIndentPattern&&sS(this._indentationRules.increaseIndentPattern)&&this._indentationRules.increaseIndentPattern.test(e))}shouldDecrease(e){return!!(this._indentationRules&&this._indentationRules.decreaseIndentPattern&&sS(this._indentationRules.decreaseIndentPattern)&&this._indentationRules.decreaseIndentPattern.test(e))}shouldIndentNextLine(e){return!!(this._indentationRules&&this._indentationRules.indentNextLinePattern&&sS(this._indentationRules.indentNextLinePattern)&&this._indentationRules.indentNextLinePattern.test(e))}shouldIgnore(e){return!!(this._indentationRules&&this._indentationRules.unIndentedLinePattern&&sS(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 m_{constructor(e){e=e||{},e.brackets=e.brackets||[["(",")"],["{","}"],["[","]"]],this._brackets=[],e.brackets.forEach(t=>{const n=m_._createOpenBracketRegExp(t[0]),r=m_._createCloseBracketRegExp(t[1]);n&&r&&this._brackets.push({open:t[0],openRegExp:n,close:t[1],closeRegExp:r})}),this._regExpRules=e.onEnterRules||[]}onEnter(e,t,n,r){if(e>=3)for(let s=0,o=this._regExpRules.length;sc.reg?(c.reg.lastIndex=0,c.reg.test(c.text)):!0))return a.action}if(e>=2&&n.length>0&&r.length>0)for(let s=0,o=this._brackets.length;s=2&&n.length>0){for(let s=0,o=this._brackets.length;s"u"?t:s}const Mi=Ln("languageService");class eu{constructor(e,t=[],n=!1){this.ctor=e,this.staticArguments=t,this.supportsDelayedInstantiation=n}}const r$=[];function On(i,e,t){e instanceof eu||(e=new eu(e,[],t)),r$.push([i,e])}function s$(){return r$}var p2e=globalThis&&globalThis.__decorate||function(i,e,t,n){var r=arguments.length,s=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(s=(r<3?o(s):r>3?o(e,t,s):o(e,t))||s);return r>3&&s&&Object.defineProperty(e,t,s),s},o$=globalThis&&globalThis.__param||function(i,e){return function(t,n){e(t,n,i)}};class iI{constructor(e){this.languageId=e}affects(e){return this.languageId?this.languageId===e:!0}}const Ss=Ln("languageConfigurationService");let rI=class extends Ne{constructor(e,t){super(),this.configurationService=e,this.languageService=t,this.onDidChangeEmitter=this._register(new be),this.onDidChange=this.onDidChangeEmitter.event,this.configurations=new Map;const n=new Set(Object.values(sI));this._register(this.configurationService.onDidChangeConfiguration(r=>{const s=r.change.keys.some(a=>n.has(a)),o=r.change.overrides.filter(([a,l])=>l.some(c=>n.has(c))).map(([a])=>a);if(s)this.configurations.clear(),this.onDidChangeEmitter.fire(new iI(void 0));else for(const a of o)this.languageService.isRegisteredLanguageId(a)&&(this.configurations.delete(a),this.onDidChangeEmitter.fire(new iI(a)))})),this._register(gr.onDidChange(r=>{this.configurations.delete(r.languageId),this.onDidChangeEmitter.fire(new iI(r.languageId))}))}getLanguageConfiguration(e){let t=this.configurations.get(e);return t||(t=m2e(e,this.configurationService,this.languageService),this.configurations.set(e,t)),t}};rI=p2e([o$(0,ui),o$(1,Mi)],rI);function m2e(i,e,t){let n=gr.getLanguageConfiguration(i);if(!n){if(!t.isRegisteredLanguageId(i))throw new Error(`Language id "${i}" is not configured nor known`);n=new Ib(i,{})}const r=_2e(n.languageId,e),s=c$([n.underlyingConfig,r]);return new Ib(n.languageId,s)}const sI={brackets:"editor.language.brackets",colorizedBracketPairs:"editor.language.colorizedBracketPairs"};function _2e(i,e){const t=e.getValue(sI.brackets,{overrideIdentifier:i}),n=e.getValue(sI.colorizedBracketPairs,{overrideIdentifier:i});return{brackets:a$(t),colorizedBracketPairs:a$(n)}}function a$(i){if(Array.isArray(i))return i.map(e=>{if(!(!Array.isArray(e)||e.length!==2))return[e[0],e[1]]}).filter(e=>!!e)}class l${constructor(e){this.languageId=e}}class b2e{constructor(){this._entries=new Map,this._onDidChange=new be,this.onDidChange=this._onDidChange.event}register(e,t,n=0){let r=this._entries.get(e);r||(r=new v2e(e),this._entries.set(e,r));const s=r.register(t,n);return this._onDidChange.fire(new l$(e)),fn(()=>{s.dispose(),this._onDidChange.fire(new l$(e))})}getLanguageConfiguration(e){const t=this._entries.get(e);return(t==null?void 0:t.getResolvedConfiguration())||null}getComments(e){const t=this.getLanguageConfiguration(e);return t&&t.comments||null}getIndentRulesSupport(e){const t=this.getLanguageConfiguration(e);return t&&t.indentRulesSupport||null}getPrecedingValidLine(e,t,n){const r=e.getLanguageIdAtPosition(t,0);if(t>1){let s,o=-1;for(s=t-1;s>=1;s--){if(e.getLanguageIdAtPosition(s,0)!==r)return o;const a=e.getLineContent(s);if(n.shouldIgnore(a)||/^\s+$/.test(a)||a===""){o=s;continue}return s}}return-1}getInheritIndentForLine(e,t,n,r=!0){if(e<4)return null;const s=this.getIndentRulesSupport(t.getLanguageId());if(!s)return null;if(n<=1)return{indentation:"",action:null};const o=this.getPrecedingValidLine(t,n,s);if(o<0)return null;if(o<1)return{indentation:"",action:null};const a=t.getLineContent(o);if(s.shouldIncrease(a)||s.shouldIndentNextLine(a))return{indentation:ii(a),action:nr.Indent,line:o};if(s.shouldDecrease(a))return{indentation:ii(a),action:null,line:o};{if(o===1)return{indentation:ii(t.getLineContent(o)),action:null,line:o};const l=o-1,c=s.getIndentMetadata(t.getLineContent(l));if(!(c&3)&&c&4){let u=0;for(let d=l-1;d>0;d--)if(!s.shouldIndentNextLine(t.getLineContent(d))){u=d;break}return{indentation:ii(t.getLineContent(u+1)),action:null,line:u+1}}if(r)return{indentation:ii(t.getLineContent(o)),action:null,line:o};for(let u=o;u>0;u--){const d=t.getLineContent(u);if(s.shouldIncrease(d))return{indentation:ii(d),action:nr.Indent,line:u};if(s.shouldIndentNextLine(d)){let h=0;for(let f=u-1;f>0;f--)if(!s.shouldIndentNextLine(t.getLineContent(u))){h=f;break}return{indentation:ii(t.getLineContent(h+1)),action:null,line:h+1}}else if(s.shouldDecrease(d))return{indentation:ii(d),action:null,line:u}}return{indentation:ii(t.getLineContent(1)),action:null,line:1}}}getGoodIndentForLine(e,t,n,r,s){if(e<4)return null;const o=this.getLanguageConfiguration(n);if(!o)return null;const a=this.getIndentRulesSupport(n);if(!a)return null;const l=this.getInheritIndentForLine(e,t,r),c=t.getLineContent(r);if(l){const u=l.line;if(u!==void 0){const d=o.onEnter(e,"",t.getLineContent(u),"");if(d){let h=ii(t.getLineContent(u));return d.removeText&&(h=h.substring(0,h.length-d.removeText)),d.indentAction===nr.Indent||d.indentAction===nr.IndentOutdent?h=s.shiftIndent(h):d.indentAction===nr.Outdent&&(h=s.unshiftIndent(h)),a.shouldDecrease(c)&&(h=s.unshiftIndent(h)),d.appendText&&(h+=d.appendText),ii(h)}}return a.shouldDecrease(c)?l.action===nr.Indent?l.indentation:s.unshiftIndent(l.indentation):l.action===nr.Indent?s.shiftIndent(l.indentation):l.indentation}return null}getIndentForEnter(e,t,n,r){if(e<4)return null;t.forceTokenization(n.startLineNumber);const s=t.getLineTokens(n.startLineNumber),o=Jy(s,n.startColumn-1),a=o.getLineContent();let l=!1,c;o.firstCharOffset>0&&s.getLanguageId(0)!==o.languageId?(l=!0,c=a.substr(0,n.startColumn-1-o.firstCharOffset)):c=s.getLineContent().substring(0,n.startColumn-1);let u;n.isEmpty()?u=a.substr(n.startColumn-1-o.firstCharOffset):u=this.getScopedLineTokens(t,n.endLineNumber,n.endColumn).getLineContent().substr(n.endColumn-1-o.firstCharOffset);const d=this.getIndentRulesSupport(o.languageId);if(!d)return null;const h=c,f=ii(c),g={getLineTokens:b=>t.getLineTokens(b),getLanguageId:()=>t.getLanguageId(),getLanguageIdAtPosition:(b,v)=>t.getLanguageIdAtPosition(b,v),getLineContent:b=>b===n.startLineNumber?h:t.getLineContent(b)},p=ii(s.getLineContent()),m=this.getInheritIndentForLine(e,g,n.startLineNumber+1);if(!m){const b=l?p:f;return{beforeEnter:b,afterEnter:b}}let _=l?p:m.indentation;return m.action===nr.Indent&&(_=r.shiftIndent(_)),d.shouldDecrease(u)&&(_=r.unshiftIndent(_)),{beforeEnter:l?p:f,afterEnter:_}}getIndentActionForType(e,t,n,r,s){if(e<4)return null;const o=this.getScopedLineTokens(t,n.startLineNumber,n.startColumn);if(o.firstCharOffset)return null;const a=this.getIndentRulesSupport(o.languageId);if(!a)return null;const l=o.getLineContent(),c=l.substr(0,n.startColumn-1-o.firstCharOffset);let u;if(n.isEmpty()?u=l.substr(n.startColumn-1-o.firstCharOffset):u=this.getScopedLineTokens(t,n.endLineNumber,n.endColumn).getLineContent().substr(n.endColumn-1-o.firstCharOffset),!a.shouldDecrease(c+u)&&a.shouldDecrease(c+r+u)){const d=this.getInheritIndentForLine(e,t,n.startLineNumber,!1);if(!d)return null;let h=d.indentation;return d.action!==nr.Indent&&(h=s.unshiftIndent(h)),h}return null}getIndentMetadata(e,t){const n=this.getIndentRulesSupport(e.getLanguageId());return!n||t<1||t>e.getLineCount()?null:n.getIndentMetadata(e.getLineContent(t))}getEnterAction(e,t,n){const r=this.getScopedLineTokens(t,n.startLineNumber,n.startColumn),s=this.getLanguageConfiguration(r.languageId);if(!s)return null;const o=r.getLineContent(),a=o.substr(0,n.startColumn-1-r.firstCharOffset);let l;n.isEmpty()?l=o.substr(n.startColumn-1-r.firstCharOffset):l=this.getScopedLineTokens(t,n.endLineNumber,n.endColumn).getLineContent().substr(n.endColumn-1-r.firstCharOffset);let c="";if(n.startLineNumber>1&&r.firstCharOffset===0){const p=this.getScopedLineTokens(t,n.startLineNumber-1);p.languageId===r.languageId&&(c=p.getLineContent())}const u=s.onEnter(e,c,a,l);if(!u)return null;const d=u.indentAction;let h=u.appendText;const f=u.removeText||0;h?d===nr.Indent&&(h=" "+h):d===nr.Indent||d===nr.IndentOutdent?h=" ":h="";let g=this.getIndentationAtPosition(t,n.startLineNumber,n.startColumn);return f&&(g=g.substring(0,g.length-f)),{indentAction:d,appendText:h,removeText:f,indentation:g}}getIndentationAtPosition(e,t,n){const r=e.getLineContent(t);let s=ii(r);return s.length>n-1&&(s=s.substring(0,n-1)),s}getScopedLineTokens(e,t,n){e.forceTokenization(t);const r=e.getLineTokens(t),s=typeof n>"u"?e.getLineMaxColumn(t)-1:n-1;return Jy(r,s)}}const gr=new b2e;class v2e{constructor(e){this.languageId=e,this._resolved=null,this._entries=[],this._order=0,this._resolved=null}register(e,t){const n=new u$(e,t,++this._order);return this._entries.push(n),this._resolved=null,fn(()=>{for(let r=0;re.configuration)))}}function c$(i){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 i)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 u${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 Ib{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 m_(this.underlyingConfig):null,this.comments=Ib._handleComments(this.underlyingConfig),this.characterPair=new eS(this.underlyingConfig),this.wordDefinition=this.underlyingConfig.wordPattern||w8,this.indentationRules=this.underlyingConfig.indentationRules,this.underlyingConfig.indentationRules?this.indentRulesSupport=new f2e(this.underlyingConfig.indentationRules):this.indentRulesSupport=null,this.foldingRules=this.underlyingConfig.folding||{}}getWordDefinition(){return nz(this.wordDefinition)}get brackets(){return!this._brackets&&this.underlyingConfig.brackets&&(this._brackets=new o2e(this.languageId,this.underlyingConfig.brackets)),this._brackets}get electricCharacter(){return this._electricCharacter||(this._electricCharacter=new h2e(this.brackets)),this._electricCharacter}onEnter(e,t,n,r){return this._onEnterSupport?this._onEnterSupport.onEnter(e,t,n,r):null}getAutoClosingPairs(){return new XCe(this.characterPair.getAutoClosingPairs())}getAutoCloseBeforeSet(){return this.characterPair.getAutoCloseBeforeSet()}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[r,s]=t.blockComment;n.blockCommentStartToken=r,n.blockCommentEndToken=s}return n}}On(Ss,rI);const __=new class{clone(){return this}equals(i){return this===i}};function d$(i,e){return new $8([new wb(0,"",i)],e)}function oI(i,e){const t=new Uint32Array(2);return t[0]=0,t[1]=(i<<0|0<<8|0<<10|1<<14|2<<23)>>>0,new Uy(t,e===null?__:e)}const Pi=Ln("modelService");var ja=globalThis&&globalThis.__awaiter||function(i,e,t,n){function r(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(u){try{c(n.next(u))}catch(d){o(d)}}function l(u){try{c(n.throw(u))}catch(d){o(d)}}function c(u){u.done?s(u.value):r(u.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},Db=globalThis&&globalThis.__asyncValues||function(i){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=i[Symbol.asyncIterator],t;return e?e.call(i):(i=typeof __values=="function"?__values(i):i[Symbol.iterator](),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(s){t[s]=i[s]&&function(o){return new Promise(function(a,l){o=i[s](o),r(a,l,o.done,o.value)})}}function r(s,o,a,l){Promise.resolve(l).then(function(c){s({value:c,done:a})},o)}};function w2e(i){return!!i&&typeof i.then=="function"}function Yr(i){const e=new rs,t=i(e.token),n=new Promise((r,s)=>{const o=e.token.onCancellationRequested(()=>{o.dispose(),e.dispose(),s(new Tg)});Promise.resolve(t).then(a=>{o.dispose(),e.dispose(),r(a)},a=>{o.dispose(),e.dispose(),s(a)})});return new class{cancel(){e.cancel()}then(r,s){return n.then(r,s)}catch(r){return this.then(void 0,r)}finally(r){return n.finally(r)}}}function aI(i,e,t){return new Promise((n,r)=>{const s=e.onCancellationRequested(()=>{s.dispose(),n(t)});i.then(n,r).finally(()=>s.dispose())})}class C2e{constructor(){this.activePromise=null,this.queuedPromise=null,this.queuedPromiseFactory=null}queue(e){if(this.activePromise){if(this.queuedPromiseFactory=e,!this.queuedPromise){const t=()=>{this.queuedPromise=null;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(r=>{this.activePromise=null,t(r)},r=>{this.activePromise=null,n(r)})})}}const y2e=(i,e)=>{let t=!0;const n=setTimeout(()=>{t=!1,e()},i);return{isTriggered:()=>t,dispose:()=>{clearTimeout(n),t=!1}}},S2e=i=>{let e=!0;return queueMicrotask(()=>{e&&(e=!1,i())}),{isTriggered:()=>e,dispose:()=>{e=!1}}},h$=Symbol("MicrotaskDelay");class tu{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((r,s)=>{this.doResolve=r,this.doReject=s}).then(()=>{if(this.completionPromise=null,this.doResolve=null,this.task){const r=this.task;return this.task=null,r()}}));const n=()=>{var r;this.deferred=null,(r=this.doResolve)===null||r===void 0||r.call(this,null)};return this.deferred=t===h$?S2e(n):y2e(t,n),this.completionPromise}isTriggered(){var e;return!!(!((e=this.deferred)===null||e===void 0)&&e.isTriggered())}cancel(){this.cancelTimeout(),this.completionPromise&&(this.doReject&&this.doReject(new Tg),this.completionPromise=null)}cancelTimeout(){var e;(e=this.deferred)===null||e===void 0||e.dispose(),this.deferred=null}dispose(){this.cancel()}}class k2e{constructor(e){this.delayer=new tu(e),this.throttler=new C2e}trigger(e,t){return this.delayer.trigger(()=>this.throttler.queue(e),t)}dispose(){this.delayer.dispose()}}function Th(i,e){return e?new Promise((t,n)=>{const r=setTimeout(()=>{s.dispose(),t()},i),s=e.onCancellationRequested(()=>{clearTimeout(r),s.dispose(),n(new Tg)})}):Yr(t=>Th(i,t))}function Mg(i,e=0){const t=setTimeout(i,e);return fn(()=>clearTimeout(t))}function f$(i,e=n=>!!n,t=null){let n=0;const r=i.length,s=()=>{if(n>=r)return Promise.resolve(t);const o=i[n++];return Promise.resolve(o()).then(l=>e(l)?Promise.resolve(l):s())};return s()}class Wo{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 Nb{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 ri{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(){this.runner&&this.runner()}}let Ab;(function(){typeof requestIdleCallback!="function"||typeof cancelIdleCallback!="function"?Ab=i=>{ZH(()=>{if(e)return;const t=Date.now()+15;i(Object.freeze({didTimeout:!0,timeRemaining(){return Math.max(0,t-Date.now())}}))});let e=!1;return{dispose(){e||(e=!0)}}}:Ab=(i,e)=>{const t=requestIdleCallback(i,typeof e=="number"?{timeout:e}:void 0);let n=!1;return{dispose(){n||(n=!0,cancelIdleCallback(t))}}}})();class Ih{constructor(e){this._didRun=!1,this._executor=()=>{try{this._value=e()}catch(t){this._error=t}finally{this._didRun=!0}},this._handle=Ab(()=>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 lI{constructor(){this.rejected=!1,this.resolved=!1,this.p=new Promise((e,t)=>{this.completeCallback=e,this.errorCallback=t})}get isRejected(){return this.rejected}get isSettled(){return this.rejected||this.resolved}complete(e){return new Promise(t=>{this.completeCallback(e),this.resolved=!0,t()})}cancel(){new Promise(e=>{this.errorCallback(new Tg),this.rejected=!0,e()})}}var cI;(function(i){function e(n){return ja(this,void 0,void 0,function*(){let r;const s=yield Promise.all(n.map(o=>o.then(a=>a,a=>{r||(r=a)})));if(typeof r<"u")throw r;return s})}i.settled=e;function t(n){return new Promise((r,s)=>ja(this,void 0,void 0,function*(){try{yield n(r,s)}catch(o){s(o)}}))}i.withAsyncBody=t})(cI||(cI={}));class ir{constructor(e){this._state=0,this._results=[],this._error=null,this._onStateChanged=new be,queueMicrotask(()=>ja(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}}))}static fromArray(e){return new ir(t=>{t.emitMany(e)})}static fromPromise(e){return new ir(t=>ja(this,void 0,void 0,function*(){t.emitMany(yield e)}))}static fromPromises(e){return new ir(t=>ja(this,void 0,void 0,function*(){yield Promise.all(e.map(n=>ja(this,void 0,void 0,function*(){return t.emitOne(yield n)})))}))}static merge(e){return new ir(t=>ja(this,void 0,void 0,function*(){yield Promise.all(e.map(n=>{var r,s;return ja(this,void 0,void 0,function*(){var o,a;try{for(r=Db(n);s=yield r.next(),!s.done;){const l=s.value;t.emitOne(l)}}catch(l){o={error:l}}finally{try{s&&!s.done&&(a=r.return)&&(yield a.call(r))}finally{if(o)throw o.error}}})}))}))}[Symbol.asyncIterator](){let e=0;return{next:()=>ja(this,void 0,void 0,function*(){do{if(this._state===2)throw this._error;if(eja(this,void 0,void 0,function*(){var r,s;try{for(var o=Db(e),a;a=yield o.next(),!a.done;){const l=a.value;n.emitOne(t(l))}}catch(l){r={error:l}}finally{try{a&&!a.done&&(s=o.return)&&(yield s.call(o))}finally{if(r)throw r.error}}}))}map(e){return ir.map(this,e)}static filter(e,t){return new ir(n=>ja(this,void 0,void 0,function*(){var r,s;try{for(var o=Db(e),a;a=yield o.next(),!a.done;){const l=a.value;t(l)&&n.emitOne(l)}}catch(l){r={error:l}}finally{try{a&&!a.done&&(s=o.return)&&(yield s.call(o))}finally{if(r)throw r.error}}}))}filter(e){return ir.filter(this,e)}static coalesce(e){return ir.filter(e,t=>!!t)}coalesce(){return ir.coalesce(this)}static toPromise(e){var t,n,r,s;return ja(this,void 0,void 0,function*(){const o=[];try{for(t=Db(e);n=yield t.next(),!n.done;){const a=n.value;o.push(a)}}catch(a){r={error:a}}finally{try{n&&!n.done&&(s=t.return)&&(yield s.call(t))}finally{if(r)throw r.error}}return o})}toPromise(){return ir.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())}}ir.EMPTY=ir.fromArray([]);class E2e extends ir{constructor(e,t){super(t),this._source=e}cancel(){this._source.cancel()}}function x2e(i){const e=new rs,t=i(e.token);return new E2e(e,n=>ja(this,void 0,void 0,function*(){var r,s;const o=e.token.onCancellationRequested(()=>{o.dispose(),e.dispose(),n.reject(new Tg)});try{try{for(var a=Db(t),l;l=yield a.next(),!l.done;){const c=l.value;if(e.token.isCancellationRequested)return;n.emitOne(c)}}catch(c){r={error:c}}finally{try{l&&!l.done&&(s=a.return)&&(yield s.call(a))}finally{if(r)throw r.error}}o.dispose(),e.dispose()}catch(c){o.dispose(),e.dispose(),n.reject(c)}}))}const L2e="$initialize";let g$=!1;function uI(i){bh&&(g$||(g$=!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(i.message))}class T2e{constructor(e,t,n,r){this.vsWorker=e,this.req=t,this.method=n,this.args=r,this.type=0}}class p${constructor(e,t,n,r){this.vsWorker=e,this.seq=t,this.res=n,this.err=r,this.type=1}}class I2e{constructor(e,t,n,r){this.vsWorker=e,this.req=t,this.eventName=n,this.arg=r,this.type=2}}class D2e{constructor(e,t,n){this.vsWorker=e,this.req=t,this.event=n,this.type=3}}class N2e{constructor(e,t){this.vsWorker=e,this.req=t,this.type=4}}class A2e{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((r,s)=>{this._pendingReplies[n]={resolve:r,reject:s},this._send(new T2e(this._workerId,n,e,t))})}listen(e,t){let n=null;const r=new be({onFirstListenerAdd:()=>{n=String(++this._lastSentReq),this._pendingEmitters.set(n,r),this._send(new I2e(this._workerId,n,e,t))},onLastListenerRemove:()=>{this._pendingEmitters.delete(n),this._send(new N2e(this._workerId,n)),n=null}});return r.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}let 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){let t=e.req;this._handler.handleMessage(e.method,e.args).then(r=>{this._send(new p$(this._workerId,t,r,void 0))},r=>{r.detail instanceof Error&&(r.detail=bz(r.detail)),this._send(new p$(this._workerId,t,void 0,bz(r)))})}_handleSubscribeEventMessage(e){const t=e.req,n=this._handler.handleEvent(e.eventName,e.arg)(r=>{this._send(new D2e(this._workerId,t,r))});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){let t=[];if(e.type===0)for(let n=0;n{this._protocol.handleMessage(c)},c=>{r&&r(c)})),this._protocol=new A2e({sendMessage:(c,u)=>{this._worker.postMessage(c,u)},handleMessage:(c,u)=>{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,u))}catch(d){return Promise.reject(d)}},handleEvent:(c,u)=>{if(_$(c)){const d=n[c].call(n,u);if(typeof d!="function")throw new Error(`Missing dynamic event ${c} on main thread host.`);return d}if(m$(c)){const d=n[c];if(typeof d!="function")throw new Error(`Missing event ${c} on main thread host.`);return d}throw new Error(`Malformed event name ${c}`)}}),this._protocol.setWorkerId(this._worker.getId());let s=null;typeof Ki.require<"u"&&typeof Ki.require.getConfig=="function"?s=Ki.require.getConfig():typeof Ki.requirejs<"u"&&(s=Ki.requirejs.s.contexts._.config);const o=x8(n);this._onModuleLoaded=this._protocol.sendMessage(L2e,[this._worker.getId(),JSON.parse(JSON.stringify(s)),t,o]);const a=(c,u)=>this._request(c,u),l=(c,u)=>this._protocol.listen(c,u);this._lazyProxy=new Promise((c,u)=>{r=u,this._onModuleLoaded.then(d=>{c(O2e(d,a,l))},d=>{u(d),this._onError("Worker failed to load "+t,d)})})}getProxyObject(){return this._lazyProxy}_request(e,t){return new Promise((n,r)=>{this._onModuleLoaded.then(()=>{this._protocol.sendMessage(e,t).then(n,r)},r)})}_onError(e,t){console.error(e),console.info(t)}}function m$(i){return i[0]==="o"&&i[1]==="n"&&Zc(i.charCodeAt(2))}function _$(i){return/^onDynamic/.test(i)&&Zc(i.charCodeAt(9))}function O2e(i,e,t){const n=o=>function(){const a=Array.prototype.slice.call(arguments,0);return e(o,a)},r=o=>function(a){return t(o,a)};let s={};for(const o of i){if(_$(o)){s[o]=r(o);continue}if(m$(o)){s[o]=t(o,void 0);continue}s[o]=n(o)}return s}var dI;const b$=(dI=window.trustedTypes)===null||dI===void 0?void 0:dI.createPolicy("defaultWorkerFactory",{createScriptURL:i=>i});function M2e(i){if(Ki.MonacoEnvironment){if(typeof Ki.MonacoEnvironment.getWorker=="function")return Ki.MonacoEnvironment.getWorker("workerMain.js",i);if(typeof Ki.MonacoEnvironment.getWorkerUrl=="function"){const e=Ki.MonacoEnvironment.getWorkerUrl("workerMain.js",i);return new Worker(b$?b$.createScriptURL(e):e,{name:i})}}throw new Error("You must define a function MonacoEnvironment.getWorkerUrl or MonacoEnvironment.getWorker")}function P2e(i){return typeof i.then=="function"}class F2e{constructor(e,t,n,r,s){this.id=t;const o=M2e(n);P2e(o)?this.worker=o:this.worker=Promise.resolve(o),this.postMessage(e,[]),this.worker.then(a=>{a.onmessage=function(l){r(l.data)},a.onmessageerror=s,typeof a.addEventListener=="function"&&a.addEventListener("error",s)})}getId(){return this.id}postMessage(e,t){this.worker&&this.worker.then(n=>n.postMessage(e,t))}dispose(){this.worker&&this.worker.then(e=>e.terminate()),this.worker=null}}class oS{constructor(e){this._label=e,this._webWorkerFailedBeforeError=!1}create(e,t,n){let r=++oS.LAST_WORKER_ID;if(this._webWorkerFailedBeforeError)throw this._webWorkerFailedBeforeError;return new F2e(e,r,this._label||"anonymous"+r,t,s=>{uI(s),this._webWorkerFailedBeforeError=s,n(s)})}}oS.LAST_WORKER_ID=0;class Dh{constructor(e,t,n,r){this.originalStart=e,this.originalLength=t,this.modifiedStart=n,this.modifiedLength=r}getOriginalEnd(){return this.originalStart+this.originalLength}getModifiedEnd(){return this.modifiedStart+this.modifiedLength}}function v$(i){return aS(i,0)}function aS(i,e){switch(typeof i){case"object":return i===null?od(349,e):Array.isArray(i)?V2e(i,e):W2e(i,e);case"string":return hI(i,e);case"boolean":return B2e(i,e);case"number":return od(i,e);case"undefined":return od(937,e);default:return od(617,e)}}function od(i,e){return(e<<5)-e+i|0}function B2e(i,e){return od(i?433:863,e)}function hI(i,e){e=od(149417,e);for(let t=0,n=i.length;taS(n,t),e)}function W2e(i,e){return e=od(181387,e),Object.keys(i).sort().reduce((t,n)=>(t=hI(n,t),aS(i[n],t)),e)}function fI(i,e,t=32){const n=t-e,r=~((1<>>n)>>>0}function w$(i,e=0,t=i.byteLength,n=0){for(let r=0;rt.toString(16).padStart(2,"0")).join(""):H2e((i>>>0).toString(16),e/4)}class lS{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 r=this._buffLen,s=this._leftoverHighSurrogate,o,a;for(s!==0?(o=s,a=-1,s=0):(o=e.charCodeAt(0),a=0);;){let l=o;if(Tr(o))if(a+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()),Rb(this._h0)+Rb(this._h1)+Rb(this._h2)+Rb(this._h3)+Rb(this._h4)}_wrapUp(){this._buff[this._buffLen++]=128,w$(this._buff,this._buffLen),this._buffLen>56&&(this._step(),w$(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=lS._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,fI(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,r=this._h1,s=this._h2,o=this._h3,a=this._h4,l,c,u;for(let d=0;d<80;d++)d<20?(l=r&s|~r&o,c=1518500249):d<40?(l=r^s^o,c=1859775393):d<60?(l=r&s|r&o|s&o,c=2400959708):(l=r^s^o,c=3395469782),u=fI(n,5)+l+a+c+e.getUint32(d*4,!1)&4294967295,a=o,o=s,s=fI(r,30),r=n,n=u;this._h0=this._h0+n&4294967295,this._h1=this._h1+r&4294967295,this._h2=this._h2+s&4294967295,this._h3=this._h3+o&4294967295,this._h4=this._h4+a&4294967295}}lS._bigBlock32=new DataView(new ArrayBuffer(320));class C${constructor(e){this.source=e}getElements(){const e=this.source,t=new Int32Array(e.length);for(let n=0,r=e.length;n0||this.m_modifiedCount>0)&&this.m_changes.push(new Dh(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 nu{constructor(e,t,n=null){this.ContinueProcessingPredicate=n,this._originalSequence=e,this._modifiedSequence=t;const[r,s,o]=nu._getElements(e),[a,l,c]=nu._getElements(t);this._hasStrings=o&&c,this._originalStringElements=r,this._originalElementsOrHash=s,this._modifiedStringElements=a,this._modifiedElementsOrHash=l,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(nu._isStringArray(t)){const n=new Int32Array(t.length);for(let r=0,s=t.length;r=e&&r>=n&&this.ElementsAreEqual(t,r);)t--,r--;if(e>t||n>r){let d;return n<=r?(b_.Assert(e===t+1,"originalStart should only be one more than originalEnd"),d=[new Dh(e,0,n,r-n+1)]):e<=t?(b_.Assert(n===r+1,"modifiedStart should only be one more than modifiedEnd"),d=[new Dh(e,t-e+1,n,0)]):(b_.Assert(e===t+1,"originalStart should only be one more than originalEnd"),b_.Assert(n===r+1,"modifiedStart should only be one more than modifiedEnd"),d=[]),d}const o=[0],a=[0],l=this.ComputeRecursionPoint(e,t,n,r,o,a,s),c=o[0],u=a[0];if(l!==null)return l;if(!s[0]){const d=this.ComputeDiffRecursive(e,c,n,u,s);let h=[];return s[0]?h=[new Dh(c+1,t-(c+1)+1,u+1,r-(u+1)+1)]:h=this.ComputeDiffRecursive(c+1,t,u+1,r,s),this.ConcatenateChanges(d,h)}return[new Dh(e,t-e+1,n,r-n+1)]}WALKTRACE(e,t,n,r,s,o,a,l,c,u,d,h,f,g,p,m,_,b){let v=null,w=null,E=new y$,I=t,x=n,T=f[0]-m[0]-r,L=-1073741824,O=this.m_forwardHistory.length-1;do{const N=T+e;N===I||N=0&&(c=this.m_forwardHistory[O],e=c[0],I=1,x=c.length-1)}while(--O>=-1);if(v=E.getReverseChanges(),b[0]){let N=f[0]+1,P=m[0]+1;if(v!==null&&v.length>0){const $=v[v.length-1];N=Math.max(N,$.getOriginalEnd()),P=Math.max(P,$.getModifiedEnd())}w=[new Dh(N,h-N+1,P,p-P+1)]}else{E=new y$,I=o,x=a,T=f[0]-m[0]-l,L=1073741824,O=_?this.m_reverseHistory.length-1:this.m_reverseHistory.length-2;do{const N=T+s;N===I||N=u[N+1]?(d=u[N+1]-1,g=d-T-l,d>L&&E.MarkNextChange(),L=d+1,E.AddOriginalElement(d+1,g+1),T=N+1-s):(d=u[N-1],g=d-T-l,d>L&&E.MarkNextChange(),L=d,E.AddModifiedElement(d+1,g+1),T=N-1-s),O>=0&&(u=this.m_reverseHistory[O],s=u[0],I=1,x=u.length-1)}while(--O>=-1);w=E.getChanges()}return this.ConcatenateChanges(v,w)}ComputeRecursionPoint(e,t,n,r,s,o,a){let l=0,c=0,u=0,d=0,h=0,f=0;e--,n--,s[0]=0,o[0]=0,this.m_forwardHistory=[],this.m_reverseHistory=[];const g=t-e+(r-n),p=g+1,m=new Int32Array(p),_=new Int32Array(p),b=r-n,v=t-e,w=e-n,E=t-r,x=(v-b)%2===0;m[b]=e,_[v]=t,a[0]=!1;for(let T=1;T<=g/2+1;T++){let L=0,O=0;u=this.ClipDiagonalBound(b-T,T,b,p),d=this.ClipDiagonalBound(b+T,T,b,p);for(let P=u;P<=d;P+=2){P===u||PL+O&&(L=l,O=c),!x&&Math.abs(P-v)<=T-1&&l>=_[P])return s[0]=l,o[0]=c,$<=_[P]&&1447>0&&T<=1447+1?this.WALKTRACE(b,u,d,w,v,h,f,E,m,_,l,t,s,c,r,o,x,a):null}const N=(L-e+(O-n)-T)/2;if(this.ContinueProcessingPredicate!==null&&!this.ContinueProcessingPredicate(L,N))return a[0]=!0,s[0]=L,o[0]=O,N>0&&1447>0&&T<=1447+1?this.WALKTRACE(b,u,d,w,v,h,f,E,m,_,l,t,s,c,r,o,x,a):(e++,n++,[new Dh(e,t-e+1,n,r-n+1)]);h=this.ClipDiagonalBound(v-T,T,v,p),f=this.ClipDiagonalBound(v+T,T,v,p);for(let P=h;P<=f;P+=2){P===h||P=_[P+1]?l=_[P+1]-1:l=_[P-1],c=l-(P-v)-E;const $=l;for(;l>e&&c>n&&this.ElementsAreEqual(l,c);)l--,c--;if(_[P]=l,x&&Math.abs(P-b)<=T&&l<=m[P])return s[0]=l,o[0]=c,$>=m[P]&&1447>0&&T<=1447+1?this.WALKTRACE(b,u,d,w,v,h,f,E,m,_,l,t,s,c,r,o,x,a):null}if(T<=1447){let P=new Int32Array(d-u+2);P[0]=b-u+1,v_.Copy2(m,u,P,1,d-u+1),this.m_forwardHistory.push(P),P=new Int32Array(f-h+2),P[0]=v-h+1,v_.Copy2(_,h,P,1,f-h+1),this.m_reverseHistory.push(P)}}return this.WALKTRACE(b,u,d,w,v,h,f,E,m,_,l,t,s,c,r,o,x,a)}PrettifyChanges(e){for(let t=0;t0,a=n.modifiedLength>0;for(;n.originalStart+n.originalLength=0;t--){const n=e[t];let r=0,s=0;if(t>0){const d=e[t-1];r=d.originalStart+d.originalLength,s=d.modifiedStart+d.modifiedLength}const o=n.originalLength>0,a=n.modifiedLength>0;let l=0,c=this._boundaryScore(n.originalStart,n.originalLength,n.modifiedStart,n.modifiedLength);for(let d=1;;d++){const h=n.originalStart-d,f=n.modifiedStart-d;if(hc&&(c=p,l=d)}n.originalStart-=l,n.modifiedStart-=l;const u=[null];if(t>0&&this.ChangesOverlap(e[t-1],e[t],u)){e[t-1]=u[0],e.splice(t,1),t++;continue}}if(this._hasStrings)for(let t=1,n=e.length;t0&&f>l&&(l=f,c=d,u=h)}return l>0?[c,u]:null}_contiguousSequenceScore(e,t,n){let r=0;for(let s=0;s=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,r){const s=this._OriginalRegionIsBoundary(e,t)?1:0,o=this._ModifiedRegionIsBoundary(n,r)?1:0;return s+o}ConcatenateChanges(e,t){let 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 r=new Array(e.length+t.length-1);return v_.Copy(e,0,r,0,e.length-1),r[e.length-1]=n[0],v_.Copy(t,1,r,e.length,t.length-1),r}else{const r=new Array(e.length+t.length);return v_.Copy(e,0,r,0,e.length),v_.Copy(t,0,r,e.length,t.length),r}}ChangesOverlap(e,t,n){if(b_.Assert(e.originalStart<=t.originalStart,"Left change is not less than or equal to right change"),b_.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 r=e.originalStart;let s=e.originalLength;const o=e.modifiedStart;let a=e.modifiedLength;return e.originalStart+e.originalLength>=t.originalStart&&(s=t.originalStart+t.originalLength-e.originalStart),e.modifiedStart+e.modifiedLength>=t.modifiedStart&&(a=t.modifiedStart+t.modifiedLength-e.modifiedStart),n[0]=new Dh(r,s,o,a),!0}else return n[0]=null,!1}ClipDiagonalBound(e,t,n,r){if(e>=0&&e0&&t.originalLength<20&&t.modifiedLength>0&&t.modifiedLength<20&&s()){const f=n.createCharSequence(e,t.originalStart,t.originalStart+t.originalLength-1),g=r.createCharSequence(e,t.modifiedStart,t.modifiedStart+t.modifiedLength-1);let p=S$(f,g,s,!0).changes;a&&(p=j2e(p)),h=[];for(let m=0,_=p.length;m<_;m++)h.push(Ob.createFromDiffChange(p[m],f,g))}return new Mb(l,c,u,d,h)}}class q2e{constructor(e,t,n){this.shouldComputeCharChanges=n.shouldComputeCharChanges,this.shouldPostProcessCharChanges=n.shouldPostProcessCharChanges,this.shouldIgnoreTrimWhitespace=n.shouldIgnoreTrimWhitespace,this.shouldMakePrettyDiff=n.shouldMakePrettyDiff,this.originalLines=e,this.modifiedLines=t,this.original=new k$(e),this.modified=new k$(t),this.continueLineDiff=E$(n.maxComputationTime),this.continueCharDiff=E$(n.maxComputationTime===0?0:Math.min(n.maxComputationTime,5e3))}computeDiff(){if(this.original.lines.length===1&&this.original.lines[0].length===0)return this.modified.lines.length===1&&this.modified.lines[0].length===0?{quitEarly:!1,changes:[]}:{quitEarly:!1,changes:[{originalStartLineNumber:1,originalEndLineNumber:1,modifiedStartLineNumber:1,modifiedEndLineNumber:this.modified.lines.length,charChanges:[{modifiedEndColumn:0,modifiedEndLineNumber:0,modifiedStartColumn:0,modifiedStartLineNumber:0,originalEndColumn:0,originalEndLineNumber:0,originalStartColumn:0,originalStartLineNumber:0}]}]};if(this.modified.lines.length===1&&this.modified.lines[0].length===0)return{quitEarly:!1,changes:[{originalStartLineNumber:1,originalEndLineNumber:this.original.lines.length,modifiedStartLineNumber:1,modifiedEndLineNumber:1,charChanges:[{modifiedEndColumn:0,modifiedEndLineNumber:0,modifiedStartColumn:0,modifiedStartLineNumber:0,originalEndColumn:0,originalEndLineNumber:0,originalStartColumn:0,originalStartLineNumber:0}]}]};const e=S$(this.original,this.modified,this.continueLineDiff,this.shouldMakePrettyDiff),t=e.changes,n=e.quitEarly;if(this.shouldIgnoreTrimWhitespace){const a=[];for(let l=0,c=t.length;l1&&p>1;){const m=h.charCodeAt(g-2),_=f.charCodeAt(p-2);if(m!==_)break;g--,p--}(g>1||p>1)&&this._pushTrimWhitespaceCharChange(r,s+1,1,g,o+1,1,p)}{let g=pI(h,1),p=pI(f,1);const m=h.length+1,_=f.length+1;for(;g!0;const e=Date.now();return()=>Date.now()-e255?255:i|0}function w_(i){return i<0?0:i>4294967295?4294967295:i|0}class G2e{constructor(e){this.values=e,this.prefixSum=new Uint32Array(e.length),this.prefixSumValidIndex=new Int32Array(1),this.prefixSumValidIndex[0]=-1}insertValues(e,t){e=w_(e);const n=this.values,r=this.prefixSum,s=t.length;return s===0?!1:(this.values=new Uint32Array(n.length+s),this.values.set(n.subarray(0,e),0),this.values.set(n.subarray(e),e+s),this.values.set(t,e),e-1=0&&this.prefixSum.set(r.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}setValue(e,t){return e=w_(e),t=w_(t),this.values[e]===t?!1:(this.values[e]=t,e-1=n.length)return!1;const s=n.length-e;return t>=s&&(t=s),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(r.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=w_(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,r=0,s=0,o=0;for(;t<=n;)if(r=t+(n-t)/2|0,s=this.prefixSum[r],o=s-this.values[r],e=s)t=r+1;else break;return new x$(r,e-o)}}class K2e{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 x$(t,e-n)}removeValues(e,t){this._values.splice(e,t),this._invalidate(e)}insertValues(e,t){this._values=Iy(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]=r+n;for(let s=0;s=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}}class y_{constructor(){this._actual=new C_(0)}add(e){this._actual.set(e,1)}has(e){return this._actual.get(e)===1}}class Z2e{constructor(e,t,n){const r=new Uint8Array(e*t);for(let s=0,o=e*t;st&&(t=l),a>n&&(n=a),c>n&&(n=c)}t++,n++;const r=new Z2e(n,t,0);for(let s=0,o=e.length;s=this._maxCharCode?0:this._states.get(e,t)}}let mI=null;function Q2e(){return mI===null&&(mI=new X2e([[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]])),mI}let Pb=null;function J2e(){if(Pb===null){Pb=new C_(0);const i=` <>'"、。。、,.:;‘〈「『〔([{「」}])〕』」〉’`~…`;for(let t=0;tr);if(r>0){const a=t.charCodeAt(r-1),l=t.charCodeAt(o);(a===40&&l===41||a===91&&l===93||a===123&&l===125)&&o--}return{range:{startLineNumber:n,startColumn:r+1,endLineNumber:n,endColumn:o+2},url:t.substring(r,o+1)}}static computeLinks(e,t=Q2e()){const n=J2e(),r=[];for(let s=1,o=e.getLineCount();s<=o;s++){const a=e.getLineContent(s),l=a.length;let c=0,u=0,d=0,h=1,f=!1,g=!1,p=!1,m=!1;for(;c=0?(r+=n?1:-1,r<0?r=e.length-1:r%=e.length,e[r]):null}}_I.INSTANCE=new _I;class tye extends C_{constructor(e){super(0);for(let t=0,n=e.length;t(e.hasOwnProperty(t)||(e[t]=i(t)),e[t])}const qa=nye(i=>new tye(i)),iye=999;class Pg{constructor(e,t,n,r){this.searchString=e,this.isRegex=t,this.matchCase=n,this.wordSeparators=r}parseSearchRequest(){if(this.searchString==="")return null;let e;this.isRegex?e=rye(this.searchString):e=this.searchString.indexOf(` +`)>=0;let t=null;try{t=Mz(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 KCe(t,this.wordSeparators?qa(this.wordSeparators):null,n?this.searchString:null)}}function rye(i){if(!i||i.length===0)return!1;for(let e=0,t=i.length;e=t)break;const r=i.charCodeAt(e);if(r===110||r===114||r===87)return!0}return!1}function Fg(i,e,t){if(!t)return new Lb(i,null);const n=[];for(let r=0,s=e.length;r>0);t[s]>=e?r=s-1:t[s+1]>=e?(n=s,r=s):n=s+1}return n+1}}class dS{static findMatches(e,t,n,r,s){const o=t.parseSearchRequest();return o?o.regex.multiline?this._doFindMatchesMultiline(e,n,new S_(o.wordSeparators,o.regex),r,s):this._doFindMatchesLineByLine(e,n,o,r,s):[]}static _getMultilineMatchRange(e,t,n,r,s,o){let a,l=0;r?(l=r.findLineFeedCountBeforeOffset(s),a=t+s+l):a=t+s;let c;if(r){const f=r.findLineFeedCountBeforeOffset(s+o.length)-l;c=a+o.length+f}else c=a+o.length;const u=e.getPositionAt(a),d=e.getPositionAt(c);return new H(u.lineNumber,u.column,d.lineNumber,d.column)}static _doFindMatchesMultiline(e,t,n,r,s){const o=e.getOffsetAt(t.getStartPosition()),a=e.getValueInRange(t,1),l=e.getEOL()===`\r +`?new L$(a):null,c=[];let u=0,d;for(n.reset(0);d=n.next(a);)if(c[u++]=Fg(this._getMultilineMatchRange(e,o,a,l,d.index,d[0]),d,r),u>=s)return c;return c}static _doFindMatchesLineByLine(e,t,n,r,s){const o=[];let a=0;if(t.startLineNumber===t.endLineNumber){const c=e.getLineContent(t.startLineNumber).substring(t.startColumn-1,t.endColumn-1);return a=this._findMatchesInLine(n,c,t.startLineNumber,t.startColumn-1,a,o,r,s),o}const l=e.getLineContent(t.startLineNumber).substring(t.startColumn-1);a=this._findMatchesInLine(n,l,t.startLineNumber,t.startColumn-1,a,o,r,s);for(let c=t.startLineNumber+1;c=l))return s;return s}const u=new S_(e.wordSeparators,e.regex);let d;u.reset(0);do if(d=u.next(t),d&&(o[s++]=Fg(new H(n,d.index+1+r,n,d.index+1+d[0].length+r),d,a),s>=l))return s;while(d);return s}static findNextMatch(e,t,n,r){const s=t.parseSearchRequest();if(!s)return null;const o=new S_(s.wordSeparators,s.regex);return s.regex.multiline?this._doFindNextMatchMultiline(e,n,o,r):this._doFindNextMatchLineByLine(e,n,o,r)}static _doFindNextMatchMultiline(e,t,n,r){const s=new ye(t.lineNumber,1),o=e.getOffsetAt(s),a=e.getLineCount(),l=e.getValueInRange(new H(s.lineNumber,s.column,a,e.getLineMaxColumn(a)),1),c=e.getEOL()===`\r +`?new L$(l):null;n.reset(t.column-1);let u=n.next(l);return u?Fg(this._getMultilineMatchRange(e,o,l,c,u.index,u[0]),u,r):t.lineNumber!==1||t.column!==1?this._doFindNextMatchMultiline(e,new ye(1,1),n,r):null}static _doFindNextMatchLineByLine(e,t,n,r){const s=e.getLineCount(),o=t.lineNumber,a=e.getLineContent(o),l=this._findFirstMatchInLine(n,a,o,t.column,r);if(l)return l;for(let c=1;c<=s;c++){const u=(o+c-1)%s,d=e.getLineContent(u+1),h=this._findFirstMatchInLine(n,d,u+1,1,r);if(h)return h}return null}static _findFirstMatchInLine(e,t,n,r,s){e.reset(r-1);const o=e.next(t);return o?Fg(new H(n,o.index+1,n,o.index+1+o[0].length),o,s):null}static findPreviousMatch(e,t,n,r){const s=t.parseSearchRequest();if(!s)return null;const o=new S_(s.wordSeparators,s.regex);return s.regex.multiline?this._doFindPreviousMatchMultiline(e,n,o,r):this._doFindPreviousMatchLineByLine(e,n,o,r)}static _doFindPreviousMatchMultiline(e,t,n,r){const s=this._doFindMatchesMultiline(e,new H(1,1,t.lineNumber,t.column),n,r,10*iye);if(s.length>0)return s[s.length-1];const o=e.getLineCount();return t.lineNumber!==o||t.column!==e.getLineMaxColumn(o)?this._doFindPreviousMatchMultiline(e,new ye(o,e.getLineMaxColumn(o)),n,r):null}static _doFindPreviousMatchLineByLine(e,t,n,r){const s=e.getLineCount(),o=t.lineNumber,a=e.getLineContent(o).substring(0,t.column-1),l=this._findLastMatchInLine(n,a,o,r);if(l)return l;for(let c=1;c<=s;c++){const u=(s+o-c-1)%s,d=e.getLineContent(u+1),h=this._findLastMatchInLine(n,d,u+1,r);if(h)return h}return null}static _findLastMatchInLine(e,t,n,r){let s=null,o;for(e.reset(0);o=e.next(t);)s=Fg(new H(n,o.index+1,n,o.index+1+o[0].length),o,r);return s}}function sye(i,e,t,n,r){if(n===0)return!0;const s=e.charCodeAt(n-1);if(i.get(s)!==0||s===13||s===10)return!0;if(r>0){const o=e.charCodeAt(n);if(i.get(o)!==0)return!0}return!1}function oye(i,e,t,n,r){if(n+r===t)return!0;const s=e.charCodeAt(n+r);if(i.get(s)!==0||s===13||s===10)return!0;if(r>0){const o=e.charCodeAt(n+r-1);if(i.get(o)!==0)return!0}return!1}function bI(i,e,t,n,r){return sye(i,e,t,n,r)&&oye(i,e,t,n,r)}class S_{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 r=n.index,s=n[0].length;if(r===this._prevMatchStartIndex&&s===this._prevMatchLength){if(s===0){Gy(e,t,this._searchRegex.lastIndex)>65535?this._searchRegex.lastIndex+=2:this._searchRegex.lastIndex+=1;continue}return null}if(this._prevMatchStartIndex=r,this._prevMatchLength=s,!this._wordSeparators||bI(this._wordSeparators,e,t,r,s))return n}while(n);return null}}class vI{static computeUnicodeHighlights(e,t,n){const r=n?n.startLineNumber:1,s=n?n.endLineNumber:e.getLineCount(),o=new T$(t),a=o.getCandidateCodePoints();let l;a==="allNonBasicAscii"?l=new RegExp("[^\\t\\n\\r\\x20-\\x7E]","g"):l=new RegExp(`${aye(Array.from(a))}`,"g");const c=new S_(null,l),u=[];let d=!1,h,f=0,g=0,p=0;e:for(let m=r,_=s;m<=_;m++){const b=e.getLineContent(m),v=b.length;c.reset(0);do if(h=c.next(b),h){let w=h.index,E=h.index+h[0].length;if(w>0){const L=b.charCodeAt(w-1);Tr(L)&&w--}if(E+1=L){d=!0;break e}u.push(new H(m,w+1,m,E+1))}}while(h)}return{ranges:u,hasMore:d,ambiguousCharacterCount:f,invisibleCharacterCount:g,nonBasicAsciiCharacterCount:p}}static computeUnicodeHighlightReason(e,t){const n=new T$(t);switch(n.shouldHighlightNonBasicASCII(e,null)){case 0:return null;case 2:return{kind:1};case 3:{const s=e.codePointAt(0),o=n.ambiguousCharacters.getPrimaryConfusable(s),a=vl.getLocales().filter(l=>!vl.getInstance(new Set([...t.allowedLocales,l])).isAmbiguous(s));return{kind:0,confusableWith:String.fromCodePoint(o),notAmbiguousInLocales:a}}case 1:return{kind:2}}}}function aye(i,e){return`[${za(i.map(n=>String.fromCodePoint(n)).join(""))}]`}class T${constructor(e){this.options=e,this.allowedCodePoints=new Set(e.allowedCodePoints),this.ambiguousCharacters=vl.getInstance(new Set(e.allowedLocales))}getCandidateCodePoints(){if(this.options.nonBasicASCII)return"allNonBasicAscii";const e=new Set;if(this.options.invisibleCharacters)for(const t of Xc.codePoints)I$(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 r=!1,s=!1;if(t)for(let o of t){const a=o.codePointAt(0),l=Zy(o);r=r||l,!l&&!this.ambiguousCharacters.isAmbiguous(a)&&!Xc.isInvisibleCharacter(a)&&(s=!0)}return!r&&s?0:this.options.invisibleCharacters&&!I$(e)&&Xc.isInvisibleCharacter(n)?2:this.options.ambiguousCharacters&&this.ambiguousCharacters.isAmbiguous(n)?3:0}}function I$(i){return i===" "||i===` +`||i===" "}var Bg=globalThis&&globalThis.__awaiter||function(i,e,t,n){function r(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(u){try{c(n.next(u))}catch(d){o(d)}}function l(u){try{c(n.throw(u))}catch(d){o(d)}}function c(u){u.done?s(u.value):r(u.value).then(a,l)}c((n=n.apply(i,e||[])).next())})};class lye extends Y2e{get uri(){return this._uri}get eol(){return this._eol}getValue(){return this.getText()}getLinesContent(){return this._lines.slice(0)}getLineCount(){return this._lines.length}getLineContent(e){return this._lines[e-1]}getWordAtPosition(e,t){const n=mb(e.column,nz(t),this._lines[e.lineNumber-1],0);return n?new H(e.lineNumber,n.startColumn,e.lineNumber,n.endColumn):null}words(e){const t=this._lines,n=this._wordenize.bind(this);let r=0,s="",o=0,a=[];return{*[Symbol.iterator](){for(;;)if(othis._lines.length)t=this._lines.length,n=this._lines[t-1].length+1,r=!0;else{const s=this._lines[t-1].length+1;n<1?(n=1,r=!0):n>s&&(n=s,r=!0)}return r?{lineNumber:t,column:n}:e}}class Vg{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 lye(Pt.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 Bg(this,void 0,void 0,function*(){const r=this._getModel(e);return r?vI.computeUnicodeHighlights(r,t,n):{ranges:[],hasMore:!1,ambiguousCharacterCount:0,invisibleCharacterCount:0,nonBasicAsciiCharacterCount:0}})}computeDiff(e,t,n,r){return Bg(this,void 0,void 0,function*(){const s=this._getModel(e),o=this._getModel(t);if(!s||!o)return null;const a=s.getLinesContent(),l=o.getLinesContent(),u=new q2e(a,l,{shouldComputeCharChanges:!0,shouldPostProcessCharChanges:!0,shouldIgnoreTrimWhitespace:n,shouldMakePrettyDiff:!0,maxComputationTime:r}).computeDiff(),d=u.changes.length>0?!1:this._modelsAreIdentical(s,o);return{quitEarly:u.quitEarly,identical:d,changes:u.changes}})}_modelsAreIdentical(e,t){const n=e.getLineCount(),r=t.getLineCount();if(n!==r)return!1;for(let s=1;s<=n;s++){const o=e.getLineContent(s),a=t.getLineContent(s);if(o!==a)return!1}return!0}computeMoreMinimalEdits(e,t){return Bg(this,void 0,void 0,function*(){const n=this._getModel(e);if(!n)return t;const r=[];let s;t=t.slice(0).sort((o,a)=>{if(o.range&&a.range)return H.compareRangesUsingStarts(o.range,a.range);const l=o.range?0:1,c=a.range?0:1;return l-c});for(let{range:o,text:a,eol:l}of t){if(typeof l=="number"&&(s=l),H.isEmpty(o)&&!a)continue;const c=n.getValueInRange(o);if(a=a.replace(/\r\n|\n|\r/g,n.eol),c===a)continue;if(Math.max(a.length,c.length)>Vg._diffLimit){r.push({range:o,text:a});continue}const u=z2e(c,a,!1),d=n.offsetAt(H.lift(o).getStartPosition());for(const h of u){const f=n.positionAt(d+h.originalStart),g=n.positionAt(d+h.originalStart+h.originalLength),p={text:a.substr(h.modifiedStart,h.modifiedLength),range:{startLineNumber:f.lineNumber,startColumn:f.column,endLineNumber:g.lineNumber,endColumn:g.column}};n.getValueInRange(p.range)!==p.text&&r.push(p)}}return typeof s=="number"&&r.push({eol:s,text:"",range:{startLineNumber:0,startColumn:0,endLineNumber:0,endColumn:0}}),r})}computeLinks(e){return Bg(this,void 0,void 0,function*(){const t=this._getModel(e);return t?eye(t):null})}textualSuggest(e,t,n,r){return Bg(this,void 0,void 0,function*(){const s=new go(!0),o=new RegExp(n,r),a=new Set;e:for(let l of e){const c=this._getModel(l);if(c){for(let u of c.words(o))if(!(u===t||!isNaN(Number(u)))&&(a.add(u),a.size>Vg._suggestionsLimit))break e}}return{words:Array.from(a),duration:s.elapsed()}})}computeWordRanges(e,t,n,r){return Bg(this,void 0,void 0,function*(){const s=this._getModel(e);if(!s)return Object.create(null);const o=new RegExp(n,r),a=Object.create(null);for(let l=t.startLineNumber;lthis._host.fhr(a,l)),getMirrorModels:()=>this._getModels()};return this._foreignModuleFactory?(this._foreignModule=this._foreignModuleFactory(o,t),Promise.resolve(x8(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)}}}Vg._diffLimit=1e5,Vg._suggestionsLimit=1e4,typeof importScripts=="function"&&(Ki.monaco=Nz());const wI=Ln("textResourceConfigurationService"),D$=Ln("textResourcePropertiesService"),yl=Ln("logService");var cc;(function(i){i[i.Trace=0]="Trace",i[i.Debug=1]="Debug",i[i.Info=2]="Info",i[i.Warning=3]="Warning",i[i.Error=4]="Error",i[i.Critical=5]="Critical",i[i.Off=6]="Off"})(cc||(cc={}));const N$=cc.Info;class cye extends Ne{constructor(){super(...arguments),this.level=N$,this._onDidChangeLogLevel=this._register(new be)}setLevel(e){this.level!==e&&(this.level=e,this._onDidChangeLogLevel.fire(this.level))}getLevel(){return this.level}}class uye extends cye{constructor(e=N$){super(),this.setLevel(e)}trace(e,...t){this.getLevel()<=cc.Trace&&console.log("%cTRACE","color: #888",e,...t)}debug(e,...t){this.getLevel()<=cc.Debug&&console.log("%cDEBUG","background: #eee; color: #888",e,...t)}info(e,...t){this.getLevel()<=cc.Info&&console.log("%c INFO","color: #33f",e,...t)}error(e,...t){this.getLevel()<=cc.Error&&console.log("%c ERR","color: #f33",e,...t)}dispose(){}}class dye extends Ne{constructor(e){super(),this.logger=e,this._register(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)}error(e,...t){this.logger.error(e,...t)}}const yt=Ln("ILanguageFeaturesService");var hye=globalThis&&globalThis.__decorate||function(i,e,t,n){var r=arguments.length,s=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(s=(r<3?o(s):r>3?o(e,t,s):o(e,t))||s);return r>3&&s&&Object.defineProperty(e,t,s),s},Fb=globalThis&&globalThis.__param||function(i,e){return function(t,n){e(t,n,i)}},CI=globalThis&&globalThis.__awaiter||function(i,e,t,n){function r(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(u){try{c(n.next(u))}catch(d){o(d)}}function l(u){try{c(n.throw(u))}catch(d){o(d)}}function c(u){u.done?s(u.value):r(u.value).then(a,l)}c((n=n.apply(i,e||[])).next())})};const A$=60*1e3,R$=5*60*1e3;function Wg(i,e){const t=i.getModel(e);return!(!t||t.isTooLargeForSyncing())}let yI=class extends Ne{constructor(e,t,n,r,s){super(),this._modelService=e,this._workerManager=this._register(new gye(this._modelService,r)),this._logService=n,this._register(s.linkProvider.register({language:"*",hasAccessToAllModels:!0},{provideLinks:(o,a)=>Wg(this._modelService,o.uri)?this._workerManager.withWorker().then(l=>l.computeLinks(o.uri)).then(l=>l&&{links:l}):Promise.resolve({links:[]})})),this._register(s.completionProvider.register("*",new fye(this._workerManager,t,this._modelService,r)))}dispose(){super.dispose()}canComputeUnicodeHighlights(e){return Wg(this._modelService,e)}computedUnicodeHighlights(e,t,n){return this._workerManager.withWorker().then(r=>r.computedUnicodeHighlights(e,t,n))}computeDiff(e,t,n,r){return this._workerManager.withWorker().then(s=>s.computeDiff(e,t,n,r))}computeMoreMinimalEdits(e,t){if(Mo(t)){if(!Wg(this._modelService,e))return Promise.resolve(t);const n=go.create(!0),r=this._workerManager.withWorker().then(s=>s.computeMoreMinimalEdits(e,t));return r.finally(()=>this._logService.trace("FORMAT#computeMoreMinimalEdits",e.toString(!0),n.elapsed())),Promise.race([r,Th(1e3).then(()=>t)])}else return Promise.resolve(void 0)}canNavigateValueSet(e){return Wg(this._modelService,e)}navigateValueSet(e,t,n){return this._workerManager.withWorker().then(r=>r.navigateValueSet(e,t,n))}canComputeWordRanges(e){return Wg(this._modelService,e)}computeWordRanges(e,t){return this._workerManager.withWorker().then(n=>n.computeWordRanges(e,t))}};yI=hye([Fb(0,Pi),Fb(1,wI),Fb(2,yl),Fb(3,Ss),Fb(4,yt)],yI);class fye{constructor(e,t,n,r){this.languageConfigurationService=r,this._debugDisplayName="wordbasedCompletions",this._workerManager=e,this._configurationService=t,this._modelService=n}provideCompletionItems(e,t){return CI(this,void 0,void 0,function*(){const n=this._configurationService.getValue(e.uri,t,"editor");if(!n.wordBasedSuggestions)return;const r=[];if(n.wordBasedSuggestionsMode==="currentDocument")Wg(this._modelService,e.uri)&&r.push(e.uri);else for(const d of this._modelService.getModels())Wg(this._modelService,d.uri)&&(d===e?r.unshift(d.uri):(n.wordBasedSuggestionsMode==="allDocuments"||d.getLanguageId()===e.getLanguageId())&&r.push(d.uri));if(r.length===0)return;const s=this.languageConfigurationService.getLanguageConfiguration(e.getLanguageId()).getWordDefinition(),o=e.getWordAtPosition(t),a=o?new H(t.lineNumber,o.startColumn,t.lineNumber,o.endColumn):H.fromPositions(t),l=a.setEndPosition(t.lineNumber,t.column),u=yield(yield this._workerManager.withWorker()).textualSuggest(r,o==null?void 0:o.word,s);if(u)return{duration:u.duration,suggestions:u.words.map(d=>({kind:18,label:d,insertText:d,range:{insert:l,replace:a}}))}})}}let gye=class extends Ne{constructor(e,t){super(),this.languageConfigurationService=t,this._modelService=e,this._editorWorkerClient=null,this._lastWorkerUsedTime=new Date().getTime(),this._register(new Nb).cancelAndSet(()=>this._checkStopIdleWorker(),Math.round(R$/2)),this._register(this._modelService.onModelRemoved(r=>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>R$&&(this._editorWorkerClient.dispose(),this._editorWorkerClient=null)}withWorker(){return this._lastWorkerUsedTime=new Date().getTime(),this._editorWorkerClient||(this._editorWorkerClient=new M$(this._modelService,!1,"editorWorkerService",this.languageConfigurationService)),Promise.resolve(this._editorWorkerClient)}};class pye 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 r=new Nb;r.cancelAndSet(()=>this._checkStopModelSync(),Math.round(A$/2)),this._register(r)}}dispose(){for(let e in this._syncedModels)Nn(this._syncedModels[e]);this._syncedModels=Object.create(null),this._syncedModelsLastUsedTime=Object.create(null),super.dispose()}ensureSyncedResources(e,t){for(const n of e){const r=n.toString();this._syncedModels[r]||this._beginModelSync(n,t),this._syncedModels[r]&&(this._syncedModelsLastUsedTime[r]=new Date().getTime())}}_checkStopModelSync(){const e=new Date().getTime(),t=[];for(let n in this._syncedModelsLastUsedTime)e-this._syncedModelsLastUsedTime[n]>A$&&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 r=e.toString();this._proxy.acceptNewModel({url:n.uri.toString(),lines:n.getLinesContent(),EOL:n.getEOL(),versionId:n.getVersionId()});const s=new Je;s.add(n.onDidChangeContent(o=>{this._proxy.acceptModelChanged(r.toString(),o)})),s.add(n.onWillDispose(()=>{this._stopModelSync(r)})),s.add(fn(()=>{this._proxy.acceptRemovedModel(r)})),this._syncedModels[r]=s}_stopModelSync(e){const t=this._syncedModels[e];delete this._syncedModels[e],delete this._syncedModelsLastUsedTime[e],Nn(t)}}class O${constructor(e){this._instance=e,this._proxyObj=Promise.resolve(this._instance)}dispose(){this._instance.dispose()}getProxyObject(){return this._proxyObj}}class SI{constructor(e){this._workerClient=e}fhr(e,t){return this._workerClient.fhr(e,t)}}class M$ extends Ne{constructor(e,t,n,r){super(),this.languageConfigurationService=r,this._disposed=!1,this._modelService=e,this._keepIdleModels=t,this._workerFactory=new oS(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 R2e(this._workerFactory,"vs/editor/common/services/editorSimpleWorker",new SI(this)))}catch(e){uI(e),this._worker=new O$(new Vg(new SI(this),null))}return this._worker}_getProxy(){return this._getOrCreateWorker().getProxyObject().then(void 0,e=>(uI(e),this._worker=new O$(new Vg(new SI(this),null)),this._getOrCreateWorker().getProxyObject()))}_getOrCreateModelManager(e){return this._modelManager||(this._modelManager=this._register(new pye(e,this._modelService,this._keepIdleModels))),this._modelManager}_withSyncedResources(e,t=!1){return CI(this,void 0,void 0,function*(){return this._disposed?Promise.reject(D8()):this._getProxy().then(n=>(this._getOrCreateModelManager(n).ensureSyncedResources(e,t),n))})}computedUnicodeHighlights(e,t,n){return this._withSyncedResources([e]).then(r=>r.computeUnicodeHighlights(e.toString(),t,n))}computeDiff(e,t,n,r){return this._withSyncedResources([e,t],!0).then(s=>s.computeDiff(e.toString(),t.toString(),n,r))}computeMoreMinimalEdits(e,t){return this._withSyncedResources([e]).then(n=>n.computeMoreMinimalEdits(e.toString(),t))}computeLinks(e){return this._withSyncedResources([e]).then(t=>t.computeLinks(e.toString()))}textualSuggest(e,t,n){return CI(this,void 0,void 0,function*(){const r=yield this._withSyncedResources(e),s=n.source,o=NT(n);return r.textualSuggest(e.map(a=>a.toString()),t,s,o)})}computeWordRanges(e,t){return this._withSyncedResources([e]).then(n=>{const r=this._modelService.getModel(e);if(!r)return Promise.resolve(null);const s=this.languageConfigurationService.getLanguageConfiguration(r.getLanguageId()).getWordDefinition(),o=s.source,a=NT(s);return n.computeWordRanges(e.toString(),t,o,a)})}navigateValueSet(e,t,n){return this._withSyncedResources([e]).then(r=>{const s=this._modelService.getModel(e);if(!s)return null;const o=this.languageConfigurationService.getLanguageConfiguration(s.getLanguageId()).getWordDefinition(),a=o.source,l=NT(o);return r.navigateValueSet(e.toString(),t,n,a,l)})}dispose(){super.dispose(),this._disposed=!0}}function mye(i,e,t){return new _ye(i,e,t)}class _ye extends M${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?x8(this._foreignModuleHost):[];return e.loadForeignModule(this._foreignModuleId,this._foreignModuleCreateData,t).then(n=>{this._foreignModuleCreateData=null;const r=(a,l)=>e.fmr(a,l),s=(a,l)=>function(){const c=Array.prototype.slice.call(arguments,0);return l(a,c)},o={};for(const a of n)o[a]=s(a,r);return o})})),this._foreignProxy}getProxy(){return this._getForeignProxy()}withSyncedResources(e){return this._withSyncedResources(e).then(t=>this.getProxy())}}class Ir{constructor(e,t,n){this._lineTokensBrand=void 0,this._tokens=e,this._tokensCount=this._tokens.length>>>1,this._text=t,this._languageIdCodec=n}static createEmpty(e,t){const n=Ir.defaultTokenMetadata,r=new Uint32Array(2);return r[0]=e.length,r[1]=n,new Ir(r,e,t)}equals(e){return e instanceof Ir?this.slicedEquals(e,0,this._tokensCount):!1}slicedEquals(e,t,n){if(this._text!==e._text||this._tokensCount!==e._tokensCount)return!1;const r=t<<1,s=r+(n<<1);for(let o=r;o0?this._tokens[e-1<<1]:0}getMetadata(e){return this._tokens[(e<<1)+1]}getLanguageId(e){const t=this._tokens[(e<<1)+1],n=Cs.getLanguageId(t);return this._languageIdCodec.decodeLanguageId(n)}getStandardTokenType(e){const t=this._tokens[(e<<1)+1];return Cs.getTokenType(t)}getForeground(e){const t=this._tokens[(e<<1)+1];return Cs.getForeground(t)}getClassName(e){const t=this._tokens[(e<<1)+1];return Cs.getClassNameFromMetadata(t)}getInlineStyle(e,t){const n=this._tokens[(e<<1)+1];return Cs.getInlineStyleFromMetadata(n,t)}getPresentation(e){const t=this._tokens[(e<<1)+1];return Cs.getPresentationFromMetadata(t)}getEndOffset(e){return this._tokens[e<<1]}findTokenIndexAtOffset(e){return Ir.findIndexInTokensArray(this._tokens,e)}inflate(){return this}sliceAndInflate(e,t,n){return new kI(this,e,t,n)}static convertToEndOffset(e,t){const r=(e.length>>>1)-1;for(let s=0;s>>1)-1;for(;nt&&(r=s)}return n}withInserted(e){if(e.length===0)return this;let t=0,n=0,r="";const s=new Array;let o=0;for(;;){const a=to){r+=this._text.substring(o,l.offset);const c=this._tokens[(t<<1)+1];s.push(r.length,c),o=l.offset}r+=l.text,s.push(r.length,l.tokenMetadata),n++}else break}return new Ir(new Uint32Array(s),r,this._languageIdCodec)}}Ir.defaultTokenMetadata=(0<<10|1<<14|2<<23)>>>0;class kI{constructor(e,t,n,r){this._source=e,this._startOffset=t,this._endOffset=n,this._deltaOffset=r,this._firstTokenIndex=e.findTokenIndexAtOffset(t),this._tokensCount=0;for(let s=this._firstTokenIndex,o=e.getCount();s=n);s++)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 kI?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 da{constructor(e,t,n,r){this.startColumn=e,this.endColumn=t,this.className=n,this.type=r,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,r=t.length;if(n!==r)return!1;for(let s=0;s=s||(a[l++]=new da(Math.max(1,c.startColumn-r+1),Math.min(o+1,c.endColumn-r+1),c.className,c.type));return a}static filter(e,t,n,r){if(e.length===0)return[];const s=[];let o=0;for(let a=0,l=e.length;at||u.isEmpty()&&(c.type===0||c.type===3))continue;const d=u.startLineNumber===t?u.startColumn:n,h=u.endLineNumber===t?u.endColumn:r;s[o++]=new da(d,h,c.inlineClassName,c.type)}return s}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=da._typeCompare(e.type,t.type);return n!==0?n:e.className!==t.className?e.className0&&this.stopOffsets[0]0&&t=e){this.stopOffsets.splice(r,0,e),this.classNames.splice(r,0,t),this.metadata.splice(r,0,n);break}this.count++}}class bye{static normalize(e,t){if(t.length===0)return[];const n=[],r=new hS;let s=0;for(let o=0,a=t.length;o1){const p=e.charCodeAt(c-2);Tr(p)&&c--}if(u>1){const p=e.charCodeAt(u-2);Tr(p)&&u--}const f=c-1,g=u-2;s=r.consumeLowerThan(f,s,n),r.count===0&&(s=f),r.insert(g,d,h)}return r.consumeLowerThan(1073741824,s,n),n}}class Fr{constructor(e,t,n){this._linePartBrand=void 0,this.endIndex=e,this.type=t,this.metadata=n}isWhitespace(){return!!(this.metadata&1)}isPseudoAfter(){return!!(this.metadata&4)}}class vye{constructor(e,t){this.startOffset=e,this.endOffset=t}equals(e){return this.startOffset===e.startOffset&&this.endOffset===e.endOffset}}class Hg{constructor(e,t,n,r,s,o,a,l,c,u,d,h,f,g,p,m,_,b,v){this.useMonospaceOptimizations=e,this.canUseHalfwidthRightwardsArrow=t,this.lineContent=n,this.continuesWithWrappedLine=r,this.isBasicASCII=s,this.containsRTL=o,this.fauxIndentLength=a,this.lineTokens=l,this.lineDecorations=c.sort(da.compare),this.tabSize=u,this.startVisibleColumn=d,this.spaceWidth=h,this.stopRenderingLineAfter=p,this.renderWhitespace=m==="all"?4:m==="boundary"?1:m==="selection"?2:m==="trailing"?3:0,this.renderControlCharacters=_,this.fontLigatures=b,this.selectionsOnLine=v&&v.sort((I,x)=>I.startOffset>>16}static getCharIndex(e){return(e&65535)>>>0}setColumnInfo(e,t,n,r){const s=(t<<16|n<<0)>>>0;this._data[e-1]=s,this._absoluteOffsets[e-1]=r+n}getAbsoluteOffset(e){return this._absoluteOffsets.length===0?0:this._absoluteOffsets[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=iu.getPartIndex(t),r=iu.getCharIndex(t);return new EI(n,r)}getColumn(e,t){return this.partDataToCharOffset(e.partIndex,t,e.charIndex)+1}partDataToCharOffset(e,t,n){if(this.length===0)return 0;const r=(e<<16|n<<0)>>>0;let s=0,o=this.length-1;for(;s+1>>1,m=this._data[p];if(m===r)return p;m>r?o=p:s=p}if(s===o)return s;const a=this._data[s],l=this._data[o];if(a===r)return s;if(l===r)return o;const c=iu.getPartIndex(a),u=iu.getCharIndex(a),d=iu.getPartIndex(l);let h;c!==d?h=t:h=iu.getCharIndex(l);const f=n-u,g=h-n;return f<=g?s:o}}class xI{constructor(e,t,n){this._renderLineOutputBrand=void 0,this.characterMapping=e,this.containsRTL=t,this.containsForeignElements=n}}function fS(i,e){if(i.lineContent.length===0){if(i.lineDecorations.length>0){e.appendASCIIString("");let t=0,n=0,r=0;for(const o of i.lineDecorations)(o.type===1||o.type===2)&&(e.appendASCIIString(''),o.type===1&&(r|=1,t++),o.type===2&&(r|=2,n++));e.appendASCIIString("");const s=new iu(1,t+n);return s.setColumnInfo(1,t,0,0),new xI(s,!1,r)}return e.appendASCIIString(""),new xI(new iu(0,0),!1,0)}return Tye(yye(i),e)}class wye{constructor(e,t,n,r){this.characterMapping=e,this.html=t,this.containsRTL=n,this.containsForeignElements=r}}function gS(i){const e=Og(1e4),t=fS(i,e);return new wye(t.characterMapping,e.build(),t.containsRTL,t.containsForeignElements)}class Cye{constructor(e,t,n,r,s,o,a,l,c,u,d,h,f,g,p){this.fontIsMonospace=e,this.canUseHalfwidthRightwardsArrow=t,this.lineContent=n,this.len=r,this.isOverflowing=s,this.parts=o,this.containsForeignElements=a,this.fauxIndentLength=l,this.tabSize=c,this.startVisibleColumn=u,this.containsRTL=d,this.spaceWidth=h,this.renderSpaceCharCode=f,this.renderWhitespace=g,this.renderControlCharacters=p}}function yye(i){const e=i.lineContent;let t,n;i.stopRenderingLineAfter!==-1&&i.stopRenderingLineAfter0){for(let o=0,a=i.lineDecorations.length;o0&&(n[r++]=new Fr(e,"",0));for(let s=0,o=i.getCount();s=t){n[r++]=new Fr(t,l,0);break}n[r++]=new Fr(a,l,0)}return n}function kye(i,e,t){let n=0;const r=[];let s=0;if(t)for(let o=0,a=e.length;o=50&&(r[s++]=new Fr(h+1,u,d),f=h+1,h=-1);f!==c&&(r[s++]=new Fr(c,u,d))}else r[s++]=l;n=c}else for(let o=0,a=e.length;o50){const d=l.type,h=l.metadata,f=Math.ceil(u/50);for(let g=1;g=8234&&i<=8238||i>=8294&&i<=8297||i>=8206&&i<=8207||i===1564}function Eye(i,e){const t=[];let n=new Fr(0,"",0),r=0;for(const s of e){const o=s.endIndex;for(;rn.endIndex&&(n=new Fr(r,s.type,s.metadata),t.push(n)),n=new Fr(r+1,"mtkcontrol",s.metadata),t.push(n))}r>n.endIndex&&(n=new Fr(o,s.type,s.metadata),t.push(n))}return t}function xye(i,e,t,n){const r=i.continuesWithWrappedLine,s=i.fauxIndentLength,o=i.tabSize,a=i.startVisibleColumn,l=i.useMonospaceOptimizations,c=i.selectionsOnLine,u=i.renderWhitespace===1,d=i.renderWhitespace===3,h=i.renderSpaceWidth!==i.spaceWidth,f=[];let g=0,p=0,m=n[p].type,_=n[p].endIndex;const b=n.length;let v=!1,w=Ks(e),E;w===-1?(v=!0,w=t,E=t):E=Yc(e);let I=!1,x=0,T=c&&c[x],L=a%o;for(let N=s;N=T.endOffset&&(x++,T=c&&c[x]);let $;if(NE)$=!0;else if(P===9)$=!0;else if(P===32)if(u)if(I)$=!0;else{const ne=N+1N),$&&d&&($=v||N>E),I){if(!$||!l&&L>=o){if(h){const ne=g>0?f[g-1].endIndex:s;for(let z=ne+1;z<=N;z++)f[g++]=new Fr(z,"mtkw",1)}else f[g++]=new Fr(N,"mtkw",1);L=L%o}}else(N===_||$&&N>s)&&(f[g++]=new Fr(N,m,0),L=L%o);for(P===9?L=o:Eh(P)?L+=2:L++,I=$;N===_&&(p++,p0?e.charCodeAt(t-1):0,P=t>1?e.charCodeAt(t-2):0;N===32&&P!==32&&P!==9||(O=!0)}else O=!0;if(O)if(h){const N=g>0?f[g-1].endIndex:s;for(let P=N+1;P<=t;P++)f[g++]=new Fr(P,"mtkw",1)}else f[g++]=new Fr(t,"mtkw",1);else f[g++]=new Fr(t,m,0);return f}function Lye(i,e,t,n){n.sort(da.compare);const r=bye.normalize(i,n),s=r.length;let o=0;const a=[];let l=0,c=0;for(let d=0,h=t.length;dc&&(c=_.startOffset,a[l++]=new Fr(c,p,m)),_.endOffset+1<=g)c=_.endOffset+1,a[l++]=new Fr(c,p+" "+_.className,m|_.metadata),o++;else{c=g,a[l++]=new Fr(c,p+" "+_.className,m|_.metadata);break}}g>c&&(c=g,a[l++]=new Fr(c,p,m))}const u=t[t.length-1].endIndex;if(o'):e.appendASCIIString("");for(let L=0,O=l.length;L=c&&(B+=we)}}for(z&&(e.appendASCIIString(' style="width:'),e.appendASCIIString(String(f*ce)),e.appendASCIIString('px"')),e.appendASCII(62);v1?e.write1(8594):e.write1(65515);for(let Ae=2;Ae<=B;Ae++)e.write1(160)}else B=1,e.write1(g);E+=B,v>=c&&(w+=B)}x=ce}else{let ce=0;for(e.appendASCII(62);v=c&&(w+=Ae)}x=ce}K?I++:I=0,v>=o&&!b&&N.isPseudoAfter()&&(b=!0,_.setColumnInfo(v+1,L,E,T)),e.appendASCIIString("")}return b||_.setColumnInfo(o+1,l.length-1,E,T),a&&e.appendASCIIString(""),e.appendASCIIString(""),new xI(_,h,r)}function Iye(i){return i.toString(16).toUpperCase().padStart(4,"0")}class B${constructor(e,t,n,r){this._viewportBrand=void 0,this.top=e|0,this.left=t|0,this.width=n|0,this.height=r|0}}class Dye{constructor(e,t){this.tabSize=e,this.data=t}}class LI{constructor(e,t,n,r,s,o,a){this._viewLineDataBrand=void 0,this.content=e,this.continuesWithWrappedLine=t,this.minColumn=n,this.maxColumn=r,this.startVisibleColumn=s,this.tokens=o,this.inlineDecorations=a}}class ha{constructor(e,t,n,r,s,o,a,l,c,u){this.minColumn=e,this.maxColumn=t,this.content=n,this.continuesWithWrappedLine=r,this.isBasicASCII=ha.isBasicASCII(n,o),this.containsRTL=ha.containsRTL(n,this.isBasicASCII,s),this.tokens=a,this.inlineDecorations=l,this.tabSize=c,this.startVisibleColumn=u}static isBasicASCII(e,t){return t?Zy(e):!0}static containsRTL(e,t,n){return!t&&n?Yy(e):!1}}class Bb{constructor(e,t,n){this.range=e,this.inlineClassName=t,this.type=n}}class Nye{constructor(e,t,n,r){this.startOffset=e,this.endOffset=t,this.inlineClassName=n,this.inlineClassNameAffectsLetterSpacing=r}toInlineDecoration(e){return new Bb(new H(e,this.startOffset+1,e,this.endOffset+1),this.inlineClassName,this.inlineClassNameAffectsLetterSpacing?3:0)}}class V${constructor(e,t){this._viewModelDecorationBrand=void 0,this.range=e,this.options=t}}class W${constructor(e,t,n){this.color=e,this.zIndex=t,this.data=n}static cmp(e,t){return e.zIndex===t.zIndex?e.colort.color?1:0:e.zIndex-t.zIndex}}function Aye(i){return Array.isArray(i)}function Rye(i){return!Aye(i)}function H$(i){return typeof i=="string"}function z$(i){return!H$(i)}function k_(i){return!i}function Nh(i,e){return i.ignoreCase&&e?e.toLowerCase():e}function $$(i){return i.replace(/[&<>'"_]/g,"-")}function Oye(i,e){console.log(`${i.languageId}: ${e}`)}function mi(i,e){return new Error(`${i.languageId}: ${e}`)}function Ah(i,e,t,n,r){const s=/\$((\$)|(#)|(\d\d?)|[sS](\d\d?)|@(\w+))/g;let o=null;return e.replace(s,function(a,l,c,u,d,h,f,g,p){return k_(c)?k_(u)?!k_(d)&&d0;){const n=i.tokenizer[t];if(n)return n;const r=t.lastIndexOf(".");r<0?t=null:t=t.substr(0,r)}return null}function Mye(i,e){let t=e;for(;t&&t.length>0;){if(i.stateNames[t])return!0;const r=t.lastIndexOf(".");r<0?t=null:t=t.substr(0,r)}return!1}const U$=5;class Vb{constructor(e){this._maxCacheDepth=e,this._entries=Object.create(null)}static create(e,t){return this._INSTANCE.create(e,t)}create(e,t){if(e!==null&&e.depth>=this._maxCacheDepth)return new E_(e,t);let n=E_.getStackElementId(e);n.length>0&&(n+="|"),n+=t;let r=this._entries[n];return r||(r=new E_(e,t),this._entries[n]=r,r)}}Vb._INSTANCE=new Vb(U$);class E_{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 E_._equals(this,e)}push(e){return Vb.create(this,e)}pop(){return this.parent}popall(){let e=this;for(;e.parent;)e=e.parent;return e}switchTo(e){return Vb.create(this.parent,e)}}class x_{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 x_(this.languageId,this.state)}}class Rh{constructor(e){this._maxCacheDepth=e,this._entries=Object.create(null)}static create(e,t){return this._INSTANCE.create(e,t)}create(e,t){if(t!==null)return new Wb(e,t);if(e!==null&&e.depth>=this._maxCacheDepth)return new Wb(e,t);const n=E_.getStackElementId(e);let r=this._entries[n];return r||(r=new Wb(e,null),this._entries[n]=r,r)}}Rh._INSTANCE=new Rh(U$);class Wb{constructor(e,t){this.stack=e,this.embeddedLanguageData=t}clone(){return(this.embeddedLanguageData?this.embeddedLanguageData.clone():null)===this.embeddedLanguageData?this:Rh.create(this.stack,this.embeddedLanguageData)}equals(e){return!(e instanceof Wb)||!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 Pye{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 wb(e,t,this._languageId)))}nestedLanguageTokenize(e,t,n,r){const s=n.languageId,o=n.state,a=Oi.get(s);if(!a)return this.enterLanguage(s),this.emit(r,""),o;const l=a.tokenize(e,t,o);if(r!==0)for(const c of l.tokens)this._tokens.push(new wb(c.offset+r,c.type,c.language));else this._tokens=this._tokens.concat(l.tokens);return this._lastTokenType=null,this._lastTokenLanguage=null,this._languageId=null,l.endState}finalize(e){return new $8(this._tokens,e)}}class mS{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);this._lastTokenMetadata!==n&&(this._lastTokenMetadata=n,this._tokens.push(e),this._tokens.push(n))}static _merge(e,t,n){const r=e!==null?e.length:0,s=t.length,o=n!==null?n.length:0;if(r===0&&s===0&&o===0)return new Uint32Array(0);if(r===0&&s===0)return n;if(s===0&&o===0)return e;const a=new Uint32Array(r+s+o);e!==null&&a.set(e);for(let l=0;l{if(s)return;let a=!1;for(let l=0,c=o.changedLanguages.length;l{})}}getInitialState(){const e=Vb.create(null,this._lexer.start);return Rh.create(e,null)}tokenize(e,t,n){const r=new Pye,s=this._tokenize(e,t,n,r);return r.finalize(s)}tokenizeEncoded(e,t,n){const r=new mS(this._languageService,this._standaloneThemeService.getColorTheme().tokenTheme),s=this._tokenize(e,t,n,r);return r.finalize(s)}_tokenize(e,t,n,r){return n.embeddedLanguageData?this._nestedTokenize(e,t,n,0,r):this._myTokenize(e,t,n,0,r)}_findLeavingNestedLanguageOffset(e,t){let n=this._lexer.tokenizer[t.stack.state];if(!n&&(n=pS(this._lexer,t.stack.state),!n))throw mi(this._lexer,"tokenizer state is not defined: "+t.stack.state);let r=-1,s=!1;for(const o of n){if(!z$(o.action)||o.action.nextEmbedded!=="@pop")continue;s=!0;let a=o.regex;const l=o.regex.source;if(l.substr(0,4)==="^(?:"&&l.substr(l.length-1,1)===")"){const u=(a.ignoreCase?"i":"")+(a.unicode?"u":"");a=new RegExp(l.substr(4,l.length-5),u)}const c=e.search(a);c===-1||c!==0&&o.matchOnlyAtLineStart||(r===-1||c0&&s.nestedLanguageTokenize(a,!1,n.embeddedLanguageData,r);const l=e.substring(o);return this._myTokenize(l,t,n,r+o,s)}_safeRuleName(e){return e?e.name:"(unknown)"}_myTokenize(e,t,n,r,s){s.enterLanguage(this._languageId);const o=e.length,a=t&&this._lexer.includeLF?e+` +`:e,l=a.length;let c=n.embeddedLanguageData,u=n.stack,d=0,h=null,f=!0;for(;f||d=l)break;f=!1;let L=this._lexer.tokenizer[_];if(!L&&(L=pS(this._lexer,_),!L))throw mi(this._lexer,"tokenizer state is not defined: "+_);let O=a.substr(d);for(const N of L)if((d===0||!N.matchOnlyAtLineStart)&&(b=O.match(N.regex),b)){v=b[0],w=N.action;break}}if(b||(b=[""],v=""),w||(d=this._lexer.maxStack)throw mi(this._lexer,"maximum tokenizer stack size reached: ["+u.state+","+u.parent.state+",...]");u=u.push(_)}else if(w.next==="@pop"){if(u.depth<=1)throw mi(this._lexer,"trying to pop an empty stack in rule: "+this._safeRuleName(E));u=u.pop()}else if(w.next==="@popall")u=u.popall();else{let L=Ah(this._lexer,w.next,v,b,_);if(L[0]==="@"&&(L=L.substr(1)),pS(this._lexer,L))u=u.push(L);else throw mi(this._lexer,"trying to set a next state '"+L+"' that is undefined in rule: "+this._safeRuleName(E))}}w.log&&typeof w.log=="string"&&Oye(this._lexer,this._lexer.languageId+": "+Ah(this._lexer,w.log,v,b,_))}if(x===null)throw mi(this._lexer,"lexer rule has no well-defined action in rule: "+this._safeRuleName(E));const T=L=>{const O=this._languageService.getLanguageIdByLanguageName(L)||this._languageService.getLanguageIdByMimeType(L)||L,N=this._getNestedEmbeddedLanguageData(O);if(d0)throw mi(this._lexer,"groups cannot be nested: "+this._safeRuleName(E));if(b.length!==x.length+1)throw mi(this._lexer,"matched number of groups does not match the number of actions in rule: "+this._safeRuleName(E));let L=0;for(let O=1;Oi});class DI{static colorizeElement(e,t,n,r){r=r||{};const s=r.theme||"vs",o=r.mimeType||n.getAttribute("lang")||n.getAttribute("data-lang");if(!o)return console.error("Mode not detected"),Promise.resolve();const a=t.getLanguageIdByMimeType(o)||o;e.setTheme(s);const l=n.firstChild?n.firstChild.nodeValue:"";n.className+=" "+s;const c=u=>{var d;const h=(d=II==null?void 0:II.createHTML(u))!==null&&d!==void 0?d:u;n.innerHTML=h};return this.colorize(t,l||"",a,r).then(c,u=>console.error(u))}static colorize(e,t,n,r){return Bye(this,void 0,void 0,function*(){const s=e.languageIdCodec;let o=4;r&&typeof r.tabSize=="number"&&(o=r.tabSize),VT(t)&&(t=t.substr(1));const a=Kc(t);if(!e.isRegisteredLanguageId(n))return j$(a,o,s);const l=yield Oi.getOrCreate(n);return l?Vye(a,o,l,s):j$(a,o,s)})}static colorizeLine(e,t,n,r,s=4){const o=ha.isBasicASCII(e,t),a=ha.containsRTL(e,o,n);return gS(new Hg(!1,!0,e,!1,o,a,0,r,[],s,0,0,0,0,-1,"none",!1,!1,null)).html}static colorizeModelLine(e,t,n=4){const r=e.getLineContent(t);e.forceTokenization(t);const o=e.getLineTokens(t).inflate();return this.colorizeLine(r,e.mightContainNonBasicASCII(),e.mightContainRTL(),o,n)}}function Vye(i,e,t,n){return new Promise((r,s)=>{const o=()=>{const a=Wye(i,e,t,n);if(t instanceof Hb){const l=t.getLoadStatus();if(l.loaded===!1){l.promise.then(o,s);return}}r(a)};o()})}function j$(i,e,t){let n=[];const s=new Uint32Array(2);s[0]=0,s[1]=16793600;for(let o=0,a=i.length;o")}return n.join("")}function Wye(i,e,t,n){let r=[],s=t.getInitialState();for(let o=0,a=i.length;o"),s=c.endState}return r.join("")}const _S={clipboard:{writeText:ec||document.queryCommandSupported&&document.queryCommandSupported("copy")||!!(navigator&&navigator.clipboard&&navigator.clipboard.writeText),readText:ec||!!(navigator&&navigator.clipboard&&navigator.clipboard.readText)},keyboard:(()=>ec||$T?0:navigator.keyboard||wl?1:2)(),touch:"ontouchstart"in window||navigator.maxTouchPoints>0,pointerEvents:window.PointerEvent&&("ontouchstart"in window||window.navigator.maxTouchPoints>0||navigator.maxTouchPoints>0)};function NI(i,e){if(i===0)return null;const t=(i&65535)>>>0,n=(i&4294901760)>>>16;return n!==0?new bS([AI(t,e),AI(n,e)]):new bS([AI(t,e)])}function AI(i,e){const t=!!(i&2048),n=!!(i&256),r=e===2?n:t,s=!!(i&1024),o=!!(i&512),a=e===2?t:n,l=i&255;return new zg(r,s,o,a,l)}class zg{constructor(e,t,n,r,s){this.ctrlKey=e,this.shiftKey=t,this.altKey=n,this.metaKey=r,this.keyCode=s}equals(e){return this.ctrlKey===e.ctrlKey&&this.shiftKey===e.shiftKey&&this.altKey===e.altKey&&this.metaKey===e.metaKey&&this.keyCode===e.keyCode}isModifierKey(){return this.keyCode===0||this.keyCode===5||this.keyCode===57||this.keyCode===6||this.keyCode===4}toChord(){return new bS([this])}isDuplicateModifierCase(){return this.ctrlKey&&this.keyCode===5||this.shiftKey&&this.keyCode===4||this.altKey&&this.keyCode===6||this.metaKey&&this.keyCode===57}}class bS{constructor(e){if(e.length===0)throw ic("parts");this.parts=e}}class Hye{constructor(e,t,n,r,s,o){this.ctrlKey=e,this.shiftKey=t,this.altKey=n,this.metaKey=r,this.keyLabel=s,this.keyAriaLabel=o}}class zye{}function $ye(i){if(i.charCode){let t=String.fromCharCode(i.charCode).toUpperCase();return Ig.fromString(t)}const e=i.keyCode;if(e===3)return 7;if(ua){if(e===59)return 80;if(e===107)return 81;if(e===109)return 83;if(gn&&e===224)return 57}else if(Lh){if(e===91)return 57;if(gn&&e===93)return 57;if(!gn&&e===92)return 57}return Cz[e]||0}const Uye=gn?256:2048,jye=512,qye=1024,Gye=gn?2048:256;class ki{constructor(e){this._standardKeyboardEventBrand=!0;let 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.keyCode=$ye(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._asRuntimeKeybinding=this._computeRuntimeKeybinding()}preventDefault(){this.browserEvent&&this.browserEvent.preventDefault&&this.browserEvent.preventDefault()}stopPropagation(){this.browserEvent&&this.browserEvent.stopPropagation&&this.browserEvent.stopPropagation()}toKeybinding(){return this._asRuntimeKeybinding}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|=Uye),this.altKey&&(t|=jye),this.shiftKey&&(t|=qye),this.metaKey&&(t|=Gye),t|=e,t}_computeRuntimeKeybinding(){let e=0;return this.keyCode!==5&&this.keyCode!==4&&this.keyCode!==6&&this.keyCode!==57&&(e=this.keyCode),new zg(this.ctrlKey,this.shiftKey,this.altKey,this.metaKey,e)}}let RI=!1,L_=null;function Kye(i){if(!i.parent||i.parent===i)return null;try{let e=i.location,t=i.parent.location;if(e.origin!=="null"&&t.origin!=="null"&&e.origin!==t.origin)return RI=!0,null}catch{return RI=!0,null}return i.parent}class OI{static getSameOriginWindowChain(){if(!L_){L_=[];let e=window,t;do t=Kye(e),t?L_.push({window:e,iframeElement:e.frameElement||null}):L_.push({window:e,iframeElement:null}),e=t;while(e)}return L_.slice(0)}static hasDifferentOriginAncestor(){return L_||this.getSameOriginWindowChain(),RI}static getPositionOfChildWindowRelativeToAncestorWindow(e,t){if(!t||e===t)return{top:0,left:0};let n=0,r=0,s=this.getSameOriginWindowChain();for(const o of s){if(n+=o.window.scrollY,r+=o.window.scrollX,o.window===t||!o.iframeElement)break;let a=o.iframeElement.getBoundingClientRect();n+=a.top,r+=a.left}return{top:n,left:r}}}class Ga{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+document.body.scrollLeft+document.documentElement.scrollLeft,this.posy=e.clientY+document.body.scrollTop+document.documentElement.scrollTop);let t=OI.getPositionOfChildWindowRelativeToAncestorWindow(self,e.view);this.posx-=t.left,this.posy-=t.top}preventDefault(){this.browserEvent.preventDefault()}stopPropagation(){this.browserEvent.stopPropagation()}}class T_{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){let r=e,s=e;if(typeof r.wheelDeltaY<"u")this.deltaY=r.wheelDeltaY/120;else if(typeof s.VERTICAL_AXIS<"u"&&s.axis===s.VERTICAL_AXIS)this.deltaY=-s.detail/3;else if(e.type==="wheel"){const o=e;o.deltaMode===o.DOM_DELTA_LINE?ua&&!gn?this.deltaY=-e.deltaY/3:this.deltaY=-e.deltaY:this.deltaY=-e.deltaY/40}if(typeof r.wheelDeltaX<"u")wl&&Gr?this.deltaX=-(r.wheelDeltaX/120):this.deltaX=r.wheelDeltaX/120;else if(typeof s.HORIZONTAL_AXIS<"u"&&s.axis===s.HORIZONTAL_AXIS)this.deltaX=-e.detail/3;else if(e.type==="wheel"){const o=e;o.deltaMode===o.DOM_DELTA_LINE?ua&&!gn?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(){this.browserEvent&&this.browserEvent.preventDefault()}stopPropagation(){this.browserEvent&&this.browserEvent.stopPropagation()}}var sn;(function(i){i.inMemory="inmemory",i.vscode="vscode",i.internal="private",i.walkThrough="walkThrough",i.walkThroughSnippet="walkThroughSnippet",i.http="http",i.https="https",i.file="file",i.mailto="mailto",i.untitled="untitled",i.data="data",i.command="command",i.vscodeRemote="vscode-remote",i.vscodeRemoteResource="vscode-remote-resource",i.userData="vscode-userdata",i.vscodeCustomEditor="vscode-custom-editor",i.vscodeNotebook="vscode-notebook",i.vscodeNotebookCell="vscode-notebook-cell",i.vscodeNotebookCellMetadata="vscode-notebook-cell-metadata",i.vscodeNotebookCellOutput="vscode-notebook-cell-output",i.vscodeInteractive="vscode-interactive",i.vscodeInteractiveInput="vscode-interactive-input",i.vscodeSettings="vscode-settings",i.vscodeWorkspaceTrust="vscode-workspace-trust",i.vscodeTerminal="vscode-terminal",i.webviewPanel="webview-panel",i.vscodeWebview="vscode-webview",i.extension="extension",i.vscodeFileResource="vscode-file",i.tmp="tmp",i.vsls="vsls"})(sn||(sn={}));const Yye="tkn";class Zye{constructor(){this._hosts=Object.create(null),this._ports=Object.create(null),this._connectionTokens=Object.create(null),this._preferredWebSchema="http",this._delegate=null}setPreferredWebSchema(e){this._preferredWebSchema=e}rewrite(e){if(this._delegate)return this._delegate(e);const t=e.authority;let n=this._hosts[t];n&&n.indexOf(":")!==-1&&(n=`[${n}]`);const r=this._ports[t],s=this._connectionTokens[t];let o=`path=${encodeURIComponent(e.path)}`;return typeof s=="string"&&(o+=`&${Yye}=${encodeURIComponent(s)}`),Pt.from({scheme:bh?this._preferredWebSchema:sn.vscodeRemoteResource,authority:`${n}:${r}`,path:"/vscode-remote-resource",query:o})}}const q$=new Zye;class zb{asBrowserUri(e,t){const n=this.toUri(e,t);return n.scheme===sn.vscodeRemote?q$.rewrite(n):n.scheme===sn.file&&(ec||Wve&&Ki.origin===`${sn.vscodeFileResource}://${zb.FALLBACK_AUTHORITY}`)?n.with({scheme:sn.vscodeFileResource,authority:n.authority||zb.FALLBACK_AUTHORITY,query:null,fragment:null}):n}toUri(e,t){return Pt.isUri(e)?e:Pt.parse(t.toUrl(e))}}zb.FALLBACK_AUTHORITY="vscode-app";const G$=new zb;function Dr(i){for(;i.firstChild;)i.firstChild.remove()}function MI(i){var e;return(e=i==null?void 0:i.isConnected)!==null&&e!==void 0?e:!1}class K${constructor(e,t,n,r){this._node=e,this._type=t,this._handler=n,this._options=r||!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 Xe(i,e,t,n){return new K$(i,e,t,n)}function Y$(i){return function(e){return i(new Ga(e))}}function Xye(i){return function(e){return i(new ki(e))}}let Zr=function(e,t,n,r){let s=n;return t==="click"||t==="mousedown"?s=Y$(n):(t==="keydown"||t==="keypress"||t==="keyup")&&(s=Xye(n)),Xe(e,t,s,r)},Qye=function(e,t,n){let r=Y$(t);return PI(e,r,n)};function PI(i,e,t){return Xe(i,tc&&_S.pointerEvents?Nt.POINTER_DOWN:Nt.MOUSE_DOWN,e,t)}function Z$(i,e,t){return Xe(i,tc&&_S.pointerEvents?Nt.POINTER_UP:Nt.MOUSE_UP,e,t)}function FI(i,e){return Xe(i,"mouseout",t=>{let n=t.relatedTarget;for(;n&&n!==i;)n=n.parentNode;n!==i&&e(t)})}function Jye(i,e){return Xe(i,"pointerout",t=>{let n=t.relatedTarget;for(;n&&n!==i;)n=n.parentNode;n!==i&&e(t)})}function uc(i,e,t){let n=null;const r=l=>a.fire(l),s=()=>{n||(n=new K$(i,e,r,t))},o=()=>{n&&(n.dispose(),n=null)},a=new be({onFirstListenerAdd:s,onLastListenerRemove:o});return a}let BI=null;function eSe(i){if(!BI){const e=t=>setTimeout(()=>t(new Date().getTime()),0);BI=self.requestAnimationFrame||self.msRequestAnimationFrame||self.webkitRequestAnimationFrame||self.mozRequestAnimationFrame||self.oRequestAnimationFrame||e}return BI.call(self,i)}let X$,dc;class VI{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){Jt(e)}}static sort(e,t){return t.priority-e.priority}}(function(){let i=[],e=null,t=!1,n=!1,r=()=>{for(t=!1,e=i,i=[],n=!0;e.length>0;)e.sort(VI.sort),e.shift().execute();n=!1};dc=(s,o=0)=>{let a=new VI(s,o);return i.push(a),t||(t=!0,eSe(r)),a},X$=(s,o)=>{if(n){let a=new VI(s,o);return e.push(a),a}else return dc(s,o)}})();const tSe=8,nSe=function(i,e){return e};class iSe extends Ne{constructor(e,t,n,r=nSe,s=tSe){super();let o=null,a=0,l=this._register(new Wo),c=()=>{a=new Date().getTime(),n(o),o=null};this._register(Xe(e,t,u=>{o=r(o,u);let d=new Date().getTime()-a;d>=s?(l.cancel(),c()):l.setIfNotSet(c,s-d)}))}}function WI(i,e,t,n,r){return new iSe(i,e,t,n,r)}function HI(i){return document.defaultView.getComputedStyle(i,null)}function vS(i){if(i!==document.body)return new di(i.clientWidth,i.clientHeight);if(tc&&window.visualViewport)return new di(window.visualViewport.width,window.visualViewport.height);if(window.innerWidth&&window.innerHeight)return new di(window.innerWidth,window.innerHeight);if(document.body&&document.body.clientWidth&&document.body.clientHeight)return new di(document.body.clientWidth,document.body.clientHeight);if(document.documentElement&&document.documentElement.clientWidth&&document.documentElement.clientHeight)return new di(document.documentElement.clientWidth,document.documentElement.clientHeight);throw new Error("Unable to figure out browser width and height")}class zi{static convertToPixels(e,t){return parseFloat(t)||0}static getDimension(e,t,n){let r=HI(e),s="0";return r&&(r.getPropertyValue?s=r.getPropertyValue(t):s=r.getAttribute(n)),zi.convertToPixels(e,s)}static getBorderLeftWidth(e){return zi.getDimension(e,"border-left-width","borderLeftWidth")}static getBorderRightWidth(e){return zi.getDimension(e,"border-right-width","borderRightWidth")}static getBorderTopWidth(e){return zi.getDimension(e,"border-top-width","borderTopWidth")}static getBorderBottomWidth(e){return zi.getDimension(e,"border-bottom-width","borderBottomWidth")}static getPaddingLeft(e){return zi.getDimension(e,"padding-left","paddingLeft")}static getPaddingRight(e){return zi.getDimension(e,"padding-right","paddingRight")}static getPaddingTop(e){return zi.getDimension(e,"padding-top","paddingTop")}static getPaddingBottom(e){return zi.getDimension(e,"padding-bottom","paddingBottom")}static getMarginLeft(e){return zi.getDimension(e,"margin-left","marginLeft")}static getMarginTop(e){return zi.getDimension(e,"margin-top","marginTop")}static getMarginRight(e){return zi.getDimension(e,"margin-right","marginRight")}static getMarginBottom(e){return zi.getDimension(e,"margin-bottom","marginBottom")}}class di{constructor(e,t){this.width=e,this.height=t}with(e=this.width,t=this.height){return e!==this.width||t!==this.height?new di(e,t):this}static is(e){return typeof e=="object"&&typeof e.height=="number"&&typeof e.width=="number"}static lift(e){return e instanceof di?e:new di(e.width,e.height)}static equals(e,t){return e===t?!0:!e||!t?!1:e.width===t.width&&e.height===t.height}}di.None=new di(0,0);function Q$(i){let e=i.offsetParent,t=i.offsetTop,n=i.offsetLeft;for(;(i=i.parentNode)!==null&&i!==document.body&&i!==document.documentElement;){t-=i.scrollTop;const r=tU(i)?null:HI(i);r&&(n-=r.direction!=="rtl"?i.scrollLeft:-i.scrollLeft),i===e&&(n+=zi.getBorderLeftWidth(i),t+=zi.getBorderTopWidth(i),t+=i.offsetTop,n+=i.offsetLeft,e=i.offsetParent)}return{left:n,top:t}}function rSe(i,e,t){typeof e=="number"&&(i.style.width=`${e}px`),typeof t=="number"&&(i.style.height=`${t}px`)}function ss(i){let e=i.getBoundingClientRect();return{left:e.left+ad.scrollX,top:e.top+ad.scrollY,width:e.width,height:e.height}}const ad=new class{get scrollX(){return typeof window.scrollX=="number"?window.scrollX:document.body.scrollLeft+document.documentElement.scrollLeft}get scrollY(){return typeof window.scrollY=="number"?window.scrollY:document.body.scrollTop+document.documentElement.scrollTop}};function Sl(i){let e=zi.getMarginLeft(i)+zi.getMarginRight(i);return i.offsetWidth+e}function zI(i){let e=zi.getBorderLeftWidth(i)+zi.getBorderRightWidth(i),t=zi.getPaddingLeft(i)+zi.getPaddingRight(i);return i.offsetWidth-e-t}function sSe(i){let e=zi.getBorderTopWidth(i)+zi.getBorderBottomWidth(i),t=zi.getPaddingTop(i)+zi.getPaddingBottom(i);return i.offsetHeight-e-t}function $I(i){let e=zi.getMarginTop(i)+zi.getMarginBottom(i);return i.offsetHeight+e}function ld(i,e){for(;i;){if(i===e)return!0;i=i.parentNode}return!1}function J$(i,e,t){for(;i&&i.nodeType===i.ELEMENT_NODE;){if(i.classList.contains(e))return i;if(t){if(typeof t=="string"){if(i.classList.contains(t))return null}else if(i===t)return null}i=i.parentNode}return null}function eU(i,e,t){return!!J$(i,e,t)}function tU(i){return i&&!!i.host&&!!i.mode}function $b(i){return!!Oh(i)}function Oh(i){for(;i.parentNode;){if(i===document.body)return null;i=i.parentNode}return tU(i)?i:null}function I_(){let i=document.activeElement;for(;i!=null&&i.shadowRoot;)i=i.shadowRoot.activeElement;return i}function Ka(i=document.getElementsByTagName("head")[0]){let e=document.createElement("style");return e.type="text/css",e.media="screen",i.appendChild(e),e}let UI=null;function nU(){return UI||(UI=Ka()),UI}function oSe(i){var e,t;return!((e=i==null?void 0:i.sheet)===null||e===void 0)&&e.rules?i.sheet.rules:!((t=i==null?void 0:i.sheet)===null||t===void 0)&&t.cssRules?i.sheet.cssRules:[]}function jI(i,e,t=nU()){!t||!e||t.sheet.insertRule(i+"{"+e+"}",0)}function iU(i,e=nU()){if(!e)return;let t=oSe(e),n=[];for(let r=0;r=0;r--)e.sheet.deleteRule(n[r])}function rU(i){return typeof HTMLElement=="object"?i instanceof HTMLElement:i&&typeof i=="object"&&i.nodeType===1&&typeof i.nodeName=="string"}const Nt={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",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:Lh?"webkitAnimationStart":"animationstart",ANIMATION_END:Lh?"webkitAnimationEnd":"animationend",ANIMATION_ITERATION:Lh?"webkitAnimationIteration":"animationiteration"},Xn={stop:function(i,e){i.preventDefault?i.preventDefault():i.returnValue=!1,e&&(i.stopPropagation?i.stopPropagation():i.cancelBubble=!0)}};function aSe(i){let e=[];for(let t=0;i&&i.nodeType===i.ELEMENT_NODE;t++)e[t]=i.scrollTop,i=i.parentNode;return e}function lSe(i,e){for(let t=0;i&&i.nodeType===i.ELEMENT_NODE;t++)i.scrollTop!==e[t]&&(i.scrollTop=e[t]),i=i.parentNode}class wS extends Ne{constructor(e){super(),this._onDidFocus=this._register(new be),this.onDidFocus=this._onDidFocus.event,this._onDidBlur=this._register(new be),this.onDidBlur=this._onDidBlur.event;let t=wS.hasFocusWithin(e),n=!1;const r=()=>{n=!1,t||(t=!0,this._onDidFocus.fire())},s=()=>{t&&(n=!0,window.setTimeout(()=>{n&&(n=!1,t=!1,this._onDidBlur.fire())},0))};this._refreshStateHandler=()=>{wS.hasFocusWithin(e)!==t&&(t?s():r())},this._register(Xe(e,Nt.FOCUS,r,!0)),this._register(Xe(e,Nt.BLUR,s,!0)),this._register(Xe(e,Nt.FOCUS_IN,()=>this._refreshStateHandler())),this._register(Xe(e,Nt.FOCUS_OUT,()=>this._refreshStateHandler()))}static hasFocusWithin(e){const t=Oh(e),n=t?t.activeElement:document.activeElement;return ld(n,e)}}function D_(i){return new wS(i)}function $e(i,...e){if(i.append(...e),e.length===1&&typeof e[0]!="string")return e[0]}function cSe(i,e){return i.insertBefore(e,i.firstChild),e}function Mh(i,...e){i.innerText="",$e(i,...e)}const uSe=/([\w\-]+)?(#([\w\-]+))?((\.([\w\-]+))*)/;var Ub;(function(i){i.HTML="http://www.w3.org/1999/xhtml",i.SVG="http://www.w3.org/2000/svg"})(Ub||(Ub={}));function sU(i,e,t,...n){let r=uSe.exec(e);if(!r)throw new Error("Bad use of emmet");t=Object.assign({},t||{});let s=r[1]||"div",o;return i!==Ub.HTML?o=document.createElementNS(i,s):o=document.createElement(s),r[3]&&(o.id=r[3]),r[4]&&(o.className=r[4].replace(/\./g," ").trim()),Object.keys(t).forEach(a=>{const l=t[a];typeof l>"u"||(/^on\w+$/.test(a)?o[a]=l:a==="selected"?l&&o.setAttribute(a,"true"):o.setAttribute(a,l))}),o.append(...n),o}function Ze(i,e,...t){return sU(Ub.HTML,i,e,...t)}Ze.SVG=function(i,e,...t){return sU(Ub.SVG,i,e,...t)};function fa(...i){for(let e of i)e.style.display="",e.removeAttribute("aria-hidden")}function po(...i){for(let e of i)e.style.display="none",e.setAttribute("aria-hidden","true")}function dSe(i){return Array.prototype.slice.call(document.getElementsByTagName(i),0)}function oU(i){const e=window.devicePixelRatio*i;return Math.max(1,Math.floor(e))/window.devicePixelRatio}function aU(i){window.open(i,"_blank","noopener")}function hSe(i){const e=()=>{i(),t=dc(e)};let t=dc(e);return fn(()=>t.dispose())}q$.setPreferredWebSchema(/^https:/.test(window.location.href)?"https":"http");function $g(i){return i?`url('${G$.asBrowserUri(i).toString(!0).replace(/'/g,"%27")}')`:"url('')"}function lU(i){return`'${i.replace(/'/g,"%27")}'`}class Ug extends be{constructor(){super(),this._subscriptions=new Je,this._keyStatus={altKey:!1,shiftKey:!1,ctrlKey:!1,metaKey:!1},this._subscriptions.add(Xe(window,"keydown",e=>{if(e.defaultPrevented)return;const t=new ki(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(Xe(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(Xe(document.body,"mousedown",()=>{this._keyStatus.lastKeyPressed=void 0},!0)),this._subscriptions.add(Xe(document.body,"mouseup",()=>{this._keyStatus.lastKeyPressed=void 0},!0)),this._subscriptions.add(Xe(document.body,"mousemove",e=>{e.buttons&&(this._keyStatus.lastKeyPressed=void 0)},!0)),this._subscriptions.add(Xe(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 Ug.instance||(Ug.instance=new Ug),Ug.instance}dispose(){super.dispose(),this._subscriptions.dispose()}}function fSe(i,e){window.matchMedia(i).addEventListener("change",e)}const Ggt="",cU=2e4;let jg,CS,qI,yS,GI;function gSe(i){jg=document.createElement("div"),jg.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"),jg.appendChild(n),n};CS=e(),qI=e();const t=()=>{const n=document.createElement("div");return n.className="monaco-status",n.setAttribute("role","complementary"),n.setAttribute("aria-live","polite"),n.setAttribute("aria-atomic","true"),jg.appendChild(n),n};yS=t(),GI=t(),i.appendChild(jg)}function os(i){jg&&(CS.textContent!==i?(Dr(qI),kS(CS,i)):(Dr(CS),kS(qI,i)))}function SS(i){jg&&(gn?os(i):yS.textContent!==i?(Dr(GI),kS(yS,i)):(Dr(yS),kS(GI,i)))}function kS(i,e){Dr(i),e.length>cU&&(e=e.substr(0,cU)),i.textContent=e,i.style.visibility="hidden",i.style.visibility="visible"}const KI=Ln("markerDecorationsService"),mo=Ln("textModelService");var ES=globalThis&&globalThis.__awaiter||function(i,e,t,n){function r(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(u){try{c(n.next(u))}catch(d){o(d)}}function l(u){try{c(n.throw(u))}catch(d){o(d)}}function c(u){u.done?s(u.value):r(u.value).then(a,l)}c((n=n.apply(i,e||[])).next())})};class Ho extends Ne{constructor(e,t="",n="",r=!0,s){super(),this._onDidChange=this._register(new be),this.onDidChange=this._onDidChange.event,this._enabled=!0,this._id=e,this._label=t,this._cssClass=n,this._enabled=r,this._actionCallback=s}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 ES(this,void 0,void 0,function*(){this._actionCallback&&(yield this._actionCallback(e))})}}class N_ extends Ne{constructor(){super(...arguments),this._onBeforeRun=this._register(new be),this.onBeforeRun=this._onBeforeRun.event,this._onDidRun=this._register(new be),this.onDidRun=this._onDidRun.event}run(e,t){return ES(this,void 0,void 0,function*(){if(!e.enabled)return;this._onBeforeRun.fire({action:e});let n;try{yield this.runAction(e,t)}catch(r){n=r}this._onDidRun.fire({action:e,error:n})})}runAction(e,t){return ES(this,void 0,void 0,function*(){yield e.run(t)})}}class Ya extends Ho{constructor(e){super(Ya.ID,e,e?"separator text":"separator"),this.checked=!1,this.enabled=!1}}Ya.ID="vs.actions.separator";class xS{constructor(e,t,n,r){this.tooltip="",this.enabled=!0,this.checked=void 0,this.id=e,this.label=t,this.class=r,this._actions=n}get actions(){return this._actions}dispose(){}run(){return ES(this,void 0,void 0,function*(){})}}class LS extends Ho{constructor(){super(LS.ID,C("submenu.empty","(empty)"),void 0,!1)}}LS.ID="vs.actions.empty";const rr=Ln("commandService"),An=new class{constructor(){this._commands=new Map,this._onDidRegisterCommand=new be,this.onDidRegisterCommand=this._onDidRegisterCommand.event}registerCommand(i,e){if(!i)throw new Error("invalid command");if(typeof i=="string"){if(!e)throw new Error("invalid command");return this.registerCommand({id:i,handler:e})}if(i.description){const o=[];for(let l of i.description.args)o.push(l.constraint);const a=i.handler;i.handler=function(l,...c){return nwe(c,o),a(l,...c)}}const{id:t}=i;let n=this._commands.get(t);n||(n=new la,this._commands.set(t,n));let r=n.unshift(i),s=fn(()=>{r();const o=this._commands.get(t);o!=null&&o.isEmpty()&&this._commands.delete(t)});return this._onDidRegisterCommand.fire(t),s}registerCommandAlias(i,e){return An.registerCommand(i,(t,...n)=>t.get(rr).executeCommand(e,...n))}getCommand(i){const e=this._commands.get(i);if(!(!e||e.isEmpty()))return Dn.first(e)}getCommands(){const i=new Map;for(const e of this._commands.keys()){const t=this.getCommand(e);t&&i.set(e,t)}return i}};An.registerCommand("noop",()=>{});const ks=new Map;ks.set("false",!1),ks.set("true",!0),ks.set("isMac",gn),ks.set("isLinux",ws),ks.set("isWindows",Gr),ks.set("isWeb",bh),ks.set("isMacNative",gn&&!bh),ks.set("isEdge",Uve),ks.set("isFirefox",zve),ks.set("isChrome",ez),ks.set("isSafari",$ve);const pSe=Object.prototype.hasOwnProperty;class ht{static has(e){return Ph.create(e)}static equals(e,t){return R_.create(e,t)}static regex(e,t){return OS.create(e,t)}static not(e){return qg.create(e)}static and(...e){return Fh.create(e,null)}static or(...e){return cd.create(e,null,!0)}static deserialize(e,t=!1){if(e)return this._deserializeOrExpression(e,t)}static _deserializeOrExpression(e,t){let n=e.split("||");return cd.create(n.map(r=>this._deserializeAndExpression(r,t)),null,!0)}static _deserializeAndExpression(e,t){let n=e.split("&&");return Fh.create(n.map(r=>this._deserializeOne(r,t)),null)}static _deserializeOne(e,t){if(e=e.trim(),e.indexOf("!=")>=0){let n=e.split("!=");return TS.create(n[0].trim(),this._deserializeValue(n[1],t))}if(e.indexOf("==")>=0){let n=e.split("==");return R_.create(n[0].trim(),this._deserializeValue(n[1],t))}if(e.indexOf("=~")>=0){let n=e.split("=~");return OS.create(n[0].trim(),this._deserializeRegexValue(n[1],t))}if(e.indexOf(" in ")>=0){let n=e.split(" in ");return YI.create(n[0].trim(),n[1].trim())}if(/^[^<=>]+>=[^<=>]+$/.test(e)){const n=e.split(">=");return NS.create(n[0].trim(),n[1].trim())}if(/^[^<=>]+>[^<=>]+$/.test(e)){const n=e.split(">");return DS.create(n[0].trim(),n[1].trim())}if(/^[^<=>]+<=[^<=>]+$/.test(e)){const n=e.split("<=");return RS.create(n[0].trim(),n[1].trim())}if(/^[^<=>]+<[^<=>]+$/.test(e)){const n=e.split("<");return AS.create(n[0].trim(),n[1].trim())}return/^\!\s*/.test(e)?qg.create(e.substr(1).trim()):Ph.create(e)}static _deserializeValue(e,t){if(e=e.trim(),e==="true")return!0;if(e==="false")return!1;let n=/^'([^']*)'$/.exec(e);return n?n[1].trim():e}static _deserializeRegexValue(e,t){if(Rz(e)){if(t)throw new Error("missing regexp-value for =~-expression");return console.warn("missing regexp-value for =~-expression"),null}let n=e.indexOf("/"),r=e.lastIndexOf("/");if(n===r||n<0){if(t)throw new Error(`bad regexp-value '${e}', missing /-enclosure`);return console.warn(`bad regexp-value '${e}', missing /-enclosure`),null}let s=e.slice(n+1,r),o=e[r+1]==="i"?"i":"";try{return new RegExp(s,o)}catch(a){if(t)throw new Error(`bad regexp-value '${e}', parse error: ${a}`);return console.warn(`bad regexp-value '${e}', parse error: ${a}`),null}}}function mSe(i,e){const t=i?i.substituteConstants():void 0,n=e?e.substituteConstants():void 0;return!t&&!n?!0:!t||!n?!1:t.equals(n)}function A_(i,e){return i.cmp(e)}class ga{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 Za.INSTANCE}}ga.INSTANCE=new ga;class Za{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 ga.INSTANCE}}Za.INSTANCE=new Za;class Ph{constructor(e,t){this.key=e,this.negated=t,this.type=2}static create(e,t=null){const n=ks.get(e);return typeof n=="boolean"?n?Za.INSTANCE:ga.INSTANCE:new Ph(e,t)}cmp(e){return e.type!==this.type?this.type-e.type:dU(this.key,e.key)}equals(e){return e.type===this.type?this.key===e.key:!1}substituteConstants(){const e=ks.get(this.key);return typeof e=="boolean"?e?Za.INSTANCE:ga.INSTANCE:this}evaluate(e){return!!e.getValue(this.key)}serialize(){return this.key}keys(){return[this.key]}negate(){return this.negated||(this.negated=qg.create(this.key,this)),this.negated}}class R_{constructor(e,t,n){this.key=e,this.value=t,this.negated=n,this.type=4}static create(e,t,n=null){if(typeof t=="boolean")return t?Ph.create(e,n):qg.create(e,n);const r=ks.get(e);return typeof r=="boolean"?t===(r?"true":"false")?Za.INSTANCE:ga.INSTANCE:new R_(e,t,n)}cmp(e){return e.type!==this.type?this.type-e.type:Gg(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=ks.get(this.key);if(typeof e=="boolean"){const t=e?"true":"false";return this.value===t?Za.INSTANCE:ga.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=TS.create(this.key,this.value,this)),this.negated}}class YI{constructor(e,t){this.key=e,this.valueKey=t,this.type=10,this.negated=null}static create(e,t){return new YI(e,t)}cmp(e){return e.type!==this.type?this.type-e.type:Gg(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.indexOf(n)>=0:typeof n=="string"&&typeof t=="object"&&t!==null?pSe.call(t,n):!1}serialize(){return`${this.key} in '${this.valueKey}'`}keys(){return[this.key,this.valueKey]}negate(){return this.negated||(this.negated=ZI.create(this)),this.negated}}class ZI{constructor(e){this._actual=e,this.type=11}static create(e){return new ZI(e)}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(){throw new Error("Method not implemented.")}keys(){return this._actual.keys()}negate(){return this._actual}}class TS{constructor(e,t,n){this.key=e,this.value=t,this.negated=n,this.type=5}static create(e,t,n=null){if(typeof t=="boolean")return t?qg.create(e,n):Ph.create(e,n);const r=ks.get(e);return typeof r=="boolean"?t===(r?"true":"false")?ga.INSTANCE:Za.INSTANCE:new TS(e,t,n)}cmp(e){return e.type!==this.type?this.type-e.type:Gg(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=ks.get(this.key);if(typeof e=="boolean"){const t=e?"true":"false";return this.value===t?ga.INSTANCE:Za.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=R_.create(this.key,this.value,this)),this.negated}}class qg{constructor(e,t){this.key=e,this.negated=t,this.type=3}static create(e,t=null){const n=ks.get(e);return typeof n=="boolean"?n?ga.INSTANCE:Za.INSTANCE:new qg(e,t)}cmp(e){return e.type!==this.type?this.type-e.type:dU(this.key,e.key)}equals(e){return e.type===this.type?this.key===e.key:!1}substituteConstants(){const e=ks.get(this.key);return typeof e=="boolean"?e?ga.INSTANCE:Za.INSTANCE:this}evaluate(e){return!e.getValue(this.key)}serialize(){return`!${this.key}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=Ph.create(this.key,this)),this.negated}}function IS(i,e){if(typeof i=="string"){const t=parseFloat(i);isNaN(t)||(i=t)}return typeof i=="string"||typeof i=="number"?e(i):ga.INSTANCE}class DS{constructor(e,t,n){this.key=e,this.value=t,this.negated=n,this.type=12}static create(e,t,n=null){return IS(t,r=>new DS(e,r,n))}cmp(e){return e.type!==this.type?this.type-e.type:Gg(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=RS.create(this.key,this.value,this)),this.negated}}class NS{constructor(e,t,n){this.key=e,this.value=t,this.negated=n,this.type=13}static create(e,t,n=null){return IS(t,r=>new NS(e,r,n))}cmp(e){return e.type!==this.type?this.type-e.type:Gg(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=AS.create(this.key,this.value,this)),this.negated}}class AS{constructor(e,t,n){this.key=e,this.value=t,this.negated=n,this.type=14}static create(e,t,n=null){return IS(t,r=>new AS(e,r,n))}cmp(e){return e.type!==this.type?this.type-e.type:Gg(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 RS(e,r,n))}cmp(e){return e.type!==this.type?this.type-e.type:Gg(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=DS.create(this.key,this.value,this)),this.negated}}class OS{constructor(e,t){this.key=e,this.regexp=t,this.type=7,this.negated=null}static create(e,t){return new OS(e,t)}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){let t=e.getValue(this.key);return this.regexp?this.regexp.test(t):!1}serialize(){const e=this.regexp?`/${this.regexp.source}/${this.regexp.ignoreCase?"i":""}`:"/invalid/";return`${this.key} =~ ${e}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=XI.create(this)),this.negated}}class XI{constructor(e){this._actual=e,this.type=8}static create(e){return new XI(e)}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(){throw new Error("Method not implemented.")}keys(){return this._actual.keys()}negate(){return this._actual}}function uU(i){let e=null;for(let t=0,n=i.length;te.expr.length)return 1;for(let t=0,n=this.expr.length;t1;){const s=n[n.length-1];if(s.type!==9)break;n.pop();const o=n.pop(),a=n.length===0,l=cd.create(s.expr.map(c=>Fh.create([c,o],null)),null,a);l&&(n.push(l),n.sort(A_))}return n.length===1?n[0]:new Fh(n,t)}}serialize(){return this.expr.map(e=>e.serialize()).join(" && ")}keys(){const e=[];for(let t of this.expr)e.push(...t.keys());return e}negate(){if(!this.negated){const e=[];for(let t of this.expr)e.push(t.negate());this.negated=cd.create(e,this,!0)}return this.negated}}class cd{constructor(e,t){this.expr=e,this.negated=t,this.type=9}static create(e,t,n){return cd._normalizeArr(e,t,n)}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(let t of this.expr)e.push(...t.keys());return e}negate(){if(!this.negated){let e=[];for(let t of this.expr)e.push(t.negate());for(;e.length>1;){const t=e.shift(),n=e.shift(),r=[];for(const o of MS(t))for(const a of MS(n))r.push(Fh.create([o,a],null));const s=e.length===0;e.unshift(cd.create(r,null,s))}this.negated=e[0]}return this.negated}}class mt extends Ph{constructor(e,t,n){super(e,null),this._defaultValue=t,typeof n=="object"?mt._info.push(Object.assign(Object.assign({},n),{key:e})):n!==!0&&mt._info.push({key:e,description:n,type:t!=null?typeof t:void 0})}static all(){return mt._info.values()}bindTo(e){return e.createKey(this.key,this._defaultValue)}getValue(e){return e.getContextKeyValue(this.key)}toNegated(){return this.negate()}isEqualTo(e){return R_.create(this.key,e)}}mt._info=[];const Yt=Ln("contextKeyService"),_Se="setContext";function dU(i,e){return ie?1:0}function Gg(i,e,t,n){return it?1:en?1:0}function hU(i,e){if(e.type===6&&i.type!==9&&i.type!==6){for(const r of e.expr)if(i.equals(r))return!0}const t=i.negate(),n=MS(t).concat(MS(e));n.sort(A_);for(let r=0;r"u"||QI.isThemeColor(c.color))}i.isThemeIcon=e;const t=new RegExp(`^\\$\\((${Gs.iconNameExpression}(?:${Gs.iconModifierExpression})?)\\)$`);function n(c){const u=t.exec(c);if(!u)return;let[,d]=u;return{id:d}}i.fromString=n;function r(c){return{id:c}}i.fromId=r;function s(c,u){let d=c.id;const h=d.lastIndexOf("~");return h!==-1&&(d=d.substring(0,h)),u&&(d=`${d}~${u}`),{id:d}}i.modify=s;function o(c){const u=c.id.lastIndexOf("~");if(u!==-1)return c.id.substring(u+1)}i.getModifier=o;function a(c,u){var d,h;return c.id===u.id&&((d=c.color)===null||d===void 0?void 0:d.id)===((h=u.color)===null||h===void 0?void 0:h.id)}i.isEqual=a;function l(c,u){return{id:c.id,color:u?$i(u):void 0}}i.asThemeIcon=l,i.asClassNameArray=Gs.asClassNameArray,i.asClassName=Gs.asClassName,i.asCSSSelector=Gs.asCSSSelector})(hi||(hi={}));function PS(i){switch(i){case kl.DARK:return"vs-dark";case kl.HIGH_CONTRAST:return"hc-black";default:return"vs"}}const fU={ThemingContribution:"base.contributions.theming"};class vSe{constructor(){this.themingParticipants=[],this.themingParticipants=[],this.onThemingParticipantAddedEmitter=new be}onColorThemeChange(e){return this.themingParticipants.push(e),this.onThemingParticipantAddedEmitter.fire(e),fn(()=>{const t=this.themingParticipants.indexOf(e);this.themingParticipants.splice(t,1)})}getThemingParticipants(){return this.themingParticipants}}let gU=new vSe;sr.add(fU.ThemingContribution,gU);function _i(i){return gU.onColorThemeChange(i)}class wSe 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(){}}var CSe=globalThis&&globalThis.__decorate||function(i,e,t,n){var r=arguments.length,s=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(s=(r<3?o(s):r>3?o(e,t,s):o(e,t))||s);return r>3&&s&&Object.defineProperty(e,t,s),s},pU=globalThis&&globalThis.__param||function(i,e){return function(t,n){e(t,n,i)}};function O_(i){return i.command!==void 0}class de{constructor(e){this.id=de._idPool++,this._debugName=e}}de._idPool=0,de.CommandPalette=new de("CommandPalette"),de.DebugBreakpointsContext=new de("DebugBreakpointsContext"),de.DebugCallStackContext=new de("DebugCallStackContext"),de.DebugConsoleContext=new de("DebugConsoleContext"),de.DebugVariablesContext=new de("DebugVariablesContext"),de.DebugWatchContext=new de("DebugWatchContext"),de.DebugToolBar=new de("DebugToolBar"),de.EditorContext=new de("EditorContext"),de.SimpleEditorContext=new de("SimpleEditorContext"),de.EditorContextCopy=new de("EditorContextCopy"),de.EditorContextPeek=new de("EditorContextPeek"),de.EditorTitle=new de("EditorTitle"),de.EditorTitleRun=new de("EditorTitleRun"),de.EditorTitleContext=new de("EditorTitleContext"),de.EmptyEditorGroup=new de("EmptyEditorGroup"),de.EmptyEditorGroupContext=new de("EmptyEditorGroupContext"),de.ExplorerContext=new de("ExplorerContext"),de.ExtensionContext=new de("ExtensionContext"),de.GlobalActivity=new de("GlobalActivity"),de.LayoutControlMenuSubmenu=new de("LayoutControlMenuSubmenu"),de.LayoutControlMenu=new de("LayoutControlMenu"),de.MenubarMainMenu=new de("MenubarMainMenu"),de.MenubarAppearanceMenu=new de("MenubarAppearanceMenu"),de.MenubarDebugMenu=new de("MenubarDebugMenu"),de.MenubarEditMenu=new de("MenubarEditMenu"),de.MenubarCopy=new de("MenubarCopy"),de.MenubarFileMenu=new de("MenubarFileMenu"),de.MenubarGoMenu=new de("MenubarGoMenu"),de.MenubarHelpMenu=new de("MenubarHelpMenu"),de.MenubarLayoutMenu=new de("MenubarLayoutMenu"),de.MenubarNewBreakpointMenu=new de("MenubarNewBreakpointMenu"),de.MenubarPanelAlignmentMenu=new de("MenubarPanelAlignmentMenu"),de.MenubarPanelPositionMenu=new de("MenubarPanelPositionMenu"),de.MenubarPreferencesMenu=new de("MenubarPreferencesMenu"),de.MenubarRecentMenu=new de("MenubarRecentMenu"),de.MenubarSelectionMenu=new de("MenubarSelectionMenu"),de.MenubarSwitchEditorMenu=new de("MenubarSwitchEditorMenu"),de.MenubarSwitchGroupMenu=new de("MenubarSwitchGroupMenu"),de.MenubarTerminalMenu=new de("MenubarTerminalMenu"),de.MenubarViewMenu=new de("MenubarViewMenu"),de.MenubarHomeMenu=new de("MenubarHomeMenu"),de.OpenEditorsContext=new de("OpenEditorsContext"),de.ProblemsPanelContext=new de("ProblemsPanelContext"),de.SCMChangeContext=new de("SCMChangeContext"),de.SCMResourceContext=new de("SCMResourceContext"),de.SCMResourceFolderContext=new de("SCMResourceFolderContext"),de.SCMResourceGroupContext=new de("SCMResourceGroupContext"),de.SCMSourceControl=new de("SCMSourceControl"),de.SCMTitle=new de("SCMTitle"),de.SearchContext=new de("SearchContext"),de.StatusBarWindowIndicatorMenu=new de("StatusBarWindowIndicatorMenu"),de.StatusBarRemoteIndicatorMenu=new de("StatusBarRemoteIndicatorMenu"),de.TestItem=new de("TestItem"),de.TestItemGutter=new de("TestItemGutter"),de.TestPeekElement=new de("TestPeekElement"),de.TestPeekTitle=new de("TestPeekTitle"),de.TouchBarContext=new de("TouchBarContext"),de.TitleBarContext=new de("TitleBarContext"),de.TunnelContext=new de("TunnelContext"),de.TunnelPrivacy=new de("TunnelPrivacy"),de.TunnelProtocol=new de("TunnelProtocol"),de.TunnelPortInline=new de("TunnelInline"),de.TunnelTitle=new de("TunnelTitle"),de.TunnelLocalAddressInline=new de("TunnelLocalAddressInline"),de.TunnelOriginInline=new de("TunnelOriginInline"),de.ViewItemContext=new de("ViewItemContext"),de.ViewContainerTitle=new de("ViewContainerTitle"),de.ViewContainerTitleContext=new de("ViewContainerTitleContext"),de.ViewTitle=new de("ViewTitle"),de.ViewTitleContext=new de("ViewTitleContext"),de.CommentThreadTitle=new de("CommentThreadTitle"),de.CommentThreadActions=new de("CommentThreadActions"),de.CommentTitle=new de("CommentTitle"),de.CommentActions=new de("CommentActions"),de.InteractiveToolbar=new de("InteractiveToolbar"),de.InteractiveCellTitle=new de("InteractiveCellTitle"),de.InteractiveCellExecute=new de("InteractiveCellExecute"),de.InteractiveInputExecute=new de("InteractiveInputExecute"),de.NotebookToolbar=new de("NotebookToolbar"),de.NotebookCellTitle=new de("NotebookCellTitle"),de.NotebookCellInsert=new de("NotebookCellInsert"),de.NotebookCellBetween=new de("NotebookCellBetween"),de.NotebookCellListTop=new de("NotebookCellTop"),de.NotebookCellExecute=new de("NotebookCellExecute"),de.NotebookCellExecutePrimary=new de("NotebookCellExecutePrimary"),de.NotebookDiffCellInputTitle=new de("NotebookDiffCellInputTitle"),de.NotebookDiffCellMetadataTitle=new de("NotebookDiffCellMetadataTitle"),de.NotebookDiffCellOutputsTitle=new de("NotebookDiffCellOutputsTitle"),de.NotebookOutputToolbar=new de("NotebookOutputToolbar"),de.NotebookEditorLayoutConfigure=new de("NotebookEditorLayoutConfigure"),de.BulkEditTitle=new de("BulkEditTitle"),de.BulkEditContext=new de("BulkEditContext"),de.TimelineItemContext=new de("TimelineItemContext"),de.TimelineTitle=new de("TimelineTitle"),de.TimelineTitleContext=new de("TimelineTitleContext"),de.AccountsContext=new de("AccountsContext"),de.PanelTitle=new de("PanelTitle"),de.AuxiliaryBarTitle=new de("AuxiliaryBarTitle"),de.TerminalInstanceContext=new de("TerminalInstanceContext"),de.TerminalEditorInstanceContext=new de("TerminalEditorInstanceContext"),de.TerminalNewDropdownContext=new de("TerminalNewDropdownContext"),de.TerminalTabContext=new de("TerminalTabContext"),de.TerminalTabEmptyAreaContext=new de("TerminalTabEmptyAreaContext"),de.TerminalInlineTabContext=new de("TerminalInlineTabContext"),de.WebviewContext=new de("WebviewContext"),de.InlineCompletionsActions=new de("InlineCompletionsActions"),de.NewFile=new de("NewFile");const Kg=Ln("menuService"),pa=new class{constructor(){this._commands=new Map,this._menuItems=new Map,this._onDidChangeMenu=new be,this.onDidChangeMenu=this._onDidChangeMenu.event,this._commandPaletteChangeEvent={has:i=>i===de.CommandPalette}}addCommand(i){return this.addCommands(Dn.single(i))}addCommands(i){for(const e of i)this._commands.set(e.id,e);return this._onDidChangeMenu.fire(this._commandPaletteChangeEvent),fn(()=>{let e=!1;for(const t of i)e=this._commands.delete(t.id)||e;e&&this._onDidChangeMenu.fire(this._commandPaletteChangeEvent)})}getCommand(i){return this._commands.get(i)}getCommands(){const i=new Map;return this._commands.forEach((e,t)=>i.set(t,e)),i}appendMenuItem(i,e){return this.appendMenuItems(Dn.single({id:i,item:e}))}appendMenuItems(i){const e=new Set,t=new la;for(const{id:n,item:r}of i){let s=this._menuItems.get(n);s||(s=new la,this._menuItems.set(n,s)),t.push(s.push(r)),e.add(n)}return this._onDidChangeMenu.fire(e),fn(()=>{if(t.size>0){for(let n of t)n();this._onDidChangeMenu.fire(e),t.clear()}})}getMenuItems(i){let e;return this._menuItems.has(i)?e=[...this._menuItems.get(i)]:e=[],i===de.CommandPalette&&this._appendImplicitItems(e),e}_appendImplicitItems(i){const e=new Set;for(const t of i)O_(t)&&(e.add(t.command.id),t.alt&&e.add(t.alt.id));this._commands.forEach((t,n)=>{e.has(n)||i.push({command:t})})}};class JI extends xS{constructor(e,t,n,r){super(`submenuitem.${e.submenu.id}`,typeof e.title=="string"?e.title:e.title.value,[],"submenu"),this.item=e,this._menuService=t,this._contextKeyService=n,this._options=r}get actions(){const e=[],t=this._menuService.createMenu(this.item.submenu,this._contextKeyService),n=t.getActions(this._options);t.dispose();for(const[,r]of n)r.length>0&&(e.push(...r),e.push(new Ya));return e.length&&e.pop(),e}}let Bh=class iue{constructor(e,t,n,r,s){var o,a;if(this._commandService=s,this.id=e.id,this.label=n!=null&&n.renderShortTitle&&e.shortTitle?typeof e.shortTitle=="string"?e.shortTitle:e.shortTitle.value:typeof e.title=="string"?e.title:e.title.value,this.tooltip=(a=typeof e.tooltip=="string"?e.tooltip:(o=e.tooltip)===null||o===void 0?void 0:o.value)!==null&&a!==void 0?a:"",this.enabled=!e.precondition||r.contextMatchesRules(e.precondition),this.checked=void 0,e.toggled){const l=e.toggled.condition?e.toggled:{condition:e.toggled};this.checked=r.contextMatchesRules(l.condition),this.checked&&l.tooltip&&(this.tooltip=typeof l.tooltip=="string"?l.tooltip:l.tooltip.value),l.title&&(this.label=typeof l.title=="string"?l.title:l.title.value)}this.item=e,this.alt=t?new iue(t,void 0,n,r,s):void 0,this._options=n,hi.isThemeIcon(e.icon)&&(this.class=Gs.asClassName(e.icon))}dispose(){}run(...e){var t,n;let r=[];return!((t=this._options)===null||t===void 0)&&t.arg&&(r=[...r,this._options.arg]),!((n=this._options)===null||n===void 0)&&n.shouldForwardArgs&&(r=[...r,...e]),this._commandService.executeCommand(this.id,...r)}};Bh=CSe([pU(3,Yt),pU(4,rr)],Bh);class FS{constructor(){this._coreKeybindings=[],this._extensionKeybindings=[],this._cachedMergedKeybindings=null}static bindToCurrentPlatform(e){if(Pa===1){if(e&&e.win)return e.win}else if(Pa===2){if(e&&e.mac)return e.mac}else if(e&&e.linux)return e.linux;return e}registerKeybindingRule(e){const t=FS.bindToCurrentPlatform(e);if(t&&t.primary){const n=NI(t.primary,Pa);n&&this._registerDefaultKeybinding(n,e.id,e.args,e.weight,0,e.when)}if(t&&Array.isArray(t.secondary))for(let n=0,r=t.secondary.length;n=21&&e<=30||e>=31&&e<=56?!0:e===80||e===81||e===82||e===83||e===84||e===85||e===86||e===110||e===111||e===87||e===88||e===89||e===90||e===91||e===92}_assertNoCtrlAlt(e,t){e.ctrlKey&&e.altKey&&!e.metaKey&&FS._mightProduceChar(e.keyCode)&&console.warn("Ctrl+Alt+ keybindings should not be used by default under Windows. Offender: ",e," for ",t)}_registerDefaultKeybinding(e,t,n,r,s,o){Pa===1&&this._assertNoCtrlAlt(e.parts[0],t),this._coreKeybindings.push({keybinding:e.parts,command:t,commandArgs:n,when:o,weight1:r,weight2:s,extensionId:null,isBuiltinExtension:!1}),this._cachedMergedKeybindings=null}getDefaultKeybindings(){return this._cachedMergedKeybindings||(this._cachedMergedKeybindings=[].concat(this._coreKeybindings).concat(this._extensionKeybindings),this._cachedMergedKeybindings.sort(SSe)),this._cachedMergedKeybindings.slice(0)}}const Ys=new FS,ySe={EditorModes:"platform.keybindingsRegistry"};sr.add(ySe.EditorModes,Ys);function SSe(i,e){return i.weight1!==e.weight1?i.weight1-e.weight1:i.commande.command?1:i.weight2-e.weight2}const ru=Ln("telemetryService");let BS=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=ht.and(n,this.precondition):n=this.precondition);const r={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};Ys.registerKeybindingRule(r)}}An.registerCommand({id:this.id,handler:(e,t)=>this.runCommand(e,t),description:this._description})}_registerMenuItem(e){pa.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 M_ extends BS{constructor(){super(...arguments),this._implementations=[]}addImplementation(e,t,n){return this._implementations.push({priority:e,name:t,implementation:n}),this._implementations.sort((r,s)=>s.priority-r.priority),{dispose:()=>{for(let r=0;r{if(s.get(Yt).contextMatchesRules(Fo(this.precondition)))return this.runEditorCommand(s,r,t)})}}class wt extends as{constructor(e){super(wt.convertOptions(e)),this.label=e.label,this.alias=e.alias}static convertOptions(e){let t;Array.isArray(e.menuOpts)?t=e.menuOpts:e.menuOpts?t=[e.menuOpts]:t=[];function n(r){return r.menuId||(r.menuId=de.EditorContext),r.title||(r.title=e.label),r.when=ht.and(e.precondition,r.when),r}return Array.isArray(e.contextMenuOpts)?t.push(...e.contextMenuOpts.map(n)):e.contextMenuOpts&&t.push(n(e.contextMenuOpts)),e.menuOpts=t,e}runEditorCommand(e,t,n){return this.reportTelemetry(e,t),this.run(e,t,n||{})}reportTelemetry(e,t){e.get(ru).publicLog2("editorActionInvoked",{name:this.label,id:this.id})}}class _U extends wt{constructor(){super(...arguments),this._implementations=[]}addImplementation(e,t){return this._implementations.push([e,t]),this._implementations.sort((n,r)=>r[0]-n[0]),{dispose:()=>{for(let n=0;nnew Promise((c,u)=>{try{const d=r.invokeFunction(e,l.object.textEditorModel,ye.lift(o),n.slice(2));c(d)}catch(d){u(d)}}).finally(()=>{l.dispose()}))})}function st(i){return Xa.INSTANCE.registerEditorCommand(i),i}function ot(i){const e=new i;return Xa.INSTANCE.registerEditorAction(e),e}function bU(i){return Xa.INSTANCE.registerEditorAction(i),i}function vU(i){Xa.INSTANCE.registerEditorAction(i)}function Gn(i,e){Xa.INSTANCE.registerEditorContribution(i,e)}var Yg;(function(i){function e(o){return Xa.INSTANCE.getEditorCommand(o)}i.getEditorCommand=e;function t(){return Xa.INSTANCE.getEditorActions()}i.getEditorActions=t;function n(){return Xa.INSTANCE.getEditorContributions()}i.getEditorContributions=n;function r(o){return Xa.INSTANCE.getEditorContributions().filter(a=>o.indexOf(a.id)>=0)}i.getSomeEditorContributions=r;function s(){return Xa.INSTANCE.getDiffEditorContributions()}i.getDiffEditorContributions=s})(Yg||(Yg={}));const kSe={EditorCommonContributions:"editor.contributions"};class Xa{constructor(){this.editorContributions=[],this.diffEditorContributions=[],this.editorActions=[],this.editorCommands=Object.create(null)}registerEditorContribution(e,t){this.editorContributions.push({id:e,ctor:t})}getEditorContributions(){return this.editorContributions.slice(0)}getDiffEditorContributions(){return this.diffEditorContributions.slice(0)}registerEditorAction(e){e.register(),this.editorActions.push(e)}getEditorActions(){return this.editorActions.slice(0)}registerEditorCommand(e){e.register(),this.editorCommands[e.id]=e}getEditorCommand(e){return this.editorCommands[e]||null}}Xa.INSTANCE=new Xa,sr.add(kSe.EditorCommonContributions,Xa.INSTANCE);function jb(i){return i.register(),i}const wU=jb(new M_({id:"undo",precondition:void 0,kbOpts:{weight:0,primary:2104},menuOpts:[{menuId:de.MenubarEditMenu,group:"1_do",title:C({key:"miUndo",comment:["&& denotes a mnemonic"]},"&&Undo"),order:1},{menuId:de.CommandPalette,group:"",title:C("undo","Undo"),order:1}]}));jb(new mU(wU,{id:"default:undo",precondition:void 0}));const CU=jb(new M_({id:"redo",precondition:void 0,kbOpts:{weight:0,primary:2103,secondary:[3128],mac:{primary:3128}},menuOpts:[{menuId:de.MenubarEditMenu,group:"1_do",title:C({key:"miRedo",comment:["&& denotes a mnemonic"]},"&&Redo"),order:2},{menuId:de.CommandPalette,group:"",title:C("redo","Redo"),order:1}]}));jb(new mU(CU,{id:"default:redo",precondition:void 0}));const ESe=jb(new M_({id:"editor.action.selectAll",precondition:void 0,kbOpts:{weight:0,kbExpr:null,primary:2079},menuOpts:[{menuId:de.MenubarSelectionMenu,group:"1_basic",title:C({key:"miSelectAll",comment:["&& denotes a mnemonic"]},"&&Select All"),order:1},{menuId:de.CommandPalette,group:"",title:C("selectAll","Select All"),order:1}]}));var xSe=globalThis&&globalThis.__decorate||function(i,e,t,n){var r=arguments.length,s=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(s=(r<3?o(s):r>3?o(e,t,s):o(e,t))||s);return r>3&&s&&Object.defineProperty(e,t,s),s},LSe=globalThis&&globalThis.__param||function(i,e){return function(t,n){e(t,n,i)}};let qb=class{constructor(e,t){}dispose(){}};qb.ID="editor.contrib.markerDecorations",qb=xSe([LSe(1,KI)],qb),Gn(qb.ID,qb);const Kgt="";class yU extends Ne{constructor(e,t){super(),this._onDidChange=this._register(new be),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(){!this._resizeObserver&&this._referenceDomElement&&(this._resizeObserver=new ResizeObserver(e=>{e&&e[0]&&e[0].contentRect?this.observe({width:e[0].contentRect.width,height:e[0].contentRect.height}):this.observe()}),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,r=0;t?(n=t.width,r=t.height):this._referenceDomElement&&(n=this._referenceDomElement.clientWidth,r=this._referenceDomElement.clientHeight),n=Math.max(5,n),r=Math.max(5,r),(this._width!==n||this._height!==r)&&(this._width=n,this._height=r,e&&this._onDidChange.fire())}}const TSe=Object.prototype.hasOwnProperty;function ISe(i,e){for(let t in i)if(TSe.call(i,t)&&e({key:t,value:i[t]},function(){delete i[t]})===!1)return}class DSe{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)}}function NSe(i){const e=i.wordWrap;e===!0?i.wordWrap="on":e===!1&&(i.wordWrap="off");const t=i.lineNumbers;t===!0?i.lineNumbers="on":t===!1&&(i.lineNumbers="off"),i.autoClosingBrackets===!1&&(i.autoClosingBrackets="never",i.autoClosingQuotes="never",i.autoSurround="never"),i.cursorBlinking==="visible"&&(i.cursorBlinking="solid");const s=i.renderWhitespace;s===!0?i.renderWhitespace="boundary":s===!1&&(i.renderWhitespace="none");const o=i.renderLineHighlight;o===!0?i.renderLineHighlight="line":o===!1&&(i.renderLineHighlight="none");const a=i.acceptSuggestionOnEnter;a===!0?i.acceptSuggestionOnEnter="on":a===!1&&(i.acceptSuggestionOnEnter="off");const l=i.tabCompletion;l===!1?i.tabCompletion="off":l===!0&&(i.tabCompletion="onlySnippets");const c=i.suggest;if(c&&typeof c.filteredTypes=="object"&&c.filteredTypes){const m={};m.method="showMethods",m.function="showFunctions",m.constructor="showConstructors",m.deprecated="showDeprecated",m.field="showFields",m.variable="showVariables",m.class="showClasses",m.struct="showStructs",m.interface="showInterfaces",m.module="showModules",m.property="showProperties",m.event="showEvents",m.operator="showOperators",m.unit="showUnits",m.value="showValues",m.constant="showConstants",m.enum="showEnums",m.enumMember="showEnumMembers",m.keyword="showKeywords",m.text="showWords",m.color="showColors",m.file="showFiles",m.reference="showReferences",m.folder="showFolders",m.typeParameter="showTypeParameters",m.snippet="showSnippets",ISe(m,_=>{const b=c.filteredTypes[_.key];b===!1&&(c[_.value]=b)})}const u=i.hover;u===!0?i.hover={enabled:!0}:u===!1&&(i.hover={enabled:!1});const d=i.parameterHints;d===!0?i.parameterHints={enabled:!0}:d===!1&&(i.parameterHints={enabled:!1});const h=i.autoIndent;h===!0?i.autoIndent="full":h===!1&&(i.autoIndent="advanced");const f=i.matchBrackets;f===!0?i.matchBrackets="always":f===!1&&(i.matchBrackets="never");const{renderIndentGuides:g,highlightActiveIndentGuide:p}=i;i.guides||(i.guides={}),g!==void 0&&(i.guides.indentation=!!g),p!==void 0&&(i.guides.highlightActiveIndentation=!!p)}class ASe{constructor(){this._tabFocus=!1,this._onDidChangeTabFocus=new be,this.onDidChangeTabFocus=this._onDidChangeTabFocus.event}getTabFocusMode(){return this._tabFocus}setTabFocusMode(e){this._tabFocus!==e&&(this._tabFocus=e,this._onDidChangeTabFocus.fire(this._tabFocus))}}const VS=new ASe,zo=Ln("accessibilityService"),Gb=new mt("accessibilityModeEnabled",!1);var RSe=globalThis&&globalThis.__decorate||function(i,e,t,n){var r=arguments.length,s=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(s=(r<3?o(s):r>3?o(e,t,s):o(e,t))||s);return r>3&&s&&Object.defineProperty(e,t,s),s},OSe=globalThis&&globalThis.__param||function(i,e){return function(t,n){e(t,n,i)}};let e6=class extends Ne{constructor(e,t,n,r){super(),this._accessibilityService=r,this._onDidChange=this._register(new be),this.onDidChange=this._onDidChange.event,this._onDidChangeFast=this._register(new be),this.onDidChangeFast=this._onDidChangeFast.event,this._isDominatedByLongLines=!1,this._viewLineCount=1,this._lineNumbersDigitCount=1,this._reservedHeight=0,this._computeOptionsMemory=new pz,this.isSimpleWidget=e,this._containerObserver=this._register(new yU(n,t.dimension)),this._rawOptions=SU(t),this._validatedOptions=Vh.validateOptions(this._rawOptions),this.options=this._computeOptions(),this.options.get(10)&&this._containerObserver.startObserving(),this._register(sd.onDidChangeZoomLevel(()=>this._recomputeOptions())),this._register(VS.onDidChangeTabFocus(()=>this._recomputeOptions())),this._register(this._containerObserver.onDidChange(()=>this._recomputeOptions())),this._register(GT.onDidChange(()=>this._recomputeOptions())),this._register(g_.onDidChange(()=>this._recomputeOptions())),this._register(this._accessibilityService.onDidChangeScreenReaderOptimized(()=>this._recomputeOptions()))}_recomputeOptions(){const e=this._computeOptions(),t=Vh.checkEquals(this.options,e);t!==null&&(this.options=e,this._onDidChangeFast.fire(t),this._onDidChange.fire(t))}_computeOptions(){const e=this._readEnvConfiguration(),t=Rg.createFromValidatedSettings(this._validatedOptions,e.pixelRatio,this.isSimpleWidget),n=this._readFontInfo(t),r={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:VS.getTabFocusMode(),accessibilitySupport:e.accessibilitySupport};return Vh.computeOptions(this._validatedOptions,r)}_readEnvConfiguration(){return{extraEditorClassName:PSe(),outerWidth:this._containerObserver.getWidth(),outerHeight:this._containerObserver.getHeight(),emptySelectionClipboard:Lh||ua,pixelRatio:g_.value,accessibilitySupport:this._accessibilityService.isScreenReaderOptimized()?2:this._accessibilityService.getAccessibilitySupport()}}_readFontInfo(e){return GT.readFontInfo(e)}getRawOptions(){return this._rawOptions}updateOptions(e){const t=SU(e);Vh.applyUpdate(this._rawOptions,t)&&(this._validatedOptions=Vh.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=MSe(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())}};e6=RSe([OSe(3,zo)],e6);function MSe(i){let e=0;for(;i;)i=Math.floor(i/10),e++;return e||1}function PSe(){let i="";return!wl&&!zT&&(i+="no-user-select "),wl&&(i+="no-minimap-shadow "),gn&&(i+="mac "),i}class FSe{constructor(){this._values=[]}_read(e){return this._values[e]}get(e){return this._values[e]}_write(e,t){this._values[e]=t}}class BSe{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 Vh{static validateOptions(e){const t=new FSe;for(const n of l_){const r=n.name==="_never_"?void 0:e[n.name];t._write(n.id,n.validate(r))}return t}static computeOptions(e,t){const n=new BSe;for(const r of l_)n._write(r.id,r.compute(t,n,e._read(r.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)?ra(e,t):!1;if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(!Vh._deepEquals(e[n],t[n]))return!1;return!0}static checkEquals(e,t){const n=[];let r=!1;for(const s of l_){const o=!Vh._deepEquals(e._read(s.id),t._read(s.id));n[s.id]=o,o&&(r=!0)}return r?new gz(n):null}static applyUpdate(e,t){let n=!1;for(const r of l_)if(t.hasOwnProperty(r.name)){const s=r.applyUpdate(e[r.name],t[r.name]);e[r.name]=s.newValue,n=n||s.didChange}return n}}function SU(i){const e=nd(i);return NSe(e),e}function kr(i,e,t){let n=null,r=null;if(typeof t.value=="function"?(n="value",r=t.value,r.length!==0&&console.warn("Memoize should only be used in functions with zero parameters")):typeof t.get=="function"&&(n="get",r=t.get),!r)throw new Error("not supported");const s=`$memoize$${e}`;t[n]=function(...o){return this.hasOwnProperty(s)||Object.defineProperty(this,s,{configurable:!1,enumerable:!1,writable:!1,value:r.apply(this,o)}),this[s]}}var VSe=globalThis&&globalThis.__decorate||function(i,e,t,n){var r=arguments.length,s=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(s=(r<3?o(s):r>3?o(e,t,s):o(e,t))||s);return r>3&&s&&Object.defineProperty(e,t,s),s},bi;(function(i){i.Tap="-monaco-gesturetap",i.Change="-monaco-gesturechange",i.Start="-monaco-gesturestart",i.End="-monaco-gesturesend",i.Contextmenu="-monaco-gesturecontextmenu"})(bi||(bi={}));class ei extends Ne{constructor(){super(),this.dispatched=!1,this.activeTouches={},this.handle=null,this.targets=[],this.ignoreTargets=[],this._lastSetTapCountTime=0,this._register(Xe(document,"touchstart",e=>this.onTouchStart(e),{passive:!1})),this._register(Xe(document,"touchend",e=>this.onTouchEnd(e))),this._register(Xe(document,"touchmove",e=>this.onTouchMove(e),{passive:!1}))}static addTarget(e){return ei.isTouchDevice()?(ei.INSTANCE||(ei.INSTANCE=new ei),ei.INSTANCE.targets.push(e),{dispose:()=>{ei.INSTANCE.targets=ei.INSTANCE.targets.filter(t=>t!==e)}}):Ne.None}static ignoreTarget(e){return ei.isTouchDevice()?(ei.INSTANCE||(ei.INSTANCE=new ei),ei.INSTANCE.ignoreTargets.push(e),{dispose:()=>{ei.INSTANCE.ignoreTargets=ei.INSTANCE.ignoreTargets.filter(t=>t!==e)}}):Ne.None}static isTouchDevice(){return"ontouchstart"in window||navigator.maxTouchPoints>0}dispose(){this.handle&&(this.handle.dispose(),this.handle=null),super.dispose()}onTouchStart(e){let t=Date.now();this.handle&&(this.handle.dispose(),this.handle=null);for(let n=0,r=e.targetTouches.length;n=ei.HOLD_DELAY&&Math.abs(a.initialPageX-Fa(a.rollingPageX))<30&&Math.abs(a.initialPageY-Fa(a.rollingPageY))<30){let c=this.newGestureEvent(bi.Contextmenu,a.initialTarget);c.pageX=Fa(a.rollingPageX),c.pageY=Fa(a.rollingPageY),this.dispatchEvent(c)}else if(n===1){let c=Fa(a.rollingPageX),u=Fa(a.rollingPageY),d=Fa(a.rollingTimestamps)-a.rollingTimestamps[0],h=c-a.rollingPageX[0],f=u-a.rollingPageY[0];const g=this.targets.filter(p=>a.initialTarget instanceof Node&&p.contains(a.initialTarget));this.inertia(g,t,Math.abs(h)/d,h>0?1:-1,c,Math.abs(f)/d,f>0?1:-1,u)}this.dispatchEvent(this.newGestureEvent(bi.End,a.initialTarget)),delete this.activeTouches[o.identifier]}this.dispatched&&(e.preventDefault(),e.stopPropagation(),this.dispatched=!1)}newGestureEvent(e,t){let n=document.createEvent("CustomEvent");return n.initEvent(e,!1,!0),n.initialTarget=t,n.tapCount=0,n}dispatchEvent(e){if(e.type===bi.Tap){const t=new Date().getTime();let n=0;t-this._lastSetTapCountTime>ei.CLEAR_TAP_COUNT_TIME?n=1:n=2,this._lastSetTapCountTime=t,e.tapCount=n}else(e.type===bi.Change||e.type===bi.Contextmenu)&&(this._lastSetTapCountTime=0);for(let t=0;t{e.initialTarget instanceof Node&&t.contains(e.initialTarget)&&(t.dispatchEvent(e),this.dispatched=!0)})}inertia(e,t,n,r,s,o,a,l){this.handle=dc(()=>{let c=Date.now(),u=c-t,d=0,h=0,f=!0;n+=ei.SCROLL_FRICTION*u,o+=ei.SCROLL_FRICTION*u,n>0&&(f=!1,d=r*n*u),o>0&&(f=!1,h=a*o*u);let g=this.newGestureEvent(bi.Change);g.translationX=d,g.translationY=h,e.forEach(p=>p.dispatchEvent(g)),f||this.inertia(e,c,n,r,s+d,o,a,l+h)})}onTouchMove(e){let t=Date.now();for(let n=0,r=e.changedTouches.length;n3&&(o.rollingPageX.shift(),o.rollingPageY.shift(),o.rollingTimestamps.shift()),o.rollingPageX.push(s.pageX),o.rollingPageY.push(s.pageY),o.rollingTimestamps.push(t)}this.dispatched&&(e.preventDefault(),e.stopPropagation(),this.dispatched=!1)}}ei.SCROLL_FRICTION=-.005,ei.HOLD_DELAY=700,ei.CLEAR_TAP_COUNT_TIME=400,VSe([kr],ei,"isTouchDevice",null);function P_(i,e){let t=new Ga(e);return t.preventDefault(),{leftButton:t.leftButton,buttons:t.buttons,posx:t.posx,posy:t.posy}}class Zg{constructor(){this._hooks=new Je,this._mouseMoveEventMerger=null,this._mouseMoveCallback=null,this._onStopCallback=null}dispose(){this.stopMonitoring(!1),this._hooks.dispose()}stopMonitoring(e,t){if(!this.isMonitoring())return;this._hooks.clear(),this._mouseMoveEventMerger=null,this._mouseMoveCallback=null;const n=this._onStopCallback;this._onStopCallback=null,e&&n&&n(t)}isMonitoring(){return!!this._mouseMoveEventMerger}startMonitoring(e,t,n,r,s){if(this.isMonitoring())return;this._mouseMoveEventMerger=n,this._mouseMoveCallback=r,this._onStopCallback=s;const o=OI.getSameOriginWindowChain(),a=tc?"pointermove":"mousemove",l="mouseup",c=o.map(d=>d.window.document),u=Oh(e);u&&c.unshift(u);for(const d of c)this._hooks.add(WI(d,a,h=>{if(h.buttons!==t){this.stopMonitoring(!0);return}this._mouseMoveCallback(h)},(h,f)=>this._mouseMoveEventMerger(h,f))),this._hooks.add(Xe(d,l,h=>this.stopMonitoring(!0)));if(OI.hasDifferentOriginAncestor()){let d=o[o.length-1];this._hooks.add(Xe(d.window.document,"mouseout",h=>{new Ga(h).target.tagName.toLowerCase()==="html"&&this.stopMonitoring(!0)})),this._hooks.add(Xe(d.window.document,"mouseover",h=>{new Ga(h).target.tagName.toLowerCase()==="html"&&this.stopMonitoring(!0)})),this._hooks.add(Xe(d.window.document.body,"mouseleave",h=>{this.stopMonitoring(!0)}))}}}function Wh(i,e){const t=Math.pow(10,e);return Math.round(i*t)/t}class kn{constructor(e,t,n,r=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=Wh(Math.max(Math.min(1,r),0),3)}static equals(e,t){return e.r===t.r&&e.g===t.g&&e.b===t.b&&e.a===t.a}}class hc{constructor(e,t,n,r){this._hslaBrand=void 0,this.h=Math.max(Math.min(360,e),0)|0,this.s=Wh(Math.max(Math.min(1,t),0),3),this.l=Wh(Math.max(Math.min(1,n),0),3),this.a=Wh(Math.max(Math.min(1,r),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,r=e.b/255,s=e.a,o=Math.max(t,n,r),a=Math.min(t,n,r);let l=0,c=0;const u=(a+o)/2,d=o-a;if(d>0){switch(c=Math.min(u<=.5?d/(2*u):d/(2-2*u),1),o){case t:l=(n-r)/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:r,a:s}=e;let o,a,l;if(n===0)o=a=l=r;else{const c=r<.5?r*(1+n):r+n-r*n,u=2*r-c;o=hc._hue2rgb(u,c,t+1/3),a=hc._hue2rgb(u,c,t),l=hc._hue2rgb(u,c,t-1/3)}return new kn(Math.round(o*255),Math.round(a*255),Math.round(l*255),s)}}class ou{constructor(e,t,n,r){this._hsvaBrand=void 0,this.h=Math.max(Math.min(360,e),0)|0,this.s=Wh(Math.max(Math.min(1,t),0),3),this.v=Wh(Math.max(Math.min(1,n),0),3),this.a=Wh(Math.max(Math.min(1,r),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,r=e.b/255,s=Math.max(t,n,r),o=Math.min(t,n,r),a=s-o,l=s===0?0:a/s;let c;return a===0?c=0:s===t?c=((n-r)/a%6+6)%6:s===n?c=(r-t)/a+2:c=(t-n)/a+4,new ou(Math.round(c*60),l,s,e.a)}static toRGBA(e){const{h:t,s:n,v:r,a:s}=e,o=r*n,a=o*(1-Math.abs(t/60%2-1)),l=r-o;let[c,u,d]=[0,0,0];return t<60?(c=o,u=a):t<120?(c=a,u=o):t<180?(u=o,d=a):t<240?(u=a,d=o):t<300?(c=a,d=o):t<=360&&(c=o,d=a),c=Math.round((c+l)*255),u=Math.round((u+l)*255),d=Math.round((d+l)*255),new kn(c,u,d,s)}}let Ie=class{constructor(e){if(e)if(e instanceof kn)this.rgba=e;else if(e instanceof hc)this._hsla=e,this.rgba=hc.toRGBA(e);else if(e instanceof ou)this._hsva=e,this.rgba=ou.toRGBA(e);else throw new Error("Invalid color ctor argument");else throw new Error("Color needs a value")}static fromHex(e){return Ie.Format.CSS.parseHex(e)||Ie.red}get hsla(){return this._hsla?this._hsla:hc.fromRGBA(this.rgba)}get hsva(){return this._hsva?this._hsva:ou.fromRGBA(this.rgba)}equals(e){return!!e&&kn.equals(this.rgba,e.rgba)&&hc.equals(this.hsla,e.hsla)&&ou.equals(this.hsva,e.hsva)}getRelativeLuminance(){const e=Ie._relativeLuminanceForComponent(this.rgba.r),t=Ie._relativeLuminanceForComponent(this.rgba.g),n=Ie._relativeLuminanceForComponent(this.rgba.b),r=.2126*e+.7152*t+.0722*n;return Wh(r,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&&i.charAt(i.length-1)==="#"?i.substring(0,i.length-1):i}class HSe{constructor(){this._onDidChangeSchema=new be,this.schemasById={}}registerSchema(e,t){this.schemasById[WSe(e)]=t,this._onDidChangeSchema.fire(e)}notifySchemaChanged(e){this._onDidChangeSchema.fire(e)}}const zSe=new HSe;sr.add(WS.JSONContribution,zSe);function kU(i){return`--vscode-${i.replace(/\./g,"-")}`}const EU={ColorContribution:"base.contributions.colors"};class $Se{constructor(){this._onDidChangeSchema=new be,this.onDidChangeSchema=this._onDidChangeSchema.event,this.colorSchema={type:"object",properties:{}},this.colorReferenceSchema={type:"string",enum:[],enumDescriptions:[]},this.colorsById={}}registerColor(e,t,n,r=!1,s){let o={id:e,description:n,defaults:t,needsTransparency:r,deprecationMessage:s};this.colorsById[e]=o;let a={type:"string",description:n,format:"color-hex",defaultSnippets:[{body:"${1:#ff0000}"}]};return s&&(a.deprecationMessage=s),this.colorSchema.properties[e]=a,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 r=n.defaults[t.type];return fd(r,t)}}getColorSchema(){return this.colorSchema}toString(){let e=(t,n)=>{let r=t.indexOf(".")===-1?0:1,s=n.indexOf(".")===-1?0:1;return r!==s?r-s:t.localeCompare(n)};return Object.keys(this.colorsById).sort(e).map(t=>`- \`${t}\`: ${this.colorsById[t].description}`).join(` +`)}}const HS=new $Se;sr.add(EU.ColorContribution,HS);function oe(i,e,t,n,r){return HS.registerColor(i,e,t,n,r)}const _t=oe("foreground",{dark:"#CCCCCC",light:"#616161",hc:"#FFFFFF"},C("foreground","Overall foreground color. This color is only used if not overridden by a component.")),USe=oe("errorForeground",{dark:"#F48771",light:"#A1260D",hc:"#F48771"},C("errorForeground","Overall foreground color for error messages. This color is only used if not overridden by a component."));oe("descriptionForeground",{light:"#717171",dark:Wt(_t,.7),hc:Wt(_t,.7)},C("descriptionForeground","Foreground color for description text providing additional information, for example for a label."));const t6=oe("icon.foreground",{dark:"#C5C5C5",light:"#424242",hc:"#FFFFFF"},C("iconForeground","The default color for icons in the workbench.")),au=oe("focusBorder",{dark:"#007FD4",light:"#0090F1",hc:"#F38518"},C("focusBorder","Overall border color for focused elements. This color is only used if not overridden by a component.")),Ai=oe("contrastBorder",{light:null,dark:null,hc:"#6FC3DF"},C("contrastBorder","An extra border around elements to separate them from others for greater contrast.")),Fs=oe("contrastActiveBorder",{light:null,dark:null,hc:au},C("activeContrastBorder","An extra border around active elements to separate them from others for greater contrast."));oe("selection.background",{light:null,dark:null,hc:null},C("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.")),oe("textSeparator.foreground",{light:"#0000002e",dark:"#ffffff2e",hc:Ie.black},C("textSeparatorForeground","Color for text separators."));const zS=oe("textLink.foreground",{light:"#006AB1",dark:"#3794FF",hc:"#3794FF"},C("textLinkForeground","Foreground color for links in text.")),$S=oe("textLink.activeForeground",{light:"#006AB1",dark:"#3794FF",hc:"#3794FF"},C("textLinkActiveForeground","Foreground color for links in text when clicked on and on mouse hover."));oe("textPreformat.foreground",{light:"#A31515",dark:"#D7BA7D",hc:"#D7BA7D"},C("textPreformatForeground","Foreground color for preformatted text segments.")),oe("textBlockQuote.background",{light:"#7f7f7f1a",dark:"#7f7f7f1a",hc:null},C("textBlockQuoteBackground","Background color for block quotes in text.")),oe("textBlockQuote.border",{light:"#007acc80",dark:"#007acc80",hc:Ie.white},C("textBlockQuoteBorder","Border color for block quotes in text."));const xU=oe("textCodeBlock.background",{light:"#dcdcdc66",dark:"#0a0a0a66",hc:Ie.black},C("textCodeBlockBackground","Background color for code blocks in text.")),Hh=oe("widget.shadow",{dark:Wt(Ie.black,.36),light:Wt(Ie.black,.16),hc:null},C("widgetShadow","Shadow color of widgets such as find/replace inside the editor.")),n6=oe("input.background",{dark:"#3C3C3C",light:Ie.white,hc:Ie.black},C("inputBoxBackground","Input box background.")),i6=oe("input.foreground",{dark:_t,light:_t,hc:_t},C("inputBoxForeground","Input box foreground.")),r6=oe("input.border",{dark:null,light:null,hc:Ai},C("inputBoxBorder","Input box border.")),s6=oe("inputOption.activeBorder",{dark:"#007ACC00",light:"#007ACC00",hc:Ai},C("inputBoxActiveOptionBorder","Border color of activated options in input fields."));oe("inputOption.hoverBackground",{dark:"#5a5d5e80",light:"#b8b8b850",hc:null},C("inputOption.hoverBackground","Background color of activated options in input fields."));const o6=oe("inputOption.activeBackground",{dark:Wt(au,.4),light:Wt(au,.2),hc:Ie.transparent},C("inputOption.activeBackground","Background hover color of options in input fields.")),a6=oe("inputOption.activeForeground",{dark:Ie.white,light:Ie.black,hc:null},C("inputOption.activeForeground","Foreground color of activated options in input fields."));oe("input.placeholderForeground",{light:Wt(_t,.5),dark:Wt(_t,.5),hc:Wt(_t,.7)},C("inputPlaceholderForeground","Input box foreground color for placeholder text."));const LU=oe("inputValidation.infoBackground",{dark:"#063B49",light:"#D6ECF2",hc:Ie.black},C("inputValidationInfoBackground","Input validation background color for information severity.")),TU=oe("inputValidation.infoForeground",{dark:null,light:null,hc:null},C("inputValidationInfoForeground","Input validation foreground color for information severity.")),IU=oe("inputValidation.infoBorder",{dark:"#007acc",light:"#007acc",hc:Ai},C("inputValidationInfoBorder","Input validation border color for information severity.")),DU=oe("inputValidation.warningBackground",{dark:"#352A05",light:"#F6F5D2",hc:Ie.black},C("inputValidationWarningBackground","Input validation background color for warning severity.")),NU=oe("inputValidation.warningForeground",{dark:null,light:null,hc:null},C("inputValidationWarningForeground","Input validation foreground color for warning severity.")),AU=oe("inputValidation.warningBorder",{dark:"#B89500",light:"#B89500",hc:Ai},C("inputValidationWarningBorder","Input validation border color for warning severity.")),RU=oe("inputValidation.errorBackground",{dark:"#5A1D1D",light:"#F2DEDE",hc:Ie.black},C("inputValidationErrorBackground","Input validation background color for error severity.")),OU=oe("inputValidation.errorForeground",{dark:null,light:null,hc:null},C("inputValidationErrorForeground","Input validation foreground color for error severity.")),MU=oe("inputValidation.errorBorder",{dark:"#BE1100",light:"#BE1100",hc:Ai},C("inputValidationErrorBorder","Input validation border color for error severity.")),Xg=oe("dropdown.background",{dark:"#3C3C3C",light:Ie.white,hc:Ie.black},C("dropdownBackground","Dropdown background."));oe("dropdown.listBackground",{dark:null,light:null,hc:Ie.black},C("dropdownListBackground","Dropdown list background."));const Kb=oe("dropdown.foreground",{dark:"#F0F0F0",light:null,hc:Ie.white},C("dropdownForeground","Dropdown foreground.")),l6=oe("dropdown.border",{dark:Xg,light:"#CECECE",hc:Ai},C("dropdownBorder","Dropdown border."));oe("checkbox.background",{dark:Xg,light:Xg,hc:Xg},C("checkbox.background","Background color of checkbox widget.")),oe("checkbox.foreground",{dark:Kb,light:Kb,hc:Kb},C("checkbox.foreground","Foreground color of checkbox widget.")),oe("checkbox.border",{dark:l6,light:l6,hc:l6},C("checkbox.border","Border color of checkbox widget."));const jSe=oe("button.foreground",{dark:Ie.white,light:Ie.white,hc:Ie.white},C("buttonForeground","Button foreground color.")),c6=oe("button.background",{dark:"#0E639C",light:"#007ACC",hc:null},C("buttonBackground","Button background color.")),qSe=oe("button.hoverBackground",{dark:Kh(c6,.2),light:$_(c6,.2),hc:null},C("buttonHoverBackground","Button background color when hovering."));oe("button.border",{dark:Ai,light:Ai,hc:Ai},C("buttonBorder","Button border color.")),oe("button.secondaryForeground",{dark:Ie.white,light:Ie.white,hc:Ie.white},C("buttonSecondaryForeground","Secondary button foreground color."));const PU=oe("button.secondaryBackground",{dark:"#3A3D41",light:"#5F6A79",hc:null},C("buttonSecondaryBackground","Secondary button background color."));oe("button.secondaryHoverBackground",{dark:Kh(PU,.2),light:$_(PU,.2),hc:null},C("buttonSecondaryHoverBackground","Secondary button background color when hovering."));const Yb=oe("badge.background",{dark:"#4D4D4D",light:"#C4C4C4",hc:Ie.black},C("badgeBackground","Badge background color. Badges are small information labels, e.g. for search results count.")),Zb=oe("badge.foreground",{dark:Ie.white,light:"#333",hc:Ie.white},C("badgeForeground","Badge foreground color. Badges are small information labels, e.g. for search results count.")),F_=oe("scrollbar.shadow",{dark:"#000000",light:"#DDDDDD",hc:null},C("scrollbarShadow","Scrollbar shadow to indicate that the view is scrolled.")),B_=oe("scrollbarSlider.background",{dark:Ie.fromHex("#797979").transparent(.4),light:Ie.fromHex("#646464").transparent(.4),hc:Wt(Ai,.6)},C("scrollbarSliderBackground","Scrollbar slider background color.")),V_=oe("scrollbarSlider.hoverBackground",{dark:Ie.fromHex("#646464").transparent(.7),light:Ie.fromHex("#646464").transparent(.7),hc:Wt(Ai,.8)},C("scrollbarSliderHoverBackground","Scrollbar slider background color when hovering.")),W_=oe("scrollbarSlider.activeBackground",{dark:Ie.fromHex("#BFBFBF").transparent(.4),light:Ie.fromHex("#000000").transparent(.6),hc:Ai},C("scrollbarSliderActiveBackground","Scrollbar slider background color when clicked on.")),GSe=oe("progressBar.background",{dark:Ie.fromHex("#0E70C0"),light:Ie.fromHex("#0E70C0"),hc:Ai},C("progressBarBackground","Background color of the progress bar that can show for long running operations.")),KSe=oe("editorError.background",{dark:null,light:null,hc:null},C("editorError.background","Background color of error text in the editor. The color must not be opaque so as not to hide underlying decorations."),!0),zh=oe("editorError.foreground",{dark:"#F14C4C",light:"#E51400",hc:null},C("editorError.foreground","Foreground color of error squigglies in the editor.")),FU=oe("editorError.border",{dark:null,light:null,hc:Ie.fromHex("#E47777").transparent(.8)},C("errorBorder","Border color of error boxes in the editor.")),YSe=oe("editorWarning.background",{dark:null,light:null,hc:null},C("editorWarning.background","Background color of warning text in the editor. The color must not be opaque so as not to hide underlying decorations."),!0),El=oe("editorWarning.foreground",{dark:"#CCA700",light:"#BF8803",hc:null},C("editorWarning.foreground","Foreground color of warning squigglies in the editor.")),US=oe("editorWarning.border",{dark:null,light:null,hc:Ie.fromHex("#FFCC00").transparent(.8)},C("warningBorder","Border color of warning boxes in the editor.")),ZSe=oe("editorInfo.background",{dark:null,light:null,hc:null},C("editorInfo.background","Background color of info text in the editor. The color must not be opaque so as not to hide underlying decorations."),!0),ma=oe("editorInfo.foreground",{dark:"#3794FF",light:"#1a85ff",hc:"#3794FF"},C("editorInfo.foreground","Foreground color of info squigglies in the editor.")),u6=oe("editorInfo.border",{dark:null,light:null,hc:Ie.fromHex("#3794FF").transparent(.8)},C("infoBorder","Border color of info boxes in the editor.")),XSe=oe("editorHint.foreground",{dark:Ie.fromHex("#eeeeee").transparent(.7),light:"#6c6c6c",hc:null},C("editorHint.foreground","Foreground color of hint squigglies in the editor.")),QSe=oe("editorHint.border",{dark:null,light:null,hc:Ie.fromHex("#eeeeee").transparent(.8)},C("hintBorder","Border color of hint boxes in the editor."));oe("sash.hoverBorder",{dark:au,light:au,hc:au},C("sashActiveBorder","Border color of active sashes."));const _o=oe("editor.background",{light:"#fffffe",dark:"#1E1E1E",hc:Ie.black},C("editorBackground","Editor background color.")),$h=oe("editor.foreground",{light:"#333333",dark:"#BBBBBB",hc:Ie.white},C("editorForeground","Editor default foreground color.")),Zs=oe("editorWidget.background",{dark:"#252526",light:"#F3F3F3",hc:"#0C141F"},C("editorWidgetBackground","Background color of editor widgets, such as find/replace.")),ud=oe("editorWidget.foreground",{dark:_t,light:_t,hc:_t},C("editorWidgetForeground","Foreground color of editor widgets, such as find/replace.")),Qg=oe("editorWidget.border",{dark:"#454545",light:"#C8C8C8",hc:Ai},C("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.")),JSe=oe("editorWidget.resizeBorder",{light:null,dark:null,hc:null},C("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.")),BU=oe("quickInput.background",{dark:Zs,light:Zs,hc:Zs},C("pickerBackground","Quick picker background color. The quick picker widget is the container for pickers like the command palette.")),eke=oe("quickInput.foreground",{dark:ud,light:ud,hc:ud},C("pickerForeground","Quick picker foreground color. The quick picker widget is the container for pickers like the command palette.")),tke=oe("quickInputTitle.background",{dark:new Ie(new kn(255,255,255,.105)),light:new Ie(new kn(0,0,0,.06)),hc:"#000000"},C("pickerTitleBackground","Quick picker title background color. The quick picker widget is the container for pickers like the command palette.")),nke=oe("pickerGroup.foreground",{dark:"#3794FF",light:"#0066BF",hc:Ie.white},C("pickerGroupForeground","Quick picker color for grouping labels.")),ike=oe("pickerGroup.border",{dark:"#3F3F46",light:"#CCCEDB",hc:Ie.white},C("pickerGroupBorder","Quick picker color for grouping borders.")),rke=oe("keybindingLabel.background",{dark:new Ie(new kn(128,128,128,.17)),light:new Ie(new kn(221,221,221,.4)),hc:Ie.transparent},C("keybindingLabelBackground","Keybinding label background color. The keybinding label is used to represent a keyboard shortcut.")),ske=oe("keybindingLabel.foreground",{dark:Ie.fromHex("#CCCCCC"),light:Ie.fromHex("#555555"),hc:Ie.white},C("keybindingLabelForeground","Keybinding label foreground color. The keybinding label is used to represent a keyboard shortcut.")),oke=oe("keybindingLabel.border",{dark:new Ie(new kn(51,51,51,.6)),light:new Ie(new kn(204,204,204,.4)),hc:new Ie(new kn(111,195,223))},C("keybindingLabelBorder","Keybinding label border color. The keybinding label is used to represent a keyboard shortcut.")),ake=oe("keybindingLabel.bottomBorder",{dark:new Ie(new kn(68,68,68,.6)),light:new Ie(new kn(187,187,187,.4)),hc:new Ie(new kn(111,195,223))},C("keybindingLabelBottomBorder","Keybinding label border bottom color. The keybinding label is used to represent a keyboard shortcut.")),Uh=oe("editor.selectionBackground",{light:"#ADD6FF",dark:"#264F78",hc:"#f3f518"},C("editorSelectionBackground","Color of the editor selection.")),lke=oe("editor.selectionForeground",{light:null,dark:null,hc:"#000000"},C("editorSelectionForeground","Color of the selected text for high contrast.")),d6=oe("editor.inactiveSelectionBackground",{light:Wt(Uh,.5),dark:Wt(Uh,.5),hc:Wt(Uh,.5)},C("editorInactiveSelection","Color of the selection in an inactive editor. The color must not be opaque so as not to hide underlying decorations."),!0),h6=oe("editor.selectionHighlightBackground",{light:KU(Uh,_o,.3,.6),dark:KU(Uh,_o,.3,.6),hc:null},C("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),cke=oe("editor.selectionHighlightBorder",{light:null,dark:null,hc:Fs},C("editorSelectionHighlightBorder","Border color for regions with the same content as the selection.")),uke=oe("editor.findMatchBackground",{light:"#A8AC94",dark:"#515C6A",hc:null},C("editorFindMatch","Color of the current search match.")),jh=oe("editor.findMatchHighlightBackground",{light:"#EA5C0055",dark:"#EA5C0055",hc:null},C("findMatchHighlight","Color of the other search matches. The color must not be opaque so as not to hide underlying decorations."),!0),dke=oe("editor.findRangeHighlightBackground",{dark:"#3a3d4166",light:"#b4b4b44d",hc:null},C("findRangeHighlight","Color of the range limiting the search. The color must not be opaque so as not to hide underlying decorations."),!0),hke=oe("editor.findMatchBorder",{light:null,dark:null,hc:Fs},C("editorFindMatchBorder","Border color of the current search match.")),H_=oe("editor.findMatchHighlightBorder",{light:null,dark:null,hc:Fs},C("findMatchHighlightBorder","Border color of the other search matches.")),fke=oe("editor.findRangeHighlightBorder",{dark:null,light:null,hc:Wt(Fs,.4)},C("findRangeHighlightBorder","Border color of the range limiting the search. The color must not be opaque so as not to hide underlying decorations."),!0);oe("searchEditor.findMatchBackground",{light:Wt(jh,.66),dark:Wt(jh,.66),hc:jh},C("searchEditor.queryMatch","Color of the Search Editor query matches.")),oe("searchEditor.findMatchBorder",{light:Wt(H_,.66),dark:Wt(H_,.66),hc:H_},C("searchEditor.editorFindMatchBorder","Border color of the Search Editor query matches."));const gke=oe("editor.hoverHighlightBackground",{light:"#ADD6FF26",dark:"#264f7840",hc:"#ADD6FF26"},C("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),Jg=oe("editorHoverWidget.background",{light:Zs,dark:Zs,hc:Zs},C("hoverBackground","Background color of the editor hover.")),f6=oe("editorHoverWidget.foreground",{light:ud,dark:ud,hc:ud},C("hoverForeground","Foreground color of the editor hover.")),g6=oe("editorHoverWidget.border",{light:Qg,dark:Qg,hc:Qg},C("hoverBorder","Border color of the editor hover.")),pke=oe("editorHoverWidget.statusBarBackground",{dark:Kh(Jg,.2),light:$_(Jg,.05),hc:Zs},C("statusBarBackground","Background color of the editor hover status bar.")),p6=oe("editorLink.activeForeground",{dark:"#4E94CE",light:Ie.blue,hc:Ie.cyan},C("activeLinkForeground","Color of active links.")),ep=oe("editorInlayHint.foreground",{dark:Wt(Zb,.8),light:Wt(Zb,.8),hc:Zb},C("editorInlayHintForeground","Foreground color of inline hints")),tp=oe("editorInlayHint.background",{dark:Wt(Yb,.6),light:Wt(Yb,.3),hc:Yb},C("editorInlayHintBackground","Background color of inline hints")),mke=oe("editorInlayHint.typeForeground",{dark:ep,light:ep,hc:ep},C("editorInlayHintForegroundTypes","Foreground color of inline hints for types")),_ke=oe("editorInlayHint.typeBackground",{dark:tp,light:tp,hc:tp},C("editorInlayHintBackgroundTypes","Background color of inline hints for types")),bke=oe("editorInlayHint.parameterForeground",{dark:ep,light:ep,hc:ep},C("editorInlayHintForegroundParameter","Foreground color of inline hints for parameters")),vke=oe("editorInlayHint.parameterBackground",{dark:tp,light:tp,hc:tp},C("editorInlayHintBackgroundParameter","Background color of inline hints for parameters")),wke=oe("editorLightBulb.foreground",{dark:"#FFCC00",light:"#DDB100",hc:"#FFCC00"},C("editorLightBulbForeground","The color used for the lightbulb actions icon.")),Cke=oe("editorLightBulbAutoFix.foreground",{dark:"#75BEFF",light:"#007ACC",hc:"#75BEFF"},C("editorLightBulbAutoFixForeground","The color used for the lightbulb auto fix actions icon.")),m6=new Ie(new kn(155,185,85,.2)),_6=new Ie(new kn(255,0,0,.2)),VU=oe("diffEditor.insertedTextBackground",{dark:m6,light:m6,hc:null},C("diffEditorInserted","Background color for text that got inserted. The color must not be opaque so as not to hide underlying decorations."),!0),WU=oe("diffEditor.removedTextBackground",{dark:_6,light:_6,hc:null},C("diffEditorRemoved","Background color for text that got removed. The color must not be opaque so as not to hide underlying decorations."),!0),yke=oe("diffEditor.insertedLineBackground",{dark:null,light:null,hc:null},C("diffEditorInsertedLines","Background color for lines that got inserted. The color must not be opaque so as not to hide underlying decorations."),!0),Ske=oe("diffEditor.removedLineBackground",{dark:null,light:null,hc:null},C("diffEditorRemovedLines","Background color for lines that got removed. The color must not be opaque so as not to hide underlying decorations."),!0),kke=oe("diffEditorGutter.insertedLineBackground",{dark:null,light:null,hc:null},C("diffEditorInsertedLineGutter","Background color for the margin where lines got inserted.")),Eke=oe("diffEditorGutter.removedLineBackground",{dark:null,light:null,hc:null},C("diffEditorRemovedLineGutter","Background color for the margin where lines got removed.")),xke=oe("diffEditorOverview.insertedForeground",{dark:null,light:null,hc:null},C("diffEditorOverviewInserted","Diff overview ruler foreground for inserted content.")),Lke=oe("diffEditorOverview.removedForeground",{dark:null,light:null,hc:null},C("diffEditorOverviewRemoved","Diff overview ruler foreground for removed content.")),Tke=oe("diffEditor.insertedTextBorder",{dark:null,light:null,hc:"#33ff2eff"},C("diffEditorInsertedOutline","Outline color for the text that got inserted.")),Ike=oe("diffEditor.removedTextBorder",{dark:null,light:null,hc:"#FF008F"},C("diffEditorRemovedOutline","Outline color for text that got removed.")),Dke=oe("diffEditor.border",{dark:null,light:null,hc:Ai},C("diffEditorBorder","Border color between the two text editors.")),Nke=oe("diffEditor.diagonalFill",{dark:"#cccccc33",light:"#22222233",hc:null},C("diffDiagonalFill","Color of the diff editor's diagonal fill. The diagonal fill is used in side-by-side diff views.")),Ake=oe("list.focusBackground",{dark:null,light:null,hc:null},C("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.")),Rke=oe("list.focusForeground",{dark:null,light:null,hc:null},C("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.")),Oke=oe("list.focusOutline",{dark:au,light:au,hc:Fs},C("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.")),qh=oe("list.activeSelectionBackground",{dark:"#094771",light:"#0060C0",hc:null},C("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.")),Gh=oe("list.activeSelectionForeground",{dark:Ie.white,light:Ie.white,hc:null},C("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.")),jS=oe("list.activeSelectionIconForeground",{dark:null,light:null,hc:null},C("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.")),Mke=oe("list.inactiveSelectionBackground",{dark:"#37373D",light:"#E4E6F1",hc:null},C("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.")),Pke=oe("list.inactiveSelectionForeground",{dark:null,light:null,hc:null},C("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.")),Fke=oe("list.inactiveSelectionIconForeground",{dark:null,light:null,hc:null},C("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.")),Bke=oe("list.inactiveFocusBackground",{dark:null,light:null,hc:null},C("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.")),Vke=oe("list.inactiveFocusOutline",{dark:null,light:null,hc:null},C("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.")),Wke=oe("list.hoverBackground",{dark:"#2A2D2E",light:"#F0F0F0",hc:null},C("listHoverBackground","List/Tree background when hovering over items using the mouse.")),Hke=oe("list.hoverForeground",{dark:null,light:null,hc:null},C("listHoverForeground","List/Tree foreground when hovering over items using the mouse.")),zke=oe("list.dropBackground",{dark:"#062F4A",light:"#D6EBFF",hc:null},C("listDropBackground","List/Tree drag and drop background when moving items around using the mouse.")),dd=oe("list.highlightForeground",{dark:"#18A3FF",light:"#0066BF",hc:au},C("highlight","List/Tree foreground color of the match highlights when searching inside the list/tree.")),b6=oe("list.focusHighlightForeground",{dark:dd,light:f4e(qh,dd,"#9DDDFF"),hc:dd},C("listFocusHighlightForeground","List/Tree foreground color of the match highlights on actively focused items when searching inside the list/tree."));oe("list.invalidItemForeground",{dark:"#B89500",light:"#B89500",hc:"#B89500"},C("invalidItemForeground","List/Tree foreground color for invalid items, for example an unresolved root in explorer.")),oe("list.errorForeground",{dark:"#F88070",light:"#B01011",hc:null},C("listErrorForeground","Foreground color of list items containing errors.")),oe("list.warningForeground",{dark:"#CCA700",light:"#855F00",hc:null},C("listWarningForeground","Foreground color of list items containing warnings."));const $ke=oe("listFilterWidget.background",{light:"#efc1ad",dark:"#653723",hc:Ie.black},C("listFilterWidgetBackground","Background color of the type filter widget in lists and trees.")),Uke=oe("listFilterWidget.outline",{dark:Ie.transparent,light:Ie.transparent,hc:"#f38518"},C("listFilterWidgetOutline","Outline color of the type filter widget in lists and trees.")),jke=oe("listFilterWidget.noMatchesOutline",{dark:"#BE1100",light:"#BE1100",hc:Ai},C("listFilterWidgetNoMatchesOutline","Outline color of the type filter widget in lists and trees, when there are no matches."));oe("list.filterMatchBackground",{dark:jh,light:jh,hc:null},C("listFilterMatchHighlight","Background color of the filtered match.")),oe("list.filterMatchBorder",{dark:H_,light:H_,hc:Ai},C("listFilterMatchHighlightBorder","Border color of the filtered match."));const qke=oe("tree.indentGuidesStroke",{dark:"#585858",light:"#a9a9a9",hc:"#a9a9a9"},C("treeIndentGuidesStroke","Tree stroke color for the indentation guides.")),Gke=oe("tree.tableColumnsBorder",{dark:"#CCCCCC20",light:"#61616120",hc:null},C("tableColumnsBorder","Table border color between columns.")),Kke=oe("tree.tableOddRowsBackground",{dark:Wt(_t,.04),light:Wt(_t,.04),hc:null},C("tableOddRowsBackgroundColor","Background color for odd table rows."));oe("list.deemphasizedForeground",{dark:"#8C8C8C",light:"#8E8E90",hc:"#A7A8A9"},C("listDeemphasizedForeground","List/Tree foreground color for items that are deemphasized. "));const HU=oe("quickInput.list.focusBackground",{dark:null,light:null,hc:null},"",void 0,C("quickInput.list.focusBackground deprecation","Please use quickInputList.focusBackground instead")),qS=oe("quickInputList.focusForeground",{dark:Gh,light:Gh,hc:Gh},C("quickInput.listFocusForeground","Quick picker foreground color for the focused item.")),GS=oe("quickInputList.focusIconForeground",{dark:jS,light:jS,hc:jS},C("quickInput.listFocusIconForeground","Quick picker icon foreground color for the focused item.")),KS=oe("quickInputList.focusBackground",{dark:tv(HU,qh),light:tv(HU,qh),hc:null},C("quickInput.listFocusBackground","Quick picker background color for the focused item.")),Yke=oe("menu.border",{dark:null,light:null,hc:Ai},C("menuBorder","Border color of menus.")),Zke=oe("menu.foreground",{dark:Kb,light:_t,hc:Kb},C("menuForeground","Foreground color of menu items.")),Xke=oe("menu.background",{dark:Xg,light:Xg,hc:Xg},C("menuBackground","Background color of menu items.")),Qke=oe("menu.selectionForeground",{dark:Gh,light:Gh,hc:Gh},C("menuSelectionForeground","Foreground color of the selected menu item in menus.")),Jke=oe("menu.selectionBackground",{dark:qh,light:qh,hc:qh},C("menuSelectionBackground","Background color of the selected menu item in menus.")),e4e=oe("menu.selectionBorder",{dark:null,light:null,hc:Fs},C("menuSelectionBorder","Border color of the selected menu item in menus.")),t4e=oe("menu.separatorBackground",{dark:"#BBBBBB",light:"#888888",hc:Ai},C("menuSeparatorBackground","Color of a separator menu item in menus.")),v6=oe("toolbar.hoverBackground",{dark:"#5a5d5e50",light:"#b8b8b850",hc:null},C("toolbarHoverBackground","Toolbar background when hovering over actions using the mouse"));oe("toolbar.hoverOutline",{dark:null,light:null,hc:Fs},C("toolbarHoverOutline","Toolbar outline when hovering over actions using the mouse")),oe("toolbar.activeBackground",{dark:Kh(v6,.1),light:$_(v6,.1),hc:null},C("toolbarActiveBackground","Toolbar background when holding the mouse over actions")),oe("editor.snippetTabstopHighlightBackground",{dark:new Ie(new kn(124,124,124,.3)),light:new Ie(new kn(10,50,100,.2)),hc:new Ie(new kn(124,124,124,.3))},C("snippetTabstopHighlightBackground","Highlight background color of a snippet tabstop.")),oe("editor.snippetTabstopHighlightBorder",{dark:null,light:null,hc:null},C("snippetTabstopHighlightBorder","Highlight border color of a snippet tabstop.")),oe("editor.snippetFinalTabstopHighlightBackground",{dark:null,light:null,hc:null},C("snippetFinalTabstopHighlightBackground","Highlight background color of the final tabstop of a snippet.")),oe("editor.snippetFinalTabstopHighlightBorder",{dark:"#525252",light:new Ie(new kn(10,50,100,.5)),hc:"#525252"},C("snippetFinalTabstopHighlightBorder","Highlight border color of the final tabstop of a snippet.")),oe("breadcrumb.foreground",{light:Wt(_t,.8),dark:Wt(_t,.8),hc:Wt(_t,.8)},C("breadcrumbsFocusForeground","Color of focused breadcrumb items.")),oe("breadcrumb.background",{light:_o,dark:_o,hc:_o},C("breadcrumbsBackground","Background color of breadcrumb items.")),oe("breadcrumb.focusForeground",{light:$_(_t,.2),dark:Kh(_t,.1),hc:Kh(_t,.1)},C("breadcrumbsFocusForeground","Color of focused breadcrumb items.")),oe("breadcrumb.activeSelectionForeground",{light:$_(_t,.2),dark:Kh(_t,.1),hc:Kh(_t,.1)},C("breadcrumbsSelectedForegound","Color of selected breadcrumb items.")),oe("breadcrumbPicker.background",{light:Zs,dark:Zs,hc:Zs},C("breadcrumbsSelectedBackground","Background color of breadcrumb item picker."));const zU=.5,$U=Ie.fromHex("#40C8AE").transparent(zU),UU=Ie.fromHex("#40A6FF").transparent(zU),jU=Ie.fromHex("#606060").transparent(.4),hd=.4,z_=1,Xb=oe("merge.currentHeaderBackground",{dark:$U,light:$U,hc:null},C("mergeCurrentHeaderBackground","Current header background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0);oe("merge.currentContentBackground",{dark:Wt(Xb,hd),light:Wt(Xb,hd),hc:Wt(Xb,hd)},C("mergeCurrentContentBackground","Current content background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0);const Qb=oe("merge.incomingHeaderBackground",{dark:UU,light:UU,hc:null},C("mergeIncomingHeaderBackground","Incoming header background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0);oe("merge.incomingContentBackground",{dark:Wt(Qb,hd),light:Wt(Qb,hd),hc:Wt(Qb,hd)},C("mergeIncomingContentBackground","Incoming content background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0);const Jb=oe("merge.commonHeaderBackground",{dark:jU,light:jU,hc:null},C("mergeCommonHeaderBackground","Common ancestor header background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0);oe("merge.commonContentBackground",{dark:Wt(Jb,hd),light:Wt(Jb,hd),hc:Wt(Jb,hd)},C("mergeCommonContentBackground","Common ancestor content background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0);const w6=oe("merge.border",{dark:null,light:null,hc:"#C3DF6F"},C("mergeBorder","Border color on headers and the splitter in inline merge-conflicts."));oe("editorOverviewRuler.currentContentForeground",{dark:Wt(Xb,z_),light:Wt(Xb,z_),hc:w6},C("overviewRulerCurrentContentForeground","Current overview ruler foreground for inline merge-conflicts.")),oe("editorOverviewRuler.incomingContentForeground",{dark:Wt(Qb,z_),light:Wt(Qb,z_),hc:w6},C("overviewRulerIncomingContentForeground","Incoming overview ruler foreground for inline merge-conflicts.")),oe("editorOverviewRuler.commonContentForeground",{dark:Wt(Jb,z_),light:Wt(Jb,z_),hc:w6},C("overviewRulerCommonContentForeground","Common ancestor overview ruler foreground for inline merge-conflicts."));const C6=oe("editorOverviewRuler.findMatchForeground",{dark:"#d186167e",light:"#d186167e",hc:"#AB5A00"},C("overviewRulerFindMatchForeground","Overview ruler marker color for find matches. The color must not be opaque so as not to hide underlying decorations."),!0),qU=oe("editorOverviewRuler.selectionHighlightForeground",{dark:"#A0A0A0CC",light:"#A0A0A0CC",hc:"#A0A0A0CC"},C("overviewRulerSelectionHighlightForeground","Overview ruler marker color for selection highlights. The color must not be opaque so as not to hide underlying decorations."),!0),ev=oe("minimap.findMatchHighlight",{light:"#d18616",dark:"#d18616",hc:"#AB5A00"},C("minimapFindMatchHighlight","Minimap marker color for find matches."),!0),YS=oe("minimap.selectionOccurrenceHighlight",{light:"#c9c9c9",dark:"#676767",hc:"#ffffff"},C("minimapSelectionOccurrenceHighlight","Minimap marker color for repeating editor selections."),!0),GU=oe("minimap.selectionHighlight",{light:"#ADD6FF",dark:"#264F78",hc:"#ffffff"},C("minimapSelectionHighlight","Minimap marker color for the editor selection."),!0),n4e=oe("minimap.errorHighlight",{dark:new Ie(new kn(255,18,18,.7)),light:new Ie(new kn(255,18,18,.7)),hc:new Ie(new kn(255,50,50,1))},C("minimapError","Minimap marker color for errors.")),i4e=oe("minimap.warningHighlight",{dark:El,light:El,hc:US},C("overviewRuleWarning","Minimap marker color for warnings.")),r4e=oe("minimap.background",{dark:null,light:null,hc:null},C("minimapBackground","Minimap background color.")),s4e=oe("minimap.foregroundOpacity",{dark:Ie.fromHex("#000f"),light:Ie.fromHex("#000f"),hc:Ie.fromHex("#000f")},C("minimapForegroundOpacity",'Opacity of foreground elements rendered in the minimap. For example, "#000000c0" will render the elements with 75% opacity.')),o4e=oe("minimapSlider.background",{light:Wt(B_,.5),dark:Wt(B_,.5),hc:Wt(B_,.5)},C("minimapSliderBackground","Minimap slider background color.")),a4e=oe("minimapSlider.hoverBackground",{light:Wt(V_,.5),dark:Wt(V_,.5),hc:Wt(V_,.5)},C("minimapSliderHoverBackground","Minimap slider background color when hovering.")),l4e=oe("minimapSlider.activeBackground",{light:Wt(W_,.5),dark:Wt(W_,.5),hc:Wt(W_,.5)},C("minimapSliderActiveBackground","Minimap slider background color when clicked on.")),c4e=oe("problemsErrorIcon.foreground",{dark:zh,light:zh,hc:zh},C("problemsErrorIconForeground","The color used for the problems error icon.")),u4e=oe("problemsWarningIcon.foreground",{dark:El,light:El,hc:El},C("problemsWarningIconForeground","The color used for the problems warning icon.")),d4e=oe("problemsInfoIcon.foreground",{dark:ma,light:ma,hc:ma},C("problemsInfoIconForeground","The color used for the problems info icon."));oe("charts.foreground",{dark:_t,light:_t,hc:_t},C("chartsForeground","The foreground color used in charts.")),oe("charts.lines",{dark:Wt(_t,.5),light:Wt(_t,.5),hc:Wt(_t,.5)},C("chartsLines","The color used for horizontal lines in charts.")),oe("charts.red",{dark:zh,light:zh,hc:zh},C("chartsRed","The red color used in chart visualizations.")),oe("charts.blue",{dark:ma,light:ma,hc:ma},C("chartsBlue","The blue color used in chart visualizations.")),oe("charts.yellow",{dark:El,light:El,hc:El},C("chartsYellow","The yellow color used in chart visualizations.")),oe("charts.orange",{dark:ev,light:ev,hc:ev},C("chartsOrange","The orange color used in chart visualizations.")),oe("charts.green",{dark:"#89D185",light:"#388A34",hc:"#89D185"},C("chartsGreen","The green color used in chart visualizations.")),oe("charts.purple",{dark:"#B180D7",light:"#652D90",hc:"#B180D7"},C("chartsPurple","The purple color used in chart visualizations."));function h4e(i,e){var t,n,r;switch(i.op){case 0:return(t=fd(i.value,e))===null||t===void 0?void 0:t.darken(i.factor);case 1:return(n=fd(i.value,e))===null||n===void 0?void 0:n.lighten(i.factor);case 2:return(r=fd(i.value,e))===null||r===void 0?void 0:r.transparent(i.factor);case 3:for(const s of i.values){const o=fd(s,e);if(o)return o}return;case 5:return fd(e.defines(i.if)?i.then:i.else,e);case 4:{const s=fd(i.value,e);if(!s)return;const o=fd(i.background,e);return o?s.isDarkerThan(o)?Ie.getLighterColor(s,o,i.factor).transparent(i.transparency):Ie.getDarkerColor(s,o,i.factor).transparent(i.transparency):s.transparent(i.factor*i.transparency)}default:throw L8()}}function $_(i,e){return{op:0,value:i,factor:e}}function Kh(i,e){return{op:1,value:i,factor:e}}function Wt(i,e){return{op:2,value:i,factor:e}}function tv(...i){return{op:3,values:i}}function f4e(i,e,t){return{op:5,if:i,then:e,else:t}}function KU(i,e,t,n){return{op:4,value:i,background:e,factor:t,transparency:n}}function fd(i,e){if(i!==null){if(typeof i=="string")return i[0]==="#"?Ie.fromHex(i):e.getColor(i);if(i instanceof Ie)return i;if(typeof i=="object")return h4e(i,e)}}const YU="vscode://schemas/workbench-colors";let ZU=sr.as(WS.JSONContribution);ZU.registerSchema(YU,HS.getColorSchema());const XU=new ri(()=>ZU.notifySchemaChanged(YU),200);HS.onDidChangeSchema(()=>{XU.isScheduled()||XU.schedule()});class y6{constructor(e,t){this.x=e,this.y=t,this._pageCoordinatesBrand=void 0}toClientCoordinates(){return new QU(this.x-ad.scrollX,this.y-ad.scrollY)}}class QU{constructor(e,t){this.clientX=e,this.clientY=t,this._clientCoordinatesBrand=void 0}toPageCoordinates(){return new y6(this.clientX+ad.scrollX,this.clientY+ad.scrollY)}}class g4e{constructor(e,t,n,r){this.x=e,this.y=t,this.width=n,this.height=r,this._editorPagePositionBrand=void 0}}class p4e{constructor(e,t){this.x=e,this.y=t,this._positionRelativeToEditorBrand=void 0}}function JU(i){const e=ss(i);return new g4e(e.left,e.top,e.width,e.height)}function ej(i,e,t){const n=e.width/i.offsetWidth,r=e.height/i.offsetHeight,s=(t.x-e.x)/n,o=(t.y-e.y)/r;return new p4e(s,o)}class np extends Ga{constructor(e,t){super(e),this._editorMouseEventBrand=void 0,this.pos=new y6(this.posx,this.posy),this.editorPos=JU(t),this.relativePos=ej(t,this.editorPos,this.pos)}}class m4e{constructor(e){this._editorViewDomNode=e}_create(e){return new np(e,this._editorViewDomNode)}onContextMenu(e,t){return Xe(e,"contextmenu",n=>{t(this._create(n))})}onMouseUp(e,t){return Xe(e,"mouseup",n=>{t(this._create(n))})}onMouseDown(e,t){return Xe(e,"mousedown",n=>{t(this._create(n))})}onMouseLeave(e,t){return FI(e,n=>{t(this._create(n))})}onMouseMoveThrottled(e,t,n,r){return WI(e,"mousemove",t,(o,a)=>n(o,this._create(a)),r)}}class _4e{constructor(e){this._editorViewDomNode=e}_create(e){return new np(e,this._editorViewDomNode)}onPointerUp(e,t){return Xe(e,"pointerup",n=>{t(this._create(n))})}onPointerDown(e,t){return Xe(e,"pointerdown",n=>{t(this._create(n))})}onPointerLeave(e,t){return Jye(e,n=>{t(this._create(n))})}onPointerMoveThrottled(e,t,n,r){return WI(e,"pointermove",t,(o,a)=>n(o,this._create(a)),r)}}class b4e extends Ne{constructor(e){super(),this._editorViewDomNode=e,this._globalMouseMoveMonitor=this._register(new Zg),this._keydownListener=null}startMonitoring(e,t,n,r,s){this._keydownListener=Zr(document,"keydown",a=>{a.toKeybinding().isModifierKey()||this._globalMouseMoveMonitor.stopMonitoring(!0,a.browserEvent)},!0);const o=(a,l)=>n(a,new np(l,this._editorViewDomNode));this._globalMouseMoveMonitor.startMonitoring(e,t,o,r,a=>{this._keydownListener.dispose(),s(a)})}stopMonitoring(){this._globalMouseMoveMonitor.stopMonitoring(!0)}}class nv{constructor(e){this._editor=e,this._instanceId=++nv._idPool,this._counter=0,this._rules=new Map,this._garbageCollectionScheduler=new ri(()=>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 r=this._counter++;n=new v4e(t,`dyn-rule-${this._instanceId}-${r}`,$b(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())}}nv._idPool=0;class v4e{constructor(e,t,n,r){this.key=e,this.className=t,this.properties=r,this._referenceCount=0,this._styleElement=Ka(n),this._styleElement.textContent=this.getCssText(this.className,this.properties)}getCssText(e,t){let n=`.${e} {`;for(const r in t){const s=t[r];let o;typeof s=="object"?o=`var(${kU(s.id)})`:o=s;const a=w4e(r);n+=` + ${a}: ${o};`}return n+=` +}`,n}dispose(){this._styleElement.remove()}increaseRefCount(){this._referenceCount++}decreaseRefCount(){this._referenceCount--}hasReferences(){return this._referenceCount>0}}function w4e(i){return i.replace(/(^[A-Z])/,([e])=>e.toLowerCase()).replace(/([A-Z])/g,([e])=>`-${e.toLowerCase()}`)}class iv 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,r=e.length;n=a.left?r.width=Math.max(r.width,a.left+a.width-r.left):(t[n++]=r,r=a)}return t[n++]=r,t}static _createHorizontalRangesFromClientRects(e,t,n){if(!e||e.length===0)return null;const r=[];for(let s=0,o=e.length;su)return null;if(t=Math.min(u,Math.max(0,t)),r=Math.min(u,Math.max(0,r)),t===r&&n===s&&n===0&&!e.children[t].firstChild){const g=e.children[t].getClientRects();return this._createHorizontalRangesFromClientRects(g,o,a)}t!==r&&r>0&&s===0&&(r--,s=1073741824);let d=e.children[t].firstChild,h=e.children[r].firstChild;if((!d||!h)&&(!d&&n===0&&t>0&&(d=e.children[t-1].firstChild,n=1073741824),!h&&s===0&&r>0&&(h=e.children[r-1].firstChild,s=1073741824)),!d||!h)return null;n=Math.min(d.textContent.length,Math.max(0,n)),s=Math.min(h.textContent.length,Math.max(0,s));const f=this._readClientRects(d,n,h,s,l);return this._createHorizontalRangesFromClientRects(f,o,a)}}const x4e=function(){return ec?!0:!(ws||ua||wl)}();let j_=!0;class tj{constructor(e,t){this._domNode=e,this._clientRectDeltaLeft=0,this._clientRectScale=1,this._clientRectRead=!1,this.endNode=t}readClientRect(){if(!this._clientRectRead){this._clientRectRead=!0;const e=this._domNode.getBoundingClientRect();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}}class nj{constructor(e,t){this.themeType=t;const n=e.options,r=n.get(44);this.renderWhitespace=n.get(88),this.renderControlCharacters=n.get(83),this.spaceWidth=r.spaceWidth,this.middotWidth=r.middotWidth,this.wsmiddotWidth=r.wsmiddotWidth,this.useMonospaceOptimizations=r.isMonospace&&!n.get(29),this.canUseHalfwidthRightwardsArrow=r.canUseHalfwidthRightwardsArrow,this.lineHeight=n.get(59),this.stopRenderingLineAfter=n.get(105),this.fontLigatures=n.get(45)}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 cu{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=Rn(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 this._options.themeType===kl.HIGH_CONTRAST||this._options.renderWhitespace==="selection"?(this._isMaybeInvalid=!0,!0):!1}renderLine(e,t,n,r){if(this._isMaybeInvalid===!1)return!1;this._isMaybeInvalid=!1;const s=n.getViewLineRenderingData(e),o=this._options,a=da.filter(s.inlineDecorations,e,s.minColumn,s.maxColumn);let l=null;if(o.themeType===kl.HIGH_CONTRAST||this._options.renderWhitespace==="selection"){const h=n.selections;for(const f of h){if(f.endLineNumbere)continue;const g=f.startLineNumber===e?f.startColumn:s.minColumn,p=f.endLineNumber===e?f.endColumn:s.maxColumn;g');const u=fS(c,r);r.appendASCIIString("");let d=null;return j_&&x4e&&s.isBasicASCII&&o.useMonospaceOptimizations&&u.containsForeignElements===0&&s.content.length<300&&c.lineTokens.getCount()<100&&(d=new XS(this._renderedViewLine?this._renderedViewLine.domNode:null,c,u.characterMapping)),d||(d=rj(this._renderedViewLine?this._renderedViewLine.domNode:null,c,u.characterMapping,u.containsRTL,u.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(){return this._renderedViewLine?this._renderedViewLine.getWidth():0}getWidthIsFast(){return this._renderedViewLine?this._renderedViewLine.getWidthIsFast():!0}needsMonospaceFontCheck(){return this._renderedViewLine?this._renderedViewLine instanceof XS:!1}monospaceAssumptionsAreValid(){return this._renderedViewLine&&this._renderedViewLine instanceof XS?this._renderedViewLine.monospaceAssumptionsAreValid():j_}onMonospaceAssumptionsInvalidated(){this._renderedViewLine&&this._renderedViewLine instanceof XS&&(this._renderedViewLine=this._renderedViewLine.toSlowRenderedLine())}getVisibleRangesForRange(e,t,n,r){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 s=this._renderedViewLine.input.stopRenderingLineAfter;let o=!1;s!==-1&&t>s+1&&n>s+1&&(o=!0),s!==-1&&t>s+1&&(t=s+1),s!==-1&&n>s+1&&(n=s+1);const a=this._renderedViewLine.getVisibleRangesForRange(e,t,n,r);return a&&a.length>0?new E4e(o,a):null}getColumnOfNodeOffset(e,t,n){return this._renderedViewLine?this._renderedViewLine.getColumnOfNodeOffset(e,t,n):1}}cu.CLASS_NAME="view-line";class XS{constructor(e,t,n){this.domNode=e,this.input=t,this._characterMapping=n,this._charWidth=t.spaceWidth}getWidth(){return Math.round(this._getCharPosition(this._characterMapping.length))}getWidthIsFast(){return!0}monospaceAssumptionsAreValid(){if(!this.domNode)return j_;const e=this.getWidth(),t=this.domNode.domNode.firstChild.offsetWidth;return Math.abs(e-t)>=2&&(console.warn("monospace assumptions have been violated, therefore disabling monospace optimizations!"),j_=!1),j_}toSlowRenderedLine(){return rj(this.domNode,this.input,this._characterMapping,!1,0)}getVisibleRangesForRange(e,t,n,r){const s=this._getCharPosition(t),o=this._getCharPosition(n);return[new U_(s,o-s)]}_getCharPosition(e){const t=this._characterMapping.getAbsoluteOffset(e);return this._charWidth*t}getColumnOfNodeOffset(e,t,n){const r=t.textContent.length;let s=-1;for(;t;)t=t.previousSibling,s++;return this._characterMapping.getColumn(new EI(s,n),r)}}class ij{constructor(e,t,n,r,s){if(this.domNode=e,this.input=t,this._characterMapping=n,this._isWhitespaceOnly=/^\s*$/.test(t.lineContent),this._containsForeignElements=s,this._cachedWidth=-1,this._pixelOffsetCache=null,!r||this._characterMapping.length===0){this._pixelOffsetCache=new Float32Array(Math.max(2,this._characterMapping.length+1));for(let o=0,a=this._characterMapping.length;o<=a;o++)this._pixelOffsetCache[o]=-1}}_getReadingTarget(e){return e.domNode.firstChild}getWidth(){return this.domNode?(this._cachedWidth===-1&&(this._cachedWidth=this._getReadingTarget(this.domNode).offsetWidth),this._cachedWidth):0}getWidthIsFast(){return this._cachedWidth!==-1}getVisibleRangesForRange(e,t,n,r){if(!this.domNode)return null;if(this._pixelOffsetCache!==null){const s=this._readPixelOffset(this.domNode,e,t,r);if(s===-1)return null;const o=this._readPixelOffset(this.domNode,e,n,r);return o===-1?null:[new U_(s,o-s)]}return this._readVisibleRangesForRange(this.domNode,e,t,n,r)}_readVisibleRangesForRange(e,t,n,r,s){if(n===r){const o=this._readPixelOffset(e,t,n,s);return o===-1?null:[new U_(o,0)]}else return this._readRawVisibleRangesForRange(e,n,r,s)}_readPixelOffset(e,t,n,r){if(this._characterMapping.length===0){if(this._containsForeignElements===0||this._containsForeignElements===2)return 0;if(this._containsForeignElements===1)return this.getWidth();const s=this._getReadingTarget(e);return s.firstChild?s.firstChild.offsetWidth:0}if(this._pixelOffsetCache!==null){const s=this._pixelOffsetCache[n];if(s!==-1)return s;const o=this._actualReadPixelOffset(e,t,n,r);return this._pixelOffsetCache[n]=o,o}return this._actualReadPixelOffset(e,t,n,r)}_actualReadPixelOffset(e,t,n,r){if(this._characterMapping.length===0){const l=S6.readHorizontalRanges(this._getReadingTarget(e),0,0,0,0,r.clientRectDeltaLeft,r.clientRectScale,r.endNode);return!l||l.length===0?-1:l[0].left}if(n===this._characterMapping.length&&this._isWhitespaceOnly&&this._containsForeignElements===0)return this.getWidth();const s=this._characterMapping.getDomPosition(n),o=S6.readHorizontalRanges(this._getReadingTarget(e),s.partIndex,s.charIndex,s.partIndex,s.charIndex,r.clientRectDeltaLeft,r.clientRectScale,r.endNode);if(!o||o.length===0)return-1;const a=o[0].left;if(this.input.isBasicASCII){const l=this._characterMapping.getAbsoluteOffset(n),c=Math.round(this.input.spaceWidth*l);if(Math.abs(c-a)<=1)return c}return a}_readRawVisibleRangesForRange(e,t,n,r){if(t===1&&n===this._characterMapping.length)return[new U_(0,this.getWidth())];const s=this._characterMapping.getDomPosition(t),o=this._characterMapping.getDomPosition(n);return S6.readHorizontalRanges(this._getReadingTarget(e),s.partIndex,s.charIndex,o.partIndex,o.charIndex,r.clientRectDeltaLeft,r.clientRectScale,r.endNode)}getColumnOfNodeOffset(e,t,n){const r=t.textContent.length;let s=-1;for(;t;)t=t.previousSibling,s++;return this._characterMapping.getColumn(new EI(s,n),r)}}class L4e extends ij{_readVisibleRangesForRange(e,t,n,r,s){const o=super._readVisibleRangesForRange(e,t,n,r,s);if(!o||o.length===0||n===r||n===1&&r===this._characterMapping.length)return o;if(!this.input.containsRTL){const a=this._readPixelOffset(e,t,r,s);if(a!==-1){const l=o[o.length-1];l.left=t){const d=t-o;return c-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 isChildOfOverflowingContentWidgets(e){return e.length>=1&&e[0]===2}static isChildOfOverlayWidgets(e){return e.length>=2&&e[0]===3&&e[1]===4}}class q_{constructor(e,t,n){this.viewModel=e.viewModel;const r=e.configuration.options;this.layoutInfo=r.get(131),this.viewDomNode=t.viewDomNode,this.lineHeight=r.get(59),this.stickyTabStops=r.get(104),this.typicalHalfwidthCharacterWidth=r.get(44).typicalHalfwidthCharacterWidth,this.lastRenderData=n,this._context=e,this._viewHelper=t}getZoneAtCoord(e){return q_.getZoneAtCoord(this._context,e)}static getZoneAtCoord(e,t){const n=e.viewLayout.getWhitespaceAtVerticalOffset(t);if(n){const r=n.verticalOffset+n.height/2,s=e.viewModel.getLineCount();let o=null,a,l=null;return n.afterLineNumber!==s&&(l=new ye(n.afterLineNumber+1,1)),n.afterLineNumber>0&&(o=new ye(n.afterLineNumber,e.viewModel.getLineMaxColumn(n.afterLineNumber))),l===null?a=o:o===null?a=l:t=e.layoutInfo.glyphMarginLeft,this.isInContentArea=!this.isInMarginArea,this.mouseColumn=Math.max(0,Es._getMouseColumn(this.mouseContentHorizontalOffset,e.typicalHalfwidthCharacterWidth))}}class E6 extends N4e{constructor(e,t,n,r,s){super(e,t,n,r),this._ctx=e,s?(this.target=s,this.targetPath=lu.collect(s,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.columno.contentLeft+o.width)continue;const a=e.getVerticalOffsetForLineNumber(o.position.lineNumber);if(a<=s&&s<=a+o.height)return t.fulfillContentText(o.position,null,{mightBeForeignElement:!1,injectedText:null})}}return null}static _hitTestViewZone(e,t){const n=e.getZoneAtCoord(t.mouseVerticalOffset);if(n){const r=t.isInContentArea?8:5;return t.fulfillViewZone(r,n.position,n)}return null}static _hitTestTextArea(e,t){return xl.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),r=n.range.getStartPosition();let s=Math.abs(t.relativePos.x);const o={isAfterLines:n.isAfterLines,glyphMarginLeft:e.layoutInfo.glyphMarginLeft,glyphMarginWidth:e.layoutInfo.glyphMarginWidth,lineNumbersWidth:e.layoutInfo.lineNumbersWidth,offsetX:s};return s-=e.layoutInfo.glyphMarginLeft,s<=e.layoutInfo.glyphMarginWidth?t.fulfillMargin(2,r,n.range,o):(s-=e.layoutInfo.glyphMarginWidth,s<=e.layoutInfo.lineNumbersWidth?t.fulfillMargin(3,r,n.range,o):(s-=e.layoutInfo.lineNumbersWidth,t.fulfillMargin(4,r,n.range,o)))}return null}static _hitTestViewLines(e,t,n){if(!xl.isChildOfViewLines(t.targetPath))return null;if(e.isInTopPadding(t.mouseVerticalOffset))return t.fulfillContentEmpty(new ye(1,1),sj);if(e.isAfterLines(t.mouseVerticalOffset)||e.isInBottomPadding(t.mouseVerticalOffset)){const s=e.viewModel.getLineCount(),o=e.viewModel.getLineMaxColumn(s);return t.fulfillContentEmpty(new ye(s,o),sj)}if(n){if(xl.isStrictChildOfViewLines(t.targetPath)){const s=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset);if(e.viewModel.getLineLength(s)===0){const a=e.getLineWidth(s),l=x6(t.mouseContentHorizontalOffset-a);return t.fulfillContentEmpty(new ye(s,1),l)}const o=e.getLineWidth(s);if(t.mouseContentHorizontalOffset>=o){const a=x6(t.mouseContentHorizontalOffset-o),l=new ye(s,e.viewModel.getLineMaxColumn(s));return t.fulfillContentEmpty(l,a)}}return t.fulfillUnknown()}const r=Es._doHitTest(e,t);return r.type===1?Es.createMouseTargetFromHitTestPosition(e,t,r.spanNode,r.position,r.injectedText):this._createMouseTarget(e,t.withTarget(r.hitTarget),!0)}static _hitTestMinimap(e,t){if(xl.isChildOfMinimap(t.targetPath)){const n=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset),r=e.viewModel.getLineMaxColumn(n);return t.fulfillScrollbar(new ye(n,r))}return null}static _hitTestScrollbarSlider(e,t){if(xl.isChildOfScrollableElement(t.targetPath)&&t.target&&t.target.nodeType===1){const n=t.target.className;if(n&&/\b(slider|scrollbar)\b/.test(n)){const r=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset),s=e.viewModel.getLineMaxColumn(r);return t.fulfillScrollbar(new ye(r,s))}}return null}static _hitTestScrollbar(e,t){if(xl.isChildOfScrollableElement(t.targetPath)){const n=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset),r=e.viewModel.getLineMaxColumn(n);return t.fulfillScrollbar(new ye(n,r))}return null}getMouseColumn(e){const t=this._context.configuration.options,n=t.get(131),r=this._context.viewLayout.getCurrentScrollLeft()+e.x-n.contentLeft;return Es._getMouseColumn(r,t.get(44).typicalHalfwidthCharacterWidth)}static _getMouseColumn(e,t){return e<0?1:Math.round(e/t)+1}static createMouseTargetFromHitTestPosition(e,t,n,r,s){const o=r.lineNumber,a=r.column,l=e.getLineWidth(o);if(t.mouseContentHorizontalOffset>l){const m=x6(t.mouseContentHorizontalOffset-l);return t.fulfillContentEmpty(r,m)}const c=e.visibleRangeForPosition(o,a);if(!c)return t.fulfillUnknown(r);const u=c.left;if(t.mouseContentHorizontalOffset===u)return t.fulfillContentText(r,null,{mightBeForeignElement:!!s,injectedText:s});const d=[];if(d.push({offset:c.left,column:a}),a>1){const m=e.visibleRangeForPosition(o,a-1);m&&d.push({offset:m.left,column:a-1})}const h=e.viewModel.getLineMaxColumn(o);if(am.offset-_.offset);const f=t.pos.toClientCoordinates(),g=n.getBoundingClientRect(),p=g.left<=f.clientX&&f.clientX<=g.right;for(let m=1;m=t.editorPos.y+t.editorPos.height&&(o=t.editorPos.y+t.editorPos.height-1);const a=new y6(t.pos.x,o),l=this._actualDoHitTestWithCaretRangeFromPoint(e,a.toClientCoordinates());return l.type===1?l:this._actualDoHitTestWithCaretRangeFromPoint(e,t.pos.toClientCoordinates())}static _actualDoHitTestWithCaretRangeFromPoint(e,t){const n=Oh(e.viewDomNode);let r;if(n?typeof n.caretRangeFromPoint>"u"?r=A4e(n,t.clientX,t.clientY):r=n.caretRangeFromPoint(t.clientX,t.clientY):r=document.caretRangeFromPoint(t.clientX,t.clientY),!r||!r.startContainer)return new Yh;const s=r.startContainer;if(s.nodeType===s.TEXT_NODE){const o=s.parentNode,a=o?o.parentNode:null,l=a?a.parentNode:null;return(l&&l.nodeType===l.ELEMENT_NODE?l.className:null)===cu.CLASS_NAME?ip.createFromDOMInfo(e,o,r.startOffset):new Yh(s.parentNode)}else if(s.nodeType===s.ELEMENT_NODE){const o=s.parentNode,a=o?o.parentNode:null;return(a&&a.nodeType===a.ELEMENT_NODE?a.className:null)===cu.CLASS_NAME?ip.createFromDOMInfo(e,s,s.textContent.length):new Yh(s)}return new Yh}static _doHitTestWithCaretPositionFromPoint(e,t){const n=document.caretPositionFromPoint(t.clientX,t.clientY);if(n.offsetNode.nodeType===n.offsetNode.TEXT_NODE){const r=n.offsetNode.parentNode,s=r?r.parentNode:null,o=s?s.parentNode:null;return(o&&o.nodeType===o.ELEMENT_NODE?o.className:null)===cu.CLASS_NAME?ip.createFromDOMInfo(e,n.offsetNode.parentNode,n.offset):new Yh(n.offsetNode.parentNode)}if(n.offsetNode.nodeType===n.offsetNode.ELEMENT_NODE){const r=n.offsetNode.parentNode,s=r&&r.nodeType===r.ELEMENT_NODE?r.className:null,o=r?r.parentNode:null,a=o&&o.nodeType===o.ELEMENT_NODE?o.className:null;if(s===cu.CLASS_NAME){const l=n.offsetNode.childNodes[Math.min(n.offset,n.offsetNode.childNodes.length-1)];if(l)return ip.createFromDOMInfo(e,l,0)}else if(a===cu.CLASS_NAME)return ip.createFromDOMInfo(e,n.offsetNode,0)}return new Yh(n.offsetNode)}static _snapToSoftTabBoundary(e,t){const n=t.getLineContent(e.lineNumber),{tabSize:r}=t.model.getOptions(),s=rv.atomicPosition(n,e.column-1,r,2);return s!==-1?new ye(e.lineNumber,s+1):e}static _doHitTest(e,t){let n=new Yh;if(typeof document.caretRangeFromPoint=="function"?n=this._doHitTestWithCaretRangeFromPoint(e,t):document.caretPositionFromPoint&&(n=this._doHitTestWithCaretPositionFromPoint(e,t.pos.toClientCoordinates())),n.type===1){const r=e.viewModel.getInjectedTextAt(n.position),s=e.viewModel.normalizePosition(n.position,2);(r||!s.equals(n.position))&&(n=new k6(s,n.spanNode,r))}return n.type===1&&e.stickyTabStops&&(n=new k6(this._snapToSoftTabBoundary(n.position,e.viewModel),n.spanNode,n.injectedText)),n}}function A4e(i,e,t){const n=document.createRange();let r=i.elementFromPoint(e,t);if(r!==null){for(;r&&r.firstChild&&r.firstChild.nodeType!==r.firstChild.TEXT_NODE&&r.lastChild&&r.lastChild.firstChild;)r=r.lastChild;const s=r.getBoundingClientRect(),o=window.getComputedStyle(r,null).getPropertyValue("font"),a=r.innerText;let l=s.left,c=0,u;if(e>s.left+s.width)c=a.length;else{const d=rp.getInstance();for(let h=0;hthis._createMouseTarget(o,a),o=>this._getMouseColumn(o))),this.lastMouseLeaveTime=-1,this._height=this._context.configuration.options.get(131).height;const r=new m4e(this.viewHelper.viewDomNode);this._register(r.onContextMenu(this.viewHelper.viewDomNode,o=>this._onContextMenu(o,!0))),this._register(r.onMouseMoveThrottled(this.viewHelper.viewDomNode,o=>this._onMouseMove(o),QS(this.mouseTargetFactory),sp.MOUSE_MOVE_MINIMUM_TIME)),this._register(r.onMouseUp(this.viewHelper.viewDomNode,o=>this._onMouseUp(o))),this._register(r.onMouseLeave(this.viewHelper.viewDomNode,o=>this._onMouseLeave(o))),this._register(r.onMouseDown(this.viewHelper.viewDomNode,o=>this._onMouseDown(o)));const s=o=>{if(this.viewController.emitMouseWheel(o),!this._context.configuration.options.get(68))return;const a=new T_(o);if(gn?(o.metaKey||o.ctrlKey)&&!o.shiftKey&&!o.altKey:o.ctrlKey&&!o.metaKey&&!o.shiftKey&&!o.altKey){const c=sd.getZoomLevel(),u=a.deltaY>0?1:-1;sd.setZoomLevel(c+u),a.preventDefault(),a.stopPropagation()}};this._register(Xe(this.viewHelper.viewDomNode,Nt.MOUSE_WHEEL,s,{capture:!0,passive:!1})),this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),super.dispose()}onConfigurationChanged(e){if(e.hasChanged(131)){const t=this._context.configuration.options.get(131).height;this._height!==t&&(this._height=t,this._mouseDownOperation.onHeightChanged())}return!1}onCursorStateChanged(e){return this._mouseDownOperation.onCursorStateChanged(e),!1}onFocusChanged(e){return!1}onScrollChanged(e){return this._mouseDownOperation.onScrollChanged(),!1}getTargetAtClientPoint(e,t){const r=new QU(e,t).toPageCoordinates(),s=JU(this.viewHelper.viewDomNode);if(r.ys.y+s.height||r.xs.x+s.width)return null;const o=ej(this.viewHelper.viewDomNode,s,r);return this.mouseTargetFactory.createMouseTarget(this.viewHelper.getLastRenderData(),s,r,o,null)}_createMouseTarget(e,t){let n=e.target;if(!this.viewHelper.viewDomNode.contains(n)){const r=Oh(this.viewHelper.viewDomNode);r&&(n=r.elementsFromPoint(e.posx,e.posy).find(s=>this.viewHelper.viewDomNode.contains(s)))}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._mouseDownOperation.isActive()||e.timestamp{e.preventDefault(),this.viewHelper.focusTextArea()};if(c&&(n||s&&o))u(),this._mouseDownOperation.start(t.type,e);else if(r)e.preventDefault();else if(a){const d=t.detail;this.viewHelper.shouldSuppressMouseDownOnViewZone(d.viewZoneId)&&(u(),this._mouseDownOperation.start(t.type,e),e.preventDefault())}else l&&this.viewHelper.shouldSuppressMouseDownOnWidget(t.detail)&&(u(),e.preventDefault());this.viewController.emitMouseDown({event:e,target:t})}}sp.MOUSE_MOVE_MINIMUM_TIME=100;class R4e extends Ne{constructor(e,t,n,r,s){super(),this._context=e,this._viewController=t,this._viewHelper=n,this._createMouseTarget=r,this._getMouseColumn=s,this._mouseMoveMonitor=this._register(new b4e(this._viewHelper.viewDomNode)),this._onScrollTimeout=this._register(new Wo),this._mouseState=new JS,this._currentSelection=new ut(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,!0);t&&(this._mouseState.isDragAndDrop?this._viewController.emitMouseDrag({event:e,target:t}):this._dispatchMouse(t,!0))}start(e,t){this._lastMouseEvent=t,this._mouseState.setStartedOnLineNumbers(e===3),this._mouseState.setStartButtons(t),this._mouseState.setModifiers(t);const n=this._findMousePosition(t,!0);if(!n||!n.position)return;this._mouseState.trySetCount(t.detail,n.position),t.detail=this._mouseState.count;const r=this._context.configuration.options;if(!r.get(81)&&r.get(31)&&!r.get(18)&&!this._mouseState.altKey&&t.detail<2&&!this._isActive&&!this._currentSelection.isEmpty()&&n.type===6&&n.position&&this._currentSelection.containsPosition(n.position)){this._mouseState.isDragAndDrop=!0,this._isActive=!0,this._mouseMoveMonitor.startMonitoring(t.target,t.buttons,QS(null),s=>this._onMouseDownThenMove(s),s=>{const o=this._findMousePosition(this._lastMouseEvent,!0);s&&s 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(n,t.shiftKey),this._isActive||(this._isActive=!0,this._mouseMoveMonitor.startMonitoring(t.target,t.buttons,QS(null),s=>this._onMouseDownThenMove(s),()=>this._stop()))}_stop(){this._isActive=!1,this._onScrollTimeout.cancel()}onHeightChanged(){this._mouseMoveMonitor.stopMonitoring()}onScrollChanged(){this._isActive&&this._onScrollTimeout.setIfNotSet(()=>{if(!this._lastMouseEvent)return;const e=this._findMousePosition(this._lastMouseEvent,!1);e&&(this._mouseState.isDragAndDrop||this._dispatchMouse(e,!0))},10)}onCursorStateChanged(e){this._currentSelection=e.selections[0]}_getPositionOutsideEditor(e){const t=e.editorPos,n=this._context.viewModel,r=this._context.viewLayout,s=this._getMouseColumn(e);if(e.posyt.y+t.height){const a=r.getCurrentScrollTop()+e.relativePos.y,l=q_.getZoneAtCoord(this._context,a);if(l){const u=this._helpPositionJumpOverViewZone(l);if(u)return bo.createOutsideEditor(s,u)}const c=r.getLineNumberAtVerticalOffset(a);return bo.createOutsideEditor(s,new ye(c,n.getLineMaxColumn(c)))}const o=r.getLineNumberAtVerticalOffset(r.getCurrentScrollTop()+e.relativePos.y);return e.posxt.x+t.width?bo.createOutsideEditor(s,new ye(o,n.getLineMaxColumn(o))):null}_findMousePosition(e,t){const n=this._getPositionOutsideEditor(e);if(n)return n;const r=this._createMouseTarget(e,t);if(!r.position)return null;if(r.type===8||r.type===5){const o=this._helpPositionJumpOverViewZone(r.detail);if(o)return bo.createViewZone(r.type,r.element,r.mouseColumn,o,r.detail)}return r}_helpPositionJumpOverViewZone(e){const t=new ye(this._currentSelection.selectionStartLineNumber,this._currentSelection.selectionStartColumn),n=e.positionBefore,r=e.positionAfter;return n&&r?n.isBefore(t)?n:r:null}_dispatchMouse(e,t){e.position&&this._viewController.dispatchMouse({position:e.position,mouseColumn:e.mouseColumn,startedOnLineNumbers:this._mouseState.startedOnLineNumbers,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 JS{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 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}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>JS.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)}}JS.CLEAR_MOUSE_DOWN_COUNT_TIME=400;var fc;(function(i){i.text="text/plain",i.binary="application/octet-stream",i.unknown="application/unknown",i.markdown="text/markdown",i.latex="text/latex",i.uriList="text/uri-list"})(fc||(fc={}));class xs{constructor(e,t,n,r,s){this.value=e,this.selectionStart=t,this.selectionEnd=n,this.selectionStartPosition=r,this.selectionEndPosition=s}toString(){return`[ <${this.value}>, selectionStart: ${this.selectionStart}, selectionEnd: ${this.selectionEnd}]`}static readFromTextArea(e){return new xs(e.getValue(),e.getSelectionStart(),e.getSelectionEnd(),null,null)}collapseSelection(){return new xs(this.value,this.value.length,this.value.length,null,null)}writeToTextArea(e,t,n){t.setValue(e,this.value),n&&t.setSelectionRange(e,this.selectionStart,this.selectionEnd)}deduceEditorPosition(e){if(e<=this.selectionStart){const r=this.value.substring(e,this.selectionStart);return this._finishDeduceEditorPosition(this.selectionStartPosition,r,-1)}if(e>=this.selectionEnd){const r=this.value.substring(this.selectionEnd,e);return this._finishDeduceEditorPosition(this.selectionEndPosition,r,1)}const t=this.value.substring(this.selectionStart,e);if(t.indexOf(String.fromCharCode(8230))===-1)return this._finishDeduceEditorPosition(this.selectionStartPosition,t,1);const n=this.value.substring(e,this.selectionEnd);return this._finishDeduceEditorPosition(this.selectionEndPosition,n,-1)}_finishDeduceEditorPosition(e,t,n){let r=0,s=-1;for(;(s=t.indexOf(` +`,s+1))!==-1;)r++;return[e,n*t.length,r]}static deduceInput(e,t,n){if(!e)return{text:"",replacePrevCharCnt:0,replaceNextCharCnt:0,positionDelta:0};const r=Math.min(f_(e.value,t.value),e.selectionStart,t.selectionStart),s=Math.min(qy(e.value,t.value),e.value.length-e.selectionEnd,t.value.length-t.selectionEnd);e.value.substring(r,e.value.length-s);const o=t.value.substring(r,t.value.length-s),a=e.selectionStart-r,l=e.selectionEnd-r,c=t.selectionStart-r,u=t.selectionEnd-r;if(c===u){const h=e.selectionStart-r;return{text:o,replacePrevCharCnt:h,replaceNextCharCnt:0,positionDelta:0}}const d=l-a;return{text:o,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(f_(e.value,t.value),e.selectionEnd),r=Math.min(qy(e.value,t.value),e.value.length-e.selectionEnd),s=e.value.substring(n,e.value.length-r),o=t.value.substring(n,t.value.length-r);e.selectionStart-n;const a=e.selectionEnd-n;t.selectionStart-n;const l=t.selectionEnd-n;return{text:o,replacePrevCharCnt:a,replaceNextCharCnt:s.length-a,positionDelta:l-o.length}}}xs.EMPTY=new xs("",0,0,null,null);class G_{static _getPageOfLine(e,t){return Math.floor((e-1)/t)}static _getRangeForPage(e,t){const n=e*t,r=n+1,s=n+t;return new H(r,1,s+1,1)}static fromEditorSelection(e,t,n,r,s){const o=G_._getPageOfLine(n.startLineNumber,r),a=G_._getRangeForPage(o,r),l=G_._getPageOfLine(n.endLineNumber,r),c=G_._getRangeForPage(l,r),u=a.intersectRanges(new H(1,1,n.startLineNumber,n.startColumn));let d=t.getValueInRange(u,1);const h=t.getLineCount(),f=t.getLineMaxColumn(h),g=c.intersectRanges(new H(n.endLineNumber,n.endColumn,h,f));let p=t.getValueInRange(g,1),m;if(o===l||o+1===l)m=t.getValueInRange(n,1);else{const _=a.intersectRanges(n),b=c.intersectRanges(n);m=t.getValueInRange(_,1)+String.fromCharCode(8230)+t.getValueInRange(b,1)}return s&&(d.length>500&&(d=d.substring(d.length-500,d.length)),p.length>500&&(p=p.substring(0,500)),m.length>2*500&&(m=m.substring(0,500)+String.fromCharCode(8230)+m.substring(m.length-500,m.length))),new xs(d+m+p,d.length,d.length+m.length,new ye(n.startLineNumber,n.startColumn),new ye(n.endLineNumber,n.endColumn))}}var ek;(function(i){i.Tap="-monaco-textarea-synthetic-tap"})(ek||(ek={}));const L6={forceCopyWithSyntaxHighlighting:!1};class sv{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)}}sv.INSTANCE=new sv;class O4e{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 M4e extends Ne{constructor(e,t,n,r){super(),this._host=e,this._textArea=t,this._OS=n,this._browser=r,this._onFocus=this._register(new be),this.onFocus=this._onFocus.event,this._onBlur=this._register(new be),this.onBlur=this._onBlur.event,this._onKeyDown=this._register(new be),this.onKeyDown=this._onKeyDown.event,this._onKeyUp=this._register(new be),this.onKeyUp=this._onKeyUp.event,this._onCut=this._register(new be),this.onCut=this._onCut.event,this._onPaste=this._register(new be),this.onPaste=this._onPaste.event,this._onType=this._register(new be),this.onType=this._onType.event,this._onCompositionStart=this._register(new be),this.onCompositionStart=this._onCompositionStart.event,this._onCompositionUpdate=this._register(new be),this.onCompositionUpdate=this._onCompositionUpdate.event,this._onCompositionEnd=this._register(new be),this.onCompositionEnd=this._onCompositionEnd.event,this._onSelectionChangeRequest=this._register(new be),this.onSelectionChangeRequest=this._onSelectionChangeRequest.event,this._asyncTriggerCut=this._register(new ri(()=>this._onCut.fire(),0)),this._asyncFocusGainWriteScreenReaderContent=this._register(new ri(()=>this.writeScreenReaderContent("asyncFocusGain"),0)),this._textAreaState=xs.EMPTY,this._selectionChangeListener=null,this.writeScreenReaderContent("ctor"),this._hasFocus=!1,this._currentComposition=null;let s=null;this._register(this._textArea.onKeyDown(o=>{const a=new ki(o);(a.keyCode===109||this._currentComposition&&a.keyCode===1)&&a.stopPropagation(),a.equals(9)&&a.preventDefault(),s=a,this._onKeyDown.fire(a)})),this._register(this._textArea.onKeyUp(o=>{const a=new ki(o);this._onKeyUp.fire(a)})),this._register(this._textArea.onCompositionStart(o=>{const a=new O4e;if(this._currentComposition){this._currentComposition=a;return}if(this._currentComposition=a,this._OS===2&&s&&s.equals(109)&&this._textAreaState.selectionStart===this._textAreaState.selectionEnd&&this._textAreaState.selectionStart>0&&this._textAreaState.value.substr(this._textAreaState.selectionStart-1,1)===o.data&&(s.code==="ArrowRight"||s.code==="ArrowLeft")){a.handleCompositionUpdate("x"),this._onCompositionStart.fire({data:o.data});return}if(this._browser.isAndroid){this._onCompositionStart.fire({data:o.data});return}this._onCompositionStart.fire({data:o.data})})),this._register(this._textArea.onCompositionUpdate(o=>{const a=this._currentComposition;if(!a)return;if(this._browser.isAndroid){const c=xs.readFromTextArea(this._textArea),u=xs.deduceAndroidCompositionInput(this._textAreaState,c);this._textAreaState=c,this._onType.fire(u),this._onCompositionUpdate.fire(o);return}const l=a.handleCompositionUpdate(o.data);this._textAreaState=xs.readFromTextArea(this._textArea),this._onType.fire(l),this._onCompositionUpdate.fire(o)})),this._register(this._textArea.onCompositionEnd(o=>{const a=this._currentComposition;if(!a)return;if(this._currentComposition=null,this._browser.isAndroid){const c=xs.readFromTextArea(this._textArea),u=xs.deduceAndroidCompositionInput(this._textAreaState,c);this._textAreaState=c,this._onType.fire(u),this._onCompositionEnd.fire();return}const l=a.handleCompositionUpdate(o.data);this._textAreaState=xs.readFromTextArea(this._textArea),this._onType.fire(l),this._onCompositionEnd.fire()})),this._register(this._textArea.onInput(o=>{if(this._textArea.setIgnoreSelectionChangeTime("received input event"),this._currentComposition)return;const a=xs.readFromTextArea(this._textArea),l=xs.deduceInput(this._textAreaState,a,this._OS===2);l.replacePrevCharCnt===0&&l.text.length===1&&Tr(l.text.charCodeAt(0))||(this._textAreaState=a,(l.text!==""||l.replacePrevCharCnt!==0||l.replaceNextCharCnt!==0||l.positionDelta!==0)&&this._onType.fire(l))})),this._register(this._textArea.onCut(o=>{this._textArea.setIgnoreSelectionChangeTime("received cut event"),this._ensureClipboardGetsEditorSelection(o),this._asyncTriggerCut.schedule()})),this._register(this._textArea.onCopy(o=>{this._ensureClipboardGetsEditorSelection(o)})),this._register(this._textArea.onPaste(o=>{if(this._textArea.setIgnoreSelectionChangeTime("received paste event"),o.preventDefault(),!o.clipboardData)return;let[a,l]=oj.getTextData(o.clipboardData);a&&(l=l||sv.INSTANCE.get(a),this._onPaste.fire({text:a,metadata:l}))})),this._register(this._textArea.onFocus(()=>{const o=this._hasFocus;this._setHasFocus(!0),this._browser.isSafari&&!o&&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 Xe(document,"selectionchange",t=>{if(!this._hasFocus||this._currentComposition||!this._browser.isChrome)return;const n=Date.now(),r=n-e;if(e=n,r<5)return;const s=n-this._textArea.getIgnoreSelectionChangeTime();if(this._textArea.resetSelectionChangeTime(),s<100||!this._textAreaState.selectionStartPosition||!this._textAreaState.selectionEndPosition)return;const o=this._textArea.getValue();if(this._textAreaState.value!==o)return;const a=this._textArea.getSelectionStart(),l=this._textArea.getSelectionEnd();if(this._textAreaState.selectionStart===a&&this._textAreaState.selectionEnd===l)return;const c=this._textAreaState.deduceEditorPosition(a),u=this._host.deduceModelPosition(c[0],c[1],c[2]),d=this._textAreaState.deduceEditorPosition(l),h=this._host.deduceModelPosition(d[0],d[1],d[2]),f=new ut(u.lineNumber,u.column,h.lineNumber,h.column);this._onSelectionChangeRequest.fire(f)})}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(this._textAreaState))}_ensureClipboardGetsEditorSelection(e){const t=this._host.getDataToCopy(),n={version:1,isFromEmptySelection:t.isFromEmptySelection,multicursorText:t.multicursorText,mode:t.mode};sv.INSTANCE.set(this._browser.isFirefox?t.text.replace(/\r\n/g,` +`):t.text,n),e.preventDefault(),e.clipboardData&&oj.setTextData(e.clipboardData,t.text,t.html,n)}}class oj{static getTextData(e){const t=e.getData(fc.text);let n=null;const r=e.getData("vscode-editor-data");if(typeof r=="string")try{n=JSON.parse(r),n.version!==1&&(n=null)}catch{}return[t,n]}static setTextData(e,t,n,r){e.setData(fc.text,t),typeof n=="string"&&e.setData("text/html",n),e.setData("vscode-editor-data",JSON.stringify(r))}}class P4e extends Ne{constructor(e){super(),this._actual=e,this.onKeyDown=this._register(uc(this._actual,"keydown")).event,this.onKeyUp=this._register(uc(this._actual,"keyup")).event,this.onCompositionStart=this._register(uc(this._actual,"compositionstart")).event,this.onCompositionUpdate=this._register(uc(this._actual,"compositionupdate")).event,this.onCompositionEnd=this._register(uc(this._actual,"compositionend")).event,this.onInput=this._register(uc(this._actual,"input")).event,this.onCut=this._register(uc(this._actual,"cut")).event,this.onCopy=this._register(uc(this._actual,"copy")).event,this.onPaste=this._register(uc(this._actual,"paste")).event,this.onFocus=this._register(uc(this._actual,"focus")).event,this.onBlur=this._register(uc(this._actual,"blur")).event,this._onSyntheticTap=this._register(new be),this.onSyntheticTap=this._onSyntheticTap.event,this._ignoreSelectionChangeTime=0,this._register(Xe(this._actual,ek.Tap,()=>this._onSyntheticTap.fire()))}hasFocus(){const e=Oh(this._actual);return e?e.activeElement===this._actual:MI(this._actual)?document.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 r=this._actual;let s=null;const o=Oh(r);o?s=o.activeElement:s=document.activeElement;const a=s===r,l=r.selectionStart,c=r.selectionEnd;if(a&&l===t&&c===n){ua&&window.parent!==window&&r.focus();return}if(a){this.setIgnoreSelectionChangeTime("setSelectionRange"),r.setSelectionRange(t,n),ua&&window.parent!==window&&r.focus();return}try{const u=aSe(r);this.setIgnoreSelectionChangeTime("setSelectionRange"),r.focus(),r.setSelectionRange(t,n),lSe(r,u)}catch{}}}class F4e extends sp{constructor(e,t,n){super(e,t,n),this._register(ei.addTarget(this.viewHelper.linesContentDomNode)),this._register(Xe(this.viewHelper.linesContentDomNode,bi.Tap,s=>this.onTap(s))),this._register(Xe(this.viewHelper.linesContentDomNode,bi.Change,s=>this.onChange(s))),this._register(Xe(this.viewHelper.linesContentDomNode,bi.Contextmenu,s=>this._onContextMenu(new np(s,this.viewHelper.viewDomNode),!1))),this._lastPointerType="mouse",this._register(Xe(this.viewHelper.linesContentDomNode,"pointerdown",s=>{const o=s.pointerType;if(o==="mouse"){this._lastPointerType="mouse";return}else o==="touch"?this._lastPointerType="touch":this._lastPointerType="pen"}));const r=new _4e(this.viewHelper.viewDomNode);this._register(r.onPointerMoveThrottled(this.viewHelper.viewDomNode,s=>this._onMouseMove(s),QS(this.mouseTargetFactory),sp.MOUSE_MOVE_MINIMUM_TIME)),this._register(r.onPointerUp(this.viewHelper.viewDomNode,s=>this._onMouseUp(s))),this._register(r.onPointerLeave(this.viewHelper.viewDomNode,s=>this._onMouseLeave(s))),this._register(r.onPointerDown(this.viewHelper.viewDomNode,s=>this._onMouseDown(s)))}onTap(e){if(!e.initialTarget||!this.viewHelper.linesContentDomNode.contains(e.initialTarget))return;e.preventDefault(),this.viewHelper.focusTextArea();const t=this._createMouseTarget(new np(e,this.viewHelper.viewDomNode),!1);t.position&&this.viewController.dispatchMouse({position:t.position,mouseColumn:t.position.column,startedOnLineNumbers:!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){e.browserEvent.pointerType!=="touch"&&super._onMouseDown(e)}}class B4e extends sp{constructor(e,t,n){super(e,t,n),this._register(ei.addTarget(this.viewHelper.linesContentDomNode)),this._register(Xe(this.viewHelper.linesContentDomNode,bi.Tap,r=>this.onTap(r))),this._register(Xe(this.viewHelper.linesContentDomNode,bi.Change,r=>this.onChange(r))),this._register(Xe(this.viewHelper.linesContentDomNode,bi.Contextmenu,r=>this._onContextMenu(new np(r,this.viewHelper.viewDomNode),!1)))}onTap(e){e.preventDefault(),this.viewHelper.focusTextArea();const t=this._createMouseTarget(new np(e,this.viewHelper.viewDomNode),!1);if(t.position){const n=document.createEvent("CustomEvent");n.initEvent(ek.Tap,!1,!0),this.viewHelper.dispatchTextAreaEvent(n),this.viewController.moveTo(t.position)}}onChange(e){this._context.viewModel.viewLayout.deltaScrollNow(-e.translationX,-e.translationY)}}class V4e extends Ne{constructor(e,t,n){super(),tc&&_S.pointerEvents?this.handler=this._register(new F4e(e,t,n)):window.TouchEvent?this.handler=this._register(new B4e(e,t,n)):this.handler=this._register(new sp(e,t,n))}getTargetAtClientPoint(e,t){return this.handler.getTargetAtClientPoint(e,t)}}const Ygt="",Zgt="";class K_ extends iv{}const W4e=oe("editor.lineHighlightBackground",{dark:null,light:null,hc:null},C("lineHighlight","Background color for the highlight of line at the cursor position.")),aj=oe("editor.lineHighlightBorder",{dark:"#282828",light:"#eeeeee",hc:"#f38518"},C("lineHighlightBorderBox","Background color for the border around the line at the cursor position.")),H4e=oe("editor.rangeHighlightBackground",{dark:"#ffffff0b",light:"#fdff0033",hc:null},C("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),z4e=oe("editor.rangeHighlightBorder",{dark:null,light:null,hc:Fs},C("rangeHighlightBorder","Background color of the border around highlighted ranges."),!0),$4e=oe("editor.symbolHighlightBackground",{dark:jh,light:jh,hc:null},C("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),U4e=oe("editor.symbolHighlightBorder",{dark:null,light:null,hc:Fs},C("symbolHighlightBorder","Background color of the border around highlighted symbols."),!0),lj=oe("editorCursor.foreground",{dark:"#AEAFAD",light:Ie.black,hc:Ie.white},C("caret","Color of the editor cursor.")),j4e=oe("editorCursor.background",null,C("editorCursorBackground","The background color of the editor cursor. Allows customizing the color of a character overlapped by a block cursor.")),op=oe("editorWhitespace.foreground",{dark:"#e3e4e229",light:"#33333333",hc:"#e3e4e229"},C("editorWhitespaces","Color of whitespace characters in the editor.")),tk=oe("editorIndentGuide.background",{dark:op,light:op,hc:op},C("editorIndentGuides","Color of the editor indentation guides.")),nk=oe("editorIndentGuide.activeBackground",{dark:op,light:op,hc:op},C("editorActiveIndentGuide","Color of the active editor indentation guides.")),cj=oe("editorLineNumber.foreground",{dark:"#858585",light:"#237893",hc:Ie.white},C("editorLineNumbers","Color of editor line numbers.")),T6=oe("editorActiveLineNumber.foreground",{dark:"#c6c6c6",light:"#0B216F",hc:Fs},C("editorActiveLineNumber","Color of editor active line number"),!1,C("deprecatedEditorActiveLineNumber","Id is deprecated. Use 'editorLineNumber.activeForeground' instead.")),q4e=oe("editorLineNumber.activeForeground",{dark:T6,light:T6,hc:T6},C("editorActiveLineNumber","Color of editor active line number")),G4e=oe("editorRuler.foreground",{dark:"#5A5A5A",light:Ie.lightgrey,hc:Ie.white},C("editorRuler","Color of the editor rulers."));oe("editorCodeLens.foreground",{dark:"#999999",light:"#919191",hc:"#999999"},C("editorCodeLensForeground","Foreground color of editor CodeLens"));const K4e=oe("editorBracketMatch.background",{dark:"#0064001a",light:"#0064001a",hc:"#0064001a"},C("editorBracketMatchBackground","Background color behind matching brackets")),uj=oe("editorBracketMatch.border",{dark:"#888",light:"#B9B9B9",hc:Ai},C("editorBracketMatchBorder","Color for matching brackets boxes")),Y4e=oe("editorOverviewRuler.border",{dark:"#7f7f7f4d",light:"#7f7f7f4d",hc:"#7f7f7f4d"},C("editorOverviewRulerBorder","Color of the overview ruler border.")),Z4e=oe("editorOverviewRuler.background",null,C("editorOverviewRulerBackground","Background color of the editor overview ruler. Only used when the minimap is enabled and placed on the right side of the editor.")),X4e=oe("editorGutter.background",{dark:_o,light:_o,hc:_o},C("editorGutter","Background color of the editor gutter. The gutter contains the glyph margins and the line numbers.")),Q4e=oe("editorUnnecessaryCode.border",{dark:null,light:null,hc:Ie.fromHex("#fff").transparent(.8)},C("unnecessaryCodeBorder","Border color of unnecessary (unused) source code in the editor.")),J4e=oe("editorUnnecessaryCode.opacity",{dark:Ie.fromHex("#000a"),light:Ie.fromHex("#0007"),hc:null},C("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.`)),e3e=oe("editorGhostText.border",{dark:null,light:null,hc:Ie.fromHex("#fff").transparent(.8)},C("editorGhostTextBorder","Border color of ghost text in the editor.")),t3e=oe("editorGhostText.foreground",{dark:Ie.fromHex("#ffffff56"),light:Ie.fromHex("#0007"),hc:null},C("editorGhostTextForeground","Foreground color of the ghost text in the editor.")),n3e=oe("editorGhostText.background",{dark:null,light:null,hc:null},C("editorGhostTextBackground","Background color of the ghost text in the editor.")),I6=new Ie(new kn(0,122,204,.6)),i3e=oe("editorOverviewRuler.rangeHighlightForeground",{dark:I6,light:I6,hc:I6},C("overviewRulerRangeHighlight","Overview ruler marker color for range highlights. The color must not be opaque so as not to hide underlying decorations."),!0),r3e=oe("editorOverviewRuler.errorForeground",{dark:new Ie(new kn(255,18,18,.7)),light:new Ie(new kn(255,18,18,.7)),hc:new Ie(new kn(255,50,50,1))},C("overviewRuleError","Overview ruler marker color for errors.")),s3e=oe("editorOverviewRuler.warningForeground",{dark:El,light:El,hc:US},C("overviewRuleWarning","Overview ruler marker color for warnings.")),o3e=oe("editorOverviewRuler.infoForeground",{dark:ma,light:ma,hc:u6},C("overviewRuleInfo","Overview ruler marker color for infos.")),dj=oe("editorBracketHighlight.foreground1",{dark:"#FFD700",light:"#0431FAFF",hc:"#FFD700"},C("editorBracketHighlightForeground1","Foreground color of brackets (1). Requires enabling bracket pair colorization.")),hj=oe("editorBracketHighlight.foreground2",{dark:"#DA70D6",light:"#319331FF",hc:"#DA70D6"},C("editorBracketHighlightForeground2","Foreground color of brackets (2). Requires enabling bracket pair colorization.")),fj=oe("editorBracketHighlight.foreground3",{dark:"#179FFF",light:"#7B3814FF",hc:"#87CEFA"},C("editorBracketHighlightForeground3","Foreground color of brackets (3). Requires enabling bracket pair colorization.")),gj=oe("editorBracketHighlight.foreground4",{dark:"#00000000",light:"#00000000",hc:"#00000000"},C("editorBracketHighlightForeground4","Foreground color of brackets (4). Requires enabling bracket pair colorization.")),pj=oe("editorBracketHighlight.foreground5",{dark:"#00000000",light:"#00000000",hc:"#00000000"},C("editorBracketHighlightForeground5","Foreground color of brackets (5). Requires enabling bracket pair colorization.")),mj=oe("editorBracketHighlight.foreground6",{dark:"#00000000",light:"#00000000",hc:"#00000000"},C("editorBracketHighlightForeground6","Foreground color of brackets (6). Requires enabling bracket pair colorization.")),a3e=oe("editorBracketHighlight.unexpectedBracket.foreground",{dark:new Ie(new kn(255,18,18,.8)),light:new Ie(new kn(255,18,18,.8)),hc:new Ie(new kn(255,50,50,1))},C("editorBracketHighlightUnexpectedBracketForeground","Foreground color of unexpected brackets.")),l3e=oe("editorBracketPairGuide.background1",{dark:"#00000000",light:"#00000000",hc:"#00000000"},C("editorBracketPairGuide.background1","Background color of inactive bracket pair guides (1). Requires enabling bracket pair guides.")),c3e=oe("editorBracketPairGuide.background2",{dark:"#00000000",light:"#00000000",hc:"#00000000"},C("editorBracketPairGuide.background2","Background color of inactive bracket pair guides (2). Requires enabling bracket pair guides.")),u3e=oe("editorBracketPairGuide.background3",{dark:"#00000000",light:"#00000000",hc:"#00000000"},C("editorBracketPairGuide.background3","Background color of inactive bracket pair guides (3). Requires enabling bracket pair guides.")),d3e=oe("editorBracketPairGuide.background4",{dark:"#00000000",light:"#00000000",hc:"#00000000"},C("editorBracketPairGuide.background4","Background color of inactive bracket pair guides (4). Requires enabling bracket pair guides.")),h3e=oe("editorBracketPairGuide.background5",{dark:"#00000000",light:"#00000000",hc:"#00000000"},C("editorBracketPairGuide.background5","Background color of inactive bracket pair guides (5). Requires enabling bracket pair guides.")),f3e=oe("editorBracketPairGuide.background6",{dark:"#00000000",light:"#00000000",hc:"#00000000"},C("editorBracketPairGuide.background6","Background color of inactive bracket pair guides (6). Requires enabling bracket pair guides.")),g3e=oe("editorBracketPairGuide.activeBackground1",{dark:"#00000000",light:"#00000000",hc:"#00000000"},C("editorBracketPairGuide.activeBackground1","Background color of active bracket pair guides (1). Requires enabling bracket pair guides.")),p3e=oe("editorBracketPairGuide.activeBackground2",{dark:"#00000000",light:"#00000000",hc:"#00000000"},C("editorBracketPairGuide.activeBackground2","Background color of active bracket pair guides (2). Requires enabling bracket pair guides.")),m3e=oe("editorBracketPairGuide.activeBackground3",{dark:"#00000000",light:"#00000000",hc:"#00000000"},C("editorBracketPairGuide.activeBackground3","Background color of active bracket pair guides (3). Requires enabling bracket pair guides.")),_3e=oe("editorBracketPairGuide.activeBackground4",{dark:"#00000000",light:"#00000000",hc:"#00000000"},C("editorBracketPairGuide.activeBackground4","Background color of active bracket pair guides (4). Requires enabling bracket pair guides.")),b3e=oe("editorBracketPairGuide.activeBackground5",{dark:"#00000000",light:"#00000000",hc:"#00000000"},C("editorBracketPairGuide.activeBackground5","Background color of active bracket pair guides (5). Requires enabling bracket pair guides.")),v3e=oe("editorBracketPairGuide.activeBackground6",{dark:"#00000000",light:"#00000000",hc:"#00000000"},C("editorBracketPairGuide.activeBackground6","Background color of active bracket pair guides (6). Requires enabling bracket pair guides."));oe("editorUnicodeHighlight.border",{dark:"#BD9B03",light:"#CEA33D",hc:"#ff0000"},C("editorUnicodeHighlight.border","Border color used to highlight unicode characters.")),_i((i,e)=>{const t=i.getColor(_o);t&&e.addRule(`.monaco-editor, .monaco-editor-background, .monaco-editor .inputarea.ime-input { background-color: ${t}; }`);const n=i.getColor($h);n&&e.addRule(`.monaco-editor, .monaco-editor .inputarea.ime-input { color: ${n}; }`);const r=i.getColor(X4e);r&&e.addRule(`.monaco-editor .margin { background-color: ${r}; }`);const s=i.getColor(H4e);s&&e.addRule(`.monaco-editor .rangeHighlight { background-color: ${s}; }`);const o=i.getColor(z4e);o&&e.addRule(`.monaco-editor .rangeHighlight { border: 1px ${i.type==="hc"?"dotted":"solid"} ${o}; }`);const a=i.getColor($4e);a&&e.addRule(`.monaco-editor .symbolHighlight { background-color: ${a}; }`);const l=i.getColor(U4e);l&&e.addRule(`.monaco-editor .symbolHighlight { border: 1px ${i.type==="hc"?"dotted":"solid"} ${l}; }`);const c=i.getColor(op);c&&(e.addRule(`.monaco-editor .mtkw { color: ${c} !important; }`),e.addRule(`.monaco-editor .mtkz { color: ${c} !important; }`))});class Y_ extends K_{constructor(e){super(),this._context=e,this._readConfig(),this._lastCursorModelPosition=new ye(1,1),this._renderResult=null,this._activeLineNumber=1,this._context.addEventHandler(this)}_readConfig(){const e=this._context.configuration.options;this._lineHeight=e.get(59);const t=e.get(60);this._renderLineNumbers=t.renderType,this._renderCustomLineNumbers=t.renderFn,this._renderFinalNewline=e.get(84);const n=e.get(131);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 ye(e,1));if(t.column!==1)return"";const n=t.lineNumber;if(this._renderCustomLineNumbers)return this._renderCustomLineNumbers(n);if(this._renderLineNumbers===2){const r=Math.abs(this._lastCursorModelPosition.lineNumber-n);return r===0?''+n+"":String(r)}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=ws?this._lineHeight%2===0?" lh-even":" lh-odd":"",n=e.visibleRange.startLineNumber,r=e.visibleRange.endLineNumber,s='
',o=this._context.viewModel.getLineCount(),a=[];for(let l=n;l<=r;l++){const c=l-n;if(!this._renderFinalNewline&&l===o&&this._context.viewModel.getLineLength(l)===0){a[c]="";continue}const u=this._getLineRenderLineNumber(l);u?l===this._activeLineNumber?a[c]='
'+u+"
":a[c]=s+u+"
":a[c]=""}this._renderResult=a}render(e,t){if(!this._renderResult)return"";const n=t-e;return n<0||n>=this._renderResult.length?"":this._renderResult[n]}}Y_.CLASS_NAME="line-numbers",_i((i,e)=>{const t=i.getColor(cj);t&&e.addRule(`.monaco-editor .line-numbers { color: ${t}; }`);const n=i.getColor(q4e);n&&e.addRule(`.monaco-editor .line-numbers.active-line-number { color: ${n}; }`)});class ap extends Qa{constructor(e){super(e);const t=this._context.configuration.options,n=t.get(131);this._canUseLayerHinting=!t.get(28),this._contentLeft=n.contentLeft,this._glyphMarginLeft=n.glyphMarginLeft,this._glyphMarginWidth=n.glyphMarginWidth,this._domNode=Rn(document.createElement("div")),this._domNode.setClassName(ap.OUTER_CLASS_NAME),this._domNode.setPosition("absolute"),this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true"),this._glyphMarginBackgroundDomNode=Rn(document.createElement("div")),this._glyphMarginBackgroundDomNode.setClassName(ap.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(131);return this._canUseLayerHinting=!t.get(28),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)}}ap.CLASS_NAME="glyph-margin",ap.OUTER_CLASS_NAME="margin";const Xgt="",lp="monaco-mouse-cursor-text";class w3e{constructor(e,t,n,r,s){this._context=e,this.modelLineNumber=t,this.distanceToModelLineStart=n,this.widthOfHiddenLineTextBefore=r,this.distanceToModelLineEnd=s,this._visibleTextAreaBrand=void 0,this.startPosition=null,this.endPosition=null,this.visibleTextareaStart=null,this.visibleTextareaEnd=null,this._previousPresentation=null}prepareRender(e){const t=new ye(this.modelLineNumber,this.distanceToModelLineStart+1),n=new ye(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 ov=ua;class C3e extends Qa{constructor(e,t,n){super(e),this._primaryCursorPosition=new ye(1,1),this._primaryCursorVisibleRange=null,this._viewController=t,this._visibleRangeProvider=n,this._scrollLeft=0,this._scrollTop=0;const r=this._context.configuration.options,s=r.get(131);this._setAccessibilityOptions(r),this._contentLeft=s.contentLeft,this._contentWidth=s.contentWidth,this._contentHeight=s.height,this._fontInfo=r.get(44),this._lineHeight=r.get(59),this._emptySelectionClipboard=r.get(32),this._copyWithSyntaxHighlighting=r.get(21),this._visibleTextArea=null,this._selections=[new ut(1,1,1,1)],this._modelSelections=[new ut(1,1,1,1)],this._lastRenderPosition=null,this.textArea=Rn(document.createElement("textarea")),lu.write(this.textArea,6),this.textArea.setClassName(`inputarea ${lp}`),this.textArea.setAttribute("wrap","off"),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("tabindex",String(r.get(112))),this.textArea.setAttribute("role","textbox"),this.textArea.setAttribute("aria-roledescription",C("editor","editor")),this.textArea.setAttribute("aria-multiline","true"),this.textArea.setAttribute("aria-haspopup","false"),this.textArea.setAttribute("aria-autocomplete","both"),r.get(30)&&r.get(81)&&this.textArea.setAttribute("readonly","true"),this.textAreaCover=Rn(document.createElement("div")),this.textAreaCover.setPosition("absolute");const o={getLineCount:()=>this._context.viewModel.getLineCount(),getLineMaxColumn:c=>this._context.viewModel.getLineMaxColumn(c),getValueInRange:(c,u)=>this._context.viewModel.getValueInRange(c,u)},a={getDataToCopy:()=>{const c=this._context.viewModel.getPlainTextToCopy(this._modelSelections,this._emptySelectionClipboard,Gr),u=this._context.viewModel.model.getEOL(),d=this._emptySelectionClipboard&&this._modelSelections.length===1&&this._modelSelections[0].isEmpty(),h=Array.isArray(c)?c:null,f=Array.isArray(c)?c.join(u):c;let g,p=null;if(L6.forceCopyWithSyntaxHighlighting||this._copyWithSyntaxHighlighting&&f.length<65536){const m=this._context.viewModel.getRichTextToCopy(this._modelSelections,this._emptySelectionClipboard);m&&(g=m.html,p=m.mode)}return{isFromEmptySelection:d,multicursorText:h,text:f,html:g,mode:p}},getScreenReaderContent:c=>{if(this._accessibilitySupport===1){if(gn){const u=this._selections[0];if(u.isEmpty()){const d=u.getStartPosition();let h=this._getWordBeforePosition(d);if(h.length===0&&(h=this._getCharacterBeforePosition(d)),h.length>0)return new xs(h,h.length,h.length,d,d)}}return xs.EMPTY}if(zz){const u=this._selections[0];if(u.isEmpty()){const d=u.getStartPosition(),[h,f]=this._getAndroidWordAtPosition(d);if(h.length>0)return new xs(h,f,f,d,d)}return xs.EMPTY}return G_.fromEditorSelection(c,o,this._selections[0],this._accessibilityPageSize,this._accessibilitySupport===0)},deduceModelPosition:(c,u,d)=>this._context.viewModel.deduceModelPositionRelativeToViewPosition(c,u,d)},l=this._register(new P4e(this.textArea.domNode));this._textAreaInput=this._register(new M4e(a,l,Pa,VCe)),this._register(this._textAreaInput.onKeyDown(c=>{this._viewController.emitKeyDown(c)})),this._register(this._textAreaInput.onKeyUp(c=>{this._viewController.emitKeyUp(c)})),this._register(this._textAreaInput.onPaste(c=>{let u=!1,d=null,h=null;c.metadata&&(u=this._emptySelectionClipboard&&!!c.metadata.isFromEmptySelection,d=typeof c.metadata.multicursorText<"u"?c.metadata.multicursorText:null,h=c.metadata.mode),this._viewController.paste(c.text,u,d,h)})),this._register(this._textAreaInput.onCut(()=>{this._viewController.cut()})),this._register(this._textAreaInput.onType(c=>{c.replacePrevCharCnt||c.replaceNextCharCnt||c.positionDelta?this._viewController.compositionType(c.text,c.replacePrevCharCnt,c.replaceNextCharCnt,c.positionDelta):this._viewController.type(c.text)})),this._register(this._textAreaInput.onSelectionChangeRequest(c=>{this._viewController.setSelection(c)})),this._register(this._textAreaInput.onCompositionStart(c=>{const u=this.textArea.domNode,d=this._modelSelections[0],{distanceToModelLineStart:h,widthOfHiddenTextBefore:f}=(()=>{const p=u.value.substring(0,Math.min(u.selectionStart,u.selectionEnd)),m=p.lastIndexOf(` +`),_=p.substring(m+1),b=_.lastIndexOf(" "),v=_.length-b-1,w=d.getStartPosition(),E=Math.min(w.column-1,v),I=w.column-1-E,x=_.substring(0,_.length-E),T=y3e(x,this._fontInfo);return{distanceToModelLineStart:I,widthOfHiddenTextBefore:T}})(),{distanceToModelLineEnd:g}=(()=>{const p=u.value.substring(Math.max(u.selectionStart,u.selectionEnd)),m=p.indexOf(` +`),_=m===-1?p:p.substring(0,m),b=_.indexOf(" "),v=b===-1?_.length:_.length-b-1,w=d.getEndPosition(),E=Math.min(this._context.viewModel.model.getLineMaxColumn(w.lineNumber)-w.column,v);return{distanceToModelLineEnd:this._context.viewModel.model.getLineMaxColumn(w.lineNumber)-w.column-E}})();this._context.viewModel.revealRange("keyboard",!0,H.fromPositions(this._selections[0].getStartPosition()),0,1),this._visibleTextArea=new w3e(this._context,d.startLineNumber,h,f,g),this._visibleTextArea.prepareRender(this._visibleRangeProvider),this._render(),this.textArea.setClassName(`inputarea ${lp} ime-input`),this._viewController.compositionStart(),this._context.viewModel.onCompositionStart()})),this._register(this._textAreaInput.onCompositionUpdate(c=>{this._visibleTextArea&&(this._visibleTextArea.prepareRender(this._visibleRangeProvider),this._render())})),this._register(this._textAreaInput.onCompositionEnd(()=>{this._visibleTextArea=null,this._render(),this.textArea.setClassName(`inputarea ${lp}`),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)}))}dispose(){super.dispose()}_getAndroidWordAtPosition(e){const t='`~!@#$%^&*()-=+[{]}\\|;:",.<>/?',n=this._context.viewModel.getLineContent(e.lineNumber),r=qa(t);let s=!0,o=e.column,a=!0,l=e.column,c=0;for(;c<50&&(s||a);){if(s&&o<=1&&(s=!1),s){const u=n.charCodeAt(o-2);r.get(u)!==0?s=!1:o--}if(a&&l>n.length&&(a=!1),a){const u=n.charCodeAt(l-1);r.get(u)!==0?a=!1:l++}c++}return[n.substring(o-1,l-1),e.column-o]}_getWordBeforePosition(e){const t=this._context.viewModel.getLineContent(e.lineNumber),n=qa(this._context.configuration.options.get(117));let r=e.column,s=0;for(;r>1;){const o=t.charCodeAt(r-2);if(n.get(o)!==0||s>50)return t.substring(r-1,e.column-1);s++,r--}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(!Tr(n.charCodeAt(0)))return n}return""}_getAriaLabel(e){return e.get(2)===1?C("accessibilityOffAriaLabel","The editor is not accessible at this time. Press {0} for options.",ws?"Shift+Alt+F1":"Alt+F1"):e.get(4)}_setAccessibilityOptions(e){this._accessibilitySupport=e.get(2);const t=e.get(3);this._accessibilitySupport===2&&t===nc.accessibilityPageSize.defaultValue?this._accessibilityPageSize=500:this._accessibilityPageSize=t}onConfigurationChanged(e){const t=this._context.configuration.options,n=t.get(131);return this._setAccessibilityOptions(t),this._contentLeft=n.contentLeft,this._contentWidth=n.contentWidth,this._contentHeight=n.height,this._fontInfo=t.get(44),this._lineHeight=t.get(59),this._emptySelectionClipboard=t.get(32),this._copyWithSyntaxHighlighting=t.get(21),this.textArea.setAttribute("aria-label",this._getAriaLabel(t)),this.textArea.setAttribute("tabindex",String(t.get(112))),(e.hasChanged(30)||e.hasChanged(81))&&(t.get(30)&&t.get(81)?this.textArea.setAttribute("readonly","true"):this.textArea.removeAttribute("readonly")),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)}prepareRender(e){this._primaryCursorPosition=new ye(this._selections[0].positionLineNumber,this._selections[0].positionColumn),this._primaryCursorVisibleRange=e.visibleRangeForPosition(this._primaryCursorPosition),this._visibleTextArea&&this._visibleTextArea.prepareRender(e)}render(e){this._textAreaInput.writeScreenReaderContent("render"),this._render()}_render(){if(this._visibleTextArea){const n=this._visibleTextArea.visibleTextareaStart,r=this._visibleTextArea.visibleTextareaEnd,s=this._visibleTextArea.startPosition,o=this._visibleTextArea.endPosition;if(s&&o&&n&&r&&r.left>=this._scrollLeft&&n.left<=this._scrollLeft+this._contentWidth){const a=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,u=this._contentLeft+n.left-this._scrollLeft,d=r.left-n.left+1;if(uthis._contentWidth&&(d=this._contentWidth);const h=this._context.viewModel.getViewLineData(s.lineNumber),f=h.tokens.findTokenIndexAtOffset(s.column-1),g=h.tokens.findTokenIndexAtOffset(o.column-1),p=f===g,m=this._visibleTextArea.definePresentation(p?h.tokens.getPresentation(f):null);this.textArea.domNode.scrollTop=l*this._lineHeight,this.textArea.domNode.scrollLeft=c,this._doRender({lastRenderPosition:null,top:a,left:u,width:d,height:this._lineHeight,useCover:!1,color:(Oi.getColorMap()||[])[m.foreground],italic:m.italic,bold:m.bold,underline:m.underline,strikethrough:m.strikethrough})}return}if(!this._primaryCursorVisibleRange){this._renderAtTopLeft();return}const e=this._contentLeft+this._primaryCursorVisibleRange.left-this._scrollLeft;if(ethis._contentLeft+this._contentWidth){this._renderAtTopLeft();return}const t=this._context.viewLayout.getVerticalOffsetForLineNumber(this._selections[0].positionLineNumber)-this._scrollTop;if(t<0||t>this._contentHeight){this._renderAtTopLeft();return}if(gn){this._doRender({lastRenderPosition:this._primaryCursorPosition,top:t,left:e,width:ov?0:1,height:this._lineHeight,useCover:!1}),this.textArea.domNode.scrollLeft=this._primaryCursorVisibleRange.left;const n=this._newlinecount(this.textArea.domNode.value.substr(0,this.textArea.domNode.selectionStart));this.textArea.domNode.scrollTop=n*this._lineHeight;return}this._doRender({lastRenderPosition:this._primaryCursorPosition,top:t,left:e,width:ov?0:1,height:ov?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:ov?0:1,height:ov?0:1,useCover:!0})}_doRender(e){this._lastRenderPosition=e.lastRenderPosition;const t=this.textArea,n=this.textAreaCover;ys(t,this._fontInfo),t.setTop(e.top),t.setLeft(e.left),t.setWidth(e.width),t.setHeight(e.height),t.setColor(e.color?Ie.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 r=this._context.configuration.options;r.get(50)?n.setClassName("monaco-editor-background textAreaCover "+ap.OUTER_CLASS_NAME):r.get(60).renderType!==0?n.setClassName("monaco-editor-background textAreaCover "+Y_.CLASS_NAME):n.setClassName("monaco-editor-background textAreaCover")}}function y3e(i,e){if(i.length===0)return 0;const t=document.createElement("div");t.style.position="absolute",t.style.top="-50000px",t.style.width="50000px";const n=document.createElement("span");ys(n,e),n.style.whiteSpace="pre",n.append(i),t.appendChild(n),document.body.appendChild(t);const r=n.offsetWidth;return document.body.removeChild(t),r}function S3e(i,e,t){let n=0;for(let s=0;s!0,E3e=()=>!1,x3e=i=>i===" "||i===" ";class Z_{constructor(e,t,n,r){this.languageConfigurationService=r,this._cursorMoveConfigurationBrand=void 0,this._languageId=e;const s=n.options,o=s.get(131);this.readOnly=s.get(81),this.tabSize=t.tabSize,this.indentSize=t.indentSize,this.insertSpaces=t.insertSpaces,this.stickyTabStops=s.get(104),this.lineHeight=s.get(59),this.pageSize=Math.max(1,Math.floor(o.height/this.lineHeight)-2),this.useTabStops=s.get(116),this.wordSeparators=s.get(117),this.emptySelectionClipboard=s.get(32),this.copyWithSyntaxHighlighting=s.get(21),this.multiCursorMergeOverlapping=s.get(69),this.multiCursorPaste=s.get(71),this.autoClosingBrackets=s.get(5),this.autoClosingQuotes=s.get(8),this.autoClosingDelete=s.get(6),this.autoClosingOvertype=s.get(7),this.autoSurround=s.get(11),this.autoIndent=s.get(9),this.surroundingPairs={},this._electricChars=null,this.shouldAutoCloseBefore={quote:this._getShouldAutoClose(e,this.autoClosingQuotes),bracket:this._getShouldAutoClose(e,this.autoClosingBrackets)},this.autoClosingPairs=this.languageConfigurationService.getLanguageConfiguration(e).getAutoClosingPairs();const a=this.languageConfigurationService.getLanguageConfiguration(e).getSurroundingPairs();if(a)for(const l of a)this.surroundingPairs[l.open]=l.close}static shouldRecreate(e){return e.hasChanged(131)||e.hasChanged(117)||e.hasChanged(32)||e.hasChanged(69)||e.hasChanged(71)||e.hasChanged(5)||e.hasChanged(8)||e.hasChanged(6)||e.hasChanged(7)||e.hasChanged(11)||e.hasChanged(116)||e.hasChanged(59)||e.hasChanged(81)}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 r=Jy(t,n-1),s=this.languageConfigurationService.getLanguageConfiguration(r.languageId).electricCharacter;return s?s.onElectricCharacter(e,r,n-r.firstCharOffset):null}normalizeIndentation(e){return ik(e,this.indentSize,this.insertSpaces)}_getShouldAutoClose(e,t){switch(t){case"beforeWhitespace":return x3e;case"languageDefined":return this._getLanguageDefinedShouldAutoClose(e);case"always":return k3e;case"never":return E3e}}_getLanguageDefinedShouldAutoClose(e){const t=this.languageConfigurationService.getLanguageConfiguration(e).getAutoCloseBeforeSet();return n=>t.indexOf(n)!==-1}visibleColumnFromColumn(e,t){return Nr.visibleColumnFromColumn(e.getLineContent(t.lineNumber),t.column,this.tabSize)}columnFromVisibleColumn(e,t,n){const r=Nr.columnFromVisibleColumn(e.getLineContent(t),n,this.tabSize),s=e.getLineMinColumn(t);if(ro?o:r}}let bn=class{constructor(e,t){this._cursorStateBrand=void 0,this.modelState=e,this.viewState=t}static fromModelState(e){return new L3e(e)}static fromViewState(e){return new T3e(e)}static fromModelSelection(e){const t=ut.liftSelection(e),n=new Xr(H.fromPositions(t.getSelectionStart()),0,t.getPosition(),0);return bn.fromModelState(n)}static fromModelSelections(e){const t=[];for(let n=0,r=e.length;ns,c=r>o,u=ro||_r||m0&&r--,cp.columnSelect(e,t,n.fromViewLineNumber,n.fromViewVisualColumn,n.toViewLineNumber,r)}static columnSelectRight(e,t,n){let r=0;const s=Math.min(n.fromViewLineNumber,n.toViewLineNumber),o=Math.max(n.fromViewLineNumber,n.toViewLineNumber);for(let l=s;l<=o;l++){const c=t.getLineMaxColumn(l),u=e.visibleColumnFromColumn(t,new ye(l,c));r=Math.max(r,u)}let a=n.toViewVisualColumn;return ae.getLineMinColumn(t.lineNumber))return t.delta(void 0,-Pz(e.getLineContent(t.lineNumber),t.column-1));if(t.lineNumber>1){const n=t.lineNumber-1;return new ye(n,e.getLineMaxColumn(n))}else return t}static leftPositionAtomicSoftTabs(e,t,n){if(t.column<=e.getLineIndentColumn(t.lineNumber)){const r=e.getLineMinColumn(t.lineNumber),s=e.getLineContent(t.lineNumber),o=rv.atomicPosition(s,t.column-1,n,0);if(o!==-1&&o+1>=r)return new ye(t.lineNumber,o+1)}return this.leftPosition(e,t)}static left(e,t,n){const r=e.stickyTabStops?Vn.leftPositionAtomicSoftTabs(t,n,e.tabSize):Vn.leftPosition(t,n);return new N6(r.lineNumber,r.column,0)}static moveLeft(e,t,n,r,s){let o,a;if(n.hasSelection()&&!r)o=n.selection.startLineNumber,a=n.selection.startColumn;else{const l=n.position.delta(void 0,-(s-1)),c=t.normalizePosition(Vn.clipPositionColumn(l,t),0),u=Vn.left(e,t,c);o=u.lineNumber,a=u.column}return n.move(r,o,a,0)}static clipPositionColumn(e,t){return new ye(e.lineNumber,Vn.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 nu?(n=u,a?r=t.getLineMaxColumn(n):r=Math.min(t.getLineMaxColumn(n),r)):r=e.columnFromVisibleColumn(t,n,c),f?s=0:s=c-Nr.visibleColumnFromColumn(t.getLineContent(n),r,e.tabSize),l!==void 0){const g=new ye(n,r),p=t.normalizePosition(g,l);s=s+(r-p.column),n=p.lineNumber,r=p.column}return new N6(n,r,s)}static down(e,t,n,r,s,o,a){return this.vertical(e,t,n,r,s,n+o,a,1)}static moveDown(e,t,n,r,s){let o,a;n.hasSelection()&&!r?(o=n.selection.endLineNumber,a=n.selection.endColumn):(o=n.position.lineNumber,a=n.position.column);const l=Vn.down(e,t,o,a,n.leftoverVisibleColumns,s,!0);return n.move(r,l.lineNumber,l.column,l.leftoverVisibleColumns)}static translateDown(e,t,n){const r=n.selection,s=Vn.down(e,t,r.selectionStartLineNumber,r.selectionStartColumn,n.selectionStartLeftoverVisibleColumns,1,!1),o=Vn.down(e,t,r.positionLineNumber,r.positionColumn,n.leftoverVisibleColumns,1,!1);return new Xr(new H(s.lineNumber,s.column,s.lineNumber,s.column),s.leftoverVisibleColumns,new ye(o.lineNumber,o.column),o.leftoverVisibleColumns)}static up(e,t,n,r,s,o,a){return this.vertical(e,t,n,r,s,n-o,a,0)}static moveUp(e,t,n,r,s){let o,a;n.hasSelection()&&!r?(o=n.selection.startLineNumber,a=n.selection.startColumn):(o=n.position.lineNumber,a=n.position.column);const l=Vn.up(e,t,o,a,n.leftoverVisibleColumns,s,!0);return n.move(r,l.lineNumber,l.column,l.leftoverVisibleColumns)}static translateUp(e,t,n){const r=n.selection,s=Vn.up(e,t,r.selectionStartLineNumber,r.selectionStartColumn,n.selectionStartLeftoverVisibleColumns,1,!1),o=Vn.up(e,t,r.positionLineNumber,r.positionColumn,n.leftoverVisibleColumns,1,!1);return new Xr(new H(s.lineNumber,s.column,s.lineNumber,s.column),s.leftoverVisibleColumns,new ye(o.lineNumber,o.column),o.leftoverVisibleColumns)}static _isBlankLine(e,t){return e.getLineFirstNonWhitespaceColumn(t)===0}static moveToPrevBlankLine(e,t,n,r){let s=n.position.lineNumber;for(;s>1&&this._isBlankLine(t,s);)s--;for(;s>1&&!this._isBlankLine(t,s);)s--;return n.move(r,s,t.getLineMinColumn(s),0)}static moveToNextBlankLine(e,t,n,r){const s=t.getLineCount();let o=n.position.lineNumber;for(;o=h.length+1)return!1;const f=h.charAt(d.column-2),g=r.get(f);if(!g)return!1;if(X_(f)){if(n==="never")return!1}else if(t==="never")return!1;const p=h.charAt(d.column-1);let m=!1;for(const _ of g)_.open===f&&_.close===p&&(m=!0);if(!m)return!1;if(e==="auto"){let _=!1;for(let b=0,v=a.length;b1){const s=t.getLineContent(r.lineNumber),o=Ks(s),a=o===-1?s.length+1:o+1;if(r.column<=a){const l=n.visibleColumnFromColumn(t,r),c=Nr.prevIndentTabStop(l,n.indentSize),u=n.columnFromVisibleColumn(t,r.lineNumber,c);return new H(r.lineNumber,u,r.lineNumber,r.column)}}return H.fromPositions(up.getPositionAfterDeleteLeft(r,t),r)}static getPositionAfterDeleteLeft(e,t){if(e.column>1){const n=NCe(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 ye(n,t.getLineMaxColumn(n))}else return e}static cut(e,t,n){const r=[];let s=null;n.sort((o,a)=>ye.compare(o.getStartPosition(),a.getEndPosition()));for(let o=0,a=n.length;o1&&(s==null?void 0:s.endLineNumber)!==c.lineNumber?(u=c.lineNumber-1,d=t.getLineMaxColumn(c.lineNumber-1),h=c.lineNumber,f=t.getLineMaxColumn(c.lineNumber)):(u=c.lineNumber,d=1,h=c.lineNumber,f=t.getLineMaxColumn(c.lineNumber));const g=new H(u,d,h,f);s=g,g.isEmpty()?r[o]=null:r[o]=new ls(g,"")}else r[o]=null;else r[o]=new ls(l,"")}return new $o(0,r,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!0})}}class Mn{static _createWord(e,t,n,r,s){return{start:r,end:s,wordType:t,nextCharClass:n}}static _findPreviousWordOnLine(e,t,n){const r=t.getLineContent(n.lineNumber);return this._doFindPreviousWordOnLine(r,e,n)}static _doFindPreviousWordOnLine(e,t,n){let r=0;for(let s=n.column-2;s>=0;s--){const o=e.charCodeAt(s),a=t.get(o);if(a===0){if(r===2)return this._createWord(e,r,a,s+1,this._findEndOfWord(e,t,r,s+1));r=1}else if(a===2){if(r===1)return this._createWord(e,r,a,s+1,this._findEndOfWord(e,t,r,s+1));r=2}else if(a===1&&r!==0)return this._createWord(e,r,a,s+1,this._findEndOfWord(e,t,r,s+1))}return r!==0?this._createWord(e,r,1,0,this._findEndOfWord(e,t,r,0)):null}static _findEndOfWord(e,t,n,r){const s=e.length;for(let o=r;o=0;s--){const o=e.charCodeAt(s),a=t.get(o);if(a===1||n===1&&a===2||n===2&&a===0)return s+1}return 0}static moveWordLeft(e,t,n,r){let s=n.lineNumber,o=n.column;o===1&&s>1&&(s=s-1,o=t.getLineMaxColumn(s));let a=Mn._findPreviousWordOnLine(e,t,new ye(s,o));if(r===0)return new ye(s,a?a.start+1:1);if(r===1)return a&&a.wordType===2&&a.end-a.start===1&&a.nextCharClass===0&&(a=Mn._findPreviousWordOnLine(e,t,new ye(s,a.start+1))),new ye(s,a?a.start+1:1);if(r===3){for(;a&&a.wordType===2;)a=Mn._findPreviousWordOnLine(e,t,new ye(s,a.start+1));return new ye(s,a?a.start+1:1)}return a&&o<=a.end+1&&(a=Mn._findPreviousWordOnLine(e,t,new ye(s,a.start+1))),new ye(s,a?a.end+1:1)}static _moveWordPartLeft(e,t){const n=t.lineNumber,r=e.getLineMaxColumn(n);if(t.column===1)return n>1?new ye(n-1,e.getLineMaxColumn(n-1)):t;const s=e.getLineContent(n);for(let o=t.column-1;o>1;o--){const a=s.charCodeAt(o-2),l=s.charCodeAt(o-1);if(a===95&&l!==95)return new ye(n,o);if(kh(a)&&Zc(l))return new ye(n,o);if(Zc(a)&&Zc(l)&&o+1=l.start+1&&(l=Mn._findNextWordOnLine(e,t,new ye(s,l.end+1))),l?o=l.start+1:o=t.getLineMaxColumn(s);return new ye(s,o)}static _moveWordPartRight(e,t){const n=t.lineNumber,r=e.getLineMaxColumn(n);if(t.column===r)return n1?c=1:(l--,c=r.getLineMaxColumn(l)):(u&&c<=u.end+1&&(u=Mn._findPreviousWordOnLine(n,r,new ye(l,u.start+1))),u?c=u.end+1:c>1?c=1:(l--,c=r.getLineMaxColumn(l))),new H(l,c,a.lineNumber,a.column)}static deleteInsideWord(e,t,n){if(!n.isEmpty())return n;const r=new ye(n.positionLineNumber,n.positionColumn),s=this._deleteInsideWordWhitespace(t,r);return s||this._deleteInsideWordDetermineDeleteRange(e,t,r)}static _charAtIsWhitespace(e,t){const n=e.charCodeAt(t);return n===32||n===9}static _deleteInsideWordWhitespace(e,t){const n=e.getLineContent(t.lineNumber),r=n.length;if(r===0)return null;let s=Math.max(t.column-2,0);if(!this._charAtIsWhitespace(n,s))return null;let o=Math.min(t.column-1,r-1);if(!this._charAtIsWhitespace(n,o))return null;for(;s>0&&this._charAtIsWhitespace(n,s-1);)s--;for(;o+11?new H(n.lineNumber-1,t.getLineMaxColumn(n.lineNumber-1),n.lineNumber,1):n.lineNumberd.start+1<=n.column&&n.column<=d.end+1,a=(d,h)=>(d=Math.min(d,n.column),h=Math.max(h,n.column),new H(n.lineNumber,d,n.lineNumber,h)),l=d=>{let h=d.start+1,f=d.end+1,g=!1;for(;f-11&&this._charAtIsWhitespace(r,h-2);)h--;return a(h,f)},c=Mn._findPreviousWordOnLine(e,t,n);if(c&&o(c))return l(c);const u=Mn._findNextWordOnLine(e,t,n);return u&&o(u)?l(u):c&&u?a(c.end+1,u.start+1):c?a(c.start+1,c.end+1):u?a(u.start+1,u.end+1):a(1,s+1)}static _deleteWordPartLeft(e,t){if(!t.isEmpty())return t;const n=t.getPosition(),r=Mn._moveWordPartLeft(e,n);return new H(n.lineNumber,n.column,r.lineNumber,r.column)}static _findFirstNonWhitespaceChar(e,t){const n=e.length;for(let r=t;r=h.start+1&&(h=Mn._findNextWordOnLine(n,r,new ye(l,h.end+1))),h?c=h.start+1:cBoolean(e))}class Qr{static addCursorDown(e,t,n){const r=[];let s=0;for(let o=0,a=t.length;oc&&(u=c,d=e.model.getLineMaxColumn(u)),bn.fromModelState(new Xr(new H(o.lineNumber,1,u,d),0,new ye(u,d),0))}const l=t.modelState.selectionStart.getStartPosition().lineNumber;if(o.lineNumberl){const c=e.getLineCount();let u=a.lineNumber+1,d=1;return u>c&&(u=c,d=e.getLineMaxColumn(u)),bn.fromViewState(t.viewState.move(t.modelState.hasSelection(),u,d,0))}else{const c=t.modelState.selectionStart.getEndPosition();return bn.fromModelState(t.modelState.move(t.modelState.hasSelection(),c.lineNumber,c.column,0))}}static word(e,t,n,r){const s=e.model.validatePosition(r);return bn.fromModelState(Mn.word(e.cursorConfig,e.model,t.modelState,n,s))}static cancelSelection(e,t){if(!t.modelState.hasSelection())return new bn(t.modelState,t.viewState);const n=t.viewState.position.lineNumber,r=t.viewState.position.column;return bn.fromViewState(new Xr(new H(n,r,n,r),0,new ye(n,r),0))}static moveTo(e,t,n,r,s){const o=e.model.validatePosition(r),a=s?e.coordinatesConverter.validateViewPosition(new ye(s.lineNumber,s.column),o):e.coordinatesConverter.convertModelPositionToViewPosition(o);return bn.fromViewState(t.viewState.move(n,a.lineNumber,a.column,0))}static simpleMove(e,t,n,r,s,o){switch(n){case 0:return o===4?this._moveHalfLineLeft(e,t,r):this._moveLeft(e,t,r,s);case 1:return o===4?this._moveHalfLineRight(e,t,r):this._moveRight(e,t,r,s);case 2:return o===2?this._moveUpByViewLines(e,t,r,s):this._moveUpByModelLines(e,t,r,s);case 3:return o===2?this._moveDownByViewLines(e,t,r,s):this._moveDownByModelLines(e,t,r,s);case 4:return o===2?t.map(a=>bn.fromViewState(Vn.moveToPrevBlankLine(e.cursorConfig,e,a.viewState,r))):t.map(a=>bn.fromModelState(Vn.moveToPrevBlankLine(e.cursorConfig,e.model,a.modelState,r)));case 5:return o===2?t.map(a=>bn.fromViewState(Vn.moveToNextBlankLine(e.cursorConfig,e,a.viewState,r))):t.map(a=>bn.fromModelState(Vn.moveToNextBlankLine(e.cursorConfig,e.model,a.modelState,r)));case 6:return this._moveToViewMinColumn(e,t,r);case 7:return this._moveToViewFirstNonWhitespaceColumn(e,t,r);case 8:return this._moveToViewCenterColumn(e,t,r);case 9:return this._moveToViewMaxColumn(e,t,r);case 10:return this._moveToViewLastNonWhitespaceColumn(e,t,r);default:return null}}static viewportMove(e,t,n,r,s){const o=e.getCompletelyVisibleViewRange(),a=e.coordinatesConverter.convertViewRangeToModelRange(o);switch(n){case 11:{const l=this._firstLineNumberInRange(e.model,a,s),c=e.model.getLineFirstNonWhitespaceColumn(l);return[this._moveToModelPosition(e,t[0],r,l,c)]}case 13:{const l=this._lastLineNumberInRange(e.model,a,s),c=e.model.getLineFirstNonWhitespaceColumn(l);return[this._moveToModelPosition(e,t[0],r,l,c)]}case 12:{const l=Math.round((a.startLineNumber+a.endLineNumber)/2),c=e.model.getLineFirstNonWhitespaceColumn(l);return[this._moveToModelPosition(e,t[0],r,l,c)]}case 14:{const l=[];for(let c=0,u=t.length;cn.endLineNumber-1?o=n.endLineNumber-1:sbn.fromViewState(Vn.moveLeft(e.cursorConfig,e,s.viewState,n,r)))}static _moveHalfLineLeft(e,t,n){const r=[];for(let s=0,o=t.length;sbn.fromViewState(Vn.moveRight(e.cursorConfig,e,s.viewState,n,r)))}static _moveHalfLineRight(e,t,n){const r=[];for(let s=0,o=t.length;s1&&Nr.visibleColumnFromColumn(h,f+1,s)%o!==0&&e.isCheapToTokenize(d-1)){const m=gr.getEnterAction(this._opts.autoIndent,e,new H(d-1,e.getLineMaxColumn(d-1),d-1,e.getLineMaxColumn(d-1)));if(m){if(u=c,m.appendText)for(let _=0,b=m.appendText.length;_1){let a;for(a=n-1;a>=1;a--){const u=t.getLineContent(a);if(Yc(u)>=0)break}if(a<1)return null;const l=t.getLineMaxColumn(a),c=gr.getEnterAction(e.autoIndent,t,new H(a,l,a,l));c&&(s=c.indentation+c.appendText)}return r&&(r===nr.Indent&&(s=Fi.shiftIndent(e,s)),r===nr.Outdent&&(s=Fi.unshiftIndent(e,s)),s=e.normalizeIndentation(s)),s||null}static _replaceJumpToNextIndent(e,t,n,r){let s="";const o=n.getStartPosition();if(e.insertSpaces){const a=e.visibleColumnFromColumn(t,o),l=e.indentSize,c=l-a%l;for(let u=0;uthis._compositionType(n,u,s,o,a,l));return new $o(4,c,{shouldPushStackElementBefore:ck(e,4),shouldPushStackElementAfter:!1})}static _compositionType(e,t,n,r,s,o){if(!t.isEmpty())return null;const a=t.getPosition(),l=Math.max(1,a.column-r),c=Math.min(e.getLineMaxColumn(a.lineNumber),a.column+s),u=new H(a.lineNumber,l,a.lineNumber,c);return e.getValueInRange(u)===n&&o===0?null:new sk(u,n,0,o)}static _typeCommand(e,t,n){return n?new rk(e,t,!0):new ls(e,t,!0)}static _enter(e,t,n,r){if(e.autoIndent===0)return Fi._typeCommand(r,` +`,n);if(!t.isCheapToTokenize(r.getStartPosition().lineNumber)||e.autoIndent===1){const l=t.getLineContent(r.startLineNumber),c=ii(l).substring(0,r.startColumn-1);return Fi._typeCommand(r,` +`+e.normalizeIndentation(c),n)}const s=gr.getEnterAction(e.autoIndent,t,r);if(s){if(s.indentAction===nr.None)return Fi._typeCommand(r,` +`+e.normalizeIndentation(s.indentation+s.appendText),n);if(s.indentAction===nr.Indent)return Fi._typeCommand(r,` +`+e.normalizeIndentation(s.indentation+s.appendText),n);if(s.indentAction===nr.IndentOutdent){const l=e.normalizeIndentation(s.indentation),c=e.normalizeIndentation(s.indentation+s.appendText),u=` +`+c+` +`+l;return n?new rk(r,u,!0):new sk(r,u,-1,c.length-l.length,!0)}else if(s.indentAction===nr.Outdent){const l=Fi.unshiftIndent(e,s.indentation);return Fi._typeCommand(r,` +`+e.normalizeIndentation(l+s.appendText),n)}}const o=t.getLineContent(r.startLineNumber),a=ii(o).substring(0,r.startColumn-1);if(e.autoIndent>=4){const l=gr.getIndentForEnter(e.autoIndent,t,r,{unshiftIndent:c=>Fi.unshiftIndent(e,c),shiftIndent:c=>Fi.shiftIndent(e,c),normalizeIndentation:c=>e.normalizeIndentation(c)});if(l){let c=e.visibleColumnFromColumn(t,r.getEndPosition());const u=r.endColumn,d=t.getLineContent(r.endLineNumber),h=Ks(d);if(h>=0?r=r.setEndPosition(r.endLineNumber,Math.max(r.endColumn,h+1)):r=r.setEndPosition(r.endLineNumber,t.getLineMaxColumn(r.endLineNumber)),n)return new rk(r,` +`+e.normalizeIndentation(l.afterEnter),!0);{let f=0;return u<=h+1&&(e.insertSpaces||(c=Math.ceil(c/e.indentSize)),f=Math.min(c+1-e.normalizeIndentation(l.afterEnter).length-1,0)),new sk(r,` +`+e.normalizeIndentation(l.afterEnter),0,f,!0)}}}return Fi._typeCommand(r,` +`+e.normalizeIndentation(a),n)}static _isAutoIndentType(e,t,n){if(e.autoIndent<4)return!1;for(let r=0,s=n.length;rFi.shiftIndent(e,a),unshiftIndent:a=>Fi.unshiftIndent(e,a)});if(o===null)return null;if(o!==e.normalizeIndentation(s)){const a=t.getLineFirstNonWhitespaceColumn(n.startLineNumber);return a===0?Fi._typeCommand(new H(n.startLineNumber,1,n.endLineNumber,n.endColumn),e.normalizeIndentation(o)+r,!1):Fi._typeCommand(new H(n.startLineNumber,1,n.endLineNumber,n.endColumn),e.normalizeIndentation(o)+t.getLineContent(n.startLineNumber).substring(a-1,n.startColumn-1)+r,!1)}return null}static _isAutoClosingOvertype(e,t,n,r,s){if(e.autoClosingOvertype==="never"||!e.autoClosingPairs.autoClosingPairsCloseSingleChar.has(s))return!1;for(let o=0,a=n.length;o2?u.charCodeAt(c.column-2):0)===92&&h)return!1;if(e.autoClosingOvertype==="auto"){let g=!1;for(let p=0,m=r.length;pt.startsWith(l.open)),a=s.some(l=>t.startsWith(l.close));return!o&&a}static _findAutoClosingPairOpen(e,t,n,r){const s=e.autoClosingPairs.autoClosingPairsOpenByEnd.get(r);if(!s)return null;let o=null;for(const a of s)if(o===null||a.open.length>o.open.length){let l=!0;for(const c of n)if(t.getValueInRange(new H(c.lineNumber,c.column-a.open.length+1,c.lineNumber,c.column))+r!==a.open){l=!1;break}l&&(o=a)}return o}static _findContainedAutoClosingPair(e,t){if(t.open.length<=1)return null;const n=t.close.charAt(t.close.length-1),r=e.autoClosingPairs.autoClosingPairsCloseByEnd.get(n)||[];let s=null;for(const o of r)o.open!==t.open&&t.open.includes(o.open)&&t.close.endsWith(o.close)&&(!s||o.open.length>s.open.length)&&(s=o);return s}static _getAutoClosingPairClose(e,t,n,r,s){const o=X_(r),a=o?e.autoClosingQuotes:e.autoClosingBrackets,l=o?e.shouldAutoCloseBefore.quote:e.shouldAutoCloseBefore.bracket;if(a==="never")return null;for(const g of n)if(!g.isEmpty())return null;const c=n.map(g=>{const p=g.getPosition();return s?{lineNumber:p.lineNumber,beforeColumn:p.column-r.length,afterColumn:p.column}:{lineNumber:p.lineNumber,beforeColumn:p.column,afterColumn:p.column}}),u=this._findAutoClosingPairOpen(e,t,c.map(g=>new ye(g.lineNumber,g.beforeColumn)),r);if(!u)return null;const d=this._findContainedAutoClosingPair(e,u),h=d?d.close:"";let f=!0;for(const g of c){const{lineNumber:p,beforeColumn:m,afterColumn:_}=g,b=t.getLineContent(p),v=b.substring(0,m-1),w=b.substring(_-1);if(w.startsWith(h)||(f=!1),w.length>0){const T=w.charAt(0);if(!Fi._isBeforeClosingBrace(e,w)&&!l(T))return null}if(u.open.length===1&&(r==="'"||r==='"')&&a!=="always"){const T=qa(e.wordSeparators);if(v.length>0){const L=v.charCodeAt(v.length-1);if(T.get(L)===0)return null}}if(!t.isCheapToTokenize(p))return null;t.forceTokenization(p);const E=t.getLineTokens(p),I=Jy(E,m-1);if(!u.shouldAutoClose(I,m-I.firstCharOffset))return null;const x=u.findNeutralCharacter();if(x){const T=t.getTokenTypeIfInsertingCharacter(p,m,x);if(!u.isOK(T))return null}}return f?u.close.substring(0,u.close.length-h.length):u.close}static _runAutoClosingOpenCharType(e,t,n,r,s,o,a){const l=[];for(let c=0,u=r.length;cnew ls(new H(u.positionLineNumber,u.positionColumn,u.positionLineNumber,u.positionColumn+1),"",!1));return new $o(4,c,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!1})}const l=this._getAutoClosingPairClose(t,n,s,a,!0);return l!==null?this._runAutoClosingOpenCharType(e,t,n,s,a,!0,l):null}static typeWithInterceptors(e,t,n,r,s,o,a){if(!e&&a===` +`){const u=[];for(let d=0,h=s.length;d{const r=t.get(Zn).getFocusedCodeEditor();return r&&r.hasTextFocus()?this._runEditorCommand(t,r,n):!1}),e.addImplementation(1e3,"generic-dom-input-textarea",(t,n)=>{const r=document.activeElement;return r&&["input","textarea"].indexOf(r.tagName.toLowerCase())>=0?(this.runDOMCommand(),!0):!1}),e.addImplementation(0,"generic-dom",(t,n)=>{const r=t.get(Zn).getActiveCodeEditor();return r?(r.focus(),this._runEditorCommand(t,r,n)):!1})}_runEditorCommand(e,t,n){const r=this.runEditorCommand(e,t,n);return r||!0}}var Br;(function(i){class e extends pr{constructor(b){super(b),this._minimalReveal=b.minimalReveal,this._inSelectionMode=b.inSelectionMode}runCoreEditorCommand(b,v){b.model.pushStackElement(),b.setCursorStates(v.source,3,[Qr.moveTo(b,b.getPrimaryCursorState(),this._inSelectionMode,v.position,v.viewPosition)])&&b.revealPrimaryCursor(v.source,!0,this._minimalReveal)}}i.MoveTo=st(new e({id:"_moveTo",minimalReveal:!0,inSelectionMode:!1,precondition:void 0})),i.MoveToSelect=st(new e({id:"_moveToSelect",minimalReveal:!1,inSelectionMode:!0,precondition:void 0}));class t extends pr{runCoreEditorCommand(b,v){b.model.pushStackElement();const w=this._getColumnSelectResult(b,b.getPrimaryCursorState(),b.getCursorColumnSelectData(),v);b.setCursorStates(v.source,3,w.viewStates.map(E=>bn.fromViewState(E))),b.setCursorColumnSelectData({isReal:!0,fromViewLineNumber:w.fromLineNumber,fromViewVisualColumn:w.fromVisualColumn,toViewLineNumber:w.toLineNumber,toViewVisualColumn:w.toVisualColumn}),w.reversed?b.revealTopMostCursor(v.source):b.revealBottomMostCursor(v.source)}}i.ColumnSelect=st(new class extends t{constructor(){super({id:"columnSelect",precondition:void 0})}_getColumnSelectResult(_,b,v,w){const E=_.model.validatePosition(w.position),I=_.coordinatesConverter.validateViewPosition(new ye(w.viewPosition.lineNumber,w.viewPosition.column),E),x=w.doColumnSelect?v.fromViewLineNumber:I.lineNumber,T=w.doColumnSelect?v.fromViewVisualColumn:w.mouseColumn-1;return cp.columnSelect(_.cursorConfig,_,x,T,I.lineNumber,w.mouseColumn-1)}}),i.CursorColumnSelectLeft=st(new class extends t{constructor(){super({id:"cursorColumnSelectLeft",precondition:void 0,kbOpts:{weight:$n,kbExpr:ie.textInputFocus,primary:3599,linux:{primary:0}}})}_getColumnSelectResult(_,b,v,w){return cp.columnSelectLeft(_.cursorConfig,_,v)}}),i.CursorColumnSelectRight=st(new class extends t{constructor(){super({id:"cursorColumnSelectRight",precondition:void 0,kbOpts:{weight:$n,kbExpr:ie.textInputFocus,primary:3601,linux:{primary:0}}})}_getColumnSelectResult(_,b,v,w){return cp.columnSelectRight(_.cursorConfig,_,v)}});class n extends t{constructor(b){super(b),this._isPaged=b.isPaged}_getColumnSelectResult(b,v,w,E){return cp.columnSelectUp(b.cursorConfig,b,w,this._isPaged)}}i.CursorColumnSelectUp=st(new n({isPaged:!1,id:"cursorColumnSelectUp",precondition:void 0,kbOpts:{weight:$n,kbExpr:ie.textInputFocus,primary:3600,linux:{primary:0}}})),i.CursorColumnSelectPageUp=st(new n({isPaged:!0,id:"cursorColumnSelectPageUp",precondition:void 0,kbOpts:{weight:$n,kbExpr:ie.textInputFocus,primary:3595,linux:{primary:0}}}));class r extends t{constructor(b){super(b),this._isPaged=b.isPaged}_getColumnSelectResult(b,v,w,E){return cp.columnSelectDown(b.cursorConfig,b,w,this._isPaged)}}i.CursorColumnSelectDown=st(new r({isPaged:!1,id:"cursorColumnSelectDown",precondition:void 0,kbOpts:{weight:$n,kbExpr:ie.textInputFocus,primary:3602,linux:{primary:0}}})),i.CursorColumnSelectPageDown=st(new r({isPaged:!0,id:"cursorColumnSelectPageDown",precondition:void 0,kbOpts:{weight:$n,kbExpr:ie.textInputFocus,primary:3596,linux:{primary:0}}}));class s extends pr{constructor(){super({id:"cursorMove",precondition:void 0,description:lk.description})}runCoreEditorCommand(b,v){const w=lk.parse(v);w&&this._runCursorMove(b,v.source,w)}_runCursorMove(b,v,w){b.model.pushStackElement(),b.setCursorStates(v,3,s._move(b,b.getCursorStates(),w)),b.revealPrimaryCursor(v,!0)}static _move(b,v,w){const E=w.select,I=w.value;switch(w.direction){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:case 9:case 10:return Qr.simpleMove(b,v,w.direction,E,I,w.unit);case 11:case 13:case 12:case 14:return Qr.viewportMove(b,v,w.direction,E,I);default:return null}}}i.CursorMoveImpl=s,i.CursorMove=st(new s);class o extends pr{constructor(b){super(b),this._staticArgs=b.args}runCoreEditorCommand(b,v){let w=this._staticArgs;this._staticArgs.value===-1&&(w={direction:this._staticArgs.direction,unit:this._staticArgs.unit,select:this._staticArgs.select,value:v.pageSize||b.cursorConfig.pageSize}),b.model.pushStackElement(),b.setCursorStates(v.source,3,Qr.simpleMove(b,b.getCursorStates(),w.direction,w.select,w.value,w.unit)),b.revealPrimaryCursor(v.source,!0)}}i.CursorLeft=st(new o({args:{direction:0,unit:0,select:!1,value:1},id:"cursorLeft",precondition:void 0,kbOpts:{weight:$n,kbExpr:ie.textInputFocus,primary:15,mac:{primary:15,secondary:[288]}}})),i.CursorLeftSelect=st(new o({args:{direction:0,unit:0,select:!0,value:1},id:"cursorLeftSelect",precondition:void 0,kbOpts:{weight:$n,kbExpr:ie.textInputFocus,primary:1039}})),i.CursorRight=st(new o({args:{direction:1,unit:0,select:!1,value:1},id:"cursorRight",precondition:void 0,kbOpts:{weight:$n,kbExpr:ie.textInputFocus,primary:17,mac:{primary:17,secondary:[292]}}})),i.CursorRightSelect=st(new o({args:{direction:1,unit:0,select:!0,value:1},id:"cursorRightSelect",precondition:void 0,kbOpts:{weight:$n,kbExpr:ie.textInputFocus,primary:1041}})),i.CursorUp=st(new o({args:{direction:2,unit:2,select:!1,value:1},id:"cursorUp",precondition:void 0,kbOpts:{weight:$n,kbExpr:ie.textInputFocus,primary:16,mac:{primary:16,secondary:[302]}}})),i.CursorUpSelect=st(new o({args:{direction:2,unit:2,select:!0,value:1},id:"cursorUpSelect",precondition:void 0,kbOpts:{weight:$n,kbExpr:ie.textInputFocus,primary:1040,secondary:[3088],mac:{primary:1040},linux:{primary:1040}}})),i.CursorPageUp=st(new o({args:{direction:2,unit:2,select:!1,value:-1},id:"cursorPageUp",precondition:void 0,kbOpts:{weight:$n,kbExpr:ie.textInputFocus,primary:11}})),i.CursorPageUpSelect=st(new o({args:{direction:2,unit:2,select:!0,value:-1},id:"cursorPageUpSelect",precondition:void 0,kbOpts:{weight:$n,kbExpr:ie.textInputFocus,primary:1035}})),i.CursorDown=st(new o({args:{direction:3,unit:2,select:!1,value:1},id:"cursorDown",precondition:void 0,kbOpts:{weight:$n,kbExpr:ie.textInputFocus,primary:18,mac:{primary:18,secondary:[300]}}})),i.CursorDownSelect=st(new o({args:{direction:3,unit:2,select:!0,value:1},id:"cursorDownSelect",precondition:void 0,kbOpts:{weight:$n,kbExpr:ie.textInputFocus,primary:1042,secondary:[3090],mac:{primary:1042},linux:{primary:1042}}})),i.CursorPageDown=st(new o({args:{direction:3,unit:2,select:!1,value:-1},id:"cursorPageDown",precondition:void 0,kbOpts:{weight:$n,kbExpr:ie.textInputFocus,primary:12}})),i.CursorPageDownSelect=st(new o({args:{direction:3,unit:2,select:!0,value:-1},id:"cursorPageDownSelect",precondition:void 0,kbOpts:{weight:$n,kbExpr:ie.textInputFocus,primary:1036}})),i.CreateCursor=st(new class extends pr{constructor(){super({id:"createCursor",precondition:void 0})}runCoreEditorCommand(_,b){let v;b.wholeLine?v=Qr.line(_,_.getPrimaryCursorState(),!1,b.position,b.viewPosition):v=Qr.moveTo(_,_.getPrimaryCursorState(),!1,b.position,b.viewPosition);const w=_.getCursorStates();if(w.length>1){const E=v.modelState?v.modelState.position:null,I=v.viewState?v.viewState.position:null;for(let x=0,T=w.length;xI&&(E=I);const x=new H(E,1,E,_.model.getLineMaxColumn(E));let T=0;if(v.at)switch(v.at){case Q_.RawAtArgument.Top:T=3;break;case Q_.RawAtArgument.Center:T=1;break;case Q_.RawAtArgument.Bottom:T=4;break}const L=_.coordinatesConverter.convertModelRangeToViewRange(x);_.revealRange(b.source,!1,L,T,0)}}),i.SelectAll=new class extends O6{constructor(){super(ESe)}runDOMCommand(){ua&&(document.activeElement.focus(),document.activeElement.select()),document.execCommand("selectAll")}runEditorCommand(_,b,v){const w=b._getViewModel();w&&this.runCoreEditorCommand(w,v)}runCoreEditorCommand(_,b){_.model.pushStackElement(),_.setCursorStates("keyboard",3,[Qr.selectAll(_,_.getPrimaryCursorState())])}},i.SetSelection=st(new class extends pr{constructor(){super({id:"setSelection",precondition:void 0})}runCoreEditorCommand(_,b){_.model.pushStackElement(),_.setCursorStates(b.source,3,[bn.fromModelSelection(b.selection)])}})})(Br||(Br={}));const N3e=ht.and(ie.textInputFocus,ie.columnSelection);function J_(i,e){Ys.registerKeybindingRule({id:i,primary:e,when:N3e,weight:$n+1})}J_(Br.CursorColumnSelectLeft.id,1039),J_(Br.CursorColumnSelectRight.id,1041),J_(Br.CursorColumnSelectUp.id,1040),J_(Br.CursorColumnSelectPageUp.id,1035),J_(Br.CursorColumnSelectDown.id,1042),J_(Br.CursorColumnSelectPageDown.id,1036);function wj(i){return i.register(),i}var e1;(function(i){class e extends as{runEditorCommand(n,r,s){const o=r._getViewModel();o&&this.runCoreEditingCommand(r,o,s||{})}}i.CoreEditingCommand=e,i.LineBreakInsert=st(new class extends e{constructor(){super({id:"lineBreakInsert",precondition:ie.writable,kbOpts:{weight:$n,kbExpr:ie.textInputFocus,primary:0,mac:{primary:301}}})}runCoreEditingCommand(t,n,r){t.pushUndoStop(),t.executeCommands(this.id,Fi.lineBreakInsert(n.cursorConfig,n.model,n.getCursorStates().map(s=>s.modelState.selection)))}}),i.Outdent=st(new class extends e{constructor(){super({id:"outdent",precondition:ie.writable,kbOpts:{weight:$n,kbExpr:ht.and(ie.editorTextFocus,ie.tabDoesNotMoveFocus),primary:1026}})}runCoreEditingCommand(t,n,r){t.pushUndoStop(),t.executeCommands(this.id,Fi.outdent(n.cursorConfig,n.model,n.getCursorStates().map(s=>s.modelState.selection))),t.pushUndoStop()}}),i.Tab=st(new class extends e{constructor(){super({id:"tab",precondition:ie.writable,kbOpts:{weight:$n,kbExpr:ht.and(ie.editorTextFocus,ie.tabDoesNotMoveFocus),primary:2}})}runCoreEditingCommand(t,n,r){t.pushUndoStop(),t.executeCommands(this.id,Fi.tab(n.cursorConfig,n.model,n.getCursorStates().map(s=>s.modelState.selection))),t.pushUndoStop()}}),i.DeleteLeft=st(new class extends e{constructor(){super({id:"deleteLeft",precondition:void 0,kbOpts:{weight:$n,kbExpr:ie.textInputFocus,primary:1,secondary:[1025],mac:{primary:1,secondary:[1025,294,257]}}})}runCoreEditingCommand(t,n,r){const[s,o]=up.deleteLeft(n.getPrevEditOperationType(),n.cursorConfig,n.model,n.getCursorStates().map(a=>a.modelState.selection),n.getCursorAutoClosedCharacters());s&&t.pushUndoStop(),t.executeCommands(this.id,o),n.setPrevEditOperationType(2)}}),i.DeleteRight=st(new class extends e{constructor(){super({id:"deleteRight",precondition:void 0,kbOpts:{weight:$n,kbExpr:ie.textInputFocus,primary:20,mac:{primary:20,secondary:[290,276]}}})}runCoreEditingCommand(t,n,r){const[s,o]=up.deleteRight(n.getPrevEditOperationType(),n.cursorConfig,n.model,n.getCursorStates().map(a=>a.modelState.selection));s&&t.pushUndoStop(),t.executeCommands(this.id,o),n.setPrevEditOperationType(3)}}),i.Undo=new class extends O6{constructor(){super(wU)}runDOMCommand(){document.execCommand("undo")}runEditorCommand(t,n,r){if(!(!n.hasModel()||n.getOption(81)===!0))return n.getModel().undo()}},i.Redo=new class extends O6{constructor(){super(CU)}runDOMCommand(){document.execCommand("redo")}runEditorCommand(t,n,r){if(!(!n.hasModel()||n.getOption(81)===!0))return n.getModel().redo()}}})(e1||(e1={}));class Cj extends BS{constructor(e,t,n){super({id:e,precondition:void 0,description:n}),this._handlerId=t}runCommand(e,t){const n=e.get(Zn).getFocusedCodeEditor();n&&n.trigger("keyboard",this._handlerId,t)}}function hp(i,e){wj(new Cj("default:"+i,i)),wj(new Cj(i,i,e))}hp("type",{description:"Type",args:[{name:"args",schema:{type:"object",required:["text"],properties:{text:{type:"string"}}}}]}),hp("replacePreviousChar"),hp("compositionType"),hp("compositionStart"),hp("compositionEnd"),hp("paste"),hp("cut");class A3e{constructor(e,t,n,r){this.configuration=e,this.viewModel=t,this.userInputEvents=n,this.commandDelegate=r}paste(e,t,n,r){this.commandDelegate.paste(e,t,n,r)}type(e){this.commandDelegate.type(e)}compositionType(e,t,n,r){this.commandDelegate.compositionType(e,t,n,r)}compositionStart(){this.commandDelegate.startComposition()}compositionEnd(){this.commandDelegate.endComposition()}cut(){this.commandDelegate.cut()}setSelection(e){Br.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):this._lastCursorLineSelect(e.position):e.inSelectionMode?this._lineSelectDrag(e.position):this._lineSelect(e.position):e.mouseDownCount===2?e.onInjectedText||(this._hasMulticursorModifier(e)?this._lastCursorWordSelect(e.position):e.inSelectionMode?this._wordSelectDrag(e.position):this._wordSelect(e.position)):this._hasMulticursorModifier(e)?this._hasNonMulticursorModifier(e)||(e.shiftKey?this._columnSelect(e.position,e.mouseColumn,!0):e.inSelectionMode?this._lastCursorMoveToSelect(e.position):this._createCursor(e.position,!1)):e.inSelectionMode?e.altKey?this._columnSelect(e.position,e.mouseColumn,!0):r?this._columnSelect(e.position,e.mouseColumn,!0):this._moveToSelect(e.position):this.moveTo(e.position)}_usualArgs(e){return e=this._validateViewColumn(e),{source:"mouse",position:this._convertViewToModelPosition(e),viewPosition:e}}moveTo(e){Br.MoveTo.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}_moveToSelect(e){Br.MoveToSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}_columnSelect(e,t,n){e=this._validateViewColumn(e),Br.ColumnSelect.runCoreEditorCommand(this.viewModel,{source:"mouse",position:this._convertViewToModelPosition(e),viewPosition:e,mouseColumn:t,doColumnSelect:n})}_createCursor(e,t){e=this._validateViewColumn(e),Br.CreateCursor.runCoreEditorCommand(this.viewModel,{source:"mouse",position:this._convertViewToModelPosition(e),viewPosition:e,wholeLine:t})}_lastCursorMoveToSelect(e){Br.LastCursorMoveToSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}_wordSelect(e){Br.WordSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}_wordSelectDrag(e){Br.WordSelectDrag.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}_lastCursorWordSelect(e){Br.LastCursorWordSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}_lineSelect(e){Br.LineSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}_lineSelectDrag(e){Br.LineSelectDrag.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}_lastCursorLineSelect(e){Br.LastCursorLineSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}_lastCursorLineSelectDrag(e){Br.LastCursorLineSelectDrag.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}_selectAll(){Br.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 dk{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){this.onKeyDown&&this.onKeyDown(e)}emitKeyUp(e){this.onKeyUp&&this.onKeyUp(e)}emitContextMenu(e){this.onContextMenu&&this.onContextMenu(this._convertViewToModelMouseEvent(e))}emitMouseMove(e){this.onMouseMove&&this.onMouseMove(this._convertViewToModelMouseEvent(e))}emitMouseLeave(e){this.onMouseLeave&&this.onMouseLeave(this._convertViewToModelMouseEvent(e))}emitMouseDown(e){this.onMouseDown&&this.onMouseDown(this._convertViewToModelMouseEvent(e))}emitMouseUp(e){this.onMouseUp&&this.onMouseUp(this._convertViewToModelMouseEvent(e))}emitMouseDrag(e){this.onMouseDrag&&this.onMouseDrag(this._convertViewToModelMouseEvent(e))}emitMouseDrop(e){this.onMouseDrop&&this.onMouseDrop(this._convertViewToModelMouseEvent(e))}emitMouseDropCanceled(){this.onMouseDropCanceled&&this.onMouseDropCanceled()}emitMouseWheel(e){this.onMouseWheel&&this.onMouseWheel(e)}_convertViewToModelMouseEvent(e){return e.target?{event:e.event,target:this._convertViewToModelMouseTarget(e.target)}:e}_convertViewToModelMouseTarget(e){return dk.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}}var M6;class yj{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 Error("Illegal value for lineNumber");return this._lines[t]}onLinesDeleted(e,t){if(this.getCount()===0)return null;const n=this.getStartLineNumber(),r=this.getEndLineNumber();if(tr)return null;let s=0,o=0;for(let l=n;l<=r;l++){const c=l-this._rendLineNumberStart;e<=l&&l<=t&&(o===0?(s=c,o=1):o++)}if(e=n&&o<=r&&(this._lines[o-this._rendLineNumberStart].onContentChanged(),s=!0);return s}onLinesInserted(e,t){if(this.getCount()===0)return null;const n=t-e+1,r=this.getStartLineNumber(),s=this.getEndLineNumber();if(e<=r)return this._rendLineNumberStart+=n,null;if(e>s)return null;if(n+e>s)return this._lines.splice(e-this._rendLineNumberStart,s-e+1);const o=[];for(let d=0;dn)continue;const l=Math.max(t,a.fromLineNumber),c=Math.min(n,a.toLineNumber);for(let u=l;u<=c;u++){const d=u-this._rendLineNumberStart;this._lines[d].onTokensChanged(),r=!0}}return r}}class Sj{constructor(e){this._host=e,this.domNode=this._createDomNode(),this._linesCollection=new yj(()=>this._host.createVisibleLine())}_createDomNode(){const e=Rn(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(131)}onFlushed(e){return this._linesCollection.flush(),!0}onLinesChanged(e){return this._linesCollection.onLinesChanged(e.fromLineNumber,e.toLineNumber)}onLinesDeleted(e){const t=this._linesCollection.onLinesDeleted(e.fromLineNumber,e.toLineNumber);if(t)for(let n=0,r=t.length;nt){const o=t,a=Math.min(n,s.rendLineNumberStart-1);o<=a&&(this._insertLinesBefore(s,o,a,r,t),s.linesLength+=a-o+1)}else if(s.rendLineNumberStart0&&(this._removeLinesBefore(s,o),s.linesLength-=o)}if(s.rendLineNumberStart=t,s.rendLineNumberStart+s.linesLength-1n){const o=Math.max(0,n-s.rendLineNumberStart+1),l=s.linesLength-1-o+1;l>0&&(this._removeLinesAfter(s,l),s.linesLength-=l)}return this._finishRendering(s,!1,r),s}_renderUntouchedLines(e,t,n,r,s){const o=e.rendLineNumberStart,a=e.lines;for(let l=t;l<=n;l++){const c=o+l;a[l].layoutLine(c,r[c-s])}}_insertLinesBefore(e,t,n,r,s){const o=[];let a=0;for(let l=t;l<=n;l++)o[a++]=this.host.createVisibleLine();e.lines=o.concat(e.lines)}_removeLinesBefore(e,t){for(let n=0;n=0;a--){const l=e.lines[a];r[a]&&(l.setDomNode(o),o=o.previousSibling)}}_finishRenderingInvalidLines(e,t,n){const r=document.createElement("div");gd._ttPolicy&&(t=gd._ttPolicy.createHTML(t)),r.innerHTML=t;for(let s=0;si}),gd._sb=Og(1e5);class kj extends Qa{constructor(e){super(e),this._visibleLines=new Sj(this),this.domNode=this._visibleLines.domNode,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,r=t.length;n'),r.appendASCIIString(s),r.appendASCIIString(""),!0)}layoutLine(e,t){this._domNode&&(this._domNode.setTop(t),this._domNode.setHeight(this._lineHeight))}}class O3e extends kj{constructor(e){super(e);const n=this._context.configuration.options.get(131);this._contentWidth=n.contentWidth,this.domNode.setHeight(0)}onConfigurationChanged(e){const n=this._context.configuration.options.get(131);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 M3e extends kj{constructor(e){super(e);const t=this._context.configuration.options,n=t.get(131);this._contentLeft=n.contentLeft,this.domNode.setClassName("margin-view-overlays"),this.domNode.setWidth(1),ys(this.domNode,t.get(44))}onConfigurationChanged(e){const t=this._context.configuration.options;ys(this.domNode,t.get(44));const n=t.get(131);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 av{constructor(e,t){this._coordinateBrand=void 0,this.top=e,this.left=t}}class P3e extends Qa{constructor(e,t){super(e),this._viewDomNode=t,this._widgets={},this.domNode=Rn(document.createElement("div")),lu.write(this.domNode,1),this.domNode.setClassName("contentWidgets"),this.domNode.setPosition("absolute"),this.domNode.setTop(0),this.overflowingContentWidgetsDomNode=Rn(document.createElement("div")),lu.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){const t=Object.keys(this._widgets);for(const n of t)this._widgets[n].onLineMappingChanged(e);return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return!0}onZonesChanged(e){return!0}addWidget(e){const t=new F3e(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){this._widgets[e.getId()].setPosition(t,n),this.setShouldRender()}removeWidget(e){const t=e.getId();if(this._widgets.hasOwnProperty(t)){const n=this._widgets[t];delete this._widgets[t];const r=n.domNode.domNode;r.parentNode.removeChild(r),r.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)}}let F3e=class{constructor(e,t,n){this._context=e,this._viewDomNode=t,this._actual=n,this.domNode=Rn(this._actual.getDomNode()),this.id=this._actual.getId(),this.allowEditorOverflow=this._actual.allowEditorOverflow||!1,this.suppressMouseDown=this._actual.suppressMouseDown||!1;const r=this._context.configuration.options,s=r.get(131);this._fixedOverflowWidgets=r.get(36),this._contentWidth=s.contentWidth,this._contentLeft=s.contentLeft,this._lineHeight=r.get(59),this._range=null,this._viewRange=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(59),e.hasChanged(131)){const n=t.get(131);this._contentLeft=n.contentLeft,this._contentWidth=n.contentWidth,this._maxWidth=this._getMaxWidth()}}onLineMappingChanged(e){this._setPosition(this._range)}_setPosition(e){if(this._range=e,this._viewRange=null,this._range){const t=this._context.viewModel.model.validateRange(this._range);(this._context.viewModel.coordinatesConverter.modelPositionIsVisible(t.getStartPosition())||this._context.viewModel.coordinatesConverter.modelPositionIsVisible(t.getEndPosition()))&&(this._viewRange=this._context.viewModel.coordinatesConverter.convertModelRangeToViewRange(t))}}_getMaxWidth(){return this.allowEditorOverflow?window.innerWidth||document.documentElement.offsetWidth||document.body.offsetWidth:this._contentWidth}setPosition(e,t){this._setPosition(e),this._preference=t,this._viewRange&&this._preference&&this._preference.length>0?this.domNode.setDisplay("block"):this.domNode.setDisplay("none"),this._cachedDomNodeOffsetWidth=-1,this._cachedDomNodeOffsetHeight=-1}_layoutBoxInViewport(e,t,n,r,s){const o=e.top,a=o,l=t.top+this._lineHeight,c=s.viewportHeight-l,u=o-r,d=a>=r,h=l,f=c>=r;let g=e.left,p=t.left;return g+n>s.scrollLeft+s.viewportWidth&&(g=s.scrollLeft+s.viewportWidth-n),p+n>s.scrollLeft+s.viewportWidth&&(p=s.scrollLeft+s.viewportWidth-n),go){const l=a-(o-r);a-=l,n-=l}if(a=m,v=u+r<=d.height-_;return this._fixedOverflowWidgets?{fitsAbove:b,aboveTop:Math.max(c,m),aboveLeft:f,fitsBelow:v,belowTop:u,belowLeft:p}:{fitsAbove:b,aboveTop:o,aboveLeft:h,fitsBelow:v,belowTop:a,belowLeft:g}}_prepareRenderWidgetAtExactPositionOverflowing(e){return new av(e.top,e.left+this._contentLeft)}_getTopAndBottomLeft(e){if(!this._viewRange)return[null,null];const t=e.linesVisibleRangesForRange(this._viewRange,!1);if(!t||t.length===0)return[null,null];let n=t[0],r=t[0];for(const d of t)d.lineNumberr.lineNumber&&(r=d);let s=1073741824;for(const d of n.ranges)d.lefte.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"&&P6(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"&&P6(this._actual.afterRender,this._actual,this._renderData.position)}};function P6(i,e,...t){try{return i.call(e,...t)}catch{return null}}const Qgt="";class Ej extends K_{constructor(e){super(),this._context=e;const t=this._context.configuration.options,n=t.get(131);this._lineHeight=t.get(59),this._renderLineHighlight=t.get(85),this._renderLineHighlightOnlyWhenFocus=t.get(86),this._contentLeft=n.contentLeft,this._contentWidth=n.contentWidth,this._selectionIsEmpty=!0,this._focused=!1,this._cursorLineNumbers=[1],this._selections=[new ut(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(r=>r.positionLineNumber);t.sort((r,s)=>r-s),ra(this._cursorLineNumbers,t)||(this._cursorLineNumbers=t,e=!0);const n=this._selections.every(r=>r.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(131);return this._lineHeight=t.get(59),this._renderLineHighlight=t.get(85),this._renderLineHighlightOnlyWhenFocus=t.get(86),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,r=e.visibleRange.endLineNumber,s=this._cursorLineNumbers.length;let o=0;const a=[];for(let l=n;l<=r;l++){const c=l-n;for(;o=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 B3e extends Ej{_renderOne(e){return`
`}_shouldRenderThis(){return this._shouldRenderInContent()}_shouldRenderOther(){return this._shouldRenderInMargin()}}class V3e extends Ej{_renderOne(e){return`
`}_shouldRenderThis(){return!0}_shouldRenderOther(){return this._shouldRenderInContent()}}_i((i,e)=>{const t=i.getColor(W4e);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()||i.defines(aj)){const n=i.getColor(aj);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}; }`),i.type==="hc"&&(e.addRule(".monaco-editor .view-overlays .current-line { border-width: 1px; }"),e.addRule(".monaco-editor .margin-view-overlays .current-line-margin { border-width: 1px; }")))}});const Jgt="";class W3e extends K_{constructor(e){super(),this._context=e;const t=this._context.configuration.options;this._lineHeight=t.get(59),this._typicalHalfwidthCharacterWidth=t.get(44).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(59),this._typicalHalfwidthCharacterWidth=t.get(44).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=[],r=0;for(let l=0,c=t.length;l{if(l.options.zIndexc.options.zIndex)return 1;const u=l.options.className,d=c.options.className;return ud?1:H.compareRangesUsingStarts(l.range,c.range)});const s=e.visibleRange.startLineNumber,o=e.visibleRange.endLineNumber,a=[];for(let l=s;l<=o;l++){const c=l-s;a[c]=""}this._renderWholeLineDecorations(e,n,a),this._renderNormalDecorations(e,n,a),this._renderResult=a}_renderWholeLineDecorations(e,t,n){const r=String(this._lineHeight),s=e.visibleRange.startLineNumber,o=e.visibleRange.endLineNumber;for(let a=0,l=t.length;a',d=Math.max(c.range.startLineNumber,s),h=Math.min(c.range.endLineNumber,o);for(let f=d;f<=h;f++){const g=f-s;n[g]+=u}}}_renderNormalDecorations(e,t,n){const r=String(this._lineHeight),s=e.visibleRange.startLineNumber;let o=null,a=!1,l=null;for(let c=0,u=t.length;c';a[h]+=m}}}render(e,t){if(!this._renderResult)return"";const n=t-e;return n<0||n>=this._renderResult.length?"":this._renderResult[n]}}class Ll extends Ne{onclick(e,t){this._register(Xe(e,Nt.CLICK,n=>t(new Ga(n))))}onmousedown(e,t){this._register(Xe(e,Nt.MOUSE_DOWN,n=>t(new Ga(n))))}onmouseover(e,t){this._register(Xe(e,Nt.MOUSE_OVER,n=>t(new Ga(n))))}onnonbubblingmouseout(e,t){this._register(FI(e,n=>t(new Ga(n))))}onkeydown(e,t){this._register(Xe(e,Nt.KEY_DOWN,n=>t(new ki(n))))}onkeyup(e,t){this._register(Xe(e,Nt.KEY_UP,n=>t(new ki(n))))}oninput(e,t){this._register(Xe(e,Nt.INPUT,t))}onblur(e,t){this._register(Xe(e,Nt.BLUR,t))}onfocus(e,t){this._register(Xe(e,Nt.FOCUS,t))}ignoreGesture(e){ei.ignoreTarget(e)}}const t1=11;class H3e extends Ll{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(...e.icon.classNamesArray),this.domNode.style.position="absolute",this.domNode.style.width=t1+"px",this.domNode.style.height=t1+"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._mouseMoveMonitor=this._register(new Zg),this.onmousedown(this.bgDomNode,t=>this._arrowMouseDown(t)),this.onmousedown(this.domNode,t=>this._arrowMouseDown(t)),this._mousedownRepeatTimer=this._register(new Nb),this._mousedownScheduleRepeatTimer=this._register(new Wo)}_arrowMouseDown(e){const t=()=>{this._mousedownRepeatTimer.cancelAndSet(()=>this._onActivate(),41.666666666666664)};this._onActivate(),this._mousedownRepeatTimer.cancel(),this._mousedownScheduleRepeatTimer.cancelAndSet(t,200),this._mouseMoveMonitor.startMonitoring(e.target,e.buttons,P_,n=>{},()=>{this._mousedownRepeatTimer.cancel(),this._mousedownScheduleRepeatTimer.cancel()}),e.preventDefault()}}class z3e 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 Wo)}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(()=>{this._domNode&&this._domNode.setClassName(this._visibleClassName)},0))}_hide(e){this._revealTimer.cancel(),this._isVisible&&(this._isVisible=!1,this._domNode&&this._domNode.setClassName(this._invisibleClassName+(e?" fade":"")))}}const $3e=140;class xj extends Ll{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 z3e(e.visibility,"visible scrollbar "+e.extraScrollbarClassName,"invisible scrollbar "+e.extraScrollbarClassName)),this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._mouseMoveMonitor=this._register(new Zg),this._shouldRender=!0,this.domNode=Rn(document.createElement("div")),this.domNode.setAttribute("role","presentation"),this.domNode.setAttribute("aria-hidden","true"),this._visibilityController.setDomNode(this.domNode),this.domNode.setPosition("absolute"),this.onmousedown(this.domNode.domNode,t=>this._domNodeMouseDown(t))}_createArrow(e){const t=this._register(new H3e(e));this.domNode.domNode.appendChild(t.bgDomNode),this.domNode.domNode.appendChild(t.domNode)}_createSlider(e,t,n,r){this.slider=Rn(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 r=="number"&&this.slider.setHeight(r),this.slider.setLayerHinting(!0),this.slider.setContain("strict"),this.domNode.domNode.appendChild(this.slider.domNode),this.onmousedown(this.slider.domNode,s=>{s.leftButton&&(s.preventDefault(),this._sliderMouseDown(s,()=>{}))}),this.onclick(this.slider.domNode,s=>{s.leftButton&&s.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()))}_domNodeMouseDown(e){e.target===this.domNode.domNode&&this._onMouseDown(e)}delegateMouseDown(e){const t=this.domNode.domNode.getClientRects()[0].top,n=t+this._scrollbarState.getSliderPosition(),r=t+this._scrollbarState.getSliderPosition()+this._scrollbarState.getSliderSize(),s=this._sliderMousePosition(e);n<=s&&s<=r?e.leftButton&&(e.preventDefault(),this._sliderMouseDown(e,()=>{})):this._onMouseDown(e)}_onMouseDown(e){let t,n;if(e.target===this.domNode.domNode&&typeof e.browserEvent.offsetX=="number"&&typeof e.browserEvent.offsetY=="number")t=e.browserEvent.offsetX,n=e.browserEvent.offsetY;else{const s=ss(this.domNode.domNode);t=e.posx-s.left,n=e.posy-s.top}const r=this._mouseDownRelativePosition(t,n);this._setDesiredScrollPositionNow(this._scrollByPage?this._scrollbarState.getDesiredScrollPositionFromOffsetPaged(r):this._scrollbarState.getDesiredScrollPositionFromOffset(r)),e.leftButton&&(e.preventDefault(),this._sliderMouseDown(e,()=>{}))}_sliderMouseDown(e,t){const n=this._sliderMousePosition(e),r=this._sliderOrthogonalMousePosition(e),s=this._scrollbarState.clone();this.slider.toggleClassName("active",!0),this._mouseMoveMonitor.startMonitoring(e.target,e.buttons,P_,o=>{const a=this._sliderOrthogonalMousePosition(o),l=Math.abs(a-r);if(Gr&&l>$3e){this._setDesiredScrollPositionNow(s.getScrollPosition());return}const u=this._sliderMousePosition(o)-n;this._setDesiredScrollPositionNow(s.getDesiredScrollPositionFromDelta(u))},()=>{this.slider.toggleClassName("active",!1),this._host.onDragEnd(),t()}),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 U3e=20;class lv{constructor(e,t,n,r,s,o){this._scrollbarSize=Math.round(t),this._oppositeScrollbarSize=Math.round(n),this._arrowSize=Math.round(e),this._visibleSize=r,this._scrollSize=s,this._scrollPosition=o,this._computedAvailableSize=0,this._computedIsNeeded=!1,this._computedSliderSize=0,this._computedSliderRatio=0,this._computedSliderPosition=0,this._refreshComputedValues()}clone(){return new lv(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,r,s){const o=Math.max(0,n-e),a=Math.max(0,o-2*t),l=r>0&&r>n;if(!l)return{computedAvailableSize:Math.round(o),computedIsNeeded:l,computedSliderSize:Math.round(a),computedSliderRatio:0,computedSliderPosition:0};const c=Math.round(Math.max(U3e,Math.floor(n*a/r))),u=(a-c)/(r-n),d=s*u;return{computedAvailableSize:Math.round(o),computedIsNeeded:l,computedSliderSize:Math.round(c),computedSliderRatio:u,computedSliderPosition:Math.round(d)}}_refreshComputedValues(){const e=lv._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 T_(null,1,0))}),this._createArrow({className:"scra",icon:k.scrollbarButtonRight,top:a,left:void 0,bottom:void 0,right:o,bgWidth:t.arrowSize,bgHeight:t.horizontalScrollbarSize,onActivate:()=>this._host.onMouseWheel(new T_(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}_mouseDownRelativePosition(e,t){return e}_sliderMousePosition(e){return e.posx}_sliderOrthogonalMousePosition(e){return e.posy}_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 q3e extends xj{constructor(e,t,n){const r=e.getScrollDimensions(),s=e.getCurrentScrollPosition();if(super({lazyRender:t.lazyRender,host:n,scrollbarState:new lv(t.verticalHasArrows?t.arrowSize:0,t.vertical===2?0:t.verticalScrollbarSize,0,r.height,r.scrollHeight,s.scrollTop),visibility:t.vertical,extraScrollbarClassName:"vertical",scrollable:e,scrollByPage:t.scrollByPage}),t.verticalHasArrows){const o=(t.arrowSize-t1)/2,a=(t.verticalScrollbarSize-t1)/2;this._createArrow({className:"scra",icon:k.scrollbarButtonUp,top:o,left:a,bottom:void 0,right:void 0,bgWidth:t.verticalScrollbarSize,bgHeight:t.arrowSize,onActivate:()=>this._host.onMouseWheel(new T_(null,0,1))}),this._createArrow({className:"scra",icon:k.scrollbarButtonDown,top:void 0,left:a,bottom:o,right:void 0,bgWidth:t.verticalScrollbarSize,bgHeight:t.arrowSize,onActivate:()=>this._host.onMouseWheel(new T_(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}_mouseDownRelativePosition(e,t){return t}_sliderMousePosition(e){return e.posy}_sliderOrthogonalMousePosition(e){return e.posx}_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 hk{constructor(e,t,n,r,s,o,a){this._forceIntegerValues=e,this._scrollStateBrand=void 0,this._forceIntegerValues&&(t=t|0,n=n|0,r=r|0,s=s|0,o=o|0,a=a|0),this.rawScrollLeft=r,this.rawScrollTop=a,t<0&&(t=0),r+t>n&&(r=n-t),r<0&&(r=0),s<0&&(s=0),a+s>o&&(a=o-s),a<0&&(a=0),this.width=t,this.scrollWidth=n,this.scrollLeft=r,this.height=s,this.scrollHeight=o,this.scrollTop=a}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 hk(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 hk(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,r=this.scrollWidth!==e.scrollWidth,s=this.scrollLeft!==e.scrollLeft,o=this.height!==e.height,a=this.scrollHeight!==e.scrollHeight,l=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:r,scrollLeftChanged:s,heightChanged:o,scrollHeightChanged:a,scrollTopChanged:l}}}class cv extends Ne{constructor(e){super(),this._scrollableBrand=void 0,this._onScroll=this._register(new be),this.onScroll=this._onScroll.event,this._smoothScrollDuration=e.smoothScrollDuration,this._scheduleAtNextAnimationFrame=e.scheduleAtNextAnimationFrame,this._state=new hk(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){const n=this._state.withScrollDimensions(e,t);this._setState(n,Boolean(this._smoothScrolling)),this._smoothScrolling&&this._smoothScrolling.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 r;t?r=new uv(this._smoothScrolling.from,n,this._smoothScrolling.startTime,this._smoothScrolling.duration):r=this._smoothScrolling.combine(this._state,n,this._smoothScrollDuration),this._smoothScrolling.dispose(),this._smoothScrolling=r}else{const n=this._state.withScrollPosition(e);this._smoothScrolling=uv.start(this._state,n,this._smoothScrollDuration)}this._smoothScrolling.animationFrameDisposable=this._scheduleAtNextAnimationFrame(()=>{this._smoothScrolling&&(this._smoothScrolling.animationFrameDisposable=null,this._performSmoothScrolling())})}_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 Lj{constructor(e,t,n){this.scrollLeft=e,this.scrollTop=t,this.isDone=n}}function F6(i,e){const t=e-i;return function(n){return i+t*Y3e(n)}}function G3e(i,e,t){return function(n){return n2.5*n){let s,o;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}}B6.INSTANCE=new B6;class V6 extends Ll{constructor(e,t,n){super(),this._onScroll=this._register(new be),this.onScroll=this._onScroll.event,this._onWillScroll=this._register(new be),e.style.overflow="hidden",this._options=Q3e(t),this._scrollable=n,this._register(this._scrollable.onScroll(s=>{this._onWillScroll.fire(s),this._onDidScroll(s),this._onScroll.fire(s)}));const r={onMouseWheel:s=>this._onMouseWheel(s),onDragStart:()=>this._onDragStart(),onDragEnd:()=>this._onDragEnd()};this._verticalScrollbar=this._register(new q3e(this._scrollable,this._options,r)),this._horizontalScrollbar=this._register(new j3e(this._scrollable,this._options,r)),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=Rn(document.createElement("div")),this._leftShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._leftShadowDomNode.domNode),this._topShadowDomNode=Rn(document.createElement("div")),this._topShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._topShadowDomNode.domNode),this._topLeftShadowDomNode=Rn(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,s=>this._onMouseOver(s)),this.onnonbubblingmouseout(this._listenOnDomNode,s=>this._onMouseOut(s)),this._hideTimeout=this._register(new Wo),this._isDragging=!1,this._mouseIsOver=!1,this._shouldRender=!0,this._revealOnScroll=!0}get options(){return this._options}dispose(){this._mouseWheelToDispose=Nn(this._mouseWheelToDispose),super.dispose()}getDomNode(){return this._domNode}getOverviewRulerLayoutInfo(){return{parent:this._domNode,insertBefore:this._verticalScrollbar.domNode.domNode}}delegateVerticalScrollbarMouseDown(e){this._verticalScrollbar.delegateMouseDown(e)}getScrollDimensions(){return this._scrollable.getScrollDimensions()}setScrollDimensions(e){this._scrollable.setScrollDimensions(e,!1)}updateClassName(e){this._options.className=e,gn&&(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()}_setListeningToMouseWheel(e){if(this._mouseWheelToDispose.length>0!==e&&(this._mouseWheelToDispose=Nn(this._mouseWheelToDispose),e)){const n=r=>{this._onMouseWheel(new T_(r))};this._mouseWheelToDispose.push(Xe(this._listenOnDomNode,Nt.MOUSE_WHEEL,n,{passive:!1}))}}_onMouseWheel(e){const t=B6.INSTANCE;{const s=window.devicePixelRatio/Hz();Gr||ws?t.accept(Date.now(),e.deltaX/s,e.deltaY/s):t.accept(Date.now(),e.deltaX,e.deltaY)}let n=!1;if(e.deltaY||e.deltaX){let s=e.deltaY*this._options.mouseWheelScrollSensitivity,o=e.deltaX*this._options.mouseWheelScrollSensitivity;this._options.scrollPredominantAxis&&(Math.abs(s)>=Math.abs(o)?o=0:s=0),this._options.flipAxes&&([s,o]=[o,s]);const a=!gn&&e.browserEvent&&e.browserEvent.shiftKey;(this._options.scrollYToX||a)&&!o&&(o=s,s=0),e.browserEvent&&e.browserEvent.altKey&&(o=o*this._options.fastScrollSensitivity,s=s*this._options.fastScrollSensitivity);const l=this._scrollable.getFutureScrollPosition();let c={};if(s){const u=Tj*s,d=l.scrollTop-(u<0?Math.floor(u):Math.ceil(u));this._verticalScrollbar.writeScrollPosition(c,d)}if(o){const u=Tj*o,d=l.scrollLeft-(u<0?Math.floor(u):Math.ceil(u));this._horizontalScrollbar.writeScrollPosition(c,d)}c=this._scrollable.validateScrollPosition(c),(l.scrollLeft!==c.scrollLeft||l.scrollTop!==c.scrollTop)&&(this._options.mouseWheelSmoothScroll&&t.isPhysicalMouseWheel()?this._scrollable.setScrollPositionSmooth(c):this._scrollable.setScrollPositionNow(c),n=!0)}let r=n;!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,r=n?" left":"",s=t?" top":"",o=n||t?" top-left-corner":"";this._leftShadowDomNode.setClassName(`shadow${r}`),this._topShadowDomNode.setClassName(`shadow${s}`),this._topLeftShadowDomNode.setClassName(`shadow${o}${s}${r}`)}}_onDragStart(){this._isDragging=!0,this._reveal()}_onDragEnd(){this._isDragging=!1,this._hide()}_onMouseOut(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(),Z3e)}}class Ij extends V6{constructor(e,t){t=t||{},t.mouseWheelSmoothScroll=!1;const n=new cv({forceIntegerValues:!0,smoothScrollDuration:0,scheduleAtNextAnimationFrame:r=>dc(r)});super(e,t,n),this._register(n)}setScrollPosition(e){this._scrollable.setScrollPositionNow(e)}}class W6 extends V6{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 dv extends V6{constructor(e,t){t=t||{},t.mouseWheelSmoothScroll=!1;const n=new cv({forceIntegerValues:!1,smoothScrollDuration:0,scheduleAtNextAnimationFrame:r=>dc(r)});super(e,t,n),this._register(n),this._element=e,this.onScroll(r=>{r.scrollTopChanged&&(this._element.scrollTop=r.scrollTop),r.scrollLeftChanged&&(this._element.scrollLeft=r.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 Q3e(i){const e={lazyRender:typeof i.lazyRender<"u"?i.lazyRender:!1,className:typeof i.className<"u"?i.className:"",useShadows:typeof i.useShadows<"u"?i.useShadows:!0,handleMouseWheel:typeof i.handleMouseWheel<"u"?i.handleMouseWheel:!0,flipAxes:typeof i.flipAxes<"u"?i.flipAxes:!1,consumeMouseWheelIfScrollbarIsNeeded:typeof i.consumeMouseWheelIfScrollbarIsNeeded<"u"?i.consumeMouseWheelIfScrollbarIsNeeded:!1,alwaysConsumeMouseWheel:typeof i.alwaysConsumeMouseWheel<"u"?i.alwaysConsumeMouseWheel:!1,scrollYToX:typeof i.scrollYToX<"u"?i.scrollYToX:!1,mouseWheelScrollSensitivity:typeof i.mouseWheelScrollSensitivity<"u"?i.mouseWheelScrollSensitivity:1,fastScrollSensitivity:typeof i.fastScrollSensitivity<"u"?i.fastScrollSensitivity:5,scrollPredominantAxis:typeof i.scrollPredominantAxis<"u"?i.scrollPredominantAxis:!0,mouseWheelSmoothScroll:typeof i.mouseWheelSmoothScroll<"u"?i.mouseWheelSmoothScroll:!0,arrowSize:typeof i.arrowSize<"u"?i.arrowSize:11,listenOnDomNode:typeof i.listenOnDomNode<"u"?i.listenOnDomNode:null,horizontal:typeof i.horizontal<"u"?i.horizontal:1,horizontalScrollbarSize:typeof i.horizontalScrollbarSize<"u"?i.horizontalScrollbarSize:10,horizontalSliderSize:typeof i.horizontalSliderSize<"u"?i.horizontalSliderSize:0,horizontalHasArrows:typeof i.horizontalHasArrows<"u"?i.horizontalHasArrows:!1,vertical:typeof i.vertical<"u"?i.vertical:1,verticalScrollbarSize:typeof i.verticalScrollbarSize<"u"?i.verticalScrollbarSize:10,verticalHasArrows:typeof i.verticalHasArrows<"u"?i.verticalHasArrows:!1,verticalSliderSize:typeof i.verticalSliderSize<"u"?i.verticalSliderSize:0,scrollByPage:typeof i.scrollByPage<"u"?i.scrollByPage:!1};return e.horizontalSliderSize=typeof i.horizontalSliderSize<"u"?i.horizontalSliderSize:e.horizontalScrollbarSize,e.verticalSliderSize=typeof i.verticalSliderSize<"u"?i.verticalSliderSize:e.verticalScrollbarSize,gn&&(e.className+=" mac"),e}class J3e extends Qa{constructor(e,t,n,r){super(e);const s=this._context.configuration.options,o=s.get(92),a=s.get(67),l=s.get(34),c=s.get(95),u={listenOnDomNode:n.domNode,className:"editor-scrollable "+PS(e.theme.type),useShadows:!1,lazyRender:!0,vertical:o.vertical,horizontal:o.horizontal,verticalHasArrows:o.verticalHasArrows,horizontalHasArrows:o.horizontalHasArrows,verticalScrollbarSize:o.verticalScrollbarSize,verticalSliderSize:o.verticalSliderSize,horizontalScrollbarSize:o.horizontalScrollbarSize,horizontalSliderSize:o.horizontalSliderSize,handleMouseWheel:o.handleMouseWheel,alwaysConsumeMouseWheel:o.alwaysConsumeMouseWheel,arrowSize:o.arrowSize,mouseWheelScrollSensitivity:a,fastScrollSensitivity:l,scrollPredominantAxis:c,scrollByPage:o.scrollByPage};this.scrollbar=this._register(new W6(t.domNode,u,this._context.viewLayout.getScrollable())),lu.write(this.scrollbar.getDomNode(),5),this.scrollbarDomNode=Rn(this.scrollbar.getDomNode()),this.scrollbarDomNode.setPosition("absolute"),this._setLayout();const d=(h,f,g)=>{const p={};if(f){const m=h.scrollTop;m&&(p.scrollTop=this._context.viewLayout.getCurrentScrollTop()+m,h.scrollTop=0)}if(g){const m=h.scrollLeft;m&&(p.scrollLeft=this._context.viewLayout.getCurrentScrollLeft()+m,h.scrollLeft=0)}this._context.viewModel.viewLayout.setScrollPosition(p,1)};this._register(Xe(n.domNode,"scroll",h=>d(n.domNode,!0,!0))),this._register(Xe(t.domNode,"scroll",h=>d(t.domNode,!0,!1))),this._register(Xe(r.domNode,"scroll",h=>d(r.domNode,!0,!1))),this._register(Xe(this.scrollbarDomNode.domNode,"scroll",h=>d(this.scrollbarDomNode.domNode,!0,!1)))}dispose(){super.dispose()}_setLayout(){const e=this._context.configuration.options,t=e.get(131);this.scrollbarDomNode.setLeft(t.contentLeft),e.get(65).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}delegateVerticalScrollbarMouseDown(e){this.scrollbar.delegateVerticalScrollbarMouseDown(e)}onConfigurationChanged(e){if(e.hasChanged(92)||e.hasChanged(67)||e.hasChanged(34)){const t=this._context.configuration.options,n=t.get(92),r=t.get(67),s=t.get(34),o=t.get(95),a={vertical:n.vertical,horizontal:n.horizontal,verticalScrollbarSize:n.verticalScrollbarSize,horizontalScrollbarSize:n.horizontalScrollbarSize,scrollByPage:n.scrollByPage,handleMouseWheel:n.handleMouseWheel,mouseWheelScrollSensitivity:r,fastScrollSensitivity:s,scrollPredominantAxis:o};this.scrollbar.updateOptions(a)}return e.hasChanged(131)&&this._setLayout(),!0}onScrollChanged(e){return!0}onThemeChanged(e){return this.scrollbar.updateClassName("editor-scrollable "+PS(this._context.theme.type)),!0}prepareRender(e){}render(e){this.scrollbar.renderNow()}}_i((i,e)=>{const t=i.getColor(F_);t&&e.addRule(` + .monaco-scrollable-element > .shadow.top { + box-shadow: ${t} 0 6px 6px -6px inset; + } + + .monaco-scrollable-element > .shadow.left { + box-shadow: ${t} 6px 0 6px -6px inset; + } + + .monaco-scrollable-element > .shadow.top.left { + box-shadow: ${t} 6px 6px 6px -6px inset; + } + `);const n=i.getColor(B_);n&&e.addRule(` + .monaco-scrollable-element > .scrollbar > .slider { + background: ${n}; + } + `);const r=i.getColor(V_);r&&e.addRule(` + .monaco-scrollable-element > .scrollbar > .slider:hover { + background: ${r}; + } + `);const s=i.getColor(W_);s&&e.addRule(` + .monaco-scrollable-element > .scrollbar > .slider.active { + background: ${s}; + } + `)});const tpt="";class fk{constructor(e,t,n){this._decorationToRenderBrand=void 0,this.startLineNumber=+e,this.endLineNumber=+t,this.className=String(n)}}class H6 extends K_{_render(e,t,n){const r=[];for(let a=e;a<=t;a++){const l=a-e;r[l]=[]}if(n.length===0)return r;n.sort((a,l)=>a.className===l.className?a.startLineNumber===l.startLineNumber?a.endLineNumber-l.endLineNumber:a.startLineNumber-l.startLineNumber:a.className',c=[];for(let u=t;u<=n;u++){const d=u-t,h=r[d];h.length===0?c[d]="":c[d]='
=this._renderResult.length?"":this._renderResult[n]}}const npt="";class tEe{constructor(){this._isDisposed=!1}dispose(){this._isDisposed=!0}assertNotDisposed(){if(this._isDisposed)throw new Error("TextModelPart is disposed!")}}function gk(i,e){let t=0,n=0;const r=i.length;for(;nr)throw new Error("Illegal value for lineNumber");const s=this.getLanguageConfiguration(this.textModel.getLanguageId()).foldingRules,o=Boolean(s&&s.offSide);let a=-2,l=-1,c=-2,u=-1;const d=x=>{if(a!==-1&&(a===-2||a>x-1)){a=-1,l=-1;for(let T=x-2;T>=0;T--){const L=this._computeIndentLevel(T);if(L>=0){a=T,l=L;break}}}if(c===-2){c=-1,u=-1;for(let T=x;T=0){c=T,u=L;break}}}};let h=-2,f=-1,g=-2,p=-1;const m=x=>{if(h===-2){h=-1,f=-1;for(let T=x-2;T>=0;T--){const L=this._computeIndentLevel(T);if(L>=0){h=T,f=L;break}}}if(g!==-1&&(g===-2||g=0){g=T,p=L;break}}}};let _=0,b=!0,v=0,w=!0,E=0,I=0;for(let x=0;b||w;x++){const T=e-x,L=e+x;x>1&&(T<1||T1&&(L>r||L>n)&&(w=!1),x>5e4&&(b=!1,w=!1);let O=-1;if(b&&T>=1){const P=this._computeIndentLevel(T-1);P>=0?(c=T-1,u=P,O=Math.ceil(P/this.textModel.getOptions().indentSize)):(d(T),O=this._getIndentLevelForWhitespaceLine(o,l,u))}let N=-1;if(w&&L<=r){const P=this._computeIndentLevel(L-1);P>=0?(h=L-1,f=P,N=Math.ceil(P/this.textModel.getOptions().indentSize)):(m(L),N=this._getIndentLevelForWhitespaceLine(o,f,p))}if(x===0){I=O;continue}if(x===1){if(L<=r&&N>=0&&I+1===N){b=!1,_=L,v=L,E=N;continue}if(T>=1&&O>=0&&O-1===I){w=!1,_=T,v=T,E=O;continue}if(_=e,v=e,E=I,E===0)return{startLineNumber:_,endLineNumber:v,indent:E}}b&&(O>=E?_=T:b=!1),w&&(N>=E?v=L:w=!1)}return{startLineNumber:_,endLineNumber:v,indent:E}}getLinesBracketGuides(e,t,n,r){var s,o,a,l,c;const u=[],d=this.textModel.bracketPairs.getBracketPairsInRangeWithMinIndentation(new H(e,1,t,this.textModel.getLineMaxColumn(t)));let h;if(n&&d.length>0){const _=e<=n.lineNumber&&n.lineNumber<=t?d.filter(b=>H.strictContainsPosition(b.range,n)):this.textModel.bracketPairs.getBracketPairsInRange(H.fromPositions(n));h=(s=Yve(_,b=>b.range.startLineNumber!==b.range.endLineNumber))===null||s===void 0?void 0:s.range}const f=new s_(d),g=new Array,p=new Array,m=new Dj;for(let _=e;_<=t;_++){let b=new Array;p.length>0&&(b=b.concat(p),p.length=0),u.push(b);for(const w of f.takeWhile(E=>E.openingBracketRange.startLineNumber<=_)||[]){if(w.range.startLineNumber===w.range.endLineNumber)continue;const E=Math.min(this.getVisibleColumnFromPosition(w.openingBracketRange.getStartPosition()),this.getVisibleColumnFromPosition((a=(o=w.closingBracketRange)===null||o===void 0?void 0:o.getStartPosition())!==null&&a!==void 0?a:w.range.getEndPosition()),w.minVisibleColumnIndentation+1);let I=!1;w.closingBracketRange&&Ks(this.textModel.getLineContent(w.closingBracketRange.startLineNumber))=0;w--){const E=g[w];if(!E)continue;const I=r.highlightActive&&h&&E.bracketPair.range.equalsRange(h),x=m.getInlineClassNameOfLevel(E.nestingLevel)+(I?" "+m.activeClassName:"");(I||r.includeInactive)&&E.renderHorizontalEndLineAtTheBottom&&E.end.lineNumber===_+1&&p.push(new n1(E.guideVisibleColumn,x,null)),!(E.end.lineNumber<=_||E.start.lineNumber>=_)&&(E.guideVisibleColumn>=v&&!I||(v=E.guideVisibleColumn,(I||r.includeInactive)&&b.push(new n1(E.guideVisibleColumn,x,null))))}b.sort((w,E)=>w.visibleColumn-E.visibleColumn)}return u}getVisibleColumnFromPosition(e){return Nr.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 r=this.textModel.getOptions(),s=this.getLanguageConfiguration(this.textModel.getLanguageId()).foldingRules,o=Boolean(s&&s.offSide),a=new Array(t-e+1);let l=-2,c=-1,u=-2,d=-1;for(let h=e;h<=t;h++){const f=h-e,g=this._computeIndentLevel(h-1);if(g>=0){l=h-1,c=g,a[f]=Math.ceil(g/r.indentSize);continue}if(l===-2){l=-1,c=-1;for(let p=h-2;p>=0;p--){const m=this._computeIndentLevel(p);if(m>=0){l=p,c=m;break}}}if(u!==-1&&(u===-2||u=0){u=p,d=m;break}}}a[f]=this._getIndentLevelForWhitespaceLine(o,c,d)}return a}_getIndentLevelForWhitespaceLine(e,t,n){const r=this.textModel.getOptions();return t===-1||n===-1?0:tl||this._maxIndentLeft>0&&v>this._maxIndentLeft)break;const w=b.horizontalLine?b.horizontalLine.top?"horizontal-top":"horizontal-bottom":"vertical",E=b.horizontalLine?((s=(r=e.visibleRangeForPosition(new ye(f,b.horizontalLine.endColumn)))===null||r===void 0?void 0:r.left)!==null&&s!==void 0?s:v+this._spaceWidth)-v:this._spaceWidth;m+=`
`}h[g]=m}this._renderResult=h}getGuidesByLine(e,t,n){const r=this._bracketPairGuideOptions.bracketPairs!==!1?this._context.viewModel.getBracketGuidesInRangeByLine(e,t,n,{highlightActive:this._bracketPairGuideOptions.highlightActiveBracketPair,horizontalGuides:this._bracketPairGuideOptions.bracketPairsHorizontal===!0?fp.Enabled:this._bracketPairGuideOptions.bracketPairsHorizontal==="active"?fp.EnabledForActive:fp.Disabled,includeInactive:this._bracketPairGuideOptions.bracketPairs===!0}):null,s=this._bracketPairGuideOptions.indentation?this._context.viewModel.getLinesIndentGuides(e,t):null;let o=0,a=0,l=0;if(this._bracketPairGuideOptions.highlightActiveIndentation&&n){const d=this._context.viewModel.getActiveIndentGuide(n.lineNumber,e,t);o=d.startLineNumber,a=d.endLineNumber,l=d.indent}const{indentSize:c}=this._context.viewModel.model.getOptions(),u=[];for(let d=e;d<=t;d++){const h=new Array;u.push(h);const f=r?r[d-e]:[],g=new s_(f),p=s?s[d-e]:[];for(let m=1;m<=p;m++){const _=(m-1)*c+1,b=f.length===0&&o<=d&&d<=a&&m===l;h.push(...g.takeWhile(w=>w.visibleColumn<_)||[]);const v=g.peek();(!v||v.visibleColumn!==_||v.horizontalLine)&&h.push(new n1(_,b?"core-guide-indent-active":"core-guide-indent",null))}h.push(...g.takeWhile(m=>!0)||[])}return u}render(e,t){if(!this._renderResult)return"";const n=t-e;return n<0||n>=this._renderResult.length?"":this._renderResult[n]}}function pk(i){if(!(i&&i.isTransparent()))return i}_i((i,e)=>{const t=i.getColor(tk);t&&e.addRule(`.monaco-editor .lines-content .core-guide-indent { box-shadow: 1px 0 0 0 ${t} inset; }`);const n=i.getColor(nk)||t;n&&e.addRule(`.monaco-editor .lines-content .core-guide-indent-active { box-shadow: 1px 0 0 0 ${n} inset; }`);const r=[{bracketColor:dj,guideColor:l3e,guideColorActive:g3e},{bracketColor:hj,guideColor:c3e,guideColorActive:p3e},{bracketColor:fj,guideColor:u3e,guideColorActive:m3e},{bracketColor:gj,guideColor:d3e,guideColorActive:_3e},{bracketColor:pj,guideColor:h3e,guideColorActive:b3e},{bracketColor:mj,guideColor:f3e,guideColorActive:v3e}],s=new Dj,o=r.map(a=>{var l,c;const u=i.getColor(a.bracketColor),d=i.getColor(a.guideColor),h=i.getColor(a.guideColorActive),f=pk((l=pk(d))!==null&&l!==void 0?l:u==null?void 0:u.transparent(.3)),g=pk((c=pk(h))!==null&&c!==void 0?c:u);if(!(!f||!g))return{guideColor:f,guideColorActive:g}}).filter(twe);if(o.length>0){for(let a=0;a<30;a++){const l=o[a%o.length];e.addRule(`.monaco-editor .${s.getInlineClassNameOfLevel(a).replace(/ /g,".")} { --guide-color: ${l.guideColor}; --guide-color-active: ${l.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.${s.activeClassName} { box-shadow: 1px 0 0 0 var(--guide-color-active) inset; }`),e.addRule(`.monaco-editor .horizontal-top.${s.activeClassName} { border-top: 1px solid var(--guide-color-active); }`),e.addRule(`.monaco-editor .horizontal-bottom.${s.activeClassName} { border-bottom: 1px solid var(--guide-color-active); }`)}});const ipt="";class rEe{constructor(){this._currentVisibleRange=new H(1,1,1,1)}getCurrentVisibleRange(){return this._currentVisibleRange}setCurrentVisibleRange(e){this._currentVisibleRange=e}}class sEe{constructor(e,t,n,r,s,o,a){this.minimalReveal=e,this.lineNumber=t,this.startColumn=n,this.endColumn=r,this.startScrollTop=s,this.stopScrollTop=o,this.scrollType=a,this.type="range",this.minLineNumber=t,this.maxLineNumber=t}}class oEe{constructor(e,t,n,r,s){this.minimalReveal=e,this.selections=t,this.startScrollTop=n,this.stopScrollTop=r,this.scrollType=s,this.type="selections";let o=t[0].startLineNumber,a=t[0].endLineNumber;for(let l=1,c=t.length;l{this._updateLineWidthsSlow()},200),this._asyncCheckMonospaceFontAssumptions=new ri(()=>{this._checkMonospaceFontAssumptions()},2e3),this._lastRenderedData=new rEe,this._horizontalRevealRequest=null}dispose(){this._asyncUpdateLineWidths.dispose(),this._asyncCheckMonospaceFontAssumptions.dispose(),super.dispose()}getDomNode(){return this.domNode}createVisibleLine(){return new cu(this._viewLineOptions)}onConfigurationChanged(e){this._visibleLines.onConfigurationChanged(e),e.hasChanged(132)&&(this._maxLineWidth=0);const t=this._context.configuration.options,n=t.get(44),r=t.get(132),s=t.get(131);return this._lineHeight=t.get(59),this._typicalHalfwidthCharacterWidth=n.typicalHalfwidthCharacterWidth,this._isViewportWrapping=r.isViewportWrapping,this._revealHorizontalRightPadding=t.get(89),this._horizontalScrollbarHeight=s.horizontalScrollbarHeight,this._cursorSurroundingLines=t.get(25),this._cursorSurroundingLinesStyle=t.get(26),this._canUseLayerHinting=!t.get(28),ys(this.domNode,n),this._onOptionsMaybeChanged(),e.hasChanged(131)&&(this._maxLineWidth=0),!0}_onOptionsMaybeChanged(){const e=this._context.configuration,t=new nj(e,this._context.theme.type);if(!this._viewLineOptions.equals(t)){this._viewLineOptions=t;const n=this._visibleLines.getStartLineNumber(),r=this._visibleLines.getEndLineNumber();for(let s=n;s<=r;s++)this._visibleLines.getVisibleLine(s).onOptionsChanged(this._viewLineOptions);return!0}return!1}onCursorStateChanged(e){const t=this._visibleLines.getStartLineNumber(),n=this._visibleLines.getEndLineNumber();let r=!1;for(let s=t;s<=n;s++)r=this._visibleLines.getVisibleLine(s).onSelectionChanged()||r;return r}onDecorationsChanged(e){{const t=this._visibleLines.getStartLineNumber(),n=this._visibleLines.getEndLineNumber();for(let r=t;r<=n;r++)this._visibleLines.getVisibleLine(r).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 sEe(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 oEe(e.minimalReveal,e.selections,this._context.viewLayout.getCurrentScrollTop(),n.scrollTop,e.scrollType)):this._horizontalRevealRequest=null;const s=Math.abs(this._context.viewLayout.getCurrentScrollTop()-n.scrollTop)<=this._lineHeight?1:e.scrollType;return this._context.viewModel.viewLayout.setScrollPosition(n,s),!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 r=this._getLineNumberFor(n);if(r===-1||r<1||r>this._context.viewModel.getLineCount())return null;if(this._context.viewModel.getLineMaxColumn(r)===1)return new ye(r,1);const s=this._visibleLines.getStartLineNumber(),o=this._visibleLines.getEndLineNumber();if(ro)return null;let a=this._visibleLines.getVisibleLine(r).getColumnOfNodeOffset(r,e,t);const l=this._context.viewModel.getLineMinColumn(r);return an?-1:this._visibleLines.getVisibleLine(e).getWidth()}linesVisibleRangesForRange(e,t){if(this.shouldRender())return null;const n=e.endLineNumber,r=H.intersectRanges(e,this._lastRenderedData.getCurrentVisibleRange());if(!r)return null;let s=[],o=0;const a=new tj(this.domNode.domNode,this._textRangeRestingSpot);let l=0;t&&(l=this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(new ye(r.startLineNumber,1)).lineNumber);const c=this._visibleLines.getStartLineNumber(),u=this._visibleLines.getEndLineNumber();for(let d=r.startLineNumber;d<=r.endLineNumber;d++){if(du)continue;const h=d===r.startLineNumber?r.startColumn:1,f=d===r.endLineNumber?r.endColumn:this._context.viewModel.getLineMaxColumn(d),g=this._visibleLines.getVisibleLine(d).getVisibleRangesForRange(d,h,f,a);if(g){if(t&&dthis._visibleLines.getEndLineNumber()?null:this._visibleLines.getVisibleLine(e).getVisibleRangesForRange(e,t,n,new tj(this.domNode.domNode,this._textRangeRestingSpot))}visibleRangeForPosition(e){const t=this._visibleRangesForLineRange(e.lineNumber,e.column,e.column);return t?new k4e(t.outsideRenderedLine,t.ranges[0].left):null}updateLineWidths(){this._updateLineWidths(!1)}_updateLineWidthsFast(){return this._updateLineWidths(!0)}_updateLineWidthsSlow(){this._updateLineWidths(!1)}_updateLineWidths(e){const t=this._visibleLines.getStartLineNumber(),n=this._visibleLines.getEndLineNumber();let r=1,s=!0;for(let o=t;o<=n;o++){const a=this._visibleLines.getVisibleLine(o);if(e&&!a.getWidthIsFast()){s=!1;continue}r=Math.max(r,a.getWidth())}return s&&t===1&&n===this._context.viewModel.getLineCount()&&(this._maxLineWidth=0),this._ensureMaxLineWidth(r),s}_checkMonospaceFontAssumptions(){let e=-1,t=-1;const n=this._visibleLines.getStartLineNumber(),r=this._visibleLines.getEndLineNumber();for(let s=n;s<=r;s++){const o=this._visibleLines.getVisibleLine(s);if(o.needsMonospaceFontCheck()){const a=o.getWidth();a>t&&(t=a,e=s)}}if(e!==-1&&!this._visibleLines.getVisibleLine(e).monospaceAssumptionsAreValid())for(let s=n;s<=r;s++)this._visibleLines.getVisibleLine(s).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 r=this._computeScrollLeftToReveal(n);r&&(this._isViewportWrapping||this._ensureMaxLineWidth(r.maxHorizontalOffset),this._context.viewModel.viewLayout.setScrollPosition({scrollLeft:r.scrollLeft},n.scrollType))}}if(this._updateLineWidthsFast()||this._asyncUpdateLineWidths.schedule(),ws&&!this._asyncCheckMonospaceFontAssumptions.isScheduled()){const n=this._visibleLines.getStartLineNumber(),r=this._visibleLines.getEndLineNumber();for(let s=n;s<=r;s++)if(this._visibleLines.getVisibleLine(s).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=s[0].startLineNumber,m=s[0].endLineNumber;for(let _=1,b=s.length;_l){if(!u)return-1;g=d}else if(o===5||o===6)if(o===6&&a<=d&&h<=c)g=a;else{const p=Math.max(5*this._lineHeight,l*.2),m=d-p,_=h-l;g=Math.max(_,m)}else if(o===1||o===2)if(o===2&&a<=d&&h<=c)g=a;else{const p=(d+h)/2;g=Math.max(0,p-l/2)}else g=this._computeMinimumScrolling(a,c,d,h,o===3,o===4);return g}_computeScrollLeftToReveal(e){const t=this._context.viewLayout.getCurrentViewport(),n=t.left,r=n+t.width;let s=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)s=Math.min(s,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 u of c.ranges)s=Math.min(s,Math.round(u.left)),o=Math.max(o,Math.round(u.left+u.width))}return e.minimalReveal||(s=Math.max(0,s-mk.HORIZONTAL_EXTRA_PX),o+=this._revealHorizontalRightPadding),e.type==="selections"&&o-s>t.width?null:{scrollLeft:this._computeMinimumScrolling(n,r,s,o),maxHorizontalOffset:o}}_computeMinimumScrolling(e,t,n,r,s,o){e=e|0,t=t|0,n=n|0,r=r|0,s=!!s,o=!!o;const a=t-e;if(r-nt)return Math.max(0,r-a)}else return n;return e}}mk.HORIZONTAL_EXTRA_PX=30;const rpt="";class aEe extends H6{constructor(e){super(),this._context=e;const n=this._context.configuration.options.get(131);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(131);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 r=0;for(let s=0,o=t.length;s
',l=[];for(let c=t;c<=n;c++){const u=c-t,d=r[u];let h="";for(let f=0,g=d.length;f';s[a]=c}this._renderResult=s}render(e,t){return this._renderResult?this._renderResult[t-e]:""}}const opt="";class Ja{constructor(e,t,n,r){this._rgba8Brand=void 0,this.r=Ja._clamp(e),this.g=Ja._clamp(t),this.b=Ja._clamp(n),this.a=Ja._clamp(r)}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}}Ja.Empty=new Ja(0,0,0,0);class hv extends Ne{constructor(){super(),this._onDidChange=new be,this.onDidChange=this._onDidChange.event,this._updateColorMap(),this._register(Oi.onDidChange(e=>{e.changedColorMap&&this._updateColorMap()}))}static getInstance(){return this._INSTANCE||(this._INSTANCE=new hv),this._INSTANCE}_updateColorMap(){const e=Oi.getColorMap();if(!e){this._colors=[Ja.Empty],this._backgroundIsLight=!0;return}this._colors=[Ja.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}}hv._INSTANCE=null;const cEe=(()=>{const i=[];for(let e=32;e<=126;e++)i.push(e);return i.push(65533),i})(),uEe=(i,e)=>(i-=32,i<0||i>96?e<=2?(i+96)%96:96-1:i);class fv{constructor(e,t){this.scale=t,this._minimapCharRendererBrand=void 0,this.charDataNormal=fv.soften(e,12/15),this.charDataLight=fv.soften(e,50/60)}static soften(e,t){const n=new Uint8ClampedArray(e.length);for(let r=0,s=e.length;re.width||n+g>e.height){console.warn("bad render request outside image data");return}const p=u?this.charDataLight:this.charDataNormal,m=uEe(r,c),_=e.width*4,b=a.r,v=a.g,w=a.b,E=s.r-b,I=s.g-v,x=s.b-w,T=Math.max(o,l),L=e.data;let O=m*h*f,N=n*_+t*4;for(let P=0;Pe.width||n+d>e.height){console.warn("bad render request outside image data");return}const h=e.width*4,f=.5*(s/255),g=o.r,p=o.g,m=o.b,_=r.r-g,b=r.g-p,v=r.b-m,w=g+_*f,E=p+b*f,I=m+v*f,x=Math.max(s,a),T=e.data;let L=n*h+t*4;for(let O=0;O{const e=new Uint8ClampedArray(i.length/2);for(let t=0;t>1]=Nj[i[t]]<<4|Nj[i[t+1]]&15;return e},Rj={1:id(()=>Aj("0000511D6300CF609C709645A78432005642574171487021003C451900274D35D762755E8B629C5BA856AF57BA649530C167D1512A272A3F6038604460398526BCA2A968DB6F8957C768BE5FBE2FB467CF5D8D5B795DC7625B5DFF50DE64C466DB2FC47CD860A65E9A2EB96CB54CE06DA763AB2EA26860524D3763536601005116008177A8705E53AB738E6A982F88BAA35B5F5B626D9C636B449B737E5B7B678598869A662F6B5B8542706C704C80736A607578685B70594A49715A4522E792")),2:id(()=>Aj("000000000000000055394F383D2800008B8B1F210002000081B1CBCBCC820000847AAF6B9AAF2119BE08B8881AD60000A44FD07DCCF107015338130C00000000385972265F390B406E2437634B4B48031B12B8A0847000001E15B29A402F0000000000004B33460B00007A752C2A0000000000004D3900000084394B82013400ABA5CFC7AD9C0302A45A3E5A98AB000089A43382D97900008BA54AA087A70A0248A6A7AE6DBE0000BF6F94987EA40A01A06DCFA7A7A9030496C32F77891D0000A99FB1A0AFA80603B29AB9CA75930D010C0948354D3900000C0948354F37460D0028BE673D8400000000AF9D7B6E00002B007AA8933400007AA642675C2700007984CFB9C3985B768772A8A6B7B20000CAAECAAFC4B700009F94A6009F840009D09F9BA4CA9C0000CC8FC76DC87F0000C991C472A2000000A894A48CA7B501079BA2C9C69BA20000B19A5D3FA89000005CA6009DA2960901B0A7F0669FB200009D009E00B7890000DAD0F5D092820000D294D4C48BD10000B5A7A4A3B1A50402CAB6CBA6A2000000B5A7A4A3B1A8044FCDADD19D9CB00000B7778F7B8AAE0803C9AB5D3F5D3F00009EA09EA0BAB006039EA0989A8C7900009B9EF4D6B7C00000A9A7816CACA80000ABAC84705D3F000096DA635CDC8C00006F486F266F263D4784006124097B00374F6D2D6D2D6D4A3A95872322000000030000000000008D8939130000000000002E22A5C9CBC70600AB25C0B5C9B400061A2DB04CA67001082AA6BEBEBFC606002321DACBC19E03087AA08B6768380000282FBAC0B8CA7A88AD25BBA5A29900004C396C5894A6000040485A6E356E9442A32CD17EADA70000B4237923628600003E2DE9C1D7B500002F25BBA5A2990000231DB6AFB4A804023025C0B5CAB588062B2CBDBEC0C706882435A75CA20000002326BD6A82A908048B4B9A5A668000002423A09CB4BB060025259C9D8A7900001C1FCAB2C7C700002A2A9387ABA200002626A4A47D6E9D14333163A0C87500004B6F9C2D643A257049364936493647358A34438355497F1A0000A24C1D590000D38DFFBDD4CD3126"))};class gv{static create(e,t){if(this.lastCreated&&e===this.lastCreated.scale&&t===this.lastFontFamily)return this.lastCreated;let n;return Rj[e]?n=new fv(Rj[e](),e):n=gv.createFromSampleData(gv.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=`${16}px`,t.height=16,t.width=96*10,t.style.width=96*10+"px",n.fillStyle="#ffffff",n.font=`bold ${16}px ${e}`,n.textBaseline="middle";let r=0;for(const s of cEe)n.fillText(String.fromCharCode(s),r,16/2),r+=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 r=gv._downsample(e,t);return new fv(r,t)}static _downsampleChar(e,t,n,r,s){const o=1*s,a=2*s;let l=r,c=0;for(let u=0;u0){const c=255/l;for(let u=0;ugv.create(this.fontScale,l.fontFamily)),this.defaultBackgroundColor=n.getColor(2),this.backgroundColor=pv._getMinimapBackground(t,this.defaultBackgroundColor),this.foregroundAlpha=pv._getMinimapForegroundOpacity(t)}static _getMinimapBackground(e,t){const n=e.getColor(r4e);return n?new Ja(n.rgba.r,n.rgba.g,n.rgba.b,Math.round(255*n.rgba.a)):t}static _getMinimapForegroundOpacity(e){const t=e.getColor(s4e);return t?Ja._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.showSlider===e.showSlider&&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 mv{constructor(e,t,n,r,s,o,a,l){this.scrollTop=e,this.scrollHeight=t,this.sliderNeeded=n,this._computedSliderRatio=r,this.sliderTop=s,this.sliderHeight=o,this.startLineNumber=a,this.endLineNumber=l}getDesiredScrollTopFromDelta(e){return Math.round(this.scrollTop+e/this._computedSliderRatio)}getDesiredScrollTopFromTouchLocation(e){return Math.round((e-this.sliderHeight/2)/this._computedSliderRatio)}static create(e,t,n,r,s,o,a,l,c,u,d){const h=e.pixelRatio,f=e.minimapLineHeight,g=Math.floor(e.canvasInnerHeight/f),p=e.lineHeight;if(e.minimapHeightIsEditorHeight){const E=l*e.lineHeight+(e.scrollBeyondLastLine?s-e.lineHeight:0),I=Math.max(1,Math.floor(s*s/E)),x=Math.max(0,e.minimapHeight-I),T=x/(u-s),L=c*T,O=x>0,N=Math.floor(e.canvasInnerHeight/e.minimapLineHeight);return new mv(c,u,O,T,L,I,1,Math.min(a,N))}let m;if(o&&n!==a){const E=n-t+1;m=Math.floor(E*f/h)}else{const E=s/p;m=Math.floor(E*f/h)}let _;e.scrollBeyondLastLine?_=(a-1)*f/h:_=Math.max(0,a*f/h-m),_=Math.min(e.minimapHeight-m,_);const b=_/(u-s),v=c*b;let w=0;if(e.scrollBeyondLastLine&&(w=s/p-1),g>=a+w){const I=a,x=_>0;return new mv(c,u,x,b,v,m,1,I)}else{let E=Math.max(1,Math.floor(t-v*h/f));d&&d.scrollHeight===u&&(d.scrollTop>c&&(E=Math.min(E,d.startLineNumber)),d.scrollTop_k.INVALID),this._renderedLines._set(e.startLineNumber,n)}linesEquals(e){if(!this.scrollEquals(e))return!1;const n=this._renderedLines._get().lines;for(let r=0,s=n.length;r1){for(let w=0,E=a-1;w0&&this.minimapLines[n-1]>=e;)n--;let r=this.modelLineToMinimapLine(t)-1;for(;r+1t)return null}return[n+1,r+1]}decorationLineRangeToMinimapLineRange(e,t){let n=this.modelLineToMinimapLine(e),r=this.modelLineToMinimapLine(t);return e!==t&&r===n&&(r===this.minimapLines.length?n>1&&n--:r++),[n,r]}onLinesDeleted(e){const t=e.toLineNumber-e.fromLineNumber+1;let n=this.minimapLines.length,r=0;for(let s=this.minimapLines.length-1;s>=0&&!(this.minimapLines[s]=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(r)}_recreateLineSampling(){this._minimapSelections=null;const e=Boolean(this._samplingState),[t,n]=_v.compute(this.options,this._context.viewModel.getLineCount(),this._samplingState);if(this._samplingState=t,e&&this._samplingState)for(const r of n)switch(r.type){case"deleted":this._actual.onLinesDeleted(r.deleteFromLineNumber,r.deleteToLineNumber);break;case"inserted":this._actual.onLinesInserted(r.insertFromLineNumber,r.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 r=[];for(let s=0,o=t-e+1;s{if(n.preventDefault(),this._model.options.renderMinimap===0||!this._lastRenderData)return;if(this._model.options.size!=="proportional"){if(n.leftButton&&this._lastRenderData){const c=ss(this._slider.domNode),u=c.top+c.height/2;this._startSliderDragging(n.buttons,n.posx,u,n.posy,this._lastRenderData.renderedLayout)}return}const s=this._model.options.minimapLineHeight,o=this._model.options.canvasInnerHeight/this._model.options.canvasOuterHeight*n.browserEvent.offsetY;let l=Math.floor(o/s)+this._lastRenderData.renderedLayout.startLineNumber;l=Math.min(l,this._model.getLineCount()),this._model.revealLineNumber(l)}),this._sliderMouseMoveMonitor=new Zg,this._sliderMouseDownListener=Zr(this._slider.domNode,"mousedown",n=>{n.preventDefault(),n.stopPropagation(),n.leftButton&&this._lastRenderData&&this._startSliderDragging(n.buttons,n.posx,n.posy,n.posy,this._lastRenderData.renderedLayout)}),this._gestureDisposable=ei.addTarget(this._domNode.domNode),this._sliderTouchStartListener=Xe(this._domNode.domNode,bi.Start,n=>{n.preventDefault(),n.stopPropagation(),this._lastRenderData&&(this._slider.toggleClassName("active",!0),this._gestureInProgress=!0,this.scrollDueToTouchEvent(n))},{passive:!1}),this._sliderTouchMoveListener=Xe(this._domNode.domNode,bi.Change,n=>{n.preventDefault(),n.stopPropagation(),this._lastRenderData&&this._gestureInProgress&&this.scrollDueToTouchEvent(n)},{passive:!1}),this._sliderTouchEndListener=Zr(this._domNode.domNode,bi.End,n=>{n.preventDefault(),n.stopPropagation(),this._gestureInProgress=!1,this._slider.toggleClassName("active",!1)})}_startSliderDragging(e,t,n,r,s){this._slider.toggleClassName("active",!0);const o=(a,l)=>{const c=Math.abs(l-t);if(Gr&&c>dEe){this._model.setScrollTop(s.scrollTop);return}const u=a-n;this._model.setScrollTop(s.getDesiredScrollTopFromDelta(u))};r!==n&&o(r,t),this._sliderMouseMoveMonitor.startMonitoring(this._slider.domNode,e,P_,a=>o(a.posy,a.posx),()=>{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._mouseDownListener.dispose(),this._sliderMouseMoveMonitor.dispose(),this._sliderMouseDownListener.dispose(),this._gestureDisposable.dispose(),this._sliderTouchStartListener.dispose(),this._sliderTouchMoveListener.dispose(),this._sliderTouchEndListener.dispose(),super.dispose()}_getMinimapDomNodeClassName(){return this._model.options.showSlider==="always"?"minimap slider-always":"minimap slider-mouseover"}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 $6(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){return this._lastRenderData&&this._lastRenderData.onLinesDeleted(e,t),!0}onLinesInserted(e,t){return this._lastRenderData&&this._lastRenderData.onLinesInserted(e,t),!0}onScrollChanged(){return this._renderDecorations=!0,!0}onThemeChanged(){return this._selectionColor=this._theme.getColor(GU),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=mv.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(H.compareRangesUsingStarts);const n=this._model.getMinimapDecorationsInViewport(e.startLineNumber,e.endLineNumber);n.sort((h,f)=>(h.options.zIndex||0)-(f.options.zIndex||0));const{canvasInnerWidth:r,canvasInnerHeight:s}=this._model.options,o=this._model.options.minimapLineHeight,a=this._model.options.minimapCharWidth,l=this._model.getOptions().tabSize,c=this._decorationsCanvas.domNode.getContext("2d");c.clearRect(0,0,r,s);const u=new Mj(e.startLineNumber,e.endLineNumber,!1);this._renderSelectionLineHighlights(c,t,u,e,o),this._renderDecorationsLineHighlights(c,n,u,e,o);const d=new Mj(e.startLineNumber,e.endLineNumber,null);this._renderSelectionsHighlights(c,t,d,e,o,l,a,r),this._renderDecorationsHighlights(c,n,d,e,o,l,a,r)}}_renderSelectionLineHighlights(e,t,n,r,s){if(!this._selectionColor||this._selectionColor.isTransparent())return;e.fillStyle=this._selectionColor.transparent(.5).toString();let o=0,a=0;for(const l of t){const c=Math.max(r.startLineNumber,l.startLineNumber),u=Math.min(r.endLineNumber,l.endLineNumber);if(c>u)continue;for(let f=c;f<=u;f++)n.set(f,!0);const d=(c-r.startLineNumber)*s,h=(u-r.startLineNumber)*s+s;a>=d||(a>o&&e.fillRect(wh,o,e.canvas.width,a-o),o=d),a=h}a>o&&e.fillRect(wh,o,e.canvas.width,a-o)}_renderDecorationsLineHighlights(e,t,n,r,s){const o=new Map;for(let a=t.length-1;a>=0;a--){const l=t[a],c=l.options.minimap;if(!c||c.position!==Ua.Inline)continue;const u=Math.max(r.startLineNumber,l.range.startLineNumber),d=Math.min(r.endLineNumber,l.range.endLineNumber);if(u>d)continue;const h=c.getColor(this._theme.value);if(!h||h.isTransparent())continue;let f=o.get(h.toString());f||(f=h.transparent(.5).toString(),o.set(h.toString(),f)),e.fillStyle=f;for(let g=u;g<=d;g++){if(n.has(g))continue;n.set(g,!0);const p=(u-r.startLineNumber)*s;e.fillRect(wh,p,e.canvas.width,s)}}}_renderSelectionsHighlights(e,t,n,r,s,o,a,l){if(!(!this._selectionColor||this._selectionColor.isTransparent()))for(const c of t){const u=Math.max(r.startLineNumber,c.startLineNumber),d=Math.min(r.endLineNumber,c.endLineNumber);if(!(u>d))for(let h=u;h<=d;h++)this.renderDecorationOnLine(e,n,c,this._selectionColor,r,h,s,s,o,a,l)}}_renderDecorationsHighlights(e,t,n,r,s,o,a,l){for(const c of t){const u=c.options.minimap;if(!u)continue;const d=Math.max(r.startLineNumber,c.range.startLineNumber),h=Math.min(r.endLineNumber,c.range.endLineNumber);if(d>h)continue;const f=u.getColor(this._theme.value);if(!(!f||f.isTransparent()))for(let g=d;g<=h;g++)switch(u.position){case Ua.Inline:this.renderDecorationOnLine(e,n,c.range,f,r,g,s,s,o,a,l);continue;case Ua.Gutter:{const p=(g-r.startLineNumber)*s,m=2;this.renderDecoration(e,f,m,p,hEe,s);continue}}}}renderDecorationOnLine(e,t,n,r,s,o,a,l,c,u,d){const h=(o-s.startLineNumber)*l;if(h+a<0||h>this._model.options.canvasInnerHeight)return;const{startLineNumber:f,endLineNumber:g}=n,p=f===o?n.startColumn:1,m=g===o?n.endColumn:this._model.getLineMaxColumn(o),_=this.getXOffsetForPosition(t,o,p,c,u,d),b=this.getXOffsetForPosition(t,o,m,c,u,d);this.renderDecoration(e,r,_,h,b-_,a)}getXOffsetForPosition(e,t,n,r,s,o){if(n===1)return wh;if((n-1)*s>=o)return o;let l=e.get(t);if(!l){const c=this._model.getLineContent(t);l=[wh];let u=wh;for(let d=1;d=o){l[d]=o;break}l[d]=g,u=g}e.set(t,l)}return n-1E?Math.floor((r-E)/2):0,x=h.a/255,T=new Ja(Math.round((h.r-d.r)*x+d.r),Math.round((h.g-d.g)*x+d.g),Math.round((h.b-d.b)*x+d.b),255);let L=0;const O=[];for(let z=0,K=n-t+1;z=0&&Ob)return;const P=m.charCodeAt(E);if(P===9){const $=h-(E+I)%h;I+=$-1,w+=$*o}else if(P===32)w+=o;else{const $=Eh(P)?2:1;for(let ne=0;ne<$;ne++)if(s===2?c.blockRenderChar(e,w,u+d,N,l,t,n,v):c.renderChar(e,w,u+d,P,N,l,t,n,g,r,v),w+=o,w>b)return}}}}}class Mj{constructor(e,t,n){this._startLineNumber=e,this._endLineNumber=t,this._defaultValue=n,this._values=[];for(let r=0,s=this._endLineNumber-this._startLineNumber+1;rthis._endLineNumber||(this._values[e-this._startLineNumber]=t)}get(e){return ethis._endLineNumber?this._defaultValue:this._values[e-this._startLineNumber]}}_i((i,e)=>{const t=i.getColor(o4e);t&&e.addRule(`.monaco-editor .minimap-slider .minimap-slider-horizontal { background: ${t}; }`);const n=i.getColor(a4e);n&&e.addRule(`.monaco-editor .minimap-slider:hover .minimap-slider-horizontal { background: ${n}; }`);const r=i.getColor(l4e);r&&e.addRule(`.monaco-editor .minimap-slider.active .minimap-slider-horizontal { background: ${r}; }`);const s=i.getColor(F_);s&&e.addRule(`.monaco-editor .minimap-shadow-visible { box-shadow: ${s} -6px 0 6px -6px inset; }`)});const apt="";class gEe extends Qa{constructor(e){super(e);const n=this._context.configuration.options.get(131);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=Rn(document.createElement("div")),lu.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(131);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=Rn(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()}setWidgetPosition(e,t){const n=this._widgets[e.getId()];return n.preference===t?!1:(n.preference=t,this.setShouldRender(),!0)}removeWidget(e){const t=e.getId();if(this._widgets.hasOwnProperty(t)){const r=this._widgets[t].domNode.domNode;delete this._widgets[t],r.parentNode.removeChild(r),this.setShouldRender()}}_renderWidget(e){const t=e.domNode;if(e.preference===null){t.unsetTop();return}if(e.preference===0)t.setTop(0),t.setRight(2*this._verticalScrollbarWidth+this._minimapWidth);else if(e.preference===1){const n=t.domNode.clientHeight;t.setTop(this._editorHeight-n-2*this._horizontalScrollbarHeight),t.setRight(2*this._verticalScrollbarWidth+this._minimapWidth)}else e.preference===2&&(t.setTop(0),t.domNode.style.right="50%")}prepareRender(e){}render(e){this._domNode.setWidth(this._editorWidth);const t=Object.keys(this._widgets);for(let n=0,r=t.length;n=3){const s=Math.floor(r/3),o=Math.floor(r/3),a=r-s-o,l=e,c=l+s,u=l+s+a;return[[0,l,c,l,u,l,c,l],[0,s,a,s+a,o,s+a+o,a+o,s+a+o]]}else if(n===2){const s=Math.floor(r/2),o=r-s,a=e,l=a+s;return[[0,a,a,a,l,a,a,a],[0,s,s,s,o,s+o,s+o,s+o]]}else{const s=e,o=r;return[[0,s,s,s,s,s,s,s],[0,o,o,o,o,o,o,o]]}}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&&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 mEe extends Qa{constructor(e){super(e),this._domNode=Rn(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=Oi.onDidChange(t=>{t.changedColorMap&&this._updateSettings(!0)}),this._cursorPositions=[]}dispose(){super.dispose(),this._tokensColorTrackerListener.dispose()}_updateSettings(e){const t=new pEe(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)}onConfigurationChanged(e){return this._updateSettings(!1)}onCursorStateChanged(e){this._cursorPositions=[];for(let t=0,n=e.selections.length;tt&&(N=t-c),T=N-c,L=N+c}T>b+1||E!==m?(v!==0&&u.fillRect(d[m],_,h[m],b-_),m=E,_=T,b=L):L>b&&(b=L)}u.fillRect(d[m],_,h[m],b-_)}if(!this._settings.hideCursor&&this._settings.cursorColor){const f=2*this._settings.pixelRatio|0,g=f/2|0,p=this._settings.x[7],m=this._settings.w[7];u.fillStyle=this._settings.cursorColor;let _=-100,b=-100;for(let v=0,w=this._cursorPositions.length;vt&&(I=t-g);const x=I-g,T=x+f;x>b+1?(v!==0&&u.fillRect(p,_,m,b-_),_=x,b=T):T>b&&(b=T)}u.fillRect(p,_,m,b-_)}this._settings.renderBorder&&this._settings.borderColor&&this._settings.overviewRulerLanes>0&&(u.beginPath(),u.lineWidth=1,u.strokeStyle=this._settings.borderColor,u.moveTo(0,0),u.lineTo(0,t),u.stroke(),u.moveTo(0,0),u.lineTo(e,0),u.stroke())}}class Pj{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 bv{constructor(e,t,n,r){this._overviewRulerZoneBrand=void 0,this.startLineNumber=e,this.endLineNumber=t,this.heightInLines=n,this.color=r,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&&(p=n-m);const _=u.color;let b=this._color2Id[_];b||(b=++this._lastAssignedId,this._color2Id[_]=b,this._id2Color[b]=_);const v=new Pj(p-m,p+m,b);u.setColorZone(v),a.push(v)}return this._colorZonesInvalid=!1,a.sort(Pj.compare),a}}class bEe extends iv{constructor(e,t){super(),this._context=e;const n=this._context.configuration.options;this._domNode=Rn(document.createElement("canvas")),this._domNode.setClassName(t),this._domNode.setPosition("absolute"),this._domNode.setLayerHinting(!0),this._domNode.setContain("strict"),this._zoneManager=new _Ee(r=>this._context.viewLayout.getVerticalOffsetForLineNumber(r)),this._zoneManager.setDOMWidth(0),this._zoneManager.setDOMHeight(0),this._zoneManager.setOuterHeight(this._context.viewLayout.getScrollHeight()),this._zoneManager.setLineHeight(n.get(59)),this._zoneManager.setPixelRatio(n.get(129)),this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),super.dispose()}onConfigurationChanged(e){const t=this._context.configuration.options;return e.hasChanged(59)&&(this._zoneManager.setLineHeight(t.get(59)),this._render()),e.hasChanged(129)&&(this._zoneManager.setPixelRatio(t.get(129)),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(),r=this._zoneManager.getId2Color(),s=this._domNode.domNode.getContext("2d");return s.clearRect(0,0,e,t),n.length>0&&this._renderOneLane(s,n,r,e),!0}_renderOneLane(e,t,n,r){let s=0,o=0,a=0;for(const l of t){const c=l.colorId,u=l.from,d=l.to;c!==s?(e.fillRect(0,o,r,a-o),s=c,e.fillStyle=n[s],o=u,a=d):a>=u?a=Math.max(a,d):(e.fillRect(0,o,r,a-o),o=u,a=d)}e.fillRect(0,o,r,a-o)}}const lpt="";class vEe extends Qa{constructor(e){super(e),this.domNode=Rn(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(91),this._typicalHalfwidthCharacterWidth=t.get(44).typicalHalfwidthCharacterWidth}dispose(){super.dispose()}onConfigurationChanged(e){const t=this._context.configuration.options;return this._rulers=t.get(91),this._typicalHalfwidthCharacterWidth=t.get(44).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 a=Rn(document.createElement("div"));a.setClassName("view-ruler"),a.setWidth(s),this.domNode.appendChild(a),this._renderedRulers.push(a),o--}return}let n=e-t;for(;n>0;){const r=this._renderedRulers.pop();this.domNode.removeChild(r),n--}}render(e){this._ensureRulersCount();for(let t=0,n=this._rulers.length;t{const t=i.getColor(G4e);t&&e.addRule(`.monaco-editor .view-ruler { box-shadow: 1px 0 0 0 ${t} inset; }`)});const cpt="";class wEe extends Qa{constructor(e){super(e),this._scrollTop=0,this._width=0,this._updateWidth(),this._shouldShow=!1;const n=this._context.configuration.options.get(92);this._useShadows=n.useShadows,this._domNode=Rn(document.createElement("div")),this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true")}dispose(){super.dispose()}_updateShouldShow(){const e=this._useShadows&&this._scrollTop>0;return this._shouldShow!==e?(this._shouldShow=e,!0):!1}getDomNode(){return this._domNode}_updateWidth(){const t=this._context.configuration.options.get(131);t.minimap.renderMinimap===0||t.minimap.minimapWidth>0&&t.minimap.minimapLeft===0?this._width=t.width:this._width=t.width-t.minimap.minimapWidth-t.verticalScrollbarWidth}onConfigurationChanged(e){const n=this._context.configuration.options.get(92);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":"")}}_i((i,e)=>{const t=i.getColor(F_);t&&e.addRule(`.monaco-editor .scroll-decoration { box-shadow: ${t} 0 6px 6px -6px inset; }`)});const upt="";class CEe{constructor(e){this.left=e.left,this.width=e.width,this.startStyle=null,this.endStyle=null}}class yEe{constructor(e,t){this.lineNumber=e,this.ranges=t}}function SEe(i){return new CEe(i)}function kEe(i){return new yEe(i.lineNumber,i.ranges.map(SEe))}class Ui extends K_{constructor(e){super(),this._previousFrameVisibleRangesWithStyle=[],this._context=e;const t=this._context.configuration.options;this._lineHeight=t.get(59),this._roundedSelection=t.get(90),this._typicalHalfwidthCharacterWidth=t.get(44).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(59),this._roundedSelection=t.get(90),this._typicalHalfwidthCharacterWidth=t.get(44).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 r=this._typicalHalfwidthCharacterWidth/4;let s=null,o=null;if(n&&n.length>0&&t.length>0){const a=t[0].lineNumber;if(a===e.startLineNumber)for(let c=0;!s&&c=0;c--)n[c].lineNumber===l&&(o=n[c].ranges[0]);s&&!s.startStyle&&(s=null),o&&!o.startStyle&&(o=null)}for(let a=0,l=t.length;a0){const g=t[a-1].ranges[0].left,p=t[a-1].ranges[0].left+t[a-1].ranges[0].width;vk(u-g)g&&(h.top=1),vk(d-p)'}_actualRenderOneSelection(e,t,n,r){if(r.length===0)return;const s=!!r[0].ranges[0].startStyle,o=this._lineHeight.toString(),a=(this._lineHeight-1).toString(),l=r[0].lineNumber,c=r[r.length-1].lineNumber;for(let u=0,d=r.length;u1,c)}this._previousFrameVisibleRangesWithStyle=s,this._renderResult=t.map(([o,a])=>o+a)}render(e,t){if(!this._renderResult)return"";const n=t-e;return n<0||n>=this._renderResult.length?"":this._renderResult[n]}}Ui.SELECTION_CLASS_NAME="selected-text",Ui.SELECTION_TOP_LEFT="top-left-radius",Ui.SELECTION_BOTTOM_LEFT="bottom-left-radius",Ui.SELECTION_TOP_RIGHT="top-right-radius",Ui.SELECTION_BOTTOM_RIGHT="bottom-right-radius",Ui.EDITOR_BACKGROUND_CLASS_NAME="monaco-editor-background",Ui.ROUNDED_PIECE_WIDTH=10,_i((i,e)=>{const t=i.getColor(Uh);t&&e.addRule(`.monaco-editor .focused .selected-text { background-color: ${t}; }`);const n=i.getColor(d6);n&&e.addRule(`.monaco-editor .selected-text { background-color: ${n}; }`);const r=i.getColor(lke);r&&!r.isTransparent()&&e.addRule(`.monaco-editor .view-line span.inline-selected-text { color: ${r}; }`)});function vk(i){return i<0?-i:i}const dpt="";class Fj{constructor(e,t,n,r,s,o){this.top=e,this.left=t,this.width=n,this.height=r,this.textContent=s,this.textContentClassName=o}}class Bj{constructor(e){this._context=e;const t=this._context.configuration.options,n=t.get(44);this._cursorStyle=t.get(24),this._lineHeight=t.get(59),this._typicalHalfwidthCharacterWidth=n.typicalHalfwidthCharacterWidth,this._lineCursorWidth=Math.min(t.get(27),this._typicalHalfwidthCharacterWidth),this._isVisible=!0,this._domNode=Rn(document.createElement("div")),this._domNode.setClassName(`cursor ${lp}`),this._domNode.setHeight(this._lineHeight),this._domNode.setTop(0),this._domNode.setLeft(0),ys(this._domNode,n),this._domNode.setDisplay("none"),this._position=new ye(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(44);return this._cursorStyle=t.get(24),this._lineHeight=t.get(59),this._typicalHalfwidthCharacterWidth=n.typicalHalfwidthCharacterWidth,this._lineCursorWidth=Math.min(t.get(27),this._typicalHalfwidthCharacterWidth),ys(this._domNode,n),!0}onCursorPositionChanged(e){return this._position=e,!0}_getGraphemeAwarePosition(){const{lineNumber:e,column:t}=this._position,n=this._context.viewModel.getLineContent(e),[r,s]=ECe(n,t-1);return[new ye(e,r+1),n.substring(r,s)]}_prepareRender(e){let t="";const[n,r]=this._getGraphemeAwarePosition();if(this._cursorStyle===Kr.Line||this._cursorStyle===Kr.LineThin){const h=e.visibleRangeForPosition(n);if(!h||h.outsideRenderedLine)return null;let f;this._cursorStyle===Kr.Line?(f=oU(this._lineCursorWidth>0?this._lineCursorWidth:2),f>2&&(t=r)):f=oU(1);let g=h.left;f>=2&&g>=1&&(g-=1);const p=e.getVerticalOffsetForLineNumber(n.lineNumber)-e.bigNumbersDelta;return new Fj(p,g,f,this._lineHeight,t,"")}const s=e.linesVisibleRangesForRange(new H(n.lineNumber,n.column,n.lineNumber,n.column+r.length),!1);if(!s||s.length===0)return null;const o=s[0];if(o.outsideRenderedLine||o.ranges.length===0)return null;const a=o.ranges[0],l=a.width<1?this._typicalHalfwidthCharacterWidth:a.width;let c="";if(this._cursorStyle===Kr.Block){const h=this._context.viewModel.getViewLineData(n.lineNumber);t=r;const f=h.tokens.findTokenIndexAtOffset(n.column-1);c=h.tokens.getClassName(f)}let u=e.getVerticalOffsetForLineNumber(n.lineNumber)-e.bigNumbersDelta,d=this._lineHeight;return(this._cursorStyle===Kr.Underline||this._cursorStyle===Kr.UnderlineThin)&&(u+=this._lineHeight-2,d=2),new Fj(u,a.left,l,d,t,c)}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 ${lp} ${this._renderData.textContentClassName}`),this._domNode.setDisplay("block"),this._domNode.setTop(this._renderData.top),this._domNode.setLeft(this._renderData.left),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 vv extends Qa{constructor(e){super(e);const t=this._context.configuration.options;this._readOnly=t.get(81),this._cursorBlinking=t.get(22),this._cursorStyle=t.get(24),this._cursorSmoothCaretAnimation=t.get(23),this._selectionIsEmpty=!0,this._isComposingInput=!1,this._isVisible=!1,this._primaryCursor=new Bj(this._context),this._secondaryCursors=[],this._renderData=[],this._domNode=Rn(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 Wo,this._cursorFlatBlinkInterval=new Nb,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(81),this._cursorBlinking=t.get(22),this._cursorStyle=t.get(24),this._cursorSmoothCaretAnimation=t.get(23),this._updateBlinking(),this._updateDomClassName(),this._primaryCursor.onConfigurationChanged(e);for(let n=0,r=this._secondaryCursors.length;nt.length){const n=this._secondaryCursors.length-t.length;for(let r=0;r{for(let r=0,s=e.ranges.length;r{this._isVisible?this._hide():this._show()},vv.BLINK_INTERVAL):this._startCursorBlinkAnimation.setIfNotSet(()=>{this._blinkingEnabled=!0,this._updateDomClassName()},vv.BLINK_INTERVAL))}_updateDomClassName(){this._domNode.setClassName(this._getClassName())}_getClassName(){let e="cursors-layer";switch(this._selectionIsEmpty||(e+=" has-selection"),this._cursorStyle){case Kr.Line:e+=" cursor-line-style";break;case Kr.Block:e+=" cursor-block-style";break;case Kr.Underline:e+=" cursor-underline-style";break;case Kr.LineThin:e+=" cursor-line-thin-style";break;case Kr.BlockOutline:e+=" cursor-block-outline-style";break;case Kr.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&&(e+=" cursor-smooth-caret-animation"),e}_show(){this._primaryCursor.show();for(let e=0,t=this._secondaryCursors.length;e{const t=i.getColor(lj);if(t){let n=i.getColor(j4e);n||(n=t.opposite()),e.addRule(`.monaco-editor .inputarea.ime-input { caret-color: ${t}; }`),e.addRule(`.monaco-editor .cursors-layer .cursor { background-color: ${t}; border-color: ${t}; color: ${n}; }`),i.type==="hc"&&e.addRule(`.monaco-editor .cursors-layer.has-selection .cursor { border-left: 1px solid ${n}; border-right: 1px solid ${n}; }`)}});const U6=()=>{throw new Error("Invalid change accessor")};class EEe extends Qa{constructor(e){super(e);const t=this._context.configuration.options,n=t.get(131);this._lineHeight=t.get(59),this._contentWidth=n.contentWidth,this._contentLeft=n.contentLeft,this.domNode=Rn(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=Rn(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 r of e)t.set(r.id,r);let n=!1;return this._context.viewModel.changeWhitespace(r=>{const s=Object.keys(this._zones);for(let o=0,a=s.length;o{const r={addZone:s=>(t=!0,this._addZone(n,s)),removeZone:s=>{s&&(t=this._removeZone(n,s)||t)},layoutZone:s=>{s&&(t=this._layoutZone(n,s)||t)}};xEe(e,r),r.addZone=U6,r.removeZone=U6,r.layoutZone=U6}),t}_addZone(e,t){const n=this._computeWhitespaceProps(t),s={whitespaceId:e.insertWhitespace(n.afterViewLineNumber,this._getZoneOrdinal(t),n.heightInPx,n.minWidthInPx),delegate:t,isInHiddenArea:n.isInHiddenArea,isVisible:!1,domNode:Rn(t.domNode),marginDomNode:t.marginDomNode?Rn(t.marginDomNode):null};return this._safeCallOnComputedHeight(s.delegate,n.heightInPx),s.domNode.setPosition("absolute"),s.domNode.domNode.style.width="100%",s.domNode.setDisplay("none"),s.domNode.setAttribute("monaco-view-zone",s.whitespaceId),this.domNode.appendChild(s.domNode),s.marginDomNode&&(s.marginDomNode.setPosition("absolute"),s.marginDomNode.domNode.style.width="100%",s.marginDomNode.setDisplay("none"),s.marginDomNode.setAttribute("monaco-view-zone",s.whitespaceId),this.marginDomNode.appendChild(s.marginDomNode)),this._zones[s.whitespaceId]=s,this.setShouldRender(),s.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],r=this._computeWhitespaceProps(n.delegate);return n.isInHiddenArea=r.isInHiddenArea,e.changeOneWhitespace(n.whitespaceId,r.afterViewLineNumber,r.heightInPx),this._safeCallOnComputedHeight(n.delegate,r.heightInPx),this.setShouldRender(),!0}return!1}shouldSuppressMouseDownOnViewZone(e){if(this._zones.hasOwnProperty(e)){const t=this._zones[e];return Boolean(t.delegate.suppressMouseDown)}return!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){Jt(n)}}_safeCallOnDomNodeTop(e,t){if(typeof e.onDomNodeTop=="function")try{e.onDomNodeTop(t)}catch(n){Jt(n)}}prepareRender(e){}render(e){const t=e.viewportData.whitespaceViewportData,n={};let r=!1;for(const o of t)this._zones[o.id].isInHiddenArea||(n[o.id]=o,r=!0);const s=Object.keys(this._zones);for(let o=0,a=s.length;o{this.focus()},dispatchTextAreaEvent:e=>{this._textAreaHandler.textArea.domNode.dispatchEvent(e)},getLastRenderData:()=>{const e=this._viewCursors.getLastRenderData()||[],t=this._textAreaHandler.getLastRenderData();return new D4e(e,t)},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 ye(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(131);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(128)+" "+PS(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}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=X$(this._onRenderScheduled.bind(this),100))}_onRenderScheduled(){this._renderAnimationFrame=null,this._flushAccumulatedAndRenderNow()}_renderNow(){NEe(()=>this._actualRender())}_getViewPartsToRender(){const e=[];let t=0;for(const n of this._viewParts)n.shouldRender()&&(e[t++]=n);return e}_actualRender(){if(!MI(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 IEe(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 r=new y4e(this._context.viewLayout,n,this._viewLines);for(const s of e)s.prepareRender(r);for(const s of e)s.render(r),s.onDidRender()}delegateVerticalScrollbarMouseDown(e){this._scrollbar.delegateVerticalScrollbarMouseDown(e)}restoreState(e){this._context.viewModel.viewLayout.setScrollPosition({scrollTop:e.scrollTop},1),this._context.viewModel.tokenizeViewport(),this._renderNow(),this._viewLines.updateLineWidths(),this._context.viewModel.viewLayout.setScrollPosition({scrollLeft:e.scrollLeft},1)}getOffsetForColumn(e,t){const n=this._context.viewModel.model.validatePosition({lineNumber:e,column:t}),r=this._context.viewModel.coordinatesConverter.convertModelPositionToViewPosition(n);this._flushAccumulatedAndRenderNow();const s=this._viewLines.visibleRangeForPosition(new ye(r.lineNumber,r.column));return s?s.left:-1}getTargetAtClientPoint(e,t){const n=this._pointerHandler.getTargetAtClientPoint(e,t);return n?dk.convertViewToModelMouseTarget(n,this._context.viewModel.coordinatesConverter):null}createOverviewRuler(e){return new bEe(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()}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){let t=e.position&&e.position.range||null;if(t===null){const r=e.position?e.position.position:null;r!==null&&(t=new H(r.lineNumber,r.column,r.lineNumber,r.column))}const n=e.position?e.position.preference:null;this._contentWidgets.setWidgetPosition(e.widget,t,n),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()}}function NEe(i){try{return i()}catch(e){Jt(e)}}class wk{constructor(e){this._selTrackedRange=null,this._trackSelection=!0,this._setState(e,new Xr(new H(1,1,1,1),0,new ye(1,1),0),new Xr(new H(1,1,1,1),0,new ye(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 bn(this.modelState,this.viewState)}readSelectionFromMarkers(e){const t=e.model._getTrackedRange(this._selTrackedRange);return ut.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,r){return t.equals(n)?r:e.normalizePosition(t,2)}static _validateViewState(e,t){const n=t.position,r=t.selectionStart.getStartPosition(),s=t.selectionStart.getEndPosition(),o=e.normalizePosition(n,2),a=this._validatePositionWithCache(e,r,n,o),l=this._validatePositionWithCache(e,s,r,a);return n.equals(o)&&r.equals(a)&&s.equals(l)?t:new Xr(H.fromPositions(a,l),t.selectionStartLeftoverVisibleColumns+r.column-a.column,o,t.leftoverVisibleColumns+n.column-o.column)}_setState(e,t,n){if(n&&(n=wk._validateViewState(e.viewModel,n)),t){const r=e.model.validateRange(t.selectionStart),s=t.selectionStart.equalsRange(r)?t.selectionStartLeftoverVisibleColumns:0,o=e.model.validatePosition(t.position),a=t.position.equals(o)?t.leftoverVisibleColumns:0;t=new Xr(r,s,o,a)}else{if(!n)return;const r=e.model.validateRange(e.coordinatesConverter.convertViewRangeToModelRange(n.selectionStart)),s=e.model.validatePosition(e.coordinatesConverter.convertViewPositionToModelPosition(n.position));t=new Xr(r,n.selectionStartLeftoverVisibleColumns,s,n.leftoverVisibleColumns)}if(n){const r=e.coordinatesConverter.validateViewRange(n.selectionStart,t.selectionStart),s=e.coordinatesConverter.validateViewPosition(n.position,t.position);n=new Xr(r,t.selectionStartLeftoverVisibleColumns,s,t.leftoverVisibleColumns)}else{const r=e.coordinatesConverter.convertModelPositionToViewPosition(new ye(t.selectionStart.startLineNumber,t.selectionStart.startColumn)),s=e.coordinatesConverter.convertModelPositionToViewPosition(new ye(t.selectionStart.endLineNumber,t.selectionStart.endColumn)),o=new H(r.lineNumber,r.column,s.lineNumber,s.column),a=e.coordinatesConverter.convertModelPositionToViewPosition(t.position);n=new Xr(o,t.selectionStartLeftoverVisibleColumns,a,t.leftoverVisibleColumns)}this.modelState=t,this.viewState=n,this._updateTrackedRange(e)}}class Vj{constructor(e){this.context=e,this.cursors=[new wk(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 ewe(this.cursors,Ny(e=>e.viewState.position,ye.compare)).viewState.position}getBottomMostViewPosition(){return Jve(this.cursors,Ny(e=>e.viewState.position,ye.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(bn.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 r=t-n;for(let s=0;s=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,r=e.length;nn.selection,H.compareRangesUsingStarts));for(let n=0;nd&&p.index--;e.splice(d,1),t.splice(u,1),this._removeSecondaryCursor(d-1),n--}}}}class Wj{constructor(e,t,n,r){this._cursorContextBrand=void 0,this.model=e,this.viewModel=t,this.coordinatesConverter=n,this.cursorConfig=r}}class AEe{constructor(){this.changeType=1}}class gc{constructor(e,t,n,r,s){this.ownerId=e,this.lineNumber=t,this.column=n,this.options=r,this.order=s}static applyInjectedText(e,t){if(!t||t.length===0)return e;let n="",r=0;for(const s of t)n+=e.substring(r,s.column-1),r=s.column-1,n+=s.options.content;return n+=e.substring(r),n}static fromDecorations(e){const t=[];for(const n of e)n.options.before&&n.options.before.content.length>0&&t.push(new gc(n.ownerId,n.range.startLineNumber,n.range.startColumn,n.options.before,0)),n.options.after&&n.options.after.content.length>0&&t.push(new gc(n.ownerId,n.range.endLineNumber,n.range.endColumn,n.options.after,1));return t.sort((n,r)=>n.lineNumber===r.lineNumber?n.column===r.column?n.order-r.order:n.column-r.column:n.lineNumber-r.lineNumber),t}}class Hj{constructor(e,t,n){this.changeType=2,this.lineNumber=e,this.detail=t,this.injectedText=n}}class REe{constructor(e,t){this.changeType=3,this.fromLineNumber=e,this.toLineNumber=t}}class OEe{constructor(e,t,n,r){this.changeType=4,this.injectedTexts=r,this.fromLineNumber=e,this.toLineNumber=t,this.detail=n}}class MEe{constructor(){this.changeType=5}}class gp{constructor(e,t,n,r){this.changes=e,this.versionId=t,this.isUndoing=n,this.isRedoing=r,this.resultingSelection=null}containsEvent(e){for(let t=0,n=this.changes.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 KEe{constructor(){this.viewEvents=[],this.outgoingEvents=[]}emitViewEvent(e){this.viewEvents.push(e)}emitOutgoingEvent(e){this.outgoingEvents.push(e)}}class G6{constructor(e,t,n,r){this.kind=0,this._oldContentWidth=e,this._oldContentHeight=t,this.contentWidth=n,this.contentHeight=r,this.contentWidthChanged=this._oldContentWidth!==this.contentWidth,this.contentHeightChanged=this._oldContentHeight!==this.contentHeight}isNoOp(){return!this.contentWidthChanged&&!this.contentHeightChanged}merge(e){return e.kind!==0?this:new G6(this._oldContentWidth,this._oldContentHeight,e.contentWidth,e.contentHeight)}}class K6{constructor(e,t){this.kind=1,this.oldHasFocus=e,this.hasFocus=t}isNoOp(){return this.oldHasFocus===this.hasFocus}merge(e){return e.kind!==1?this:new K6(this.oldHasFocus,e.hasFocus)}}class Y6{constructor(e,t,n,r,s,o,a,l){this.kind=2,this._oldScrollWidth=e,this._oldScrollLeft=t,this._oldScrollHeight=n,this._oldScrollTop=r,this.scrollWidth=s,this.scrollLeft=o,this.scrollHeight=a,this.scrollTop=l,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}merge(e){return e.kind!==2?this:new Y6(this._oldScrollWidth,this._oldScrollLeft,this._oldScrollHeight,this._oldScrollTop,e.scrollWidth,e.scrollLeft,e.scrollHeight,e.scrollTop)}}class Uj{constructor(){this.kind=3}isNoOp(){return!1}merge(e){return this}}class Ek{constructor(e,t,n,r,s,o,a){this.kind=6,this.oldSelections=e,this.selections=t,this.oldModelVersionId=n,this.modelVersionId=r,this.source=s,this.reason=o,this.reachedMaxCursorCount=a}static _selectionsAreEqual(e,t){if(!e&&!t)return!0;if(!e||!t)return!1;const n=e.length,r=t.length;if(n!==r)return!1;for(let s=0;s0){const e=this._cursors.getSelections();for(let t=0;tr1.MAX_CURSOR_COUNT&&(r=r.slice(0,r1.MAX_CURSOR_COUNT),s=!0);const o=wv.from(this._model,this);return this._cursors.setStates(r),this._cursors.normalize(),this._columnSelectData=null,this._validateAutoClosedActions(),this._emitStateChangedIfNecessary(e,t,n,o,s)}setCursorColumnSelectData(e){this._columnSelectData=e}revealPrimary(e,t,n,r,s,o){const a=this._cursors.getViewPositions();let l=null,c=null;a.length>1?c=this._cursors.getViewSelections():l=H.fromPositions(a[0],a[0]),e.emitViewEvent(new kk(t,n,l,c,r,s,o))}saveState(){const e=[],t=this._cursors.getSelections();for(let n=0,r=t.length;n0){const r=bn.fromModelSelections(t.resultingSelection);this.setStates(e,"modelChange",t.isUndoing?5:t.isRedoing?6:2,r)&&this.revealPrimary(e,"modelChange",!1,0,!0,0)}else{const r=this._cursors.readSelectionFromMarkers();this.setStates(e,"modelChange",2,bn.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,r){this.setStates(e,t,r,bn.fromModelSelections(n))}getPrevEditOperationType(){return this._prevEditOperationType}setPrevEditOperationType(e){this._prevEditOperationType=e}_pushAutoClosedAction(e,t){const n=[],r=[];for(let a=0,l=e.length;a0&&this._pushAutoClosedAction(n,r),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,r,s){const o=wv.from(this._model,this);if(o.equals(r))return!1;const a=this._cursors.getSelections(),l=this._cursors.getViewSelections();if(e.emitViewEvent(new VEe(l,a)),!r||r.cursorState.length!==o.cursorState.length||o.cursorState.some((c,u)=>!c.modelState.equals(r.cursorState[u].modelState))){const c=r?r.cursorState.map(d=>d.modelState.selection):null,u=r?r.modelVersionId:0;e.emitOutgoingEvent(new Ek(c,a,u,o.modelVersionId,t||"keyboard",n,s))}return!0}_findAutoClosingPairs(e){if(!e.length)return null;const t=[];for(let n=0,r=e.length;n=0)return null;const o=s.text.match(/([)\]}>'"`])([^)\]}>'"`]*)$/);if(!o)return null;const a=o[1],l=this.context.cursorConfig.autoClosingPairs.autoClosingPairsCloseSingleChar.get(a);if(!l||l.length!==1)return null;const c=l[0].open,u=s.text.length-o[2].length-1,d=s.text.lastIndexOf(c,u-1);if(d===-1)return null;t.push([d,u])}return t}executeEdits(e,t,n,r){let s=null;t==="snippet"&&(s=this._findAutoClosingPairs(n)),s&&(n[0]._isTracked=!0);const o=[],a=[],l=this._model.pushEditOperations(this.getSelections(),n,c=>{if(s)for(let d=0,h=s.length;d0&&this._pushAutoClosedAction(o,a)}_executeEdit(e,t,n,r=0){if(this.context.cursorConfig.readOnly)return;const s=wv.from(this._model,this);this._cursors.stopTrackingSelections(),this._isHandling=!0;try{this._cursors.ensureValidState(),e()}catch(o){Jt(o)}this._isHandling=!1,this._cursors.startTrackingSelections(),this._validateAutoClosedActions(),this._emitStateChangedIfNecessary(t,n,r,s,!1)&&this.revealPrimary(t,n,!1,0,!0,0)}setIsDoingComposition(e){this._isDoingComposition=e}getAutoClosedCharacters(){return jj.getAllAutoClosedCharacters(this._autoClosedActions)}startComposition(e){this._selectionsWhenCompositionStarted=this.getSelections().slice(0)}endComposition(e,t){this._executeEdit(()=>{t==="keyboard"&&(this._executeEditOperation(Fi.compositionEndWithInterceptors(this._prevEditOperationType,this.context.cursorConfig,this._model,this._selectionsWhenCompositionStarted,this.getSelections(),this.getAutoClosedCharacters())),this._selectionsWhenCompositionStarted=null)},e,t)}type(e,t,n){this._executeEdit(()=>{if(n==="keyboard"){const r=t.length;let s=0;for(;s{const c=l.getPosition();return new ut(c.lineNumber,c.column+s,c.lineNumber,c.column+s)});this.setSelections(e,o,a,0)}return}this._executeEdit(()=>{this._executeEditOperation(Fi.compositionType(this._prevEditOperationType,this.context.cursorConfig,this._model,this.getSelections(),t,n,r,s))},e,o)}paste(e,t,n,r,s){this._executeEdit(()=>{this._executeEditOperation(Fi.paste(this.context.cursorConfig,this._model,this.getSelections(),t,n,r||[]))},e,s,4)}cut(e,t){this._executeEdit(()=>{this._executeEditOperation(up.cut(this.context.cursorConfig,this._model,this.getSelections()))},e,t)}executeCommand(e,t,n){this._executeEdit(()=>{this._cursors.killSecondaryCursors(),this._executeEditOperation(new $o(0,[t],{shouldPushStackElementBefore:!1,shouldPushStackElementAfter:!1}))},e,n)}executeCommands(e,t,n){this._executeEdit(()=>{this._executeEditOperation(new $o(0,t,{shouldPushStackElementBefore:!1,shouldPushStackElementAfter:!1}))},e,n)}}r1.MAX_CURSOR_COUNT=1e4;class wv{constructor(e,t){this.modelVersionId=e,this.cursorState=t}static from(e,t){return new wv(e.getVersionId(),t.getCursorStates())}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 ZEe{static executeCommands(e,t,n){const r={model:e,selectionsBefore:t,trackedRanges:[],trackedRangesDirection:[]},s=this._innerExecuteCommands(r,n);for(let o=0,a=r.trackedRanges.length;o0&&(o[0]._isTracked=!0);let a=e.model.pushEditOperations(e.selectionsBefore,o,c=>{const u=[];for(let f=0;ff.identifier.minor-g.identifier.minor,h=[];for(let f=0;f0?(u[f].sort(d),h[f]=t[f].computeCursorState(e.model,{getInverseEditOperations:()=>u[f],getTrackedSelection:g=>{const p=parseInt(g,10),m=e.model._getTrackedRange(e.trackedRanges[p]);return e.trackedRangesDirection[p]===0?new ut(m.startLineNumber,m.startColumn,m.endLineNumber,m.endColumn):new ut(m.endLineNumber,m.endColumn,m.startLineNumber,m.startColumn)}})):h[f]=e.selectionsBefore[f];return h});a||(a=e.selectionsBefore);const l=[];for(let c in s)s.hasOwnProperty(c)&&l.push(parseInt(c,10));l.sort((c,u)=>u-c);for(const c of l)a.splice(c,1);return a}static _arrayIsEmpty(e){for(let t=0,n=e.length;t{H.isEmpty(d)&&h===""||r.push({identifier:{major:t,minor:s++},range:d,text:h,forceMoveMarkers:f,isAutoWhitespaceEdit:n.insertsAutoWhitespace})};let a=!1;const u={addEditOperation:o,addTrackedEditOperation:(d,h,f)=>{a=!0,o(d,h,f)},trackSelection:(d,h)=>{const f=ut.liftSelection(d);let g;if(f.isEmpty())if(typeof h=="boolean")h?g=2:g=3;else{const _=e.model.getLineMaxColumn(f.startLineNumber);f.startColumn===_?g=2:g=3}else g=1;const p=e.trackedRanges.length,m=e.model._setTrackedRange(null,f,g);return e.trackedRanges[p]=m,e.trackedRangesDirection[p]=f.getDirection(),p.toString()}};try{n.getEditOperations(e.model,u)}catch(d){return Jt(d),{operations:[],hadTrackedEditOperation:!1}}return{operations:r,hadTrackedEditOperation:a}}static _getLoserCursorMap(e){e=e.slice(0),e.sort((n,r)=>-H.compareRangesUsingEnds(n.range,r.range));const t={};for(let n=1;ns.identifier.major?o=r.identifier.major:o=s.identifier.major,t[o.toString()]=!0;for(let a=0;a0&&n--}}return t}}class qj{constructor(e,t,n,r,s,o){this.id=e,this.label=t,this.alias=n,this._precondition=r,this._run=s,this._contextKeyService=o}isSupported(){return this._contextKeyService.contextMatchesRules(this._precondition)}run(){return this.isSupported()?this._run():Promise.resolve(void 0)}}const pp={Configuration:"base.contributions.configuration"},Cv="vscode://schemas/settings/resourceLanguage",Gj=sr.as(WS.JSONContribution);class XEe{constructor(){this.overrideIdentifiers=new Set,this._onDidSchemaChange=new be,this._onDidUpdateConfiguration=new be,this.configurationDefaultsOverrides=new Map,this.defaultLanguageConfigurationOverridesNode={id:"defaultOverrides",title:C("defaultLanguageConfigurationOverrides.title","Default Language Configuration Overrides"),properties:{}},this.configurationContributors=[this.defaultLanguageConfigurationOverridesNode],this.resourceLanguageSettingsSchema={properties:{},patternProperties:{},additionalProperties:!1,errorMessage:"Unknown editor configuration setting",allowTrailingCommas:!0,allowComments:!0},this.configurationProperties={},this.excludedConfigurationProperties={},Gj.registerSchema(Cv,this.resourceLanguageSettingsSchema),this.registerOverridePropertyPatternKey()}registerConfiguration(e,t=!0){this.registerConfigurations([e],t)}registerConfigurations(e,t=!0){const n=this.doRegisterConfigurations(e,t);Gj.registerSchema(Cv,this.resourceLanguageSettingsSchema),this._onDidSchemaChange.fire(),this._onDidUpdateConfiguration.fire({properties:n})}registerDefaultConfigurations(e){var t;const n=[],r=[];for(const{overrides:s,source:o}of e)for(const a in s)if(n.push(a),yv.test(a)){const l=Object.assign(Object.assign({},((t=this.configurationDefaultsOverrides.get(a))===null||t===void 0?void 0:t.value)||{}),s[a]);this.configurationDefaultsOverrides.set(a,{source:o,value:l});const c={type:"object",default:l,description:C("defaultLanguageConfiguration.description","Configure settings to be overridden for {0} language.",a),$ref:Cv,defaultDefaultValue:l,source:Ba(o)?void 0:o};r.push(...Zj(a)),this.configurationProperties[a]=c,this.defaultLanguageConfigurationOverridesNode.properties[a]=c}else{this.configurationDefaultsOverrides.set(a,{value:s[a],source:o});const l=this.configurationProperties[a];l&&(this.updatePropertyDefaultValue(a,l),this.updateSchema(a,l))}this.registerOverrideIdentifiers(r),this._onDidSchemaChange.fire(),this._onDidUpdateConfiguration.fire({properties:n,defaultsOverrides:!0})}registerOverrideIdentifiers(e){for(const t of e)this.overrideIdentifiers.add(t);this.updateOverridePropertyPatternKey()}doRegisterConfigurations(e,t){const n=[];return e.forEach(r=>{n.push(...this.validateAndRegisterProperties(r,t,r.extensionInfo,r.restrictedProperties)),this.configurationContributors.push(r),this.registerJSONConfiguration(r)}),n}validateAndRegisterProperties(e,t=!0,n,r,s=3){s=sa(e.scope)?s:e.scope;let o=[],a=e.properties;if(a)for(let c in a){if(t&&e5e(c)){delete a[c];continue}const u=a[c];if(u.source=n,u.defaultDefaultValue=a[c].default,this.updatePropertyDefaultValue(c,u),yv.test(c)?u.scope=void 0:(u.scope=sa(u.scope)?s:u.scope,u.restricted=sa(u.restricted)?!!(r!=null&&r.includes(c)):u.restricted),a[c].hasOwnProperty("included")&&!a[c].included){this.excludedConfigurationProperties[c]=a[c],delete a[c];continue}else this.configurationProperties[c]=a[c];!a[c].deprecationMessage&&a[c].markdownDeprecationMessage&&(a[c].deprecationMessage=a[c].markdownDeprecationMessage),o.push(c)}let l=e.allOf;if(l)for(let c of l)o.push(...this.validateAndRegisterProperties(c,t,n,r,s));return o}getConfigurationProperties(){return this.configurationProperties}registerJSONConfiguration(e){const t=n=>{let r=n.properties;if(r)for(const o in r)this.updateSchema(o,r[o]);let s=n.allOf;s&&s.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:C("overrideSettings.defaultDescription","Configure editor settings to be overridden for a language."),errorMessage:C("overrideSettings.errorMessage","This setting does not support per-language configuration."),$ref:Cv};this.updatePropertyDefaultValue(t,n)}this._onDidSchemaChange.fire()}registerOverridePropertyPatternKey(){C("overrideSettings.defaultDescription","Configure editor settings to be overridden for a language."),C("overrideSettings.errorMessage","This setting does not support per-language configuration."),this._onDidSchemaChange.fire()}updatePropertyDefaultValue(e,t){const n=this.configurationDefaultsOverrides.get(e);let r=n==null?void 0:n.value,s=n==null?void 0:n.source;Po(r)&&(r=t.defaultDefaultValue,s=void 0),Po(r)&&(r=JEe(t.type)),t.default=r,t.defaultValueSource=s}}const Kj="\\[([^\\]]+)\\]",Yj=new RegExp(Kj,"g"),QEe=`^(${Kj})+$`,yv=new RegExp(QEe);function Zj(i){const e=[];if(yv.test(i)){let t=Yj.exec(i);for(;t!=null&&t.length;){const n=t[1].trim();n&&e.push(n),t=Yj.exec(i)}}return vh(e)}function JEe(i){switch(Array.isArray(i)?i[0]:i){case"boolean":return!1;case"integer":case"number":return 0;case"string":return"";case"array":return[];case"object":return{};default:return null}}const Xj=new XEe;sr.add(pp.Configuration,Xj);function e5e(i){return i.trim()?yv.test(i)?C("config.property.languageDefault","Cannot register '{0}'. This matches property pattern '\\\\[.*\\\\]$' for describing language specific editor settings. Use 'configurationDefaults' contribution.",i):Xj.getConfigurationProperties()[i]!==void 0?C("config.property.duplicate","Cannot register '{0}'. This property is already registered.",i):null:C("config.property.empty","Cannot register an empty property")}const t5e={ModesRegistry:"editor.modesRegistry"};class n5e{constructor(){this._onDidChangeLanguages=new be,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"},{open:'"',close:'"'},{open:"'",close:"'"},{open:"`",close:"`"}],colorizedBracketPairs:[],folding:{offSide:!0}},0),sr.as(pp.Configuration).registerDefaultConfigurations([{overrides:{"[plaintext]":{"editor.unicodeHighlight.ambiguousCharacters":!1,"editor.unicodeHighlight.invisibleCharacters":!1}}}]);var r5e=globalThis&&globalThis.__awaiter||function(i,e,t,n){function r(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(u){try{c(n.next(u))}catch(d){o(d)}}function l(u){try{c(n.throw(u))}catch(d){o(d)}}function c(u){u.done?s(u.value):r(u.value).then(a,l)}c((n=n.apply(i,e||[])).next())})};const Qj={getInitialState:()=>__,tokenizeEncoded:(i,e,t)=>oI(0,t)};function s5e(i,e,t){return r5e(this,void 0,void 0,function*(){if(!t)return Jj(e,i.languageIdCodec,Qj);const n=yield Oi.getOrCreate(t);return Jj(e,i.languageIdCodec,n||Qj)})}function o5e(i,e,t,n,r,s,o){let a="
",l=n,c=0,u=!0;for(let d=0,h=e.getCount();d0;)o&&u?(g+=" ",u=!1):(g+=" ",u=!0),m--;break}case 60:g+="<",u=!1;break;case 62:g+=">",u=!1;break;case 38:g+="&",u=!1;break;case 0:g+="�",u=!1;break;case 65279:case 8232:case 8233:case 133:g+="�",u=!1;break;case 13:g+="​",u=!1;break;case 32:o&&u?(g+=" ",u=!1):(g+=" ",u=!0);break;default:g+=String.fromCharCode(p),u=!1}}if(a+=`${g}`,f>r||l>=r)break}return a+="
",a}function Jj(i,e,t){let n='
';const r=Kc(i);let s=t.getInitialState();for(let o=0,a=r.length;o0&&(n+="
");const c=t.tokenizeEncoded(l,!0,s);Ir.convertToEndOffset(c.tokens,l.length);const d=new Ir(c.tokens,l,e).inflate();let h=0;for(let f=0,g=d.getCount();f${IT(l.substring(h,m))}`,h=m}s=c.endState}return n+="
",n}class a5e{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,r=this._removes;this._hasPending=!1,this._inserts=[],this._changes=[],this._removes=[],e._commitPendingChanges(t,n,r)}}class l5e{constructor(e,t,n,r,s){this.id=e,this.afterLineNumber=t,this.ordinal=n,this.height=r,this.minWidth=s,this.prefixSum=0}}class Sv{constructor(e,t,n,r){this._instanceId=Vz(++Sv.INSTANCE_COUNT),this._pendingChanges=new a5e,this._lastWhitespaceId=0,this._arr=[],this._prefixSumValidIndex=-1,this._minWidth=-1,this._lineCount=e,this._lineHeight=t,this._paddingTop=n,this._paddingBottom=r}static findInsertionIndex(e,t,n){let r=0,s=e.length;for(;r>>1;t===e[o].afterLineNumber?n{t=!0,r=r|0,s=s|0,o=o|0,a=a|0;const l=this._instanceId+ ++this._lastWhitespaceId;return this._pendingChanges.insert(new l5e(l,r,s,o,a)),l},changeOneWhitespace:(r,s,o)=>{t=!0,s=s|0,o=o|0,this._pendingChanges.change({id:r,newAfterLineNumber:s,newHeight:o})},removeWhitespace:r=>{t=!0,this._pendingChanges.remove({id:r})}})}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 l of e)this._insertWhitespace(l);for(const l of t)this._changeOneWhitespace(l.id,l.newAfterLineNumber,l.newHeight);for(const l of n){const c=this._findWhitespaceIndex(l.id);c!==-1&&this._removeWhitespace(c)}return}const r=new Set;for(const l of n)r.add(l.id);const s=new Map;for(const l of t)s.set(l.id,l);const o=l=>{const c=[];for(const u of l)if(!r.has(u.id)){if(s.has(u.id)){const d=s.get(u.id);u.afterLineNumber=d.newAfterLineNumber,u.height=d.newHeight}c.push(u)}return c},a=o(this._arr).concat(o(e));a.sort((l,c)=>l.afterLineNumber===c.afterLineNumber?l.ordinal-c.ordinal:l.afterLineNumber-c.afterLineNumber),this._arr=a,this._prefixSumValidIndex=-1}_checkPendingChanges(){this._pendingChanges.mustCommit()&&this._pendingChanges.commit(this)}_insertWhitespace(e){const t=Sv.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,r=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,r=this._arr.length;n=t.length||t[a+1].afterLineNumber>=e)return a;n=a+1|0}else r=a-1|0}return-1}_findFirstWhitespaceAfterLineNumber(e){e=e|0;const n=this._findLastWhitespaceBeforeLineNumber(e)+1;return n1?t=this._lineHeight*(e-1):t=0;const n=this.getWhitespaceAccumulatedHeightBeforeLineNumber(e);return t+n+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 r=1,s=t;for(;r=a+n)r=o+1;else{if(e>=a)return o;s=o}}return r>t?t:r}getLinesViewportData(e,t){this._checkPendingChanges(),e=e|0,t=t|0;const n=this._lineHeight,r=this.getLineNumberAtOrAfterVerticalOffset(e)|0,s=this.getVerticalOffsetForLineNumber(r)|0;let o=this._lineCount|0,a=this.getFirstWhitespaceIndexAfterLineNumber(r)|0;const l=this.getWhitespacesCount()|0;let c,u;a===-1?(a=l,u=o+1,c=0):(u=this.getAfterLineNumberForWhitespaceIndex(a)|0,c=this.getHeightForWhitespaceIndex(a)|0);let d=s,h=d;const f=5e5;let g=0;s>=f&&(g=Math.floor(s/f)*f,g=Math.floor(g/n)*n,h-=g);const p=[],m=e+(t-e)/2;let _=-1;for(let E=r;E<=o;E++){if(_===-1){const I=d,x=d+n;(I<=m&&mm)&&(_=E)}for(d+=n,p[E-r]=h,h+=n;u===E;)h+=c,d+=c,a++,a>=l?u=o+1:(u=this.getAfterLineNumberForWhitespaceIndex(a)|0,c=this.getHeightForWhitespaceIndex(a)|0);if(d>=t){o=E;break}}_===-1&&(_=o);const b=this.getVerticalOffsetForLineNumber(o)|0;let v=r,w=o;return vt&&w--,{bigNumbersDelta:g,startLineNumber:r,endLineNumber:o,relativeVerticalOffset:p,centeredLineNumber:_,completelyVisibleStartLineNumber:v,completelyVisibleEndLineNumber:w}}getVerticalOffsetForWhitespaceIndex(e){this._checkPendingChanges(),e=e|0;const t=this.getAfterLineNumberForWhitespaceIndex(e);let n;t>=1?n=this._lineHeight*t:n=0;let r;return e>0?r=this.getWhitespacesAccumulatedHeight(e-1):r=0,n+r+this._paddingTop}getWhitespaceIndexAtOrAfterVerticallOffset(e){this._checkPendingChanges(),e=e|0;let t=0,n=this.getWhitespacesCount()-1;if(n<0)return-1;const r=this.getVerticalOffsetForWhitespaceIndex(n),s=this.getHeightForWhitespaceIndex(n);if(e>=r+s)return-1;for(;t=a+l)t=o+1;else{if(e>=a)return o;n=o}}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 r=this.getHeightForWhitespaceIndex(t),s=this.getIdForWhitespaceIndex(t),o=this.getAfterLineNumberForWhitespaceIndex(t);return{id:s,afterLineNumber:o,verticalOffset:n,height:r}}getWhitespaceViewportData(e,t){this._checkPendingChanges(),e=e|0,t=t|0;const n=this.getWhitespaceIndexAtOrAfterVerticallOffset(e),r=this.getWhitespacesCount()-1;if(n<0)return[];const s=[];for(let o=n;o<=r;o++){const a=this.getVerticalOffsetForWhitespaceIndex(o),l=this.getHeightForWhitespaceIndex(o);if(a>=t)break;s.push({id:this.getIdForWhitespaceIndex(o),afterLineNumber:this.getAfterLineNumberForWhitespaceIndex(o),verticalOffset:a,height:l})}return s}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}}Sv.INSTANCE_COUNT=0;const c5e=125;class kv{constructor(e,t,n,r){e=e|0,t=t|0,n=n|0,r=r|0,e<0&&(e=0),t<0&&(t=0),n<0&&(n=0),r<0&&(r=0),this.width=e,this.contentWidth=t,this.scrollWidth=Math.max(e,t),this.height=n,this.contentHeight=r,this.scrollHeight=Math.max(n,r)}equals(e){return this.width===e.width&&this.contentWidth===e.contentWidth&&this.height===e.height&&this.contentHeight===e.contentHeight}}class u5e extends Ne{constructor(e,t){super(),this._onDidContentSizeChange=this._register(new be),this.onDidContentSizeChange=this._onDidContentSizeChange.event,this._dimensions=new kv(0,0,0,0),this._scrollable=this._register(new cv({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,r=t.contentHeight!==e.contentHeight;(n||r)&&this._onDidContentSizeChange.fire(new G6(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)}}class d5e extends Ne{constructor(e,t,n){super(),this._configuration=e;const r=this._configuration.options,s=r.get(131),o=r.get(75);this._linesLayout=new Sv(t,r.get(59),o.top,o.bottom),this._scrollable=this._register(new u5e(0,n)),this._configureSmoothScrollDuration(),this._scrollable.setScrollDimensions(new kv(s.contentWidth,0,s.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(103)?c5e:0)}onConfigurationChanged(e){const t=this._configuration.options;if(e.hasChanged(59)&&this._linesLayout.setLineHeight(t.get(59)),e.hasChanged(75)){const n=t.get(75);this._linesLayout.setPadding(n.top,n.bottom)}if(e.hasChanged(131)){const n=t.get(131),r=n.contentWidth,s=n.height,o=this._scrollable.getScrollDimensions(),a=o.contentWidth;this._scrollable.setScrollDimensions(new kv(r,o.contentWidth,s,this._getContentHeight(r,s,a)))}else this._updateHeight();e.hasChanged(103)&&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 r=this._configuration.options.get(92);return r.horizontal===2||e>=t?0:r.horizontalScrollbarSize}_getContentHeight(e,t,n){const r=this._configuration.options;let s=this._linesLayout.getLinesTotalHeight();return r.get(94)?s+=Math.max(0,t-r.get(59)-r.get(75).bottom):s+=this._getHorizontalScrollbarHeight(e,n),s}_updateHeight(){const e=this._scrollable.getScrollDimensions(),t=e.width,n=e.height,r=e.contentWidth;this._scrollable.setScrollDimensions(new kv(t,e.contentWidth,n,this._getContentHeight(t,n,r)))}getCurrentViewport(){const e=this._scrollable.getScrollDimensions(),t=this._scrollable.getCurrentScrollPosition();return new B$(t.scrollTop,t.scrollLeft,e.width,e.height)}getFutureViewport(){const e=this._scrollable.getScrollDimensions(),t=this._scrollable.getFutureScrollPosition();return new B$(t.scrollTop,t.scrollLeft,e.width,e.height)}_computeContentWidth(e){const t=this._configuration.options,n=t.get(132),r=t.get(44);if(n.isViewportWrapping){const s=t.get(131),o=t.get(65);return e>s.contentWidth+r.typicalHalfwidthCharacterWidth&&o.enabled&&o.side==="right"?e+s.verticalScrollbarWidth:e}else{const s=t.get(93)*r.typicalHalfwidthCharacterWidth,o=this._linesLayout.getWhitespaceMinWidth();return Math.max(e+s,o)}}setMaxLineWidth(e){const t=this._scrollable.getScrollDimensions();this._scrollable.setScrollDimensions(new kv(t.width,this._computeContentWidth(e),t.height,t.contentHeight)),this._updateHeight()}saveState(){const e=this._scrollable.getFutureScrollPosition(),t=e.scrollTop,n=this._linesLayout.getLineNumberAtOrAfterVerticalOffset(t),r=this._linesLayout.getWhitespaceAccumulatedHeightBeforeLineNumber(n);return{scrollTop:t,scrollTopWithoutViewZones:t-r,scrollLeft:e.scrollLeft}}changeWhitespace(e){const t=this._linesLayout.changeWhitespace(e);return t&&this.onHeightMaybeChanged(),t}getVerticalOffsetForLineNumber(e){return this._linesLayout.getVerticalOffsetForLineNumber(e)}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)}deltaScrollNow(e,t){const n=this._scrollable.getCurrentScrollPosition();this._scrollable.setScrollPositionNow({scrollLeft:n.scrollLeft+e,scrollTop:n.scrollTop+t})}}class h5e{constructor(e,t,n,r,s){this.editorId=e,this.model=t,this.configuration=n,this._linesCollection=r,this._coordinatesConverter=s,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 r=e.range,s=e.options;let o;if(s.isWholeLine){const a=this._coordinatesConverter.convertModelPositionToViewPosition(new ye(r.startLineNumber,1),0),l=this._coordinatesConverter.convertModelPositionToViewPosition(new ye(r.endLineNumber,this.model.getLineMaxColumn(r.endLineNumber)),1);o=new H(a.lineNumber,a.column,l.lineNumber,l.column)}else o=this._coordinatesConverter.convertModelRangeToViewRange(r,1);n=new V$(o,s),this._decorationsCache[t]=n}return n}getDecorationsViewportData(e){let t=this._cachedModelDecorationsResolver!==null;return t=t&&e.equalsRange(this._cachedModelDecorationsResolverViewRange),t||(this._cachedModelDecorationsResolver=this._getDecorationsViewportData(e),this._cachedModelDecorationsResolverViewRange=e),this._cachedModelDecorationsResolver}_getDecorationsViewportData(e){const t=this._linesCollection.getDecorationsInRange(e,this.editorId,My(this.configuration.options)),n=e.startLineNumber,r=e.endLineNumber,s=[];let o=0;const a=[];for(let l=n;l<=r;l++)a[l-n]=[];for(let l=0,c=t.length;lt===1)}function Q6(i,e){return eq(i,e.range,t=>t===2)}function eq(i,e,t){for(let n=e.startLineNumber;n<=e.endLineNumber;n++){const r=i.getLineTokens(n),s=n===e.startLineNumber,o=n===e.endLineNumber;let a=s?r.findTokenIndexAtOffset(e.startColumn-1):0;for(;ae.endColumn-1);){if(!t(r.getStandardTokenType(a)))return!1;a++}}return!0}class xk{constructor(e,t,n){this.range=e,this.nestingLevel=t,this.isInvalid=n}}class f5e{constructor(e,t,n,r){this.range=e,this.openingBracketRange=t,this.closingBracketRange=n,this.nestingLevel=r}}class g5e extends f5e{constructor(e,t,n,r,s){super(e,t,n,r),this.minVisibleColumnIndentation=s}}class J6{constructor(e,t){this.lineCount=e,this.columnCount=t}toString(){return`${this.lineCount},${this.columnCount}`}}J6.zero=new J6(0,0);function p5e(i,e,t,n){return i!==t?Xi(t-i,n):Xi(0,n-e)}const du=0;function m5e(i){return i===0}const ba=Math.pow(2,26);function Xi(i,e){return i*ba+e}function Zh(i){const e=i,t=Math.floor(e/ba),n=e-t*ba;return new J6(t,n)}function _5e(i){return Math.floor(i/ba)}function hpt(i){return i}function mr(i,e){return e=e}function Ik(i){return Xi(i.lineNumber-1,i.column-1)}function _p(i,e){const t=i,n=Math.floor(t/ba),r=t-n*ba,s=e,o=Math.floor(s/ba),a=s-o*ba;return new H(n+1,r+1,o+1,a+1)}function v5e(i){const e=Kc(i);return Xi(e.length-1,e[e.length-1].length)}class tq{constructor(e,t,n){this.startOffset=e,this.endOffset=t,this.newLength=n}}class w5e{constructor(e,t){this.documentLength=t,this.nextEditIdx=0,this.deltaOldToNewLineCount=0,this.deltaOldToNewColumnCount=0,this.deltaLineIdxInOld=-1,this.edits=e.map(n=>eD.from(n))}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):this.documentLength;return b5e(e,n)}translateOldToCur(e){return e.lineCount===this.deltaLineIdxInOld?Xi(e.lineCount+this.deltaOldToNewLineCount,e.columnCount+this.deltaOldToNewColumnCount):Xi(e.lineCount+this.deltaOldToNewLineCount,e.columnCount)}translateCurToOld(e){const t=Zh(e);return t.lineCount-this.deltaOldToNewLineCount===this.deltaLineIdxInOld?Xi(t.lineCount-this.deltaOldToNewLineCount,t.columnCount-this.deltaOldToNewColumnCount):Xi(t.lineCount-this.deltaOldToNewLineCount,t.columnCount)}adjustNextEdit(e){for(;this.nextEditIdx>5;if(r===0){const o=1<0;)t=t.getChild(n-1);return t.canBeReused(e)}handleChildrenChanged(){this.throwIfImmutable();const e=this.childrenLength;let t=this.getChild(0).length,n=this.getChild(0).missingOpeningBracketIds;for(let r=1;rthis.textBufferLineCount-1||this.lineIdx===this.textBufferLineCount-1&&this.lineCharOffset>=this.textBufferLastLineLength)return null;this.line===null&&(this.lineTokens=this.textModel.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 s=this.lineTokens,o=s.getCount();let a=null;if(this.lineTokenOffset1e3))break;if(n>1500)break}const r=p5e(e,t,this.lineIdx,this.lineCharOffset);return new Xh(r,0,-1,_r.getEmpty(),new o1(r))}}class x5e{constructor(e,t){this.text=e,this._offset=du,this.idx=0;const r=t.getRegExpStr()?new RegExp(t.getRegExpStr()+`| +`,"g"):null,s=[];let o,a=0,l=0,c=0,u=0;const d=new Array;for(let g=0;g<60;g++)d.push(new Xh(Xi(0,g),0,-1,_r.getEmpty(),new o1(Xi(0,g))));const h=new Array;for(let g=0;g<60;g++)h.push(new Xh(Xi(1,g),0,-1,_r.getEmpty(),new o1(Xi(1,g))));if(r)for(r.lastIndex=0;(o=r.exec(e))!==null;){const g=o.index,p=o[0];if(p===` +`)a++,l=g+1;else{if(c!==g){let m;if(u===a){const _=g-c;if(_L5e(t)).join("|")}}get regExpGlobal(){if(!this.hasRegExp){const e=this.getRegExpStr();this._regExpGlobal=e?new RegExp(e,"g"):null,this.hasRegExp=!0}return this._regExpGlobal}getToken(e){return this.map.get(e)}findClosingTokenText(e){for(const[t,n]of this.map)if(n.bracketIds.intersects(e))return t}get isEmpty(){return this.map.size===0}}function L5e(i){const e=za(i);return/^[\w ]+$/.test(i)?`\\b${e}\\b`:e}class sq{constructor(e,t){this.denseKeyProvider=e,this.getLanguageConfiguration=t,this.languageIdToBracketTokens=new Map}didLanguageChange(e){const t=this.languageIdToBracketTokens.get(e);if(!t)return!1;const n=Rk.createFromLanguage(this.getLanguageConfiguration(e),this.denseKeyProvider).getRegExpStr();return t.getRegExpStr()!==n}getSingleLanguageBracketTokens(e){let t=this.languageIdToBracketTokens.get(e);return t||(t=Rk.createFromLanguage(this.getLanguageConfiguration(e),this.denseKeyProvider),this.languageIdToBracketTokens.set(e,t)),t}}function T5e(i){if(i.length===0)return null;if(i.length===1)return i[0];let e=0;function t(){if(e>=i.length)return null;const o=e,a=i[o].listHeight;for(e++;e=2?oq(o===0&&e===i.length?i:i.slice(o,e),!1):i[o]}let n=t(),r=t();if(!r)return n;for(let o=t();o;o=t())aq(n,r)<=aq(r,o)?(n=iD(n,r),r=o):r=iD(r,o);return iD(n,r)}function oq(i,e=!1){if(i.length===0)return null;if(i.length===1)return i[0];let t=i.length;for(;t>3;){const n=t>>1;for(let r=0;r=3?i[2]:null,e)}function aq(i,e){return Math.abs(i.listHeight-e.listHeight)}function iD(i,e){return i.listHeight===e.listHeight?hu.create23(i,e,null,!1):i.listHeight>e.listHeight?I5e(i,e):D5e(e,i)}function I5e(i,e){i=i.toMutable();let t=i;const n=new Array;let r;for(;;){if(e.listHeight===t.listHeight){r=e;break}if(t.kind!==4)throw new Error("unexpected");n.push(t),t=t.makeLastElementMutable()}for(let s=n.length-1;s>=0;s--){const o=n[s];r?o.childrenLength>=3?r=hu.create23(o.unappendChild(),r,null,!1):(o.appendChildOfSameHeight(r),r=void 0):o.handleChildrenChanged()}return r?hu.create23(i,r,null,!1):i}function D5e(i,e){i=i.toMutable();let t=i;const n=new Array;for(;e.listHeight!==t.listHeight;){if(t.kind!==4)throw new Error("unexpected");n.push(t),t=t.makeFirstElementMutable()}let r=e;for(let s=n.length-1;s>=0;s--){const o=n[s];r?o.childrenLength>=3?r=hu.create23(r,o.unprependChild(),null,!1):(o.prependChildOfSameHeight(r),r=void 0):o.handleChildrenChanged()}return r?hu.create23(r,i,null,!1):i}class N5e{constructor(e){this.lastOffset=du,this.nextNodes=[e],this.offsets=[du],this.idxs=[]}readLongestNodeAt(e,t){if(Lk(e,this.lastOffset))throw new Error("Invalid offset");for(this.lastOffset=e;;){const n=Lv(this.nextNodes);if(!n)return;const r=Lv(this.offsets);if(Lk(e,r))return;if(Lk(r,e))if(mr(r,n.length)<=e)this.nextNodeAfterCurrent();else{const s=rD(n);s!==-1?(this.nextNodes.push(n.getChild(s)),this.offsets.push(r),this.idxs.push(s)):this.nextNodeAfterCurrent()}else{if(t(n))return this.nextNodeAfterCurrent(),n;{const s=rD(n);if(s===-1){this.nextNodeAfterCurrent();return}else this.nextNodes.push(n.getChild(s)),this.offsets.push(r),this.idxs.push(s)}}}}nextNodeAfterCurrent(){for(;;){const e=Lv(this.offsets),t=Lv(this.nextNodes);if(this.nextNodes.pop(),this.offsets.pop(),this.idxs.length===0)break;const n=Lv(this.nextNodes),r=rD(n,this.idxs[this.idxs.length-1]);if(r!==-1){this.nextNodes.push(n.getChild(r)),this.offsets.push(mr(e,t.length)),this.idxs[this.idxs.length-1]=r;break}else this.idxs.pop()}}}function rD(i,e=-1){for(;;){if(e++,e>=i.childrenLength)return-1;if(i.getChild(e))return e}}function Lv(i){return i.length>0?i[i.length-1]:void 0}function sD(i,e,t,n){return new A5e(i,e,t,n).parseDocument()}let A5e=class{constructor(e,t,n,r){if(this.tokenizer=e,this.createImmutableLists=r,this._itemsConstructed=0,this._itemsFromCache=0,n&&r)throw new Error("Not supported");this.oldNodeReader=n?new N5e(n):void 0,this.positionMapper=new w5e(t,e.length)}parseDocument(){this._itemsConstructed=0,this._itemsFromCache=0;let e=this.parseList(_r.getEmpty());return e||(e=hu.getEmpty()),e}parseList(e){const t=new Array;for(;;){const r=this.tokenizer.peek();if(!r||r.kind===2&&r.bracketIds.intersects(e))break;const s=this.parseChild(e);s.kind===4&&s.childrenLength===0||t.push(s)}return this.oldNodeReader?T5e(t):oq(t,this.createImmutableLists)}parseChild(e){if(this.oldNodeReader){const n=this.positionMapper.getDistanceToNextChange(this.tokenizer.offset);if(!m5e(n)){const r=this.oldNodeReader.readLongestNodeAt(this.positionMapper.getOffsetBeforeChange(this.tokenizer.offset),s=>Lk(s.length,n)?s.canBeReused(e):!1);if(r)return this._itemsFromCache++,this.tokenizer.skip(r.length),r}}this._itemsConstructed++;const t=this.tokenizer.read();switch(t.kind){case 2:return new k5e(t.bracketIds,t.length);case 0:return t.astNode;case 1:{const n=e.merge(t.bracketIds),r=this.parseList(n),s=this.tokenizer.peek();return s&&s.kind===2&&(s.bracketId===t.bracketId||s.bracketIds.intersects(t.bracketIds))?(this.tokenizer.read(),Ev.create(t.astNode,r,s.astNode)):Ev.create(t.astNode,r,null)}default:throw new Error("unexpected")}}};class R5e extends Ne{constructor(e,t){if(super(),this.textModel=e,this.getLanguageConfiguration=t,this.didChangeEmitter=new be,this.denseKeyProvider=new iq,this.brackets=new sq(this.denseKeyProvider,this.getLanguageConfiguration),this.onDidChange=this.didChangeEmitter.event,e.backgroundTokenizationState===0){const n=this.brackets.getSingleLanguageBracketTokens(this.textModel.getLanguageId()),r=new x5e(this.textModel.getValue(),n);this.initialAstWithoutTokens=sD(r,[],void 0,!0),this.astWithTokens=this.initialAstWithoutTokens}else e.backgroundTokenizationState===2?(this.initialAstWithoutTokens=void 0,this.astWithTokens=this.parseDocumentFromTextBuffer([],void 0,!1)):e.backgroundTokenizationState===1&&(this.initialAstWithoutTokens=this.parseDocumentFromTextBuffer([],void 0,!0),this.astWithTokens=this.initialAstWithoutTokens)}didLanguageChange(e){return this.brackets.didLanguageChange(e)}handleDidChangeBackgroundTokenizationState(){if(this.textModel.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 tq(Xi(n.fromLineNumber-1,0),Xi(n.toLineNumber,0),Xi(n.toLineNumber-n.fromLineNumber+1,0)));this.astWithTokens=this.parseDocumentFromTextBuffer(t,this.astWithTokens,!1),this.initialAstWithoutTokens||this.didChangeEmitter.fire()}handleContentChanged(e){const t=e.changes.map(n=>{const r=H.lift(n.range);return new tq(Ik(r.getStartPosition()),Ik(r.getEndPosition()),v5e(n.text))}).reverse();this.astWithTokens=this.parseDocumentFromTextBuffer(t,this.astWithTokens,!1),this.initialAstWithoutTokens&&(this.initialAstWithoutTokens=this.parseDocumentFromTextBuffer(t,this.initialAstWithoutTokens,!1))}parseDocumentFromTextBuffer(e,t,n){const r=t,s=new rq(this.textModel,this.brackets);return sD(s,e,r,n)}getBracketsInRange(e){const t=Xi(e.startLineNumber-1,e.startColumn-1),n=Xi(e.endLineNumber-1,e.endColumn-1),r=new Array,s=this.initialAstWithoutTokens||this.astWithTokens;return oD(s,du,s.length,t,n,r),r}getBracketPairsInRange(e,t){const n=new Array,r=Ik(e.getStartPosition()),s=Ik(e.getEndPosition()),o=this.initialAstWithoutTokens||this.astWithTokens,a=new O5e(n,t,this.textModel);return lq(o,du,o.length,r,s,a),n}}function oD(i,e,t,n,r,s,o=0){if(i.kind===4)for(const a of i.children)t=mr(e,a.length),mp(e,r)&&Tk(t,n)&&oD(a,e,t,n,r,s,o),e=t;else if(i.kind===2){o++;{const a=i.openingBracket;if(t=mr(e,a.length),mp(e,r)&&Tk(t,n)){const l=_p(e,t);s.push(new xk(l,o-1,!i.closingBracket))}e=t}if(i.child){const a=i.child;t=mr(e,a.length),mp(e,r)&&Tk(t,n)&&oD(a,e,t,n,r,s,o),e=t}if(i.closingBracket){const a=i.closingBracket;if(t=mr(e,a.length),mp(e,r)&&Tk(t,n)){const l=_p(e,t);s.push(new xk(l,o-1,!1))}e=t}}else if(i.kind===3){const a=_p(e,t);s.push(new xk(a,o-1,!0))}else if(i.kind===1){const a=_p(e,t);s.push(new xk(a,o-1,!1))}}class O5e{constructor(e,t,n){this.result=e,this.includeMinIndentation=t,this.textModel=n}}function lq(i,e,t,n,r,s,o=0){var a;if(i.kind===2){const c=mr(e,i.openingBracket.length);let u=-1;s.includeMinIndentation&&(u=i.computeMinIndentation(e,s.textModel)),s.result.push(new g5e(_p(e,t),_p(e,c),i.closingBracket?_p(mr(c,((a=i.child)===null||a===void 0?void 0:a.length)||du),t):void 0,o,u)),o++}let l=e;for(const c of i.children){const u=l;l=mr(l,c.length),mp(u,r)&&mp(n,l)&&lq(c,u,l,n,r,s,o)}}class M5e extends Ne{constructor(e,t){super(),this.textModel=e,this.languageConfigurationService=t,this.bracketPairsTree=this._register(new qs),this.onDidChangeEmitter=new be,this.onDidChange=this.onDidChangeEmitter.event,this.bracketsRequested=!1,this._register(this.languageConfigurationService.onDidChange(n=>{var r;(!n.languageId||!((r=this.bracketPairsTree.value)===null||r===void 0)&&r.object.didLanguageChange(n.languageId))&&(this.bracketPairsTree.clear(),this.updateBracketPairsTree())}))}get isDocumentSupported(){return this.textModel.getValueLength()<=5e6}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.isDocumentSupported){if(!this.bracketPairsTree.value){const e=new Je;this.bracketPairsTree.value=P5e(e.add(new R5e(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))||[]}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))||[]}getBracketsInRange(e){var t;return this.bracketsRequested=!0,this.updateBracketPairsTree(),((t=this.bracketPairsTree.value)===null||t===void 0?void 0:t.object.getBracketsInRange(e))||[]}findMatchingBracketUp(e,t,n){const r=e.toLowerCase(),s=this.textModel.validatePosition(t),o=this.textModel.getLanguageIdAtPosition(s.lineNumber,s.column),a=this.languageConfigurationService.getLanguageConfiguration(o).brackets;if(!a)return null;const l=a.textIsBracket[r];return l?Ok(this._findMatchingBracketUp(l,s,aD(n))):null}matchBracket(e,t){const n=aD(t);return this._matchBracket(this.textModel.validatePosition(e),n)}_establishBracketSearchOffsets(e,t,n,r){const s=t.getCount(),o=t.getLanguageId(r);let a=Math.max(0,e.column-1-n.maxBracketLength);for(let c=r-1;c>=0;c--){const u=t.getEndOffset(c);if(u<=a)break;if(Jc(t.getStandardTokenType(c))||t.getLanguageId(c)!==o){a=u;break}}let l=Math.min(t.getLineContent().length,e.column-1+n.maxBracketLength);for(let c=r+1;c=l)break;if(Jc(t.getStandardTokenType(c))||t.getLanguageId(c)!==o){l=u;break}}return{searchStartOffset:a,searchEndOffset:l}}_matchBracket(e,t){const n=e.lineNumber,r=this.textModel.getLineTokens(n),s=this.textModel.getLineContent(n),o=r.findTokenIndexAtOffset(e.column-1);if(o<0)return null;const a=this.languageConfigurationService.getLanguageConfiguration(r.getLanguageId(o)).brackets;if(a&&!Jc(r.getStandardTokenType(o))){let{searchStartOffset:l,searchEndOffset:c}=this._establishBracketSearchOffsets(e,r,a,o),u=null;for(;;){const d=Cl.findNextBracketInRange(a.forwardRegex,n,s,l,c);if(!d)break;if(d.startColumn<=e.column&&e.column<=d.endColumn){const h=s.substring(d.startColumn-1,d.endColumn-1).toLowerCase(),f=this._matchFoundBracket(d,a.textIsBracket[h],a.textIsOpenBracket[h],t);if(f){if(f instanceof pd)return null;u=f}}l=d.endColumn-1}if(u)return u}if(o>0&&r.getStartOffset(o)===e.column-1){const l=o-1,c=this.languageConfigurationService.getLanguageConfiguration(r.getLanguageId(l)).brackets;if(c&&!Jc(r.getStandardTokenType(l))){const{searchStartOffset:u,searchEndOffset:d}=this._establishBracketSearchOffsets(e,r,c,l),h=Cl.findPrevBracketInRange(c.reversedRegex,n,s,u,d);if(h&&h.startColumn<=e.column&&e.column<=h.endColumn){const f=s.substring(h.startColumn-1,h.endColumn-1).toLowerCase(),g=this._matchFoundBracket(h,c.textIsBracket[f],c.textIsOpenBracket[f],t);if(g)return g instanceof pd?null:g}}}return null}_matchFoundBracket(e,t,n,r){if(!t)return null;const s=n?this._findMatchingBracketDown(t,e.getEndPosition(),r):this._findMatchingBracketUp(t,e.getStartPosition(),r);return s?s instanceof pd?s:[e,s]:null}_findMatchingBracketUp(e,t,n){const r=e.languageId,s=e.reversedRegex;let o=-1,a=0;const l=(c,u,d,h)=>{for(;;){if(n&&++a%100===0&&!n())return pd.INSTANCE;const f=Cl.findPrevBracketInRange(s,c,u,d,h);if(!f)break;const g=u.substring(f.startColumn-1,f.endColumn-1).toLowerCase();if(e.isOpen(g)?o++:e.isClose(g)&&o--,o===0)return f;h=f.startColumn-1}return null};for(let c=t.lineNumber;c>=1;c--){const u=this.textModel.getLineTokens(c),d=u.getCount(),h=this.textModel.getLineContent(c);let f=d-1,g=h.length,p=h.length;c===t.lineNumber&&(f=u.findTokenIndexAtOffset(t.column-1),g=t.column-1,p=t.column-1);let m=!0;for(;f>=0;f--){const _=u.getLanguageId(f)===r&&!Jc(u.getStandardTokenType(f));if(_)m?g=u.getStartOffset(f):(g=u.getStartOffset(f),p=u.getEndOffset(f));else if(m&&g!==p){const b=l(c,h,g,p);if(b)return b}m=_}if(m&&g!==p){const _=l(c,h,g,p);if(_)return _}}return null}_findMatchingBracketDown(e,t,n){const r=e.languageId,s=e.forwardRegex;let o=1,a=0;const l=(u,d,h,f)=>{for(;;){if(n&&++a%100===0&&!n())return pd.INSTANCE;const g=Cl.findNextBracketInRange(s,u,d,h,f);if(!g)break;const p=d.substring(g.startColumn-1,g.endColumn-1).toLowerCase();if(e.isOpen(p)?o++:e.isClose(p)&&o--,o===0)return g;h=g.endColumn-1}return null},c=this.textModel.getLineCount();for(let u=t.lineNumber;u<=c;u++){const d=this.textModel.getLineTokens(u),h=d.getCount(),f=this.textModel.getLineContent(u);let g=0,p=0,m=0;u===t.lineNumber&&(g=d.findTokenIndexAtOffset(t.column-1),p=t.column-1,m=t.column-1);let _=!0;for(;g=1;s--){const o=this.textModel.getLineTokens(s),a=o.getCount(),l=this.textModel.getLineContent(s);let c=a-1,u=l.length,d=l.length;if(s===t.lineNumber){c=o.findTokenIndexAtOffset(t.column-1),u=t.column-1,d=t.column-1;const f=o.getLanguageId(c);n!==f&&(n=f,r=this.languageConfigurationService.getLanguageConfiguration(n).brackets)}let h=!0;for(;c>=0;c--){const f=o.getLanguageId(c);if(n!==f){if(r&&h&&u!==d){const p=Cl.findPrevBracketInRange(r.reversedRegex,s,l,u,d);if(p)return this._toFoundBracket(r,p);h=!1}n=f,r=this.languageConfigurationService.getLanguageConfiguration(n).brackets}const g=!!r&&!Jc(o.getStandardTokenType(c));if(g)h?u=o.getStartOffset(c):(u=o.getStartOffset(c),d=o.getEndOffset(c));else if(r&&h&&u!==d){const p=Cl.findPrevBracketInRange(r.reversedRegex,s,l,u,d);if(p)return this._toFoundBracket(r,p)}h=g}if(r&&h&&u!==d){const f=Cl.findPrevBracketInRange(r.reversedRegex,s,l,u,d);if(f)return this._toFoundBracket(r,f)}}return null}findNextBracket(e){const t=this.textModel.validatePosition(e),n=this.textModel.getLineCount();let r=null,s=null;for(let o=t.lineNumber;o<=n;o++){const a=this.textModel.getLineTokens(o),l=a.getCount(),c=this.textModel.getLineContent(o);let u=0,d=0,h=0;if(o===t.lineNumber){u=a.findTokenIndexAtOffset(t.column-1),d=t.column-1,h=t.column-1;const g=a.getLanguageId(u);r!==g&&(r=g,s=this.languageConfigurationService.getLanguageConfiguration(r).brackets)}let f=!0;for(;u{if(!o.has(f)){const p=[];for(let m=0,_=g?g.brackets.length:0;m<_;m++)p[m]=0;o.set(f,p)}a=o.get(f)};let c=0;const u=(f,g,p,m,_)=>{for(;;){if(n&&++c%100===0&&!n())return pd.INSTANCE;const b=Cl.findNextBracketInRange(f.forwardRegex,g,p,m,_);if(!b)break;const v=p.substring(b.startColumn-1,b.endColumn-1).toLowerCase(),w=f.textIsBracket[v];if(w&&(w.isOpen(v)?a[w.index]++:w.isClose(v)&&a[w.index]--,a[w.index]===-1))return this._matchFoundBracket(b,w,!1,n);m=b.endColumn-1}return null};let d=null,h=null;for(let f=r.lineNumber;f<=s;f++){const g=this.textModel.getLineTokens(f),p=g.getCount(),m=this.textModel.getLineContent(f);let _=0,b=0,v=0;if(f===r.lineNumber){_=g.findTokenIndexAtOffset(r.column-1),b=r.column-1,v=r.column-1;const E=g.getLanguageId(_);d!==E&&(d=E,h=this.languageConfigurationService.getLanguageConfiguration(d).brackets,l(d,h))}let w=!0;for(;_e==null?void 0:e.dispose()}}function aD(i){if(typeof i>"u")return()=>!0;{const e=Date.now();return()=>Date.now()-e<=i}}class pd{constructor(){this._searchCanceledBrand=void 0}}pd.INSTANCE=new pd;function Ok(i){return i instanceof pd?null:i}class F5e extends Ne{constructor(e){super(),this.textModel=e,this.colorProvider=new cq,this.onDidChangeEmitter=new be,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){if(t===void 0)return[];if(!this.colorizationOptions.enabled)return[];const r=new Array,s=this.textModel.bracketPairs.getBracketsInRange(e);for(const o of s)r.push({id:`bracket${o.range.toString()}-${o.nestingLevel}`,options:{description:"BracketPairColorization",inlineClassName:this.colorProvider.getInlineClassName(o)},ownerId:0,range:o.range});return r}getAllDecorations(e,t){return e===void 0?[]:this.colorizationOptions.enabled?this.getDecorationsInRange(new H(1,1,this.textModel.getLineCount(),1),e,t):[]}}class cq{constructor(){this.unexpectedClosingBracketClassName="unexpected-closing-bracket"}getInlineClassName(e){return e.isInvalid?this.unexpectedClosingBracketClassName:this.getInlineClassNameOfLevel(e.nestingLevel)}getInlineClassNameOfLevel(e){return`bracket-highlighting-${e%30}`}}_i((i,e)=>{const t=[dj,hj,fj,gj,pj,mj],n=new cq;e.addRule(`.monaco-editor .${n.unexpectedClosingBracketClassName} { color: ${i.getColor(a3e)}; }`);const r=t.map(s=>i.getColor(s)).filter(s=>!!s).filter(s=>!s.isTransparent());for(let s=0;s<30;s++){const o=r[s%r.length];e.addRule(`.monaco-editor .${n.getInlineClassNameOfLevel(s)} { color: ${o}; }`)}});function Mk(i){return i.replace(/\n/g,"\\n").replace(/\r/g,"\\r")}class cs{constructor(e,t,n,r){this.oldPosition=e,this.oldText=t,this.newPosition=n,this.newText=r}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}toString(){return this.oldText.length===0?`(insert@${this.oldPosition} "${Mk(this.newText)}")`:this.newText.length===0?`(delete@${this.oldPosition} "${Mk(this.oldText)}")`:`(replace@${this.oldPosition} "${Mk(this.oldText)}" with "${Mk(this.newText)}")`}static _writeStringSize(e){return 4+2*e.length}static _writeString(e,t,n){const r=t.length;lc(e,r,n),n+=4;for(let s=0;si.length)return!1;if(t){if(!OT(i,e))return!1;if(e.length===i.length)return!0;let s=e.length;return e.charAt(e.length-1)===n&&s--,i.charAt(s)===n}return e.charAt(e.length-1)!==n&&(e+=n),i.indexOf(e)===0}function hq(i){return i>=65&&i<=90||i>=97&&i<=122}function W5e(i){const e=W8(i);return Gr?i.length>3?!1:fq(e)&&(i.length===2||e.charCodeAt(2)===92):e===tr.sep}function fq(i,e){return(e!==void 0?e:Gr)?hq(i.charCodeAt(0))&&i.charCodeAt(1)===58:!1}function gu(i){return zy(i,!0)}class cD{constructor(e){this._ignorePathCasing=e}compare(e,t,n=!1){return e===t?0:kb(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===sn.file)return lD(gu(e),gu(t),this._ignorePathCasing(e))&&e.query===t.query&&(n||e.fragment===t.fragment);if(mq(e.authority,t.authority))return lD(e.path,t.path,this._ignorePathCasing(e),"/")&&e.query===t.query&&(n||e.fragment===t.fragment)}return!1}joinPath(e,...t){return Pt.joinPath(e,...t)}basenameOrAuthority(e){return el(e)||e.authority}basename(e){return tr.basename(e.path)}extname(e){return tr.extname(e.path)}dirname(e){if(e.path.length===0)return e;let t;return e.scheme===sn.file?t=Pt.file(kz(gu(e))).path:(t=tr.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===sn.file?t=Pt.file(W8(gu(e))).path:t=tr.normalize(e.path),e.with({path:t})}relativePath(e,t){if(e.scheme!==t.scheme||!mq(e.authority,t.authority))return;if(e.scheme===sn.file){const s=sCe(gu(e),gu(t));return Gr?uq(s):s}let n=e.path||"/",r=t.path||"/";if(this._ignorePathCasing(e)){let s=0;for(const o=Math.min(n.length,r.length);sdq(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=qc){return _q(e,t)?e.with({path:e.path.substr(0,e.path.length-1)}):e}addTrailingPathSeparator(e,t=qc){let n=!1;if(e.scheme===sn.file){const r=gu(e);n=r!==void 0&&r.length===dq(r).length&&r[r.length-1]===t}else{t="/";const r=e.path;n=r.length===1&&r.charCodeAt(r.length-1)===47}return!n&&!_q(e,t)?e.with({path:e.path+"/"}):e}}const vi=new cD(()=>!1);new cD(i=>i.scheme===sn.file?!ws:!0),new cD(i=>!0);const gq=vi.isEqual.bind(vi);vi.isEqualOrParent.bind(vi),vi.getComparisonKey.bind(vi);const H5e=vi.basenameOrAuthority.bind(vi),el=vi.basename.bind(vi),z5e=vi.extname.bind(vi),Pk=vi.dirname.bind(vi),$5e=vi.joinPath.bind(vi),U5e=vi.normalizePath.bind(vi);vi.relativePath.bind(vi);const pq=vi.resolvePath.bind(vi);vi.isAbsolutePath.bind(vi);const mq=vi.isEqualAuthority.bind(vi),_q=vi.hasTrailingPathSeparator.bind(vi);vi.removeTrailingPathSeparator.bind(vi),vi.addTrailingPathSeparator.bind(vi);var Jh;(function(i){i.META_DATA_LABEL="label",i.META_DATA_DESCRIPTION="description",i.META_DATA_SIZE="size",i.META_DATA_MIME="mime";function e(t){const n=new Map;t.path.substring(t.path.indexOf(";")+1,t.path.lastIndexOf(";")).split(";").forEach(o=>{const[a,l]=o.split(":");a&&l&&n.set(a,l)});const s=t.path.substring(0,t.path.indexOf(";"));return s&&n.set(i.META_DATA_MIME,s),n}i.parseMetaData=e})(Jh||(Jh={}));function a1(i){return i.toString()}class Vr{constructor(e,t,n,r,s,o,a){this.beforeVersionId=e,this.afterVersionId=t,this.beforeEOL=n,this.afterEOL=r,this.beforeCursorState=s,this.afterCursorState=o,this.changes=a}static create(e,t){const n=e.getAlternativeVersionId(),r=uD(e);return new Vr(n,n,r,r,t,t,[])}append(e,t,n,r,s){t.length>0&&(this.changes=B5e(this.changes,t)),this.afterEOL=n,this.afterVersionId=r,this.afterCursorState=s}static _writeSelectionsSize(e){return 4+4*4*(e?e.length:0)}static _writeSelections(e,t,n){if(lc(e,t?t.length:0,n),n+=4,t)for(const r of t)lc(e,r.selectionStartLineNumber,n),n+=4,lc(e,r.selectionStartColumn,n),n+=4,lc(e,r.positionLineNumber,n),n+=4,lc(e,r.positionColumn,n),n+=4;return n}static _readSelections(e,t,n){const r=ac(e,t);t+=4;for(let s=0;st.toString()).join(", ")}matchesResource(e){return(Pt.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 Vr}append(e,t,n,r,s){this._data instanceof Vr&&this._data.append(e,t,n,r,s)}close(){this._data instanceof Vr&&(this._data=this._data.serialize())}open(){this._data instanceof Vr||(this._data=Vr.deserialize(this._data))}undo(){if(Pt.isUri(this.model))throw new Error("Invalid SingleModelEditStackElement");this._data instanceof Vr&&(this._data=this._data.serialize());const e=Vr.deserialize(this._data);this.model._applyUndo(e.changes,e.beforeEOL,e.beforeVersionId,e.beforeCursorState)}redo(){if(Pt.isUri(this.model))throw new Error("Invalid SingleModelEditStackElement");this._data instanceof Vr&&(this._data=this._data.serialize());const e=Vr.deserialize(this._data);this.model._applyRedo(e.changes,e.afterEOL,e.afterVersionId,e.afterCursorState)}heapSize(){return this._data instanceof Vr&&(this._data=this._data.serialize()),this._data.byteLength+168}}class j5e{constructor(e,t){this.type=1,this.label=e,this._isOpen=!0,this._editStackElementsArr=t.slice(0),this._editStackElementsMap=new Map;for(const n of this._editStackElementsArr){const r=a1(n.resource);this._editStackElementsMap.set(r,n)}this._delegate=null}get resources(){return this._editStackElementsArr.map(e=>e.resource)}prepareUndoRedo(){if(this._delegate)return this._delegate.prepareUndoRedo(this)}matchesResource(e){const t=a1(e);return this._editStackElementsMap.has(t)}setModel(e){const t=a1(Pt.isUri(e)?e:e.uri);this._editStackElementsMap.has(t)&&this._editStackElementsMap.get(t).setModel(e)}canAppend(e){if(!this._isOpen)return!1;const t=a1(e.uri);return this._editStackElementsMap.has(t)?this._editStackElementsMap.get(t).canAppend(e):!1}append(e,t,n,r,s){const o=a1(e.uri);this._editStackElementsMap.get(o).append(e,t,n,r,s)}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=a1(e);return this._editStackElementsMap.has(t)?this._editStackElementsMap.get(t).heapSize():0}split(){return this._editStackElementsArr}toString(){let e=[];for(const t of this._editStackElementsArr)e.push(`${el(t.resource)}: ${t}`);return`{${e.join(", ")}}`}}function uD(i){return i.getEOL()===` +`?0:1}function md(i){return i?i instanceof bq||i instanceof j5e:!1}class dD{constructor(e,t){this._model=e,this._undoRedoService=t}pushStackElement(){const e=this._undoRedoService.getLastElement(this._model.uri);md(e)&&e.close()}popStackElement(){const e=this._undoRedoService.getLastElement(this._model.uri);md(e)&&e.open()}clear(){this._undoRedoService.removeElements(this._model.uri)}_getOrCreateEditStackElement(e){const t=this._undoRedoService.getLastElement(this._model.uri);if(md(t)&&t.canAppend(this._model))return t;const n=new bq(this._model,e);return this._undoRedoService.pushElement(n),n}pushEOL(e){const t=this._getOrCreateEditStackElement(null);this._model.setEOL(e),t.append(this._model,[],uD(this._model),this._model.getAlternativeVersionId(),null)}pushEditOperation(e,t,n){const r=this._getOrCreateEditStackElement(e),s=this._model.applyEdits(t,!0),o=dD._computeCursorState(n,s),a=s.map((l,c)=>({index:c,textChange:l.textChange}));return a.sort((l,c)=>l.textChange.oldPosition===c.textChange.oldPosition?l.index-c.index:l.textChange.oldPosition-c.textChange.oldPosition),r.append(this._model,a.map(l=>l.textChange),uD(this._model),this._model.getAlternativeVersionId(),o),o}static _computeCursorState(e,t){try{return e?e(t):null}catch(n){return Jt(n),null}}}class q5e{constructor(){this.spacesDiff=0,this.looksLikeAlignment=!1}}function G5e(i,e,t,n,r){r.spacesDiff=0,r.looksLikeAlignment=!1;let s;for(s=0;s0&&a>0||l>0&&c>0)return;const u=Math.abs(a-c),d=Math.abs(o-l);if(u===0){r.spacesDiff=d,d>0&&0<=l-1&&l-10?r++:w>1&&s++,G5e(o,a,m,v,d),d.looksLikeAlignment&&!(t&&e===d.spacesDiff)))continue;const I=d.spacesDiff;I<=c&&u[I]++,o=m,a=v}let h=t;r!==s&&(h=r{const m=u[p];m>g&&(g=m,f=p)}),f===4&&u[4]>0&&u[2]>0&&u[2]>=u[4]/2&&(f=2)}return{insertSpaces:h,tabSize:f}}function vo(i){return(i.metadata&1)>>>0}function wi(i,e){i.metadata=i.metadata&254|e<<0}function us(i){return(i.metadata&2)>>>1===1}function fi(i,e){i.metadata=i.metadata&253|(e?1:0)<<1}function wq(i){return(i.metadata&4)>>>2===1}function Cq(i,e){i.metadata=i.metadata&251|(e?1:0)<<2}function K5e(i){return(i.metadata&24)>>>3}function yq(i,e){i.metadata=i.metadata&231|e<<3}function Y5e(i){return(i.metadata&32)>>>5===1}function Sq(i,e){i.metadata=i.metadata&223|(e?1:0)<<5}class kq{constructor(e,t,n){this.metadata=0,this.parent=this,this.left=this,this.right=this,wi(this,1),this.start=t,this.end=n,this.delta=0,this.maxEnd=n,this.id=e,this.ownerId=0,this.options=null,Cq(this,!1),yq(this,1),Sq(this,!1),this.cachedVersionId=0,this.cachedAbsoluteStart=t,this.cachedAbsoluteEnd=n,this.range=null,fi(this,!1)}reset(e,t,n,r){this.start=t,this.end=n,this.maxEnd=n,this.cachedVersionId=e,this.cachedAbsoluteStart=t,this.cachedAbsoluteEnd=n,this.range=r}setOptions(e){this.options=e;const t=this.options.className;Cq(this,t==="squiggly-error"||t==="squiggly-warning"||t==="squiggly-info"),yq(this,this.options.stickiness),Sq(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 on=new kq(null,0,0);on.parent=on,on.left=on,on.right=on,wi(on,0);class hD{constructor(){this.root=on,this.requestNormalizeDelta=!1}intervalSearch(e,t,n,r,s){return this.root===on?[]:ixe(this,e,t,n,r,s)}search(e,t,n){return this.root===on?[]:nxe(this,e,t,n)}collectNodesFromOwner(e){return exe(this,e)}collectNodesPostOrder(){return txe(this)}insert(e){Eq(this,e),this._normalizeDeltaIfNecessary()}delete(e){xq(this,e),this._normalizeDeltaIfNecessary()}resolveNode(e,t){const n=e;let r=0;for(;e!==this.root;)e===e.parent.right&&(r+=e.parent.delta),e=e.parent;const s=n.start+r,o=n.end+r;n.setCachedOffsets(s,o,t)}acceptReplace(e,t,n,r){const s=Q5e(this,e,e+t);for(let o=0,a=s.length;ot||n===1?!1:n===2?!0:e}function X5e(i,e,t,n,r){const s=K5e(i),o=s===0||s===2,a=s===1||s===2,l=t-e,c=n,u=Math.min(l,c),d=i.start;let h=!1;const f=i.end;let g=!1;e<=d&&f<=t&&Y5e(i)&&(i.start=e,h=!0,i.end=e,g=!0);{const m=r?1:l>0?2:0;!h&&l1(d,o,e,m)&&(h=!0),!g&&l1(f,a,e,m)&&(g=!0)}if(u>0&&!r){const m=l>c?2:0;!h&&l1(d,o,e+u,m)&&(h=!0),!g&&l1(f,a,e+u,m)&&(g=!0)}{const m=r?1:0;!h&&l1(d,o,t,m)&&(i.start=e+c,h=!0),!g&&l1(f,a,t,m)&&(i.end=e+c,g=!0)}const p=c-l;h||(i.start=Math.max(0,d+p)),g||(i.end=Math.max(0,f+p)),i.start>i.end&&(i.end=i.start)}function Q5e(i,e,t){let n=i.root,r=0,s=0,o=0,a=0;const l=[];let c=0;for(;n!==on;){if(us(n)){fi(n.left,!1),fi(n.right,!1),n===n.parent.right&&(r-=n.parent.delta),n=n.parent;continue}if(!us(n.left)){if(s=r+n.maxEnd,st){fi(n,!0);continue}if(a=r+n.end,a>=e&&(n.setCachedOffsets(o,a,0),l[c++]=n),fi(n,!0),n.right!==on&&!us(n.right)){r+=n.delta,n=n.right;continue}}return fi(i.root,!1),l}function J5e(i,e,t,n){let r=i.root,s=0,o=0,a=0;const l=n-(t-e);for(;r!==on;){if(us(r)){fi(r.left,!1),fi(r.right,!1),r===r.parent.right&&(s-=r.parent.delta),ef(r),r=r.parent;continue}if(!us(r.left)){if(o=s+r.maxEnd,ot){r.start+=l,r.end+=l,r.delta+=l,(r.delta<-1073741824||r.delta>1073741824)&&(i.requestNormalizeDelta=!0),fi(r,!0);continue}if(fi(r,!0),r.right!==on&&!us(r.right)){s+=r.delta,r=r.right;continue}}fi(i.root,!1)}function exe(i,e){let t=i.root;const n=[];let r=0;for(;t!==on;){if(us(t)){fi(t.left,!1),fi(t.right,!1),t=t.parent;continue}if(t.left!==on&&!us(t.left)){t=t.left;continue}if(t.ownerId===e&&(n[r++]=t),fi(t,!0),t.right!==on&&!us(t.right)){t=t.right;continue}}return fi(i.root,!1),n}function txe(i){let e=i.root;const t=[];let n=0;for(;e!==on;){if(us(e)){fi(e.left,!1),fi(e.right,!1),e=e.parent;continue}if(e.left!==on&&!us(e.left)){e=e.left;continue}if(e.right!==on&&!us(e.right)){e=e.right;continue}t[n++]=e,fi(e,!0)}return fi(i.root,!1),t}function nxe(i,e,t,n){let r=i.root,s=0,o=0,a=0;const l=[];let c=0;for(;r!==on;){if(us(r)){fi(r.left,!1),fi(r.right,!1),r===r.parent.right&&(s-=r.parent.delta),r=r.parent;continue}if(r.left!==on&&!us(r.left)){r=r.left;continue}o=s+r.start,a=s+r.end,r.setCachedOffsets(o,a,n);let u=!0;if(e&&r.ownerId&&r.ownerId!==e&&(u=!1),t&&wq(r)&&(u=!1),u&&(l[c++]=r),fi(r,!0),r.right!==on&&!us(r.right)){s+=r.delta,r=r.right;continue}}return fi(i.root,!1),l}function ixe(i,e,t,n,r,s){let o=i.root,a=0,l=0,c=0,u=0;const d=[];let h=0;for(;o!==on;){if(us(o)){fi(o.left,!1),fi(o.right,!1),o===o.parent.right&&(a-=o.parent.delta),o=o.parent;continue}if(!us(o.left)){if(l=a+o.maxEnd,lt){fi(o,!0);continue}if(u=a+o.end,u>=e){o.setCachedOffsets(c,u,s);let f=!0;n&&o.ownerId&&o.ownerId!==n&&(f=!1),r&&wq(o)&&(f=!1),f&&(d[h++]=o)}if(fi(o,!0),o.right!==on&&!us(o.right)){a+=o.delta,o=o.right;continue}}return fi(i.root,!1),d}function Eq(i,e){if(i.root===on)return e.parent=on,e.left=on,e.right=on,wi(e,0),i.root=e,i.root;rxe(i,e),tf(e.parent);let t=e;for(;t!==i.root&&vo(t.parent)===1;)if(t.parent===t.parent.parent.left){const n=t.parent.parent.right;vo(n)===1?(wi(t.parent,0),wi(n,0),wi(t.parent.parent,1),t=t.parent.parent):(t===t.parent.right&&(t=t.parent,Tv(i,t)),wi(t.parent,0),wi(t.parent.parent,1),Iv(i,t.parent.parent))}else{const n=t.parent.parent.left;vo(n)===1?(wi(t.parent,0),wi(n,0),wi(t.parent.parent,1),t=t.parent.parent):(t===t.parent.left&&(t=t.parent,Iv(i,t)),wi(t.parent,0),wi(t.parent.parent,1),Tv(i,t.parent.parent))}return wi(i.root,0),e}function rxe(i,e){let t=0,n=i.root;const r=e.start,s=e.end;for(;;)if(oxe(r,s,n.start+t,n.end+t)<0)if(n.left===on){e.start-=t,e.end-=t,e.maxEnd-=t,n.left=e;break}else n=n.left;else if(n.right===on){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=on,e.right=on,wi(e,1)}function xq(i,e){let t,n;if(e.left===on?(t=e.right,n=e,t.delta+=e.delta,(t.delta<-1073741824||t.delta>1073741824)&&(i.requestNormalizeDelta=!0),t.start+=e.delta,t.end+=e.delta):e.right===on?(t=e.left,n=e):(n=sxe(e.right),t=n.right,t.start+=n.delta,t.end+=n.delta,t.delta+=n.delta,(t.delta<-1073741824||t.delta>1073741824)&&(i.requestNormalizeDelta=!0),n.start+=e.delta,n.end+=e.delta,n.delta=e.delta,(n.delta<-1073741824||n.delta>1073741824)&&(i.requestNormalizeDelta=!0)),n===i.root){i.root=t,wi(t,0),e.detach(),fD(),ef(t),i.root.parent=on;return}const r=vo(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,wi(n,vo(e)),e===i.root?i.root=n:e===e.parent.left?e.parent.left=n:e.parent.right=n,n.left!==on&&(n.left.parent=n),n.right!==on&&(n.right.parent=n)),e.detach(),r){tf(t.parent),n!==e&&(tf(n),tf(n.parent)),fD();return}tf(t),tf(t.parent),n!==e&&(tf(n),tf(n.parent));let s;for(;t!==i.root&&vo(t)===0;)t===t.parent.left?(s=t.parent.right,vo(s)===1&&(wi(s,0),wi(t.parent,1),Tv(i,t.parent),s=t.parent.right),vo(s.left)===0&&vo(s.right)===0?(wi(s,1),t=t.parent):(vo(s.right)===0&&(wi(s.left,0),wi(s,1),Iv(i,s),s=t.parent.right),wi(s,vo(t.parent)),wi(t.parent,0),wi(s.right,0),Tv(i,t.parent),t=i.root)):(s=t.parent.left,vo(s)===1&&(wi(s,0),wi(t.parent,1),Iv(i,t.parent),s=t.parent.left),vo(s.left)===0&&vo(s.right)===0?(wi(s,1),t=t.parent):(vo(s.left)===0&&(wi(s.right,0),wi(s,1),Tv(i,s),s=t.parent.left),wi(s,vo(t.parent)),wi(t.parent,0),wi(s.left,0),Iv(i,t.parent),t=i.root));wi(t,0),fD()}function sxe(i){for(;i.left!==on;)i=i.left;return i}function fD(){on.parent=on,on.delta=0,on.start=0,on.end=0}function Tv(i,e){const t=e.right;t.delta+=e.delta,(t.delta<-1073741824||t.delta>1073741824)&&(i.requestNormalizeDelta=!0),t.start+=e.delta,t.end+=e.delta,e.right=t.left,t.left!==on&&(t.left.parent=e),t.parent=e.parent,e.parent===on?i.root=t:e===e.parent.left?e.parent.left=t:e.parent.right=t,t.left=e,e.parent=t,ef(e),ef(t)}function Iv(i,e){const t=e.left;e.delta-=t.delta,(e.delta<-1073741824||e.delta>1073741824)&&(i.requestNormalizeDelta=!0),e.start-=t.delta,e.end-=t.delta,e.left=t.right,t.right!==on&&(t.right.parent=e),t.parent=e.parent,e.parent===on?i.root=t:e===e.parent.right?e.parent.right=t:e.parent.left=t,t.right=e,e.parent=t,ef(e),ef(t)}function Lq(i){let e=i.end;if(i.left!==on){const t=i.left.maxEnd;t>e&&(e=t)}if(i.right!==on){const t=i.right.maxEnd+i.delta;t>e&&(e=t)}return e}function ef(i){i.maxEnd=Lq(i)}function tf(i){for(;i!==on;){const e=Lq(i);if(i.maxEnd===e)return;i.maxEnd=e,i=i.parent}}function oxe(i,e,t,n){return i===t?e-n:i-t}class gD{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!==$t)return pD(this.right);let e=this;for(;e.parent!==$t&&e.parent.left!==e;)e=e.parent;return e.parent===$t?$t:e.parent}prev(){if(this.left!==$t)return Tq(this.left);let e=this;for(;e.parent!==$t&&e.parent.right!==e;)e=e.parent;return e.parent===$t?$t:e.parent}detach(){this.parent=null,this.left=null,this.right=null}}const $t=new gD(null,0);$t.parent=$t,$t.left=$t,$t.right=$t,$t.color=0;function pD(i){for(;i.left!==$t;)i=i.left;return i}function Tq(i){for(;i.right!==$t;)i=i.right;return i}function mD(i){return i===$t?0:i.size_left+i.piece.length+mD(i.right)}function _D(i){return i===$t?0:i.lf_left+i.piece.lineFeedCnt+_D(i.right)}function bD(){$t.parent=$t}function Dv(i,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!==$t&&(t.left.parent=e),t.parent=e.parent,e.parent===$t?i.root=t:e.parent.left===e?e.parent.left=t:e.parent.right=t,t.left=e,e.parent=t}function Nv(i,e){const t=e.left;e.left=t.right,t.right!==$t&&(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===$t?i.root=t:e===e.parent.right?e.parent.right=t:e.parent.left=t,t.right=e,e.parent=t}function Fk(i,e){let t,n;if(e.left===$t?(n=e,t=n.right):e.right===$t?(n=e,t=n.left):(n=pD(e.right),t=n.right),n===i.root){i.root=t,t.color=0,e.detach(),bD(),i.root.parent=$t;return}const r=n.color===1;if(n===n.parent.left?n.parent.left=t:n.parent.right=t,n===e?(t.parent=n.parent,Av(i,t)):(n.parent===e?t.parent=n:t.parent=n.parent,Av(i,t),n.left=e.left,n.right=e.right,n.parent=e.parent,n.color=e.color,e===i.root?i.root=n:e===e.parent.left?e.parent.left=n:e.parent.right=n,n.left!==$t&&(n.left.parent=n),n.right!==$t&&(n.right.parent=n),n.size_left=e.size_left,n.lf_left=e.lf_left,Av(i,n)),e.detach(),t.parent.left===t){const o=mD(t),a=_D(t);if(o!==t.parent.size_left||a!==t.parent.lf_left){const l=o-t.parent.size_left,c=a-t.parent.lf_left;t.parent.size_left=o,t.parent.lf_left=a,_d(i,t.parent,l,c)}}if(Av(i,t.parent),r){bD();return}let s;for(;t!==i.root&&t.color===0;)t===t.parent.left?(s=t.parent.right,s.color===1&&(s.color=0,t.parent.color=1,Dv(i,t.parent),s=t.parent.right),s.left.color===0&&s.right.color===0?(s.color=1,t=t.parent):(s.right.color===0&&(s.left.color=0,s.color=1,Nv(i,s),s=t.parent.right),s.color=t.parent.color,t.parent.color=0,s.right.color=0,Dv(i,t.parent),t=i.root)):(s=t.parent.left,s.color===1&&(s.color=0,t.parent.color=1,Nv(i,t.parent),s=t.parent.left),s.left.color===0&&s.right.color===0?(s.color=1,t=t.parent):(s.left.color===0&&(s.right.color=0,s.color=1,Dv(i,s),s=t.parent.left),s.color=t.parent.color,t.parent.color=0,s.left.color=0,Nv(i,t.parent),t=i.root));t.color=0,bD()}function Iq(i,e){for(Av(i,e);e!==i.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,Dv(i,e)),e.parent.color=0,e.parent.parent.color=1,Nv(i,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,Nv(i,e)),e.parent.color=0,e.parent.parent.color=1,Dv(i,e.parent.parent))}i.root.color=0}function _d(i,e,t,n){for(;e!==i.root&&e!==$t;)e.parent.left===e&&(e.parent.size_left+=t,e.parent.lf_left+=n),e=e.parent}function Av(i,e){let t=0,n=0;if(e!==i.root){for(;e!==i.root&&e===e.parent.right;)e=e.parent;if(e!==i.root)for(e=e.parent,t=mD(e.left)-e.size_left,n=_D(e.left)-e.lf_left,e.size_left+=t,e.lf_left+=n;e!==i.root&&(t!==0||n!==0);)e.parent.left===e&&(e.parent.size_left+=t,e.parent.lf_left+=n),e=e.parent}}const bd=65535;function Dq(i){let e;return i[i.length-1]<65536?e=new Uint16Array(i.length):e=new Uint32Array(i.length),e.set(i,0),e}class axe{constructor(e,t,n,r,s){this.lineStarts=e,this.cr=t,this.lf=n,this.crlf=r,this.isBasicASCII=s}}function vd(i,e=!0){const t=[0];let n=1;for(let r=0,s=i.length;r126)&&(o=!1)}const a=new axe(Dq(i),n,r,s,o);return i.length=0,a}class Uo{constructor(e,t,n,r,s){this.bufferIndex=e,this.start=t,this.end=n,this.lineFeedCnt=r,this.length=s}}class bp{constructor(e,t){this.buffer=e,this.lineStarts=t}}class cxe{constructor(e,t){this._pieces=[],this._tree=e,this._BOM=t,this._index=0,e.root!==$t&&e.iterate(e.root,n=>(n!==$t&&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 uxe{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 r=0;r=e){n[r]=null,t=!0;continue}}if(t){const r=[];for(const s of n)s!==null&&r.push(s);this._cache=r}}}class dxe{constructor(e,t,n){this.create(e,t,n)}create(e,t,n){this._buffers=[new bp("",[0])],this._lastChangeBufferPos={line:0,column:0},this.root=$t,this._lineCnt=1,this._length=0,this._EOL=t,this._EOLLength=t.length,this._EOLNormalized=n;let r=null;for(let s=0,o=e.length;s0){e[s].lineStarts||(e[s].lineStarts=vd(e[s].buffer));const a=new Uo(s+1,{line:0,column:0},{line:e[s].lineStarts.length-1,column:e[s].buffer.length-e[s].lineStarts[e[s].lineStarts.length-1]},e[s].lineStarts.length-1,e[s].buffer.length);this._buffers.push(e[s]),r=this.rbInsertRight(r,a)}this._searchCache=new uxe(1),this._lastVisitedLine={lineNumber:0,value:""},this.computeBufferMetadata()}normalizeEOL(e){const t=bd,n=t-Math.floor(t/3),r=n*2;let s="",o=0;const a=[];if(this.iterate(this.root,l=>{const c=this.getNodeContent(l),u=c.length;if(o<=n||o+u0){const l=s.replace(/\r\n|\r|\n/g,e);a.push(new bp(l,vd(l)))}this.create(a,e,!0)}getEOL(){return this._EOL}setEOL(e){this._EOL=e,this._EOLLength=this._EOL.length,this.normalizeEOL(e)}createSnapshot(e){return new cxe(this,e)}getOffsetAt(e,t){let n=0,r=this.root;for(;r!==$t;)if(r.left!==$t&&r.lf_left+1>=e)r=r.left;else if(r.lf_left+r.piece.lineFeedCnt+1>=e){n+=r.size_left;const s=this.getAccumulatedValue(r,e-r.lf_left-2);return n+=s+t-1}else e-=r.lf_left+r.piece.lineFeedCnt,n+=r.size_left+r.piece.length,r=r.right;return n}getPositionAt(e){e=Math.floor(e),e=Math.max(0,e);let t=this.root,n=0;const r=e;for(;t!==$t;)if(t.size_left!==0&&t.size_left>=e)t=t.left;else if(t.size_left+t.piece.length>=e){const s=this.getIndexOf(t,e-t.size_left);if(n+=t.lf_left+s.index,s.index===0){const o=this.getOffsetAt(n+1,1),a=r-o;return new ye(n+1,a+1)}return new ye(n+1,s.remainder+1)}else if(e-=t.size_left+t.piece.length,n+=t.lf_left+t.piece.lineFeedCnt,t.right===$t){const s=this.getOffsetAt(n+1,1),o=r-e-s;return new ye(n+1,o+1)}else t=t.right;return new ye(1,1)}getValueInRange(e,t){if(e.startLineNumber===e.endLineNumber&&e.startColumn===e.endColumn)return"";const n=this.nodeAt2(e.startLineNumber,e.startColumn),r=this.nodeAt2(e.endLineNumber,e.endColumn),s=this.getValueInRange2(n,r);return t?t!==this._EOL||!this._EOLNormalized?s.replace(/\r\n|\r|\n/g,t):t===this.getEOL()&&this._EOLNormalized?s:s.replace(/\r\n|\r|\n/g,t):s}getValueInRange2(e,t){if(e.node===t.node){const a=e.node,l=this._buffers[a.piece.bufferIndex].buffer,c=this.offsetInBuffer(a.piece.bufferIndex,a.piece.start);return l.substring(c+e.remainder,c+t.remainder)}let n=e.node;const r=this._buffers[n.piece.bufferIndex].buffer,s=this.offsetInBuffer(n.piece.bufferIndex,n.piece.start);let o=r.substring(s+e.remainder,s+n.piece.length);for(n=n.next();n!==$t;){const a=this._buffers[n.piece.bufferIndex].buffer,l=this.offsetInBuffer(n.piece.bufferIndex,n.piece.start);if(n===t.node){o+=a.substring(l,l+t.remainder);break}else o+=a.substr(l,n.piece.length);n=n.next()}return o}getLinesContent(){const e=[];let t=0,n="",r=!1;return this.iterate(this.root,s=>{if(s===$t)return!0;const o=s.piece;let a=o.length;if(a===0)return!0;const l=this._buffers[o.bufferIndex].buffer,c=this._buffers[o.bufferIndex].lineStarts,u=o.start.line,d=o.end.line;let h=c[u]+o.start.column;if(r&&(l.charCodeAt(h)===10&&(h++,a--),e[t++]=n,n="",r=!1,a===0))return!0;if(u===d)return!this._EOLNormalized&&l.charCodeAt(h+a-1)===13?(r=!0,n+=l.substr(h,a-1)):n+=l.substr(h,a),!0;n+=this._EOLNormalized?l.substring(h,Math.max(h,c[u+1]-this._EOLLength)):l.substring(h,c[u+1]).replace(/(\r\n|\r|\n)$/,""),e[t++]=n;for(let f=u+1;fw+g,t.reset(0)):(b=h.buffer,v=w=>w,t.reset(g));do if(m=t.next(b),m){if(v(m.index)>=p)return u;this.positionInBuffer(e,v(m.index)-f,_);const w=this.getLineFeedCnt(e.piece.bufferIndex,s,_),E=_.line===s.line?_.column-s.column+r:_.column+1,I=E+m[0].length;if(d[u++]=Fg(new H(n+w,E,n+w,I),m,l),v(m.index)+m[0].length>=p||u>=c)return u}while(m);return u}findMatchesLineByLine(e,t,n,r){const s=[];let o=0;const a=new S_(t.wordSeparators,t.regex);let l=this.nodeAt2(e.startLineNumber,e.startColumn);if(l===null)return[];const c=this.nodeAt2(e.endLineNumber,e.endColumn);if(c===null)return[];let u=this.positionInBuffer(l.node,l.remainder);const d=this.positionInBuffer(c.node,c.remainder);if(l.node===c.node)return this.findMatchesInNode(l.node,a,e.startLineNumber,e.startColumn,u,d,t,n,r,o,s),s;let h=e.startLineNumber,f=l.node;for(;f!==c.node;){const p=this.getLineFeedCnt(f.piece.bufferIndex,u,f.piece.end);if(p>=1){const _=this._buffers[f.piece.bufferIndex].lineStarts,b=this.offsetInBuffer(f.piece.bufferIndex,f.piece.start),v=_[u.line+p],w=h===e.startLineNumber?e.startColumn:1;if(o=this.findMatchesInNode(f,a,h,w,u,this.positionInBuffer(f,v-b),t,n,r,o,s),o>=r)return s;h+=p}const m=h===e.startLineNumber?e.startColumn-1:0;if(h===e.endLineNumber){const _=this.getLineContent(h).substring(m,e.endColumn-1);return o=this._findMatchesInLine(t,a,_,e.endLineNumber,m,o,s,n,r),s}if(o=this._findMatchesInLine(t,a,this.getLineContent(h).substr(m),h,m,o,s,n,r),o>=r)return s;h++,l=this.nodeAt2(h,1),f=l.node,u=this.positionInBuffer(l.node,l.remainder)}if(h===e.endLineNumber){const p=h===e.startLineNumber?e.startColumn-1:0,m=this.getLineContent(h).substring(p,e.endColumn-1);return o=this._findMatchesInLine(t,a,m,e.endLineNumber,p,o,s,n,r),s}const g=h===e.startLineNumber?e.startColumn:1;return o=this.findMatchesInNode(c.node,a,h,g,u,d,t,n,r,o,s),s}_findMatchesInLine(e,t,n,r,s,o,a,l,c){const u=e.wordSeparators;if(!l&&e.simpleSearch){const h=e.simpleSearch,f=h.length,g=n.length;let p=-f;for(;(p=n.indexOf(h,p+f))!==-1;)if((!u||bI(u,n,g,p,f))&&(a[o++]=new Lb(new H(r,p+1+s,r,p+1+f+s),null),o>=c))return o;return o}let d;t.reset(0);do if(d=t.next(n),d&&(a[o++]=Fg(new H(r,d.index+1+s,r,d.index+1+d[0].length+s),d,l),o>=c))return o;while(d);return o}insert(e,t,n=!1){if(this._EOLNormalized=this._EOLNormalized&&n,this._lastVisitedLine.lineNumber=0,this._lastVisitedLine.value="",this.root!==$t){const{node:r,remainder:s,nodeStartOffset:o}=this.nodeAt(e),a=r.piece,l=a.bufferIndex,c=this.positionInBuffer(r,s);if(r.piece.bufferIndex===0&&a.end.line===this._lastChangeBufferPos.line&&a.end.column===this._lastChangeBufferPos.column&&o+a.length===e&&t.lengthe){const u=[];let d=new Uo(a.bufferIndex,c,a.end,this.getLineFeedCnt(a.bufferIndex,c,a.end),this.offsetInBuffer(l,a.end)-this.offsetInBuffer(l,c));if(this.shouldCheckCRLF()&&this.endWithCR(t)&&this.nodeCharCodeAt(r,s)===10){const p={line:d.start.line+1,column:0};d=new Uo(d.bufferIndex,p,d.end,this.getLineFeedCnt(d.bufferIndex,p,d.end),d.length-1),t+=` +`}if(this.shouldCheckCRLF()&&this.startWithLF(t))if(this.nodeCharCodeAt(r,s-1)===13){const p=this.positionInBuffer(r,s-1);this.deleteNodeTail(r,p),t="\r"+t,r.piece.length===0&&u.push(r)}else this.deleteNodeTail(r,c);else this.deleteNodeTail(r,c);const h=this.createNewPieces(t);d.length>0&&this.rbInsertRight(r,d);let f=r;for(let g=0;g=0;o--)s=this.rbInsertLeft(s,r[o]);this.validateCRLFWithPrevNode(s),this.deleteNodes(n)}insertContentToNodeRight(e,t){this.adjustCarriageReturnFromNext(e,t)&&(e+=` +`);const n=this.createNewPieces(e),r=this.rbInsertRight(t,n[0]);let s=r;for(let o=1;o=h)c=d+1;else break;return n?(n.line=d,n.column=l-f,null):{line:d,column:l-f}}getLineFeedCnt(e,t,n){if(n.column===0)return n.line-t.line;const r=this._buffers[e].lineStarts;if(n.line===r.length-1)return n.line-t.line;const s=r[n.line+1],o=r[n.line]+n.column;if(s>o+1)return n.line-t.line;const a=o-1;return this._buffers[e].buffer.charCodeAt(a)===13?n.line-t.line+1:n.line-t.line}offsetInBuffer(e,t){return this._buffers[e].lineStarts[t.line]+t.column}deleteNodes(e){for(let t=0;tbd){const u=[];for(;e.length>bd;){const h=e.charCodeAt(bd-1);let f;h===13||h>=55296&&h<=56319?(f=e.substring(0,bd-1),e=e.substring(bd-1)):(f=e.substring(0,bd),e=e.substring(bd));const g=vd(f);u.push(new Uo(this._buffers.length,{line:0,column:0},{line:g.length-1,column:f.length-g[g.length-1]},g.length-1,f.length)),this._buffers.push(new bp(f,g))}const d=vd(e);return u.push(new Uo(this._buffers.length,{line:0,column:0},{line:d.length-1,column:e.length-d[d.length-1]},d.length-1,e.length)),this._buffers.push(new bp(e,d)),u}let t=this._buffers[0].buffer.length;const n=vd(e,!1);let r=this._lastChangeBufferPos;if(this._buffers[0].lineStarts[this._buffers[0].lineStarts.length-1]===t&&t!==0&&this.startWithLF(e)&&this.endWithCR(this._buffers[0].buffer)){this._lastChangeBufferPos={line:this._lastChangeBufferPos.line,column:this._lastChangeBufferPos.column+1},r=this._lastChangeBufferPos;for(let u=0;u=e-1)n=n.left;else if(n.lf_left+n.piece.lineFeedCnt>e-1){const l=this.getAccumulatedValue(n,e-n.lf_left-2),c=this.getAccumulatedValue(n,e-n.lf_left-1),u=this._buffers[n.piece.bufferIndex].buffer,d=this.offsetInBuffer(n.piece.bufferIndex,n.piece.start);return o+=n.size_left,this._searchCache.set({node:n,nodeStartOffset:o,nodeStartLineNumber:a-(e-1-n.lf_left)}),u.substring(d+l,d+c-t)}else if(n.lf_left+n.piece.lineFeedCnt===e-1){const l=this.getAccumulatedValue(n,e-n.lf_left-2),c=this._buffers[n.piece.bufferIndex].buffer,u=this.offsetInBuffer(n.piece.bufferIndex,n.piece.start);r=c.substring(u+l,u+n.piece.length);break}else e-=n.lf_left+n.piece.lineFeedCnt,o+=n.size_left+n.piece.length,n=n.right}for(n=n.next();n!==$t;){const o=this._buffers[n.piece.bufferIndex].buffer;if(n.piece.lineFeedCnt>0){const a=this.getAccumulatedValue(n,0),l=this.offsetInBuffer(n.piece.bufferIndex,n.piece.start);return r+=o.substring(l,l+a-t),r}else{const a=this.offsetInBuffer(n.piece.bufferIndex,n.piece.start);r+=o.substr(a,n.piece.length)}n=n.next()}return r}computeBufferMetadata(){let e=this.root,t=1,n=0;for(;e!==$t;)t+=e.lf_left+e.piece.lineFeedCnt,n+=e.size_left+e.piece.length,e=e.right;this._lineCnt=t,this._length=n,this._searchCache.validate(this._length)}getIndexOf(e,t){const n=e.piece,r=this.positionInBuffer(e,t),s=r.line-n.start.line;if(this.offsetInBuffer(n.bufferIndex,n.end)-this.offsetInBuffer(n.bufferIndex,n.start)===t){const o=this.getLineFeedCnt(e.piece.bufferIndex,n.start,r);if(o!==s)return{index:o,remainder:0}}return{index:s,remainder:r.column}}getAccumulatedValue(e,t){if(t<0)return 0;const n=e.piece,r=this._buffers[n.bufferIndex].lineStarts,s=n.start.line+t+1;return s>n.end.line?r[n.end.line]+n.end.column-r[n.start.line]-n.start.column:r[s]-r[n.start.line]-n.start.column}deleteNodeTail(e,t){const n=e.piece,r=n.lineFeedCnt,s=this.offsetInBuffer(n.bufferIndex,n.end),o=t,a=this.offsetInBuffer(n.bufferIndex,o),l=this.getLineFeedCnt(n.bufferIndex,n.start,o),c=l-r,u=a-s,d=n.length+u;e.piece=new Uo(n.bufferIndex,n.start,o,l,d),_d(this,e,u,c)}deleteNodeHead(e,t){const n=e.piece,r=n.lineFeedCnt,s=this.offsetInBuffer(n.bufferIndex,n.start),o=t,a=this.getLineFeedCnt(n.bufferIndex,o,n.end),l=this.offsetInBuffer(n.bufferIndex,o),c=a-r,u=s-l,d=n.length+u;e.piece=new Uo(n.bufferIndex,o,n.end,a,d),_d(this,e,u,c)}shrinkNode(e,t,n){const r=e.piece,s=r.start,o=r.end,a=r.length,l=r.lineFeedCnt,c=t,u=this.getLineFeedCnt(r.bufferIndex,r.start,c),d=this.offsetInBuffer(r.bufferIndex,t)-this.offsetInBuffer(r.bufferIndex,s);e.piece=new Uo(r.bufferIndex,r.start,c,u,d),_d(this,e,d-a,u-l);const h=new Uo(r.bufferIndex,n,o,this.getLineFeedCnt(r.bufferIndex,n,o),this.offsetInBuffer(r.bufferIndex,o)-this.offsetInBuffer(r.bufferIndex,n)),f=this.rbInsertRight(e,h);this.validateCRLFWithPrevNode(f)}appendToNode(e,t){this.adjustCarriageReturnFromNext(t,e)&&(t+=` +`);const n=this.shouldCheckCRLF()&&this.startWithLF(t)&&this.endWithCR(e),r=this._buffers[0].buffer.length;this._buffers[0].buffer+=t;const s=vd(t,!1);for(let f=0;fe)t=t.left;else if(t.size_left+t.piece.length>=e){r+=t.size_left;const s={node:t,remainder:e-t.size_left,nodeStartOffset:r};return this._searchCache.set(s),s}else e-=t.size_left+t.piece.length,r+=t.size_left+t.piece.length,t=t.right;return null}nodeAt2(e,t){let n=this.root,r=0;for(;n!==$t;)if(n.left!==$t&&n.lf_left>=e-1)n=n.left;else if(n.lf_left+n.piece.lineFeedCnt>e-1){const s=this.getAccumulatedValue(n,e-n.lf_left-2),o=this.getAccumulatedValue(n,e-n.lf_left-1);return r+=n.size_left,{node:n,remainder:Math.min(s+t-1,o),nodeStartOffset:r}}else if(n.lf_left+n.piece.lineFeedCnt===e-1){const s=this.getAccumulatedValue(n,e-n.lf_left-2);if(s+t-1<=n.piece.length)return{node:n,remainder:s+t-1,nodeStartOffset:r};t-=n.piece.length-s;break}else e-=n.lf_left+n.piece.lineFeedCnt,r+=n.size_left+n.piece.length,n=n.right;for(n=n.next();n!==$t;){if(n.piece.lineFeedCnt>0){const s=this.getAccumulatedValue(n,0),o=this.offsetOfNode(n);return{node:n,remainder:Math.min(t-1,s),nodeStartOffset:o}}else if(n.piece.length>=t-1){const s=this.offsetOfNode(n);return{node:n,remainder:t-1,nodeStartOffset:s}}else t-=n.piece.length;n=n.next()}return null}nodeCharCodeAt(e,t){if(e.piece.lineFeedCnt<1)return-1;const n=this._buffers[e.piece.bufferIndex],r=this.offsetInBuffer(e.piece.bufferIndex,e.piece.start)+t;return n.buffer.charCodeAt(r)}offsetOfNode(e){if(!e)return 0;let t=e.size_left;for(;e!==this.root;)e.parent.right===e&&(t+=e.parent.size_left+e.parent.piece.length),e=e.parent;return t}shouldCheckCRLF(){return!(this._EOLNormalized&&this._EOL===` +`)}startWithLF(e){if(typeof e=="string")return e.charCodeAt(0)===10;if(e===$t||e.piece.lineFeedCnt===0)return!1;const t=e.piece,n=this._buffers[t.bufferIndex].lineStarts,r=t.start.line,s=n[r]+t.start.column;return r===n.length-1||n[r+1]>s+1?!1:this._buffers[t.bufferIndex].buffer.charCodeAt(s)===10}endWithCR(e){return typeof e=="string"?e.charCodeAt(e.length-1)===13:e===$t||e.piece.lineFeedCnt===0?!1:this.nodeCharCodeAt(e,e.piece.length-1)===13}validateCRLFWithPrevNode(e){if(this.shouldCheckCRLF()&&this.startWithLF(e)){const t=e.prev();this.endWithCR(t)&&this.fixCRLF(t,e)}}validateCRLFWithNextNode(e){if(this.shouldCheckCRLF()&&this.endWithCR(e)){const t=e.next();this.startWithLF(t)&&this.fixCRLF(e,t)}}fixCRLF(e,t){const n=[],r=this._buffers[e.piece.bufferIndex].lineStarts;let s;e.piece.end.column===0?s={line:e.piece.end.line-1,column:r[e.piece.end.line]-r[e.piece.end.line-1]-1}:s={line:e.piece.end.line,column:e.piece.end.column-1};const o=e.piece.length-1,a=e.piece.lineFeedCnt-1;e.piece=new Uo(e.piece.bufferIndex,e.piece.start,s,a,o),_d(this,e,-1,-1),e.piece.length===0&&n.push(e);const l={line:t.piece.start.line+1,column:0},c=t.piece.length-1,u=this.getLineFeedCnt(t.piece.bufferIndex,l,t.piece.end);t.piece=new Uo(t.piece.bufferIndex,l,t.piece.end,u,c),_d(this,t,-1,-1),t.piece.length===0&&n.push(t);const d=this.createNewPieces(`\r +`);this.rbInsertRight(e,d[0]);for(let h=0;hm.sortIndex-_.sortIndex)}this._mightContainRTL=r,this._mightContainUnusualLineTerminators=s,this._mightContainNonBasicASCII=o;const f=this._doApplyEdits(l);let g=null;if(t&&d.length>0){d.sort((p,m)=>m.lineNumber-p.lineNumber),g=[];for(let p=0,m=d.length;p0&&d[p-1].lineNumber===_)continue;const b=d[p].oldContent,v=this.getLineContent(_);v.length===0||v===b||Ks(v)!==-1||g.push(_)}}return this._onDidChangeContent.fire(),new YCe(h,f,g)}_reduceOperations(e){return e.length<1e3?e:[this._toSingleEditOperation(e)]}_toSingleEditOperation(e){let t=!1;const n=e[0].range,r=e[e.length-1].range,s=new H(n.startLineNumber,n.startColumn,r.endLineNumber,r.endColumn);let o=n.startLineNumber,a=n.startColumn;const l=[];for(let f=0,g=e.length;f0&&l.push(p.text),o=m.endLineNumber,a=m.endColumn}const c=l.join(""),[u,d,h]=vp(c);return{sortIndex:0,identifier:e[0].identifier,range:s,rangeOffset:this.getOffsetAt(s.startLineNumber,s.startColumn),rangeLength:this.getValueLengthInRange(s,0),text:c,eolCount:u,firstLineLength:d,lastLineLength:h,forceMoveMarkers:t,isAutoWhitespaceEdit:!1}}_doApplyEdits(e){e.sort(c1._sortOpsDescending);const t=[];for(let n=0;n0){const h=l.eolCount+1;h===1?d=new H(c,u,c,u+l.firstLineLength):d=new H(c,u,c+h-1,l.lastLineLength+1)}else d=new H(c,u,c,u);n=d.endLineNumber,r=d.endColumn,t.push(d),s=l}return t}static _sortOpsAscending(e,t){const n=H.compareRangesUsingEnds(e.range,t.range);return n===0?e.sortIndex-t.sortIndex:n}static _sortOpsDescending(e,t){const n=H.compareRangesUsingEnds(e.range,t.range);return n===0?t.sortIndex-e.sortIndex:-n}}class hxe{constructor(e,t,n,r,s,o,a,l,c){this._chunks=e,this._bom=t,this._cr=n,this._lf=r,this._crlf=s,this._containsRTL=o,this._containsUnusualLineTerminators=a,this._isBasicASCII=l,this._normalizeEOL=c}_getEOL(e){const t=this._cr+this._lf+this._crlf,n=this._cr+this._crlf;return t===0?e===1?` +`:`\r +`:n>t/2?`\r +`:` +`}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 s=0,o=n.length;s=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=lxe(this._tmpLineStarts,e);this.chunks.push(new bp(e,t.lineStarts)),this.cr+=t.cr,this.lf+=t.lf,this.crlf+=t.crlf,this.isBasicASCII&&(this.isBasicASCII=t.isBasicASCII),!this.isBasicASCII&&!this.containsRTL&&(this.containsRTL=Yy(e)),!this.isBasicASCII&&!this.containsUnusualLineTerminators&&(this.containsUnusualLineTerminators=Bz(e))}finish(e=!0){return this._finish(),new hxe(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=vd(e.buffer);e.lineStarts=t,this._previousChar===13&&this.cr++}}}class gxe{constructor(e,t){this._startLineNumber=e,this._tokens=t}get startLineNumber(){return this._startLineNumber}get endLineNumber(){return this._startLineNumber+this._tokens.length-1}getLineTokens(e){return this._tokens[e-this._startLineNumber]}appendLineTokens(e){this._tokens.push(e)}}class vD{constructor(){this._tokens=[]}add(e,t){if(this._tokens.length>0){const n=this._tokens[this._tokens.length-1];if(n.endLineNumber+1===e){n.appendLineTokens(t);return}}this._tokens.push(new gxe(e,[t]))}finalize(){return this._tokens}}class Nq{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}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 r=0;r{const r=this._textModel.getLanguageId();n.changedLanguages.indexOf(r)!==-1&&(this._resetTokenizationState(),this._textModel.clearTokens())})),this._resetTokenizationState()}dispose(){this._isDisposed=!0,super.dispose()}handleDidChangeContent(e){if(e.isFlush){this._resetTokenizationState();return}if(this._tokenizationStateStore)for(let t=0,n=e.changes.length;t{this._isScheduled=!1,this._backgroundTokenizeWithDeadline(e)}))}_backgroundTokenizeWithDeadline(e){const t=Date.now()+e.timeRemaining(),n=()=>{this._isDisposed||!this._textModel.isAttachedToEditor()||!this._hasLinesToTokenize()||(this._backgroundTokenizeForAtLeast1ms(),Date.now()1||this._tokenizeOneInvalidLine(t)>=e)break;while(this._hasLinesToTokenize());this._textModel.setTokens(t.finalize(),!this._hasLinesToTokenize())}tokenizeViewport(e,t){const n=new vD;this._tokenizeViewport(n,e,t),this._textModel.setTokens(n.finalize(),!this._hasLinesToTokenize())}reset(){this._resetTokenizationState(),this._textModel.clearTokens()}forceTokenization(e){const t=new vD;this._updateTokensUntilLine(t,e),this._textModel.setTokens(t.finalize(),!this._hasLinesToTokenize())}getTokenTypeIfInsertingCharacter(e,t){if(!this._tokenizationStateStore)return 0;this.forceTokenization(e.lineNumber);const n=this._tokenizationStateStore.getBeginState(e.lineNumber-1);if(!n)return 0;const r=this._textModel.getLanguageId(),s=this._textModel.getLineContent(e.lineNumber),o=s.substring(0,e.column-1)+t+s.substring(e.column-1),a=Rv(this._languageIdCodec,r,this._tokenizationStateStore.tokenizationSupport,o,!0,n),l=new Ir(a.tokens,o,this._languageIdCodec);if(l.getCount()===0)return 0;const c=l.findTokenIndexAtOffset(e.column-1);return l.getStandardTokenType(c)}tokenizeLineWithEdit(e,t,n){const r=e.lineNumber,s=e.column;if(!this._tokenizationStateStore)return null;this.forceTokenization(r);const o=this._tokenizationStateStore.getBeginState(r-1);if(!o)return null;const a=this._textModel.getLineContent(r),l=a.substring(0,s-1)+n+a.substring(s-1+t),c=this._textModel.getLanguageIdAtPosition(r,0),u=Rv(this._languageIdCodec,c,this._tokenizationStateStore.tokenizationSupport,l,!0,o);return new Ir(u.tokens,l,this._languageIdCodec)}isCheapToTokenize(e){if(!this._tokenizationStateStore)return!0;const t=this._tokenizationStateStore.invalidLineStartIndex+1;return e>t?!1:e1&&c>=1;c--){const u=this._textModel.getLineFirstNonWhitespaceColumn(c);if(u!==0&&u=0;c--)l=Rv(this._languageIdCodec,a,this._tokenizationStateStore.tokenizationSupport,s[c],!1,l).endState;for(let c=t;c<=n;c++){const u=this._textModel.getLineContent(c),d=Rv(this._languageIdCodec,a,this._tokenizationStateStore.tokenizationSupport,u,!0,l);e.add(c,d.tokens),this._tokenizationStateStore.markMustBeTokenized(c-1),l=d.endState}}}function _xe(i){if(i.isTooLargeForTokenization())return[null,null];const e=Oi.get(i.getLanguageId());if(!e)return[null,null];let t;try{t=e.getInitialState()}catch(n){return Jt(n),[null,null]}return[e,t]}function Rv(i,e,t,n,r,s){let o=null;if(t)try{o=t.tokenizeEncoded(n,r,s.clone())}catch(a){Jt(a)}return o||(o=oI(i.encodeLanguageId(e),s)),Ir.convertToEndOffset(o.tokens,n.length),o}const wd=new Uint32Array(0).buffer;class pu{static deleteBeginning(e,t){return e===null||e===wd?e:pu.delete(e,0,t)}static deleteEnding(e,t){if(e===null||e===wd)return e;const n=Cd(e),r=n[n.length-2];return pu.delete(e,t,r)}static delete(e,t,n){if(e===null||e===wd||t===n)return e;const r=Cd(e),s=r.length>>>1;if(t===0&&r[r.length-2]===n)return wd;const o=Ir.findIndexInTokensArray(r,t),a=o>0?r[o-1<<1]:0,l=r[o<<1];if(nu&&(r[c++]=g,r[c++]=r[(f<<1)+1],u=g)}if(c===r.length)return e;const h=new Uint32Array(c);return h.set(r.subarray(0,c),0),h.buffer}static append(e,t){if(t===wd)return e;if(e===wd)return t;if(e===null)return e;if(t===null)return null;const n=Cd(e),r=Cd(t),s=r.length>>>1,o=new Uint32Array(n.length+r.length);o.set(n,0);let a=n.length;const l=n[n.length-2];for(let c=0;c>>1;let o=Ir.findIndexInTokensArray(r,t);o>0&&r[o-1<<1]===t&&o--;for(let a=o;a1&&(s=Cs.getLanguageId(r[1])!==e),!s)return wd}if(!r||r.length===0){const s=new Uint32Array(2);return s[0]=t,s[1]=Aq(e),s.buffer}return r[r.length-2]=t,r.byteOffset===0&&r.byteLength===r.buffer.byteLength?r.buffer:r}_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 r=0;r=this._len)return;if(e.startLineNumber===e.endLineNumber){if(e.startColumn===e.endColumn)return;this._lineTokens[t]=pu.delete(this._lineTokens[t],e.startColumn-1,e.endColumn-1);return}this._lineTokens[t]=pu.deleteEnding(this._lineTokens[t],e.startColumn-1);const n=e.endLineNumber-1;let r=null;n=this._len)){if(t===0){this._lineTokens[r]=pu.insert(this._lineTokens[r],e.column-1,n);return}this._lineTokens[r]=pu.deleteEnding(this._lineTokens[r],e.column-1),this._lineTokens[r]=pu.insert(this._lineTokens[r],e.column-1,n),this._insertLines(e.lineNumber,t)}}}function Aq(i){return(i<<0|0<<8|0<<10|1<<14|2<<23)>>>0}class wD{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 s=t[0].getRange(),o=t[t.length-1].getRange();if(!s||!o)return e;n=e.plusRange(s).plusRange(o)}let r=null;for(let s=0,o=this._pieces.length;sn.endLineNumber){r=r||{index:s};break}if(a.removeTokens(n),a.isEmpty()){this._pieces.splice(s,1),s--,o--;continue}if(a.endLineNumbern.endLineNumber){r=r||{index:s};continue}const[l,c]=a.split(n);if(l.isEmpty()){r=r||{index:s};continue}c.isEmpty()||(this._pieces.splice(s,1,l,c),s++,o++,r=r||{index:s})}return r=r||{index:this._pieces.length},t.length>0&&(this._pieces=Iy(this._pieces,r.index,t)),n}isComplete(){return this._isComplete}addSparseTokens(e,t){const n=this._pieces;if(n.length===0)return t;const r=wD._findFirstPieceWithLine(n,e),s=n[r].getLineTokens(e);if(!s)return t;const o=t.getCount(),a=s.getCount();let l=0;const c=[];let u=0,d=0;const h=(f,g)=>{f!==d&&(d=f,c[u++]=f,c[u++]=g)};for(let f=0;f>>0,b=~_>>>0;for(;lt)r=s-1;else{for(;s>n&&e[s-1].startLineNumber<=t&&t<=e[s-1].endLineNumber;)s--;return s}}return n}acceptEdit(e,t,n,r,s){for(const o of this._pieces)o.acceptEdit(e,t,n,r,s)}}const Vk=Ln("undoRedoService");class Rq{constructor(e,t){this.resource=e,this.elements=t}}class u1{constructor(){this.id=u1._ID++,this.order=1}nextOrder(){return this.id===0?0:this.order++}}u1._ID=0,u1.None=new u1;class mu{constructor(){this.id=mu._ID++,this.order=1}nextOrder(){return this.id===0?0:this.order++}}mu._ID=0,mu.None=new mu;var bxe=globalThis&&globalThis.__decorate||function(i,e,t,n){var r=arguments.length,s=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(s=(r<3?o(s):r>3?o(e,t,s):o(e,t))||s);return r>3&&s&&Object.defineProperty(e,t,s),s},CD=globalThis&&globalThis.__param||function(i,e){return function(t,n){e(t,n,i)}};function vxe(){return new fxe}function wxe(i){const e=vxe();return e.acceptChunk(i),e.finish()}function Oq(i,e){return(typeof i=="string"?wxe(i):i).create(e)}let Wk=0;const Cxe=999,yxe=1e4;class Sxe{constructor(e){this._source=e,this._eos=!1}read(){if(this._eos)return null;const e=[];let t=0,n=0;do{const r=this._source.read();if(r===null)return this._eos=!0,t===0?null:e.join("");if(r.length>0&&(e[t++]=r,n+=r.length),n>=64*1024)return e.join("")}while(!0)}}const Ov=()=>{throw new Error("Invalid change accessor")};let yd=class Um extends Ne{constructor(e,t,n,r=null,s,o,a){super(),this._undoRedoService=s,this._languageService=o,this._languageConfigurationService=a,this._onWillDispose=this._register(new be),this.onWillDispose=this._onWillDispose.event,this._onDidChangeDecorations=this._register(new Lxe(h=>this.handleBeforeFireDecorationsChangedEvent(h))),this.onDidChangeDecorations=this._onDidChangeDecorations.event,this._onDidChangeLanguage=this._register(new be),this.onDidChangeLanguage=this._onDidChangeLanguage.event,this._onDidChangeLanguageConfiguration=this._register(new be),this.onDidChangeLanguageConfiguration=this._onDidChangeLanguageConfiguration.event,this._onDidChangeTokens=this._register(new be),this.onDidChangeTokens=this._onDidChangeTokens.event,this._onDidChangeOptions=this._register(new be),this.onDidChangeOptions=this._onDidChangeOptions.event,this._onDidChangeAttached=this._register(new be),this.onDidChangeAttached=this._onDidChangeAttached.event,this._onDidChangeInjectedText=this._register(new be),this._eventEmitter=this._register(new Txe),this._backgroundTokenizationState=0,this._onBackgroundTokenizationStateChanged=this._register(new be),Wk++,this.id="$model"+Wk,this.isForSimpleWidget=n.isForSimpleWidget,typeof r>"u"||r===null?this._associatedResource=Pt.parse("inmemory://model/"+Wk):this._associatedResource=r,this._attachedEditorCount=0;const{textBuffer:l,disposable:c}=Oq(e,n.defaultEOL);this._buffer=l,this._bufferDisposable=c,this._options=Um.resolveOptions(this._buffer,n);const u=this._buffer.getLineCount(),d=this._buffer.getValueLengthInRange(new H(1,1,u,this._buffer.getLineLength(u)+1),0);n.largeFileOptimizations?this._isTooLargeForTokenization=d>Um.LARGE_FILE_SIZE_THRESHOLD||u>Um.LARGE_FILE_LINE_COUNT_THRESHOLD:this._isTooLargeForTokenization=!1,this._isTooLargeForSyncing=d>Um.MODEL_SYNC_LIMIT,this._versionId=1,this._alternativeVersionId=1,this._initialUndoRedoSnapshot=null,this._isDisposed=!1,this._isDisposing=!1,this._languageId=t,this._languageRegistryListener=this._languageConfigurationService.onDidChange(h=>{h.affects(this._languageId)&&this._onDidChangeLanguageConfiguration.fire({})}),this._instanceId=Vz(Wk),this._lastDecorationId=0,this._decorations=Object.create(null),this._decorationsTree=new Mq,this._commandManager=new dD(this,this._undoRedoService),this._isUndoing=!1,this._isRedoing=!1,this._trimAutoWhitespaceLines=null,this._tokens=new Bk(this._languageService.languageIdCodec),this._semanticTokens=new wD(this._languageService.languageIdCodec),this._tokenization=new mxe(this,this._languageService.languageIdCodec),this._bracketPairColorizer=this._register(new M5e(this,this._languageConfigurationService)),this._guidesTextModelPart=this._register(new nEe(this,this._languageConfigurationService)),this._decorationProvider=this._register(new F5e(this)),this._register(this._decorationProvider.onDidChange(()=>{this._onDidChangeDecorations.beginDeferredEmit(),this._onDidChangeDecorations.fire(),this._onDidChangeDecorations.endDeferredEmit()}))}static resolveOptions(e,t){if(t.detectIndentation){const n=vq(e,t.tabSize,t.insertSpaces);return new Qy({tabSize:n.tabSize,indentSize:n.tabSize,insertSpaces:n.insertSpaces,trimAutoWhitespace:t.trimAutoWhitespace,defaultEOL:t.defaultEOL,bracketPairColorizationOptions:t.bracketPairColorizationOptions})}return new Qy({tabSize:t.tabSize,indentSize:t.indentSize,insertSpaces:t.insertSpaces,trimAutoWhitespace:t.trimAutoWhitespace,defaultEOL:t.defaultEOL,bracketPairColorizationOptions:t.bracketPairColorizationOptions})}onDidChangeContent(e){return this._eventEmitter.slowEvent(t=>e(t.contentChangedEvent))}onDidChangeContentOrInjectedText(e){return rd(this._eventEmitter.fastEvent(t=>e(t.rawContentChangedEvent)),this._onDidChangeInjectedText.event(t=>e(t)))}get bracketPairs(){return this._bracketPairColorizer}get guides(){return this._guidesTextModelPart}get backgroundTokenizationState(){return this._backgroundTokenizationState}handleTokenizationProgress(e){if(this._backgroundTokenizationState===2)return;const t=e?2:1;this._backgroundTokenizationState!==t&&(this._backgroundTokenizationState=t,this._bracketPairColorizer.handleDidChangeBackgroundTokenizationState(),this._onBackgroundTokenizationStateChanged.fire())}dispose(){this._isDisposing=!0,this._onWillDispose.fire(),this._languageRegistryListener.dispose(),this._tokenization.dispose(),this._isDisposed=!0,super.dispose(),this._bufferDisposable.dispose(),this._isDisposing=!1;const e=new c1([],"",` +`,!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._bracketPairColorizer.handleDidChangeContent(t),this._tokenization.handleDidChangeContent(t),this._eventEmitter.fire(new Ck(e,t)))}setValue(e){if(this._assertNotDisposed(),e===null)return;const{textBuffer:t,disposable:n}=Oq(e,this._options.defaultEOL);this._setValueFromTextBuffer(t,n)}_createContentChanged2(e,t,n,r,s,o,a){return{changes:[{range:e,rangeOffset:t,rangeLength:n,text:r}],eol:this._buffer.getEOL(),versionId:this.getVersionId(),isUndoing:s,isRedoing:o,isFlush:a}}_setValueFromTextBuffer(e,t){this._assertNotDisposed();const n=this.getFullModelRange(),r=this.getValueLengthInRange(n),s=this.getLineCount(),o=this.getLineMaxColumn(s);this._buffer=e,this._bufferDisposable.dispose(),this._bufferDisposable=t,this._increaseVersionId(),this._tokens.flush(),this._semanticTokens.flush(),this._decorations=Object.create(null),this._decorationsTree=new Mq,this._commandManager.clear(),this._trimAutoWhitespaceLines=null,this._emitContentChangedEvent(new gp([new AEe],this._versionId,!1,!1),this._createContentChanged2(new H(1,1,s,o),0,r,this.getValue(),!1,!1,!0))}setEOL(e){this._assertNotDisposed();const t=e===1?`\r +`:` +`;if(this._buffer.getEOL()===t)return;const n=this.getFullModelRange(),r=this.getValueLengthInRange(n),s=this.getLineCount(),o=this.getLineMaxColumn(s);this._onBeforeEOLChange(),this._buffer.setEOL(t),this._increaseVersionId(),this._onAfterEOLChange(),this._emitContentChangedEvent(new gp([new MEe],this._versionId,!1,!1),this._createContentChanged2(new H(1,1,s,o),0,r,this.getValue(),!1,!1,!1))}_onBeforeEOLChange(){this._decorationsTree.ensureAllNodesHaveRanges(this)}_onAfterEOLChange(){const e=this.getVersionId(),t=this._decorationsTree.collectNodesPostOrder();for(let n=0,r=t.length;n0}getAttachedEditorCount(){return this._attachedEditorCount}isTooLargeForSyncing(){return this._isTooLargeForSyncing}isTooLargeForTokenization(){return this._isTooLargeForTokenization}isDisposed(){return this._isDisposed}isDominatedByLongLines(){if(this._assertNotDisposed(),this.isTooLargeForTokenization())return!1;let e=0,t=0;const n=this._buffer.getLineCount();for(let r=1;r<=n;r++){const s=this._buffer.getLineLength(r);s>=yxe?t+=s:e+=s}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.indentSize,r=typeof e.insertSpaces<"u"?e.insertSpaces:this._options.insertSpaces,s=typeof e.trimAutoWhitespace<"u"?e.trimAutoWhitespace:this._options.trimAutoWhitespace,o=typeof e.bracketColorizationOptions<"u"?e.bracketColorizationOptions:this._options.bracketPairColorizationOptions,a=new Qy({tabSize:t,indentSize:n,insertSpaces:r,defaultEOL:this._options.defaultEOL,trimAutoWhitespace:s,bracketPairColorizationOptions:o});if(this._options.equals(a))return;const l=this._options.createChangeEvent(a);this._options=a,this._bracketPairColorizer.handleDidChangeOptions(l),this._decorationProvider.handleDidChangeOptions(l),this._onDidChangeOptions.fire(l)}detectIndentation(e,t){this._assertNotDisposed();const n=vq(this._buffer,t,e);this.updateOptions({insertSpaces:n.insertSpaces,tabSize:n.tabSize,indentSize:n.tabSize})}normalizeIndentation(e){return this._assertNotDisposed(),ik(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(Fz.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){this._assertNotDisposed();const n=this.getFullModelRange(),r=this.getValueInRange(n,e);return t?this._buffer.getBOM()+r:r}createSnapshot(e=!1){return new Sxe(this._buffer.createSnapshot(e))}getValueLength(e,t=!1){this._assertNotDisposed();const n=this.getFullModelRange(),r=this.getValueLengthInRange(n,e);return t?this._buffer.getBOM().length+r:r}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 Error("Illegal value for lineNumber");return this._buffer.getLineContent(e)}getLineLength(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._buffer.getLineLength(e)}getLinesContent(){return this._assertNotDisposed(),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 Error("Illegal value for lineNumber");return this._buffer.getLineLength(e)+1}getLineFirstNonWhitespaceColumn(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._buffer.getLineFirstNonWhitespaceColumn(e)}getLineLastNonWhitespaceColumn(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._buffer.getLineLastNonWhitespaceColumn(e)}_validateRangeRelaxedNoAllocations(e){const t=this._buffer.getLineCount(),n=e.startLineNumber,r=e.startColumn;let s=Math.floor(typeof n=="number"&&!isNaN(n)?n:1),o=Math.floor(typeof r=="number"&&!isNaN(r)?r:1);if(s<1)s=1,o=1;else if(s>t)s=t,o=this.getLineMaxColumn(s);else if(o<=1)o=1;else{const d=this.getLineMaxColumn(s);o>=d&&(o=d)}const a=e.endLineNumber,l=e.endColumn;let c=Math.floor(typeof a=="number"&&!isNaN(a)?a:1),u=Math.floor(typeof l=="number"&&!isNaN(l)?l:1);if(c<1)c=1,u=1;else if(c>t)c=t,u=this.getLineMaxColumn(c);else if(u<=1)u=1;else{const d=this.getLineMaxColumn(c);u>=d&&(u=d)}return n===s&&r===o&&a===c&&l===u&&e instanceof H&&!(e instanceof ut)?e:new H(s,o,c,u)}_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 r=this._buffer.getLineCount();if(e>r)return!1;if(t===1)return!0;const s=this.getLineMaxColumn(e);if(t>s)return!1;if(n===1){const o=this._buffer.getLineCharCode(e,t-2);if(Tr(o))return!1}return!0}_validatePosition(e,t,n){const r=Math.floor(typeof e=="number"&&!isNaN(e)?e:1),s=Math.floor(typeof t=="number"&&!isNaN(t)?t:1),o=this._buffer.getLineCount();if(r<1)return new ye(1,1);if(r>o)return new ye(o,this.getLineMaxColumn(o));if(s<=1)return new ye(r,1);const a=this.getLineMaxColumn(r);if(s>=a)return new ye(r,a);if(n===1){const l=this._buffer.getLineCharCode(r,s-2);if(Tr(l))return new ye(r,s-1)}return new ye(r,s)}validatePosition(e){return this._assertNotDisposed(),e instanceof ye&&this._isValidPosition(e.lineNumber,e.column,1)?e:this._validatePosition(e.lineNumber,e.column,1)}_isValidRange(e,t){const n=e.startLineNumber,r=e.startColumn,s=e.endLineNumber,o=e.endColumn;if(!this._isValidPosition(n,r,0)||!this._isValidPosition(s,o,0))return!1;if(t===1){const a=r>1?this._buffer.getLineCharCode(n,r-2):0,l=o>1&&o<=this._buffer.getLineLength(s)?this._buffer.getLineCharCode(s,o-2):0,c=Tr(a),u=Tr(l);return!c&&!u}return!0}validateRange(e){if(this._assertNotDisposed(),e instanceof H&&!(e instanceof ut)&&this._isValidRange(e,1))return e;const n=this._validatePosition(e.startLineNumber,e.startColumn,0),r=this._validatePosition(e.endLineNumber,e.endColumn,0),s=n.lineNumber,o=n.column,a=r.lineNumber,l=r.column;{const c=o>1?this._buffer.getLineCharCode(s,o-2):0,u=l>1&&l<=this._buffer.getLineLength(a)?this._buffer.getLineCharCode(a,l-2):0,d=Tr(c),h=Tr(u);return!d&&!h?new H(s,o,a,l):s===a&&o===l?new H(s,o-1,a,l-1):d&&h?new H(s,o-1,a,l+1):d?new H(s,o-1,a,l):new H(s,o,a,l+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 H(1,1,e,this.getLineMaxColumn(e))}findMatchesLineByLine(e,t,n,r){return this._buffer.findMatchesLineByLine(e,t,n,r)}findMatches(e,t,n,r,s,o,a=Cxe){this._assertNotDisposed();let l=null;t!==null&&(Array.isArray(t)||(t=[t]),t.every(d=>H.isIRange(d))&&(l=t.map(d=>this.validateRange(d)))),l===null&&(l=[this.getFullModelRange()]),l=l.sort((d,h)=>d.startLineNumber-h.startLineNumber||d.startColumn-h.startColumn);const c=[];c.push(l.reduce((d,h)=>H.areIntersecting(d,h)?d.plusRange(h):(c.push(d),h)));let u;if(!n&&e.indexOf(` +`)<0){const h=new Pg(e,n,r,s).parseSearchRequest();if(!h)return[];u=f=>this.findMatchesLineByLine(f,h,o,a)}else u=d=>dS.findMatches(this,new Pg(e,n,r,s),d,o,a);return c.map(u).reduce((d,h)=>d.concat(h),[])}findNextMatch(e,t,n,r,s,o){this._assertNotDisposed();const a=this.validatePosition(t);if(!n&&e.indexOf(` +`)<0){const c=new Pg(e,n,r,s).parseSearchRequest();if(!c)return null;const u=this.getLineCount();let d=new H(a.lineNumber,a.column,u,this.getLineMaxColumn(u)),h=this.findMatchesLineByLine(d,c,o,1);return dS.findNextMatch(this,new Pg(e,n,r,s),a,o),h.length>0||(d=new H(1,1,a.lineNumber,this.getLineMaxColumn(a.lineNumber)),h=this.findMatchesLineByLine(d,c,o,1),h.length>0)?h[0]:null}return dS.findNextMatch(this,new Pg(e,n,r,s),a,o)}findPreviousMatch(e,t,n,r,s,o){this._assertNotDisposed();const a=this.validatePosition(t);return dS.findPreviousMatch(this,new Pg(e,n,r,s),a,o)}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 KT?e:new KT(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,r=e.length;n({range:this.validateRange(o.range),text:o.text}));let s=!0;if(e)for(let o=0,a=e.length;ol.endLineNumber,g=l.startLineNumber>h.endLineNumber;if(!f&&!g){c=!0;break}}if(!c){s=!1;break}}if(s)for(let o=0,a=this._trimAutoWhitespaceLines.length;of.endLineNumber)&&!(l===f.startLineNumber&&f.startColumn===c&&f.isEmpty()&&g&&g.length>0&&g.charAt(0)===` +`)&&!(l===f.startLineNumber&&f.startColumn===1&&f.isEmpty()&&g&&g.length>0&&g.charAt(g.length-1)===` +`)){u=!1;break}}if(u){const d=new H(l,1,l,c);t.push(new KT(null,d,null,!1,!1,!1))}}this._trimAutoWhitespaceLines=null}return this._initialUndoRedoSnapshot===null&&(this._initialUndoRedoSnapshot=this._undoRedoService.createSnapshot(this.uri)),this._commandManager.pushEditOperation(e,t,n)}_applyUndo(e,t,n,r){const s=e.map(o=>{const a=this.getPositionAt(o.newPosition),l=this.getPositionAt(o.newEnd);return{range:new H(a.lineNumber,a.column,l.lineNumber,l.column),text:o.oldText}});this._applyUndoRedoEdits(s,t,!0,!1,n,r)}_applyRedo(e,t,n,r){const s=e.map(o=>{const a=this.getPositionAt(o.oldPosition),l=this.getPositionAt(o.oldEnd);return{range:new H(a.lineNumber,a.column,l.lineNumber,l.column),text:o.newText}});this._applyUndoRedoEdits(s,t,!1,!0,n,r)}_applyUndoRedoEdits(e,t,n,r,s,o){try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit(),this._isUndoing=n,this._isRedoing=r,this.applyEdits(e,!1),this.setEOL(t),this._overwriteAlternativeVersionId(s)}finally{this._isUndoing=!1,this._isRedoing=!1,this._eventEmitter.endDeferredEmit(o),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(),r=this._buffer.applyEdits(e,this._options.trimAutoWhitespace,t),s=this._buffer.getLineCount(),o=r.changes;if(this._trimAutoWhitespaceLines=r.trimAutoWhitespaceLineNumbers,o.length!==0){for(let c=0,u=o.length;c0?d.text.charCodeAt(0):0),this._decorationsTree.acceptReplace(d.rangeOffset,d.rangeLength,d.text.length,d.forceMoveMarkers)}const a=[];this._increaseVersionId();let l=n;for(let c=0,u=o.length;c=0;L--){const O=f+L,N=v+L;T.takeFromEndWhile($=>$.lineNumber>N);const P=T.takeFromEndWhile($=>$.lineNumber===N);a.push(new Hj(O,this.getLineContent(N),P))}if(_ce.lineNumberce.lineNumber===K)}a.push(new OEe(O+1,f+m,ne,$))}l+=b}this._emitContentChangedEvent(new gp(a,this.getVersionId(),this._isUndoing,this._isRedoing),{changes:o,eol:this._buffer.getEOL(),versionId:this.getVersionId(),isUndoing:this._isUndoing,isRedoing:this._isRedoing,isFlush:!1})}return r.reverseEdits===null?void 0:r.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=[...e].map(r=>new Hj(r,this.getLineContent(r),this._getInjectedTextInLine(r)));this._onDidChangeInjectedText.fire(new zj(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:(s,o)=>this._deltaDecorationsImpl(e,[],[{range:s,options:o}])[0],changeDecoration:(s,o)=>{this._changeDecorationImpl(s,o)},changeDecorationOptions:(s,o)=>{this._changeDecorationOptionsImpl(s,Bq(o))},removeDecoration:s=>{this._deltaDecorationsImpl(e,[s],[])},deltaDecorations:(s,o)=>s.length===0&&o.length===0?[]:this._deltaDecorationsImpl(e,s,o)};let r=null;try{r=t(n)}catch(s){Jt(s)}return n.addDecoration=Ov,n.changeDecoration=Ov,n.changeDecorationOptions=Ov,n.removeDecoration=Ov,n.deltaDecorations=Ov,r}deltaDecorations(e,t,n=0){if(this._assertNotDisposed(),e||(e=[]),e.length===0&&t.length===0)return[];try{return this._onDidChangeDecorations.beginDeferredEmit(),this._deltaDecorationsImpl(n,e,t)}finally{this._onDidChangeDecorations.endDeferredEmit()}}_getTrackedRange(e){return this.getDecorationRange(e)}_setTrackedRange(e,t,n){const r=e?this._decorations[e]:null;if(!r)return t?this._deltaDecorationsImpl(0,[],[{range:t,options:Fq[n]}])[0]:null;if(!t)return this._decorationsTree.delete(r),delete this._decorations[r.id],null;const s=this._validateRangeRelaxedNoAllocations(t),o=this._buffer.getOffsetAt(s.startLineNumber,s.startColumn),a=this._buffer.getOffsetAt(s.endLineNumber,s.endColumn);return this._decorationsTree.delete(r),r.reset(this.getVersionId(),o,a,s),r.setOptions(Fq[n]),this._decorationsTree.insert(r),r.id}removeAllDecorationsWithOwnerId(e){if(this._isDisposed)return;const t=this._decorationsTree.collectNodesFromOwner(e);for(let n=0,r=t.length;nthis.getLineCount()?[]:this.getLinesDecorations(e,e,t,n)}getLinesDecorations(e,t,n=0,r=!1){const s=this.getLineCount(),o=Math.min(s,Math.max(1,e)),a=Math.min(s,Math.max(1,t)),l=this.getLineMaxColumn(a),c=new H(o,1,a,l),u=this._getDecorationsInRange(c,n,r);return u.push(...this._decorationProvider.getDecorationsInRange(c,n,r)),u}getDecorationsInRange(e,t=0,n=!1){const r=this.validateRange(e),s=this._getDecorationsInRange(r,t,n);return s.push(...this._decorationProvider.getDecorationsInRange(r,t,n)),s}getOverviewRulerDecorations(e=0,t=!1){return this._decorationsTree.getAll(this,e,t,!0)}getInjectedTextDecorations(e=0){return this._decorationsTree.getAllInjectedText(this,e)}_getInjectedTextInLine(e){const t=this._buffer.getOffsetAt(e,1),n=t+this._buffer.getLineLength(e),r=this._decorationsTree.getInjectedTextInInterval(this,t,n,0);return gc.fromDecorations(r).filter(s=>s.lineNumber===e)}getAllDecorations(e=0,t=!1){let n=this._decorationsTree.getAll(this,e,t,!1);return n=n.concat(this._decorationProvider.getAllDecorations(e,t)),n}_getDecorationsInRange(e,t,n){const r=this._buffer.getOffsetAt(e.startLineNumber,e.startColumn),s=this._buffer.getOffsetAt(e.endLineNumber,e.endColumn);return this._decorationsTree.getAllInInterval(this,r,s,t,n)}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 a=this.getDecorationRange(e);this._onDidChangeDecorations.recordLineAffectedByInjectedText(a.endLineNumber)}if(n.options.before){const a=this.getDecorationRange(e);this._onDidChangeDecorations.recordLineAffectedByInjectedText(a.startLineNumber)}const r=this._validateRangeRelaxedNoAllocations(t),s=this._buffer.getOffsetAt(r.startLineNumber,r.startColumn),o=this._buffer.getOffsetAt(r.endLineNumber,r.endColumn);this._decorationsTree.delete(n),n.reset(this.getVersionId(),s,o,r),this._decorationsTree.insert(n),this._onDidChangeDecorations.checkAffectedAndFire(n.options),n.options.after&&this._onDidChangeDecorations.recordLineAffectedByInjectedText(r.endLineNumber),n.options.before&&this._onDidChangeDecorations.recordLineAffectedByInjectedText(r.startLineNumber)}_changeDecorationOptionsImpl(e,t){const n=this._decorations[e];if(!n)return;const r=!!(n.options.overviewRuler&&n.options.overviewRuler.color),s=!!(t.overviewRuler&&t.overviewRuler.color);if(this._onDidChangeDecorations.checkAffectedAndFire(n.options),this._onDidChangeDecorations.checkAffectedAndFire(t),n.options.after||t.after){const o=this._decorationsTree.getNodeRange(this,n);this._onDidChangeDecorations.recordLineAffectedByInjectedText(o.endLineNumber)}if(n.options.before||t.before){const o=this._decorationsTree.getNodeRange(this,n);this._onDidChangeDecorations.recordLineAffectedByInjectedText(o.startLineNumber)}r!==s?(this._decorationsTree.delete(n),n.setOptions(t),this._decorationsTree.insert(n)):n.setOptions(t)}_deltaDecorationsImpl(e,t,n){const r=this.getVersionId(),s=t.length;let o=0;const a=n.length;let l=0;const c=new Array(a);for(;o0&&this._emitModelTokensChangedEvent({tokenizationSupportChanged:!1,semanticTokensApplied:!1,ranges:n})}this.handleTokenizationProgress(t)}setSemanticTokens(e,t){this._semanticTokens.set(e,t),this._emitModelTokensChangedEvent({tokenizationSupportChanged:!1,semanticTokensApplied:e!==null,ranges:[{fromLineNumber:1,toLineNumber:this.getLineCount()}]})}hasCompleteSemanticTokens(){return this._semanticTokens.isComplete()}hasSomeSemanticTokens(){return!this._semanticTokens.isEmpty()}setPartialSemanticTokens(e,t){if(this.hasCompleteSemanticTokens())return;const n=this.validateRange(this._semanticTokens.setPartial(e,t));this._emitModelTokensChangedEvent({tokenizationSupportChanged:!1,semanticTokensApplied:!0,ranges:[{fromLineNumber:n.startLineNumber,toLineNumber:n.endLineNumber}]})}tokenizeViewport(e,t){e=Math.max(1,e),t=Math.min(this._buffer.getLineCount(),t),this._tokenization.tokenizeViewport(e,t)}clearTokens(){this._tokens.flush(),this._emitModelTokensChangedEvent({tokenizationSupportChanged:!0,semanticTokensApplied:!1,ranges:[{fromLineNumber:1,toLineNumber:this._buffer.getLineCount()}]})}_emitModelTokensChangedEvent(e){this._isDisposing||(this._bracketPairColorizer.handleDidChangeTokens(e),this._onDidChangeTokens.fire(e))}resetTokenization(){this._tokenization.reset()}forceTokenization(e){if(e<1||e>this.getLineCount())throw new Error("Illegal value for lineNumber");this._tokenization.forceTokenization(e)}isCheapToTokenize(e){return this._tokenization.isCheapToTokenize(e)}tokenizeIfCheap(e){this.isCheapToTokenize(e)&&this.forceTokenization(e)}getLineTokens(e){if(e<1||e>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._getLineTokens(e)}_getLineTokens(e){const t=this.getLineContent(e),n=this._tokens.getTokens(this._languageId,e-1,t);return this._semanticTokens.addSparseTokens(e,n)}getLanguageId(){return this._languageId}setMode(e){if(this._languageId===e)return;const t={oldLanguage:this._languageId,newLanguage:e};this._languageId=e,this._bracketPairColorizer.handleDidChangeLanguage(t),this._tokenization.handleDidChangeLanguage(t),this._onDidChangeLanguage.fire(t),this._onDidChangeLanguageConfiguration.fire({})}getLanguageIdAtPosition(e,t){const n=this.validatePosition(new ye(e,t)),r=this.getLineTokens(n.lineNumber);return r.getLanguageId(r.findTokenIndexAtOffset(n.column-1))}getTokenTypeIfInsertingCharacter(e,t,n){const r=this.validatePosition(new ye(e,t));return this._tokenization.getTokenTypeIfInsertingCharacter(r,n)}tokenizeLineWithEdit(e,t,n){const r=this.validatePosition(e);return this._tokenization.tokenizeLineWithEdit(r,t,n)}getLanguageConfiguration(e){return this._languageConfigurationService.getLanguageConfiguration(e)}getWordAtPosition(e){this._assertNotDisposed();const t=this.validatePosition(e),n=this.getLineContent(t.lineNumber),r=this._getLineTokens(t.lineNumber),s=r.findTokenIndexAtOffset(t.column-1),[o,a]=Um._findLanguageBoundaries(r,s),l=mb(t.column,this.getLanguageConfiguration(r.getLanguageId(s)).getWordDefinition(),n.substring(o,a),o);if(l&&l.startColumn<=e.column&&e.column<=l.endColumn)return l;if(s>0&&o===t.column-1){const[c,u]=Um._findLanguageBoundaries(r,s-1),d=mb(t.column,this.getLanguageConfiguration(r.getLanguageId(s-1)).getWordDefinition(),n.substring(c,u),c);if(d&&d.startColumn<=e.column&&e.column<=d.endColumn)return d}return null}static _findLanguageBoundaries(e,t){const n=e.getLanguageId(t);let r=0;for(let o=t;o>=0&&e.getLanguageId(o)===n;o--)r=e.getStartOffset(o);let s=e.getLineContent().length;for(let o=t,a=e.getCount();oa.options.showIfCollapsed||!a.range.isEmpty())}getAllInjectedText(e,t){const n=e.getVersionId(),r=this._injectedTextDecorationsTree.search(t,!1,n);return this._ensureNodesHaveRanges(e,r).filter(s=>s.options.showIfCollapsed||!s.range.isEmpty())}getAll(e,t,n,r){const s=e.getVersionId(),o=this._search(t,n,r,s);return this._ensureNodesHaveRanges(e,o)}_search(e,t,n,r){if(n)return this._decorationsTree1.search(e,t,r);{const s=this._decorationsTree0.search(e,t,r),o=this._decorationsTree1.search(e,t,r),a=this._injectedTextDecorationsTree.search(e,t,r);return s.concat(o).concat(a)}}collectNodesFromOwner(e){const t=this._decorationsTree0.collectNodesFromOwner(e),n=this._decorationsTree1.collectNodesFromOwner(e),r=this._injectedTextDecorationsTree.collectNodesFromOwner(e);return t.concat(n).concat(r)}collectNodesPostOrder(){const e=this._decorationsTree0.collectNodesPostOrder(),t=this._decorationsTree1.collectNodesPostOrder(),n=this._injectedTextDecorationsTree.collectNodesPostOrder();return e.concat(t).concat(n)}insert(e){SD(e)?this._injectedTextDecorationsTree.insert(e):yD(e)?this._decorationsTree1.insert(e):this._decorationsTree0.insert(e)}delete(e){SD(e)?this._injectedTextDecorationsTree.delete(e):yD(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){SD(e)?this._injectedTextDecorationsTree.resolveNode(e,t):yD(e)?this._decorationsTree1.resolveNode(e,t):this._decorationsTree0.resolveNode(e,t)}acceptReplace(e,t,n,r){this._decorationsTree0.acceptReplace(e,t,n,r),this._decorationsTree1.acceptReplace(e,t,n,r),this._injectedTextDecorationsTree.acceptReplace(e,t,n,r)}}function nf(i){return i.replace(/[^a-z0-9\-_]/gi," ")}class Pq{constructor(e){this.color=e.color||"",this.darkColor=e.darkColor||""}}class Exe extends Pq{constructor(e){super(e),this._resolvedColor=null,this.position=typeof e.position=="number"?e.position:$a.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 xxe extends Pq{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"?Ie.fromHex(e):t.getColor(e.id)}}class wp{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}static from(e){return e instanceof wp?e:new wp(e)}}class cn{constructor(e){var t,n;this.description=e.description,this.stickiness=e.stickiness||0,this.zIndex=e.zIndex||0,this.className=e.className?nf(e.className):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 Exe(e.overviewRuler):null,this.minimap=e.minimap?new xxe(e.minimap):null,this.glyphMarginClassName=e.glyphMarginClassName?nf(e.glyphMarginClassName):null,this.linesDecorationsClassName=e.linesDecorationsClassName?nf(e.linesDecorationsClassName):null,this.firstLineDecorationClassName=e.firstLineDecorationClassName?nf(e.firstLineDecorationClassName):null,this.marginClassName=e.marginClassName?nf(e.marginClassName):null,this.inlineClassName=e.inlineClassName?nf(e.inlineClassName):null,this.inlineClassNameAffectsLetterSpacing=e.inlineClassNameAffectsLetterSpacing||!1,this.beforeContentClassName=e.beforeContentClassName?nf(e.beforeContentClassName):null,this.afterContentClassName=e.afterContentClassName?nf(e.afterContentClassName):null,this.after=e.after?wp.from(e.after):null,this.before=e.before?wp.from(e.before):null,this.hideInCommentTokens=(t=e.hideInCommentTokens)!==null&&t!==void 0?t:!1,this.hideInStringTokens=(n=e.hideInStringTokens)!==null&&n!==void 0?n:!1}static register(e){return new cn(e)}static createDynamic(e){return new cn(e)}}cn.EMPTY=cn.register({description:"empty"});const Fq=[cn.register({description:"tracked-range-always-grows-when-typing-at-edges",stickiness:0}),cn.register({description:"tracked-range-never-grows-when-typing-at-edges",stickiness:1}),cn.register({description:"tracked-range-grows-only-when-typing-before",stickiness:2}),cn.register({description:"tracked-range-grows-only-when-typing-after",stickiness:3})];function Bq(i){return i instanceof cn?i:cn.createDynamic(i)}class Lxe extends Ne{constructor(e){super(),this.handleBeforeFire=e,this._actual=this._register(new be),this.event=this._actual.event,this._affectedInjectedTextLines=null,this._deferredCnt=0,this._shouldFire=!1,this._affectsMinimap=!1,this._affectsOverviewRuler=!1}beginDeferredEmit(){this._deferredCnt++}endDeferredEmit(){var e;if(this._deferredCnt--,this._deferredCnt===0){if(this._shouldFire){this.handleBeforeFire(this._affectedInjectedTextLines);const t={affectsMinimap:this._affectsMinimap,affectsOverviewRuler:this._affectsOverviewRuler};this._shouldFire=!1,this._affectsMinimap=!1,this._affectsOverviewRuler=!1,this._actual.fire(t)}(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._shouldFire=!0}fire(){this._affectsMinimap=!0,this._affectsOverviewRuler=!0,this._shouldFire=!0}}class Txe extends Ne{constructor(){super(),this._fastEmitter=this._register(new be),this.fastEvent=this._fastEmitter.event,this._slowEmitter=this._register(new be),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)}}function kD(i,e){return i===null?e?Hk.INSTANCE:zk.INSTANCE:new Ixe(i,e)}class Ixe{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 r=n>0?this._projectionData.breakOffsets[n-1]:0,s=this._projectionData.breakOffsets[n];let o;if(this._projectionData.injectionOffsets!==null){const a=this._projectionData.injectionOffsets.map((c,u)=>new gc(0,0,c+1,this._projectionData.injectionOptions[u],0));o=gc.applyInjectedText(e.getLineContent(t),a).substring(r,s)}else o=e.getValueInRange({startLineNumber:t,startColumn:r+1,endLineNumber:t,endColumn:s+1});return n>0&&(o=Vq(this._projectionData.wrappedTextIndentLength)+o),o}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 r=new Array;return this.getViewLinesData(e,t,n,1,0,[!0],r),r[0]}getViewLinesData(e,t,n,r,s,o,a){this._assertVisible();const l=this._projectionData,c=l.injectionOffsets,u=l.injectionOptions;let d=null;if(c){d=[];let f=0,g=0;for(let p=0;p0?l.breakOffsets[p-1]:0,b=l.breakOffsets[p];for(;gb)break;if(_0?l.wrappedTextIndentLength:0,T=x+Math.max(w-_,0),L=x+Math.min(E-_,b);T!==L&&m.push(new Nye(T,L,I.inlineClassName,I.inlineClassNameAffectsLetterSpacing))}}if(E<=b)f+=v,g++;else break}}}let h;c?h=e.getLineTokens(t).withInserted(c.map((f,g)=>({offset:f,text:u[g].content,tokenMetadata:Ir.defaultTokenMetadata}))):h=e.getLineTokens(t);for(let f=n;f0?r.wrappedTextIndentLength:0,o=n>0?r.breakOffsets[n-1]:0,a=r.breakOffsets[n],l=e.sliceAndInflate(o,a,s);let c=l.getLineContent();n>0&&(c=Vq(r.wrappedTextIndentLength)+c);const u=this._projectionData.getMinOutputOffset(n)+1,d=c.length+1,h=n+1=ED.length)for(let e=1;e<=i;e++)ED[e]=Dxe(e);return ED[i]}function Dxe(i){return new Array(i+1).join(" ")}class Nxe{constructor(e,t,n,r,s,o,a,l,c){this._editorId=e,this.model=t,this._validModelVersionId=-1,this._domLineBreaksComputerFactory=n,this._monospaceLineBreaksComputerFactory=r,this.fontInfo=s,this.tabSize=o,this.wrappingStrategy=a,this.wrappingColumn=l,this.wrappingIndent=c,this._constructLines(!0,null)}dispose(){this.hiddenAreasDecorationIds=this.model.deltaDecorations(this.hiddenAreasDecorationIds,[])}createCoordinatesConverter(){return new Rxe(this)}_constructLines(e,t){this.modelLineProjections=[],e&&(this.hiddenAreasDecorationIds=this.model.deltaDecorations(this.hiddenAreasDecorationIds,[]));const n=this.model.getLinesContent(),r=this.model.getInjectedTextDecorations(this._editorId),s=n.length,o=this.createLineBreaksComputer(),a=new s_(gc.fromDecorations(r));for(let p=0;p_.lineNumber===p+1);o.addRequest(n[p],m,t?t[p]:null)}const l=o.finalize(),c=[],u=this.hiddenAreasDecorationIds.map(p=>this.model.getDecorationRange(p)).sort(H.compareRangesUsingStarts);let d=1,h=0,f=-1,g=f+1=d&&m<=h,b=kD(l[p],!_);c[p]=b.getViewLineCount(),this.modelLineProjections[p]=b}this._validModelVersionId=this.model.getVersionId(),this.projectedModelLineLineCounts=new K2e(c)}getHiddenAreas(){return this.hiddenAreasDecorationIds.map(e=>this.model.getDecorationRange(e))}setHiddenAreas(e){const t=e.map(h=>this.model.validateRange(h)),n=Axe(t),r=this.hiddenAreasDecorationIds.map(h=>this.model.getDecorationRange(h)).sort(H.compareRangesUsingStarts);if(n.length===r.length){let h=!1;for(let f=0;f({range:h,options:cn.EMPTY}));this.hiddenAreasDecorationIds=this.model.deltaDecorations(this.hiddenAreasDecorationIds,s);const o=n;let a=1,l=0,c=-1,u=c+1=a&&f<=l?this.modelLineProjections[h].isVisible()&&(this.modelLineProjections[h]=this.modelLineProjections[h].setVisible(!1),g=!0):(d=!0,this.modelLineProjections[h].isVisible()||(this.modelLineProjections[h]=this.modelLineProjections[h].setVisible(!0),g=!0)),g){const p=this.modelLineProjections[h].getViewLineCount();this.projectedModelLineLineCounts.setValue(h,p)}}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,r){const s=this.fontInfo.equals(e),o=this.wrappingStrategy===t,a=this.wrappingColumn===n,l=this.wrappingIndent===r;if(s&&o&&a&&l)return!1;const c=s&&o&&!a&&l;this.fontInfo=e,this.wrappingStrategy=t,this.wrappingColumn=n,this.wrappingIndent=r;let u=null;if(c){u=[];for(let d=0,h=this.modelLineProjections.length;d2&&!this.modelLineProjections[t-2].isVisible(),o=t===1?1:this.projectedModelLineLineCounts.getPrefixSum(t-1)+1;let a=0;const l=[],c=[];for(let u=0,d=r.length;ul?(u=this.projectedModelLineLineCounts.getPrefixSum(t-1)+1,d=u+l-1,g=d+1,p=g+(s-l)-1,c=!0):st?t:e|0}getActiveIndentGuide(e,t,n){e=this._toValidViewLineNumber(e),t=this._toValidViewLineNumber(t),n=this._toValidViewLineNumber(n);const r=this.convertViewPositionToModelPosition(e,this.getViewLineMinColumn(e)),s=this.convertViewPositionToModelPosition(t,this.getViewLineMinColumn(t)),o=this.convertViewPositionToModelPosition(n,this.getViewLineMinColumn(n)),a=this.model.guides.getActiveIndentGuide(r.lineNumber,s.lineNumber,o.lineNumber),l=this.convertModelPositionToViewPosition(a.startLineNumber,1),c=this.convertModelPositionToViewPosition(a.endLineNumber,this.model.getLineMaxColumn(a.endLineNumber));return{startLineNumber:l.lineNumber,endLineNumber:c.lineNumber,indent:a.indent}}getViewLineInfo(e){e=this._toValidViewLineNumber(e);const t=this.projectedModelLineLineCounts.getIndexOf(e-1),n=t.index,r=t.remainder;return new Wq(n+1,r)}getMinColumnOfViewLine(e){return this.modelLineProjections[e.modelLineNumber-1].getViewLineMinColumn(this.model,e.modelLineNumber,e.modelLineWrappedLineIdx)}getModelStartPositionOfViewLine(e){const t=this.modelLineProjections[e.modelLineNumber-1],n=t.getViewLineMinColumn(this.model,e.modelLineNumber,e.modelLineWrappedLineIdx),r=t.getModelColumnOfViewPosition(e.modelLineWrappedLineIdx,n);return new ye(e.modelLineNumber,r)}getModelEndPositionOfViewLine(e){const t=this.modelLineProjections[e.modelLineNumber-1],n=t.getViewLineMaxColumn(this.model,e.modelLineNumber,e.modelLineWrappedLineIdx),r=t.getModelColumnOfViewPosition(e.modelLineWrappedLineIdx,n);return new ye(e.modelLineNumber,r)}getViewLineInfosGroupedByModelRanges(e,t){const n=this.getViewLineInfo(e),r=this.getViewLineInfo(t),s=new Array;let o=this.getModelStartPositionOfViewLine(n),a=new Array;for(let l=n.modelLineNumber;l<=r.modelLineNumber;l++){const c=this.modelLineProjections[l-1];if(c.isVisible()){const u=l===n.modelLineNumber?n.modelLineWrappedLineIdx:0,d=l===r.modelLineNumber?r.modelLineWrappedLineIdx+1:c.getViewLineCount();for(let h=u;hh.horizontalLine?new n1(h.visibleColumn,h.className,new z6(h.horizontalLine.top,this.convertModelPositionToViewPosition(u.modelLineNumber,h.horizontalLine.endColumn).column)):h),o.push(d)}}return o}getViewLinesIndentGuides(e,t){e=this._toValidViewLineNumber(e),t=this._toValidViewLineNumber(t);const n=this.convertViewPositionToModelPosition(e,this.getViewLineMinColumn(e)),r=this.convertViewPositionToModelPosition(t,this.getViewLineMaxColumn(t));let s=[];const o=[],a=[],l=n.lineNumber-1,c=r.lineNumber-1;let u=null;for(let g=l;g<=c;g++){const p=this.modelLineProjections[g];if(p.isVisible()){const m=p.getViewLineNumberOfModelPosition(0,g===l?n.column:1),_=p.getViewLineNumberOfModelPosition(0,this.model.getLineMaxColumn(g+1)),b=_-m+1;let v=0;b>1&&p.getViewLineMinColumn(this.model,g+1,_)===1&&(v=m===0?1:2),o.push(b),a.push(v),u===null&&(u=new ye(g+1,0))}else u!==null&&(s=s.concat(this.model.guides.getLinesIndentGuides(u.lineNumber,g)),u=null)}u!==null&&(s=s.concat(this.model.guides.getLinesIndentGuides(u.lineNumber,r.lineNumber)),u=null);const d=t-e+1,h=new Array(d);let f=0;for(let g=0,p=s.length;gt&&(g=!0,f=t-s+1),d.getViewLinesData(this.model,c+1,h,f,s-e,n,l),s+=f,g)break}return l}validateViewPosition(e,t,n){e=this._toValidViewLineNumber(e);const r=this.projectedModelLineLineCounts.getIndexOf(e-1),s=r.index,o=r.remainder,a=this.modelLineProjections[s],l=a.getViewLineMinColumn(this.model,s+1,o),c=a.getViewLineMaxColumn(this.model,s+1,o);tc&&(t=c);const u=a.getModelColumnOfViewPosition(o,t);return this.model.validatePosition(new ye(s+1,u)).equals(n)?new ye(e,t):this.convertModelPositionToViewPosition(n.lineNumber,n.column)}validateViewRange(e,t){const n=this.validateViewPosition(e.startLineNumber,e.startColumn,t.getStartPosition()),r=this.validateViewPosition(e.endLineNumber,e.endColumn,t.getEndPosition());return new H(n.lineNumber,n.column,r.lineNumber,r.column)}convertViewPositionToModelPosition(e,t){const n=this.getViewLineInfo(e),r=this.modelLineProjections[n.modelLineNumber-1].getModelColumnOfViewPosition(n.modelLineWrappedLineIdx,t);return this.model.validatePosition(new ye(n.modelLineNumber,r))}convertViewRangeToModelRange(e){const t=this.convertViewPositionToModelPosition(e.startLineNumber,e.startColumn),n=this.convertViewPositionToModelPosition(e.endLineNumber,e.endColumn);return new H(t.lineNumber,t.column,n.lineNumber,n.column)}convertModelPositionToViewPosition(e,t,n=2){const r=this.model.validatePosition(new ye(e,t)),s=r.lineNumber,o=r.column;let a=s-1,l=!1;for(;a>0&&!this.modelLineProjections[a].isVisible();)a--,l=!0;if(a===0&&!this.modelLineProjections[a].isVisible())return new ye(1,1);const c=1+this.projectedModelLineLineCounts.getPrefixSum(a);let u;return l?u=this.modelLineProjections[a].getViewPositionOfModelPosition(c,this.model.getLineMaxColumn(a+1),n):u=this.modelLineProjections[s-1].getViewPositionOfModelPosition(c,o,n),u}convertModelRangeToViewRange(e,t=0){if(e.isEmpty()){const n=this.convertModelPositionToViewPosition(e.startLineNumber,e.startColumn,t);return H.fromPositions(n)}else{const n=this.convertModelPositionToViewPosition(e.startLineNumber,e.startColumn,1),r=this.convertModelPositionToViewPosition(e.endLineNumber,e.endColumn,0);return new H(n.lineNumber,n.column,r.lineNumber,r.column)}}getViewLineNumberOfModelPosition(e,t){let n=e-1;if(this.modelLineProjections[n].isVisible()){const s=1+this.projectedModelLineLineCounts.getPrefixSum(n);return this.modelLineProjections[n].getViewLineNumberOfModelPosition(s,t)}for(;n>0&&!this.modelLineProjections[n].isVisible();)n--;if(n===0&&!this.modelLineProjections[n].isVisible())return 1;const r=1+this.projectedModelLineLineCounts.getPrefixSum(n);return this.modelLineProjections[n].getViewLineNumberOfModelPosition(r,this.model.getLineMaxColumn(n+1))}getDecorationsInRange(e,t,n){const r=this.convertViewPositionToModelPosition(e.startLineNumber,e.startColumn),s=this.convertViewPositionToModelPosition(e.endLineNumber,e.endColumn);if(s.lineNumber-r.lineNumber<=e.endLineNumber-e.startLineNumber)return this.model.getDecorationsInRange(new H(r.lineNumber,1,s.lineNumber,s.column),t,n);let o=[];const a=r.lineNumber-1,l=s.lineNumber-1;let c=null;for(let f=a;f<=l;f++)if(this.modelLineProjections[f].isVisible())c===null&&(c=new ye(f+1,f===a?r.column:1));else if(c!==null){const p=this.model.getLineMaxColumn(f);o=o.concat(this.model.getDecorationsInRange(new H(c.lineNumber,c.column,f,p),t,n)),c=null}c!==null&&(o=o.concat(this.model.getDecorationsInRange(new H(c.lineNumber,c.column,s.lineNumber,s.column),t,n)),c=null),o.sort((f,g)=>{const p=H.compareRangesUsingStarts(f.range,g.range);return p===0?f.idg.id?1:0:p});let u=[],d=0,h=null;for(const f of o){const g=f.id;h!==g&&(h=g,u[d++]=f)}return u}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 Axe(i){if(i.length===0)return[];const e=i.slice();e.sort(H.compareRangesUsingStarts);const t=[];let n=e[0].startLineNumber,r=e[0].endLineNumber;for(let s=1,o=e.length;sr+1?(t.push(new H(n,1,r,1)),n=a.startLineNumber,r=a.endLineNumber):a.endLineNumber>r&&(r=a.endLineNumber)}return t.push(new H(n,1,r,1)),t}class Wq{constructor(e,t){this.modelLineNumber=e,this.modelLineWrappedLineIdx=t}get isWrappedLineContinuation(){return this.modelLineWrappedLineIdx>0}}class Hq{constructor(e,t){this.modelRange=e,this.viewLines=t}}class Rxe{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){return this._lines.convertModelPositionToViewPosition(e.lineNumber,e.column,t)}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 Oxe{constructor(e){this.model=e}dispose(){}createCoordinatesConverter(){return new Mxe(this)}getHiddenAreas(){return[]}setHiddenAreas(e){return!1}setTabSize(e){return!1}setWrappingSettings(e,t,n,r){return!1}createLineBreaksComputer(){const e=[];return{addRequest:(t,n,r)=>{e.push(null)},finalize:()=>e}}onModelFlushed(){}onModelLinesDeleted(e,t,n){return new j6(t,n)}onModelLinesInserted(e,t,n,r){return new q6(t,n)}onModelLineChanged(e,t,n){return[!1,new $j(t,t),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,r=new Array(n);for(let s=0;st)}getModelLineViewLineCount(e){return 1}getViewLineNumberOfModelPosition(e,t){return e}}class Pxe extends Ne{constructor(e,t,n,r,s,o,a,l){if(super(),this.languageConfigurationService=a,this._themeService=l,this._editorId=e,this._configuration=t,this.model=n,this._eventDispatcher=new GEe,this.onEvent=this._eventDispatcher.onEvent,this.cursorConfig=new Z_(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService),this._tokenizeViewportSoon=this._register(new ri(()=>this.tokenizeViewport(),50)),this._updateConfigurationViewLineCount=this._register(new ri(()=>this._updateConfigurationViewLineCountNow(),0)),this._hasFocus=!1,this._viewportStartLine=-1,this._viewportStartLineTrackedRange=null,this._viewportStartLineDelta=0,this.model.isTooLargeForTokenization())this._lines=new Oxe(this.model);else{const c=this._configuration.options,u=c.get(44),d=c.get(125),h=c.get(132),f=c.get(124);this._lines=new Nxe(this._editorId,this.model,r,s,u,this.model.getOptions().tabSize,d,h.wrappingColumn,f)}this.coordinatesConverter=this._lines.createCoordinatesConverter(),this._cursor=this._register(new r1(n,this,this.coordinatesConverter,this.cursorConfig)),this.viewLayout=this._register(new d5e(this._configuration,this.getLineCount(),o)),this._register(this.viewLayout.onDidScroll(c=>{c.scrollTopChanged&&this._tokenizeViewportSoon.schedule(),this._eventDispatcher.emitSingleViewEvent(new zEe(c)),this._eventDispatcher.emitOutgoingEvent(new Y6(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 h5e(this._editorId,this.model,this._configuration,this._lines,this.coordinatesConverter),this._registerModelEvents(),this._register(this._configuration.onDidChangeFast(c=>{try{const u=this._eventDispatcher.beginEmitViewEvents();this._onConfigurationChanged(u,c)}finally{this._eventDispatcher.endEmitViewEvents()}})),this._register(hv.getInstance().onDidChange(()=>{this._eventDispatcher.emitSingleViewEvent(new jEe)})),this._register(this._themeService.onDidColorThemeChange(c=>{this._invalidateDecorationsColorCache(),this._eventDispatcher.emitSingleViewEvent(new $Ee(c))})),this._updateConfigurationViewLineCountNow()}dispose(){super.dispose(),this._decorations.dispose(),this._lines.dispose(),this._viewportStartLineTrackedRange=this.model._setTrackedRange(this._viewportStartLineTrackedRange,null,1),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())}tokenizeViewport(){const e=this.viewLayout.getLinesViewportData(),t=new H(e.startLineNumber,this.getLineMinColumn(e.startLineNumber),e.endLineNumber,this.getLineMaxColumn(e.endLineNumber)),n=this._toModelVisibleRanges(t);for(const r of n)this.model.tokenizeViewport(r.startLineNumber,r.endLineNumber)}setHasFocus(e){this._hasFocus=e,this._cursor.setHasFocus(e),this._eventDispatcher.emitSingleViewEvent(new WEe(e)),this._eventDispatcher.emitOutgoingEvent(new K6(!e,e))}onCompositionStart(){this._eventDispatcher.emitSingleViewEvent(new PEe)}onCompositionEnd(){this._eventDispatcher.emitSingleViewEvent(new FEe)}_onConfigurationChanged(e,t){let n=null;if(this._viewportStartLine!==-1){const u=new ye(this._viewportStartLine,this.getLineMinColumn(this._viewportStartLine));n=this.coordinatesConverter.convertViewPositionToModelPosition(u)}let r=!1;const s=this._configuration.options,o=s.get(44),a=s.get(125),l=s.get(132),c=s.get(124);if(this._lines.setWrappingSettings(o,a,l.wrappingColumn,c)&&(e.emitViewEvent(new yk),e.emitViewEvent(new Sk),e.emitViewEvent(new i1(null)),this._cursor.onLineMappingChanged(e),this._decorations.onLineMappingChanged(),this.viewLayout.onFlushed(this.getLineCount()),this.viewLayout.getCurrentScrollTop()!==0&&(r=!0),this._updateConfigurationViewLineCount.schedule()),t.hasChanged(81)&&(this._decorations.reset(),e.emitViewEvent(new i1(null))),e.emitViewEvent(new BEe(t)),this.viewLayout.onConfigurationChanged(t),r&&n){const u=this.coordinatesConverter.convertModelPositionToViewPosition(n),d=this.viewLayout.getVerticalOffsetForLineNumber(u.lineNumber);this.viewLayout.setScrollPosition({scrollTop:d+this._viewportStartLineDelta},1)}Z_.shouldRecreate(t)&&(this.cursorConfig=new Z_(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService),this._cursor.updateConfiguration(this.cursorConfig))}_registerModelEvents(){this._register(this.model.onDidChangeContentOrInjectedText(e=>{try{const t=this._eventDispatcher.beginEmitViewEvents();let n=!1,r=!1;const s=e.changes,o=e instanceof gp?e.versionId:null,a=this._lines.createLineBreaksComputer();for(const u of s)switch(u.changeType){case 4:{for(let d=0;d!g.ownerId||g.ownerId===this._editorId)),a.addRequest(h,f,null)}break}case 2:{let d=null;u.injectedText&&(d=u.injectedText.filter(h=>!h.ownerId||h.ownerId===this._editorId)),a.addRequest(u.detail,d,null);break}}const l=a.finalize(),c=new s_(l);for(const u of s)switch(u.changeType){case 1:{this._lines.onModelFlushed(),t.emitViewEvent(new yk),this._decorations.reset(),this.viewLayout.onFlushed(this.getLineCount()),n=!0;break}case 3:{const d=this._lines.onModelLinesDeleted(o,u.fromLineNumber,u.toLineNumber);d!==null&&(t.emitViewEvent(d),this.viewLayout.onLinesDeleted(d.fromLineNumber,d.toLineNumber)),n=!0;break}case 4:{const d=c.takeCount(u.detail.length),h=this._lines.onModelLinesInserted(o,u.fromLineNumber,u.toLineNumber,d);h!==null&&(t.emitViewEvent(h),this.viewLayout.onLinesInserted(h.fromLineNumber,h.toLineNumber)),n=!0;break}case 2:{const d=c.dequeue(),[h,f,g,p]=this._lines.onModelLineChanged(o,u.lineNumber,d);r=h,f&&t.emitViewEvent(f),g&&(t.emitViewEvent(g),this.viewLayout.onLinesInserted(g.fromLineNumber,g.toLineNumber)),p&&(t.emitViewEvent(p),this.viewLayout.onLinesDeleted(p.fromLineNumber,p.toLineNumber));break}case 5:break}o!==null&&this._lines.acceptVersionId(o),this.viewLayout.onHeightMaybeChanged(),!n&&r&&(t.emitViewEvent(new Sk),t.emitViewEvent(new i1(null)),this._cursor.onLineMappingChanged(t),this._decorations.onLineMappingChanged())}finally{this._eventDispatcher.endEmitViewEvents()}if(this._viewportStartLine=-1,this._configuration.setModelLineCount(this.model.getLineCount()),this._updateConfigurationViewLineCountNow(),!this._hasFocus&&this.model.getAttachedEditorCount()>=2&&this._viewportStartLineTrackedRange){const t=this.model._getTrackedRange(this._viewportStartLineTrackedRange);if(t){const n=this.coordinatesConverter.convertModelPositionToViewPosition(t.getStartPosition()),r=this.viewLayout.getVerticalOffsetForLineNumber(n.lineNumber);this.viewLayout.setScrollPosition({scrollTop:r+this._viewportStartLineDelta},1)}}try{const t=this._eventDispatcher.beginEmitViewEvents();this._cursor.onModelContentChanged(t,e)}finally{this._eventDispatcher.endEmitViewEvents()}this._tokenizeViewportSoon.schedule()})),this._register(this.model.onDidChangeTokens(e=>{const t=[];for(let n=0,r=e.ranges.length;n{this._eventDispatcher.emitSingleViewEvent(new HEe),this.cursorConfig=new Z_(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService),this._cursor.updateConfiguration(this.cursorConfig)})),this._register(this.model.onDidChangeLanguage(e=>{this.cursorConfig=new Z_(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService),this._cursor.updateConfiguration(this.cursorConfig)})),this._register(this.model.onDidChangeOptions(e=>{if(this._lines.setTabSize(this.model.getOptions().tabSize)){try{const t=this._eventDispatcher.beginEmitViewEvents();t.emitViewEvent(new yk),t.emitViewEvent(new Sk),t.emitViewEvent(new i1(null)),this._cursor.onLineMappingChanged(t),this._decorations.onLineMappingChanged(),this.viewLayout.onFlushed(this.getLineCount())}finally{this._eventDispatcher.endEmitViewEvents()}this._updateConfigurationViewLineCount.schedule()}this.cursorConfig=new Z_(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService),this._cursor.updateConfiguration(this.cursorConfig)})),this._register(this.model.onDidChangeDecorations(e=>{this._decorations.onModelDecorationsChanged(),this._eventDispatcher.emitSingleViewEvent(new i1(e))}))}setHiddenAreas(e){let t=!1;try{const n=this._eventDispatcher.beginEmitViewEvents();t=this._lines.setHiddenAreas(e),t&&(n.emitViewEvent(new yk),n.emitViewEvent(new Sk),n.emitViewEvent(new i1(null)),this._cursor.onLineMappingChanged(n),this._decorations.onLineMappingChanged(),this.viewLayout.onFlushed(this.getLineCount()),this.viewLayout.onHeightMaybeChanged())}finally{this._eventDispatcher.endEmitViewEvents()}this._updateConfigurationViewLineCount.schedule(),t&&this._eventDispatcher.emitOutgoingEvent(new Uj)}getVisibleRangesPlusViewportAboveBelow(){const e=this._configuration.options.get(131),t=this._configuration.options.get(59),n=Math.max(20,Math.round(e.height/t)),r=this.viewLayout.getLinesViewportData(),s=Math.max(1,r.completelyVisibleStartLineNumber-n),o=Math.min(this.getLineCount(),r.completelyVisibleEndLineNumber+n);return this._toModelVisibleRanges(new H(s,this.getLineMinColumn(s),o,this.getLineMaxColumn(o)))}getVisibleRanges(){const e=this.getCompletelyVisibleViewRange();return this._toModelVisibleRanges(e)}_toModelVisibleRanges(e){const t=this.coordinatesConverter.convertViewRangeToModelRange(e),n=this._lines.getHiddenAreas();if(n.length===0)return[t];const r=[];let s=0,o=t.startLineNumber,a=t.startColumn;const l=t.endLineNumber,c=t.endColumn;for(let u=0,d=n.length;ul||(o"u")return this._reduceRestoreStateCompatibility(e);const t=this.model.validatePosition(e.firstPosition),n=this.coordinatesConverter.convertModelPositionToViewPosition(t),r=this.viewLayout.getVerticalOffsetForLineNumber(n.lineNumber)-e.firstPositionDeltaTop;return{scrollLeft:e.scrollLeft,scrollTop:r}}_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._viewportStartLine=e;const r=this.coordinatesConverter.convertViewPositionToModelPosition(new ye(e,this.getLineMinColumn(e)));this._viewportStartLineTrackedRange=this.model._setTrackedRange(this._viewportStartLineTrackedRange,new H(r.lineNumber,r.column,r.lineNumber,r.column),1);const s=this.viewLayout.getVerticalOffsetForLineNumber(e),o=this.viewLayout.getCurrentScrollTop();this._viewportStartLineDelta=o-s}getActiveIndentGuide(e,t,n){return this._lines.getActiveIndentGuide(e,t,n)}getLinesIndentGuides(e,t){return this._lines.getViewLinesIndentGuides(e,t)}getBracketGuidesInRangeByLine(e,t,n,r){return this._lines.getViewLinesBracketGuides(e,t,n,r)}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=Ks(this.getLineContent(e));return t===-1?0:t+1}getLineLastNonWhitespaceColumn(e){const t=Yc(this.getLineContent(e));return t===-1?0:t+2}getDecorationsInViewport(e){return this._decorations.getDecorationsViewportData(e).decorations}getInjectedTextAt(e){return this._lines.getInjectedTextAt(e)}getViewLineRenderingData(e,t){const n=this.model.mightContainRTL(),r=this.model.mightContainNonBasicASCII(),s=this.getTabSize(),o=this._lines.getViewLineData(t);let l=this._decorations.getDecorationsViewportData(e).inlineDecorations[t-e.startLineNumber];return o.inlineDecorations&&(l=[...l,...o.inlineDecorations.map(c=>c.toInlineDecoration(t))]),new ha(o.minColumn,o.maxColumn,o.content,o.continuesWithWrappedLine,n,r,o.tokens,l,s,o.startVisibleColumn)}getViewLineData(e){return this._lines.getViewLineData(e)}getMinimapLinesRenderingData(e,t,n){const r=this._lines.getViewLinesData(e,t,n);return new Dye(this.getTabSize(),r)}getAllOverviewRulerDecorations(e){const t=this.model.getOverviewRulerDecorations(this._editorId,My(this._configuration.options)),n=new Fxe;for(const r of t){const s=r.options,o=s.overviewRuler;if(!o)continue;const a=o.position;if(a===0)continue;const l=o.getColor(e.value),c=this.coordinatesConverter.getViewLineNumberOfModelPosition(r.range.startLineNumber,r.range.startColumn),u=this.coordinatesConverter.getViewLineNumberOfModelPosition(r.range.endLineNumber,r.range.endColumn);n.accept(l,s.zIndex,c,u,a)}return n.asArray}_invalidateDecorationsColorCache(){const e=this.model.getOverviewRulerDecorations();for(const t of e){const n=t.options.overviewRuler;n&&n.invalidateCachedColor();const r=t.options.minimap;r&&r.invalidateCachedColor()}}getValueInRange(e,t){const n=this.coordinatesConverter.convertViewRangeToModelRange(e);return this.model.getValueInRange(n,t)}deduceModelPositionRelativeToViewPosition(e,t,n){const r=this.coordinatesConverter.convertViewPositionToModelPosition(e);this.model.getEOL().length===2&&(t<0?t-=n:t+=n);const o=this.model.getOffsetAt(r)+t;return this.model.getPositionAt(o)}getPlainTextToCopy(e,t,n){const r=n?`\r +`:this.model.getEOL();e=e.slice(0),e.sort(H.compareRangesUsingStarts);let s=!1,o=!1;for(const l of e)l.isEmpty()?s=!0:o=!0;if(!o){if(!t)return"";const l=e.map(u=>u.startLineNumber);let c="";for(let u=0;u0&&l[u-1]===l[u]||(c+=this.model.getLineContent(l[u])+r);return c}if(s&&t){const l=[];let c=0;for(const u of e){const d=u.startLineNumber;u.isEmpty()?d!==c&&l.push(this.model.getLineContent(d)):l.push(this.model.getValueInRange(u,n?2:0)),c=d}return l.length===1?l[0]:l}const a=[];for(const l of e)l.isEmpty()||a.push(this.model.getValueInRange(l,n?2:0));return a.length===1?a[0]:a}getRichTextToCopy(e,t){const n=this.model.getLanguageId();if(n===uu||e.length!==1)return null;let r=e[0];if(r.isEmpty()){if(!t)return null;const u=r.startLineNumber;r=new H(u,this.model.getLineMinColumn(u),u,this.model.getLineMaxColumn(u))}const s=this._configuration.options.get(44),o=this._getColorMap(),l=/[:;\\\/<>]/.test(s.fontFamily)||s.fontFamily===Ms.fontFamily;let c;return l?c=Ms.fontFamily:(c=s.fontFamily,c=c.replace(/"/g,"'"),/[,']/.test(c)||/[+ ]/.test(c)&&(c=`'${c}'`),c=`${c}, ${Ms.fontFamily}`),{mode:n,html:`
`+this._getHTMLToCopy(r,o)+"
"}}_getHTMLToCopy(e,t){const n=e.startLineNumber,r=e.startColumn,s=e.endLineNumber,o=e.endColumn,a=this.getTabSize();let l="";for(let c=n;c<=s;c++){const u=this.model.getLineTokens(c),d=u.getLineContent(),h=c===n?r-1:0,f=c===s?o-1:d.length;d===""?l+="
":l+=o5e(d,u.inflate(),t,h,f,a,Gr)}return l}_getColorMap(){const e=Oi.getColorMap(),t=["#000000"];if(e)for(let n=1,r=e.length;nthis._cursor.setStates(r,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(r=>this._cursor.setSelections(r,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 YEe);return}this._withViewEventsCollector(e)}executeEdits(e,t,n){this._executeCursorEdit(r=>this._cursor.executeEdits(r,e,t,n))}startComposition(){this._cursor.setIsDoingComposition(!0),this._executeCursorEdit(e=>this._cursor.startComposition(e))}endComposition(e){this._cursor.setIsDoingComposition(!1),this._executeCursorEdit(t=>this._cursor.endComposition(t,e))}type(e,t){this._executeCursorEdit(n=>this._cursor.type(n,e,t))}compositionType(e,t,n,r,s){this._executeCursorEdit(o=>this._cursor.compositionType(o,e,t,n,r,s))}paste(e,t,n,r){this._executeCursorEdit(s=>this._cursor.paste(s,e,t,n,r))}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(r=>this._cursor.revealPrimary(r,e,n,0,t,0))}revealTopMostCursor(e){const t=this._cursor.getTopMostViewPosition(),n=new H(t.lineNumber,t.column,t.lineNumber,t.column);this._withViewEventsCollector(r=>r.emitViewEvent(new kk(e,!1,n,null,0,!0,0)))}revealBottomMostCursor(e){const t=this._cursor.getBottomMostViewPosition(),n=new H(t.lineNumber,t.column,t.lineNumber,t.column);this._withViewEventsCollector(r=>r.emitViewEvent(new kk(e,!1,n,null,0,!0,0)))}revealRange(e,t,n,r,s){this._withViewEventsCollector(o=>o.emitViewEvent(new kk(e,!1,n,null,r,t,s)))}changeWhitespace(e){this.viewLayout.changeWhitespace(e)&&(this._eventDispatcher.emitSingleViewEvent(new qEe),this._eventDispatcher.emitOutgoingEvent(new Uj))}_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 Fxe{constructor(){this._asMap=Object.create(null),this.asArray=[]}accept(e,t,n,r,s){const o=this._asMap[e];if(o){const a=o.data,l=a[a.length-3],c=a[a.length-1];if(l===s&&c+1>=n){r>c&&(a[a.length-1]=r);return}a.push(s,n,r)}else{const a=new W$(e,t,[s,n,r]);this._asMap[e]=a,this.asArray.push(a)}}}class $k{constructor(...e){this._entries=new Map;for(let[t,n]of e)this.set(t,n)}set(e,t){const n=this._entries.get(e);return this._entries.set(e,t),n}get(e){return this._entries.get(e)}}var Mv;(function(i){i[i.Ignore=0]="Ignore",i[i.Info=1]="Info",i[i.Warning=2]="Warning",i[i.Error=3]="Error"})(Mv||(Mv={})),function(i){const e="error",t="warning",n="warn",r="info",s="ignore";function o(l){return l?h_(e,l)?i.Error:h_(t,l)||h_(n,l)?i.Warning:h_(r,l)?i.Info:i.Ignore:i.Ignore}i.fromValue=o;function a(l){switch(l){case i.Error:return e;case i.Warning:return t;case i.Info:return r;default:return s}}i.toString=a}(Mv||(Mv={}));const Bi=Mv;var zq=Bi;const or=Ln("notificationService");class Bxe{}class Pv{constructor(e,t,n,r,s){this.injectionOffsets=e,this.injectionOptions=t,this.breakOffsets=n,this.breakOffsetsVisibleColumn=r,this.wrappedTextIndentLength=s}getOutputLineCount(){return this.breakOffsets.length}getMinOutputOffset(e){return e>0?this.wrappedTextIndentLength:0}getLineLength(e){const t=e>0?this.breakOffsets[e-1]:0;let r=this.breakOffsets[e]-t;return e>0&&(r+=this.wrappedTextIndentLength),r}getMaxOutputOffset(e){return this.getLineLength(e)}translateToInputOffset(e,t){e>0&&(t=Math.max(0,t-this.wrappedTextIndentLength));let r=e===0?t:this.breakOffsets[e-1]+t;if(this.injectionOffsets!==null)for(let s=0;sthis.injectionOffsets[s];s++)r0?this.breakOffsets[s-1]:0,t===0)if(e<=o)r=s-1;else if(e>l)n=s+1;else break;else if(e=l)n=s+1;else break}let a=e-o;return s>0&&(a+=this.wrappedTextIndentLength),new Uk(s,a)}normalizeOutputPosition(e,t,n){if(this.injectionOffsets!==null){const r=this.outputPositionToOffsetInInputWithInjections(e,t),s=this.normalizeOffsetInInputWithInjectionsAroundInjections(r,n);if(s!==r)return this.offsetInInputWithInjectionsToOutputPosition(s,n)}if(n===0){if(e>0&&t===this.getMinOutputOffset(e))return new Uk(e-1,this.getMaxOutputOffset(e-1))}else if(n===1){const r=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&&$q(this.injectionOptions[n.injectedTextIndex].cursorStops))return n.offsetInInputWithInjections+n.length;{let r=n.offsetInInputWithInjections;if(Uq(this.injectionOptions[n.injectedTextIndex].cursorStops))return r;let s=n.injectedTextIndex-1;for(;s>=0&&this.injectionOffsets[s]===this.injectionOffsets[n.injectedTextIndex]&&!($q(this.injectionOptions[s].cursorStops)||(r-=this.injectionOptions[s].content.length,Uq(this.injectionOptions[s].cursorStops)));)s--;return r}}else if(t===1){let r=n.offsetInInputWithInjections+n.length,s=n.injectedTextIndex;for(;s+1=0&&this.injectionOffsets[s-1]===this.injectionOffsets[s];)r-=this.injectionOptions[s-1].content.length,s--;return r}L8()}getInjectedText(e,t){const n=this.outputPositionToOffsetInInputWithInjections(e,t),r=this.getInjectedTextAtOffset(n);return r?{options:this.injectionOptions[r.injectedTextIndex]}:null}getInjectedTextAtOffset(e){const t=this.injectionOffsets,n=this.injectionOptions;if(t!==null){let r=0;for(let s=0;se)break;if(e<=l)return{injectedTextIndex:s,offsetInInputWithInjections:a,length:o};r+=o}}}}function $q(i){return i==null?!0:i===Qc.Right||i===Qc.Both}function Uq(i){return i==null?!0:i===Qc.Left||i===Qc.Both}class Uk{constructor(e,t){this.outputLineIndex=e,this.outputOffset=t}toString(){return`${this.outputLineIndex}:${this.outputOffset}`}toPosition(e){return new ye(e+this.outputLineIndex,this.outputOffset+1)}}class xD{constructor(e,t){this.classifier=new Vxe(e,t)}static create(e){return new xD(e.get(120),e.get(119))}createLineBreaksComputer(e,t,n,r){const s=[],o=[],a=[];return{addRequest:(l,c,u)=>{s.push(l),o.push(c),a.push(u)},finalize:()=>{const l=e.typicalFullwidthCharacterWidth/e.typicalHalfwidthCharacterWidth,c=[];for(let u=0,d=s.length;u=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 LD=[],TD=[];function Wxe(i,e,t,n,r,s,o){if(r===-1)return null;const a=t.length;if(a<=1)return null;const l=e.breakOffsets,c=e.breakOffsetsVisibleColumn,u=qq(t,n,r,s,o),d=r-u,h=LD,f=TD;let g=0,p=0,m=0,_=r;const b=l.length;let v=0;if(v>=0){let w=Math.abs(c[v]-_);for(;v+1=w)break;w=E,v++}}for(;vw&&(w=p,E=m);let I=0,x=0,T=0,L=0;if(E<=_){let N=E,P=w===0?0:t.charCodeAt(w-1),$=w===0?0:i.get(P),ne=!0;for(let z=w;zp&&ID(P,$,ce,re)&&(I=K,x=N),N+=B,N>_){K>p?(T=K,L=N-B):(T=z+1,L=N),N-x>d&&(I=0),ne=!1;break}P=ce,$=re}if(ne){g>0&&(h[g]=l[l.length-1],f[g]=c[l.length-1],g++);break}}if(I===0){let N=E,P=t.charCodeAt(w),$=i.get(P),ne=!1;for(let z=w-1;z>=p;z--){const K=z+1,ce=t.charCodeAt(z);if(ce===9){ne=!0;break}let re,B;if(Ag(ce)?(z--,re=0,B=2):(re=i.get(ce),B=Eh(ce)?s:1),N<=_){if(T===0&&(T=K,L=N),N<=_-d)break;if(ID(ce,re,P,$)){I=K,x=N;break}}N-=B,P=ce,$=re}if(I!==0){const z=d-(L-x);if(z<=n){const K=t.charCodeAt(T);let ce;Tr(K)?ce=2:ce=Fv(K,L,n,s),z-ce<0&&(I=0)}}if(ne){v--;continue}}if(I===0&&(I=T,x=L),I<=p){const N=t.charCodeAt(p);Tr(N)?(I=p+2,x=m+2):(I=p+1,x=m+Fv(N,m,n,s))}for(p=I,h[g]=I,m=x,f[g]=x,g++,_=x+d;v<0||v=O)break;O=N,v++}}return g===0?null:(h.length=g,f.length=g,LD=e.breakOffsets,TD=e.breakOffsetsVisibleColumn,e.breakOffsets=h,e.breakOffsetsVisibleColumn=f,e.wrappedTextIndentLength=u,e)}function Hxe(i,e,t,n,r,s,o){const a=gc.applyInjectedText(e,t);let l,c;if(t&&t.length>0?(l=t.map(x=>x.options),c=t.map(x=>x.column-1)):(l=null,c=null),r===-1)return l?new Pv(c,l,[a.length],[],0):null;const u=a.length;if(u<=1)return l?new Pv(c,l,[a.length],[],0):null;const d=qq(a,n,r,s,o),h=r-d,f=[],g=[];let p=0,m=0,_=0,b=r,v=a.charCodeAt(0),w=i.get(v),E=Fv(v,0,n,s),I=1;Tr(v)&&(E+=1,v=a.charCodeAt(1),w=i.get(v),I++);for(let x=I;xb&&((m===0||E-_>h)&&(m=T,_=E-N),f[p]=m,g[p]=_,p++,b=_+h,m=0),v=L,w=O}return p===0&&(!t||t.length===0)?null:(f[p]=u,g[p]=E,new Pv(c,l,f,g,d))}function Fv(i,e,t,n){return i===9?t-e%t:Eh(i)||i<32?n:1}function jq(i,e){return e-i%e}function ID(i,e,t,n){return t!==32&&(e===2||e===3&&n!==2||n===1||n===3&&e!==1)}function qq(i,e,t,n,r){let s=0;if(r!==0){const o=Ks(i);if(o!==-1){for(let l=0;lt&&(s=0)}}return s}var DD;const ND=(DD=window.trustedTypes)===null||DD===void 0?void 0:DD.createPolicy("domLineBreaksComputer",{createHTML:i=>i});class AD{static create(){return new AD}constructor(){}createLineBreaksComputer(e,t,n,r){const s=[],o=[];return{addRequest:(a,l,c)=>{s.push(a),o.push(l)},finalize:()=>zxe(s,e,t,n,r,o)}}}function zxe(i,e,t,n,r,s){var o;function a(T){const L=s[T];if(L){const O=gc.applyInjectedText(i[T],L),N=L.map($=>$.options),P=L.map($=>$.column-1);return new Pv(P,N,[O.length],[],0)}else return null}if(n===-1){const T=[];for(let L=0,O=i.length;Ll?(O=0,N=0):P=l-z}const $=L.substr(O),ne=$xe($,N,t,P,f,d);g[T]=O,p[T]=N,m[T]=$,_[T]=ne[0],b[T]=ne[1]}const v=f.build(),w=(o=ND==null?void 0:ND.createHTML(v))!==null&&o!==void 0?o:v;h.innerHTML=w,h.style.position="absolute",h.style.top="10000",h.style.wordWrap="break-word",document.body.appendChild(h);const E=document.createRange(),I=Array.prototype.slice.call(h.children,0),x=[];for(let T=0;Tre.options),K=ce.map(re=>re.column-1)):(z=null,K=null),x[T]=new Pv(K,z,O,ne,P)}return document.body.removeChild(h),x}function $xe(i,e,t,n,r,s){if(s!==0){const h=String(s);r.appendASCIIString('
');const o=i.length;let a=e,l=0;const c=[],u=[];let d=0");for(let h=0;h"),c[h]=l,u[h]=a;const f=d;d=h+1"),c[i.length]=l,u[i.length]=a,r.appendASCIIString("
"),[c,u]}function Uxe(i,e,t,n){if(t.length<=1)return null;const r=Array.prototype.slice.call(e.children,0),s=[];try{RD(i,r,n,0,null,t.length-1,null,s)}catch(o){return console.log(o),null}return s.length===0?null:(s.push(t.length),s)}function RD(i,e,t,n,r,s,o,a){if(n===s||(r=r||OD(i,e,t[n],t[n+1]),o=o||OD(i,e,t[s],t[s+1]),Math.abs(r[0].top-o[0].top)<=.1))return;if(n+1===s){a.push(s);return}const l=n+(s-n)/2|0,c=OD(i,e,t[l],t[l+1]);RD(i,e,t,n,r,l,c,a),RD(i,e,t,l,c,s,o,a)}function OD(i,e,t,n){return i.setStart(e[t/16384|0].firstChild,t%16384),i.setEnd(e[n/16384|0].firstChild,n%16384),i.getClientRects()}var jxe=globalThis&&globalThis.__decorate||function(i,e,t,n){var r=arguments.length,s=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(s=(r<3?o(s):r>3?o(e,t,s):o(e,t))||s);return r>3&&s&&Object.defineProperty(e,t,s),s},Sd=globalThis&&globalThis.__param||function(i,e){return function(t,n){e(t,n,i)}};let qxe=0,Gxe=class{constructor(e,t,n,r,s){this.model=e,this.viewModel=t,this.view=n,this.hasRealView=r,this.listenersToRemove=s}dispose(){Nn(this.listenersToRemove),this.model.onBeforeDetached(),this.hasRealView&&this.view.dispose(),this.viewModel.dispose()}},Bv=class kL extends Ne{constructor(e,t,n,r,s,o,a,l,c,u,d,h){super(),this.languageConfigurationService=d,this._onDidDispose=this._register(new be),this.onDidDispose=this._onDidDispose.event,this._onDidChangeModelContent=this._register(new be),this.onDidChangeModelContent=this._onDidChangeModelContent.event,this._onDidChangeModelLanguage=this._register(new be),this.onDidChangeModelLanguage=this._onDidChangeModelLanguage.event,this._onDidChangeModelLanguageConfiguration=this._register(new be),this.onDidChangeModelLanguageConfiguration=this._onDidChangeModelLanguageConfiguration.event,this._onDidChangeModelOptions=this._register(new be),this.onDidChangeModelOptions=this._onDidChangeModelOptions.event,this._onDidChangeModelDecorations=this._register(new be),this.onDidChangeModelDecorations=this._onDidChangeModelDecorations.event,this._onDidChangeConfiguration=this._register(new be),this.onDidChangeConfiguration=this._onDidChangeConfiguration.event,this._onDidChangeModel=this._register(new be),this.onDidChangeModel=this._onDidChangeModel.event,this._onDidChangeCursorPosition=this._register(new be),this.onDidChangeCursorPosition=this._onDidChangeCursorPosition.event,this._onDidChangeCursorSelection=this._register(new be),this.onDidChangeCursorSelection=this._onDidChangeCursorSelection.event,this._onDidAttemptReadOnlyEdit=this._register(new be),this.onDidAttemptReadOnlyEdit=this._onDidAttemptReadOnlyEdit.event,this._onDidLayoutChange=this._register(new be),this.onDidLayoutChange=this._onDidLayoutChange.event,this._editorTextFocus=this._register(new Gq),this.onDidFocusEditorText=this._editorTextFocus.onDidChangeToTrue,this.onDidBlurEditorText=this._editorTextFocus.onDidChangeToFalse,this._editorWidgetFocus=this._register(new Gq),this.onDidFocusEditorWidget=this._editorWidgetFocus.onDidChangeToTrue,this.onDidBlurEditorWidget=this._editorWidgetFocus.onDidChangeToFalse,this._onWillType=this._register(new be),this.onWillType=this._onWillType.event,this._onDidType=this._register(new be),this.onDidType=this._onDidType.event,this._onDidCompositionStart=this._register(new be),this.onDidCompositionStart=this._onDidCompositionStart.event,this._onDidCompositionEnd=this._register(new be),this.onDidCompositionEnd=this._onDidCompositionEnd.event,this._onDidPaste=this._register(new be),this.onDidPaste=this._onDidPaste.event,this._onMouseUp=this._register(new be),this.onMouseUp=this._onMouseUp.event,this._onMouseDown=this._register(new be),this.onMouseDown=this._onMouseDown.event,this._onMouseDrag=this._register(new be),this.onMouseDrag=this._onMouseDrag.event,this._onMouseDrop=this._register(new be),this.onMouseDrop=this._onMouseDrop.event,this._onMouseDropCanceled=this._register(new be),this.onMouseDropCanceled=this._onMouseDropCanceled.event,this._onContextMenu=this._register(new be),this.onContextMenu=this._onContextMenu.event,this._onMouseMove=this._register(new be),this.onMouseMove=this._onMouseMove.event,this._onMouseLeave=this._register(new be),this.onMouseLeave=this._onMouseLeave.event,this._onMouseWheel=this._register(new be),this.onMouseWheel=this._onMouseWheel.event,this._onKeyUp=this._register(new be),this.onKeyUp=this._onKeyUp.event,this._onKeyDown=this._register(new be),this.onKeyDown=this._onKeyDown.event,this._onDidContentSizeChange=this._register(new be),this.onDidContentSizeChange=this._onDidContentSizeChange.event,this._onDidScrollChange=this._register(new be),this.onDidScrollChange=this._onDidScrollChange.event,this._onDidChangeViewZones=this._register(new be),this.onDidChangeViewZones=this._onDidChangeViewZones.event,this._onDidChangeHiddenAreas=this._register(new be),this.onDidChangeHiddenAreas=this._onDidChangeHiddenAreas.event,this._bannerDomNode=null;const f=Object.assign({},t);this._domElement=e,this._overflowWidgetsDomNode=f.overflowWidgetsDomNode,delete f.overflowWidgetsDomNode,this._id=++qxe,this._decorationTypeKeysToIds={},this._decorationTypeSubtypes={},this._telemetryData=n.telemetryData,this._configuration=this._register(this._createConfiguration(n.isSimpleWidget||!1,f,u)),this._register(this._configuration.onDidChange(p=>{this._onDidChangeConfiguration.fire(p);const m=this._configuration.options;if(p.hasChanged(131)){const _=m.get(131);this._onDidLayoutChange.fire(_)}})),this._contextKeyService=this._register(a.createScoped(this._domElement)),this._notificationService=c,this._codeEditorService=s,this._commandService=o,this._themeService=l,this._register(new Kxe(this,this._contextKeyService)),this._register(new Yxe(this,this._contextKeyService,h)),this._instantiationService=r.createChild(new $k([Yt,this._contextKeyService])),this._modelData=null,this._contributions={},this._actions={},this._focusTracker=new Zxe(e),this._register(this._focusTracker.onChange(()=>{this._editorWidgetFocus.setValue(this._focusTracker.hasFocus())})),this._contentWidgets={},this._overlayWidgets={};let g;Array.isArray(n.contributions)?g=n.contributions:g=Yg.getEditorContributions();for(const p of g){if(this._contributions[p.id]){Jt(new Error(`Cannot have two contributions with the same id ${p.id}`));continue}try{const m=this._instantiationService.createInstance(p.ctor,this);this._contributions[p.id]=m}catch(m){Jt(m)}}Yg.getEditorActions().forEach(p=>{if(this._actions[p.id]){Jt(new Error(`Cannot have two actions with the same id ${p.id}`));return}const m=new qj(p.id,p.label,p.alias,Fo(p.precondition),()=>this._instantiationService.invokeFunction(_=>Promise.resolve(p.runEditorCommand(_,this,null))),this._contextKeyService);this._actions[m.id]=m}),this._codeEditorService.addCodeEditor(this)}get isSimpleWidget(){return this._configuration.isSimpleWidget}_createConfiguration(e,t,n){return new e6(e,t,this._domElement,n)}getId(){return this.getEditorType()+":"+this._id}getEditorType(){return xb.ICodeEditor}dispose(){this._codeEditorService.removeCodeEditor(this),this._focusTracker.dispose();const e=Object.keys(this._contributions);for(let t=0,n=e.length;tH.lift(t)))}getVisibleColumnFromPosition(e){if(!this._modelData)return e.column;const t=this._modelData.model.validatePosition(e),n=this._modelData.model.getOptions().tabSize;return Nr.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(!ye.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,r){if(!this._modelData)return;if(!H.isIRange(e))throw new Error("Invalid arguments");const s=this._modelData.model.validateRange(e),o=this._modelData.viewModel.coordinatesConverter.convertModelRangeToViewRange(s);this._modelData.viewModel.revealRange("api",n,o,t,r)}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 H(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,r){if(!ye.isIPosition(e))throw new Error("Invalid arguments");this._sendRevealRange(new H(e.lineNumber,e.column,e.lineNumber,e.column),t,n,r)}getSelection(){return this._modelData?this._modelData.viewModel.getSelection():null}getSelections(){return this._modelData?this._modelData.viewModel.getSelections():null}setSelection(e,t="api"){const n=ut.isISelection(e),r=H.isIRange(e);if(!n&&!r)throw new Error("Invalid arguments");if(n)this._setSelectionImpl(e,t);else if(r){const s={selectionStartLineNumber:e.startLineNumber,selectionStartColumn:e.startColumn,positionLineNumber:e.endLineNumber,positionColumn:e.endColumn};this._setSelectionImpl(s,t)}}_setSelectionImpl(e,t){if(!this._modelData)return;const n=new ut(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,r){if(typeof e!="number"||typeof t!="number")throw new Error("Invalid arguments");this._sendRevealRange(new H(e,1,t,1),n,!1,r)}revealRange(e,t=0,n=!1,r=!0){this._revealRange(e,n?1:0,r,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,r){if(!H.isIRange(e))throw new Error("Invalid arguments");this._sendRevealRange(H.lift(e),t,n,r)}setSelections(e,t="api",n=0){if(this._modelData){if(!e||e.length===0)throw new Error("Invalid arguments");for(let r=0,s=e.length;r0&&this._modelData.viewModel.restoreCursorState(n):this._modelData.viewModel.restoreCursorState([n]);const r=t.contributionsState||{},s=Object.keys(this._contributions);for(let a=0,l=s.length;at.isSupported()),e}getAction(e){return this._actions[e]||null}trigger(e,t,n){switch(n=n||{},t){case"compositionStart":this._startComposition();return;case"compositionEnd":this._endComposition(e);return;case"type":{const s=n;this._type(e,s.text||"");return}case"replacePreviousChar":{const s=n;this._compositionType(e,s.text||"",s.replaceCharCnt||0,0,0);return}case"compositionType":{const s=n;this._compositionType(e,s.text||"",s.replacePrevCharCnt||0,s.replaceNextCharCnt||0,s.positionDelta||0);return}case"paste":{const s=n;this._paste(e,s.text||"",s.pasteOnNewLine||!1,s.multicursorText||null,s.mode||null);return}case"cut":this._cut(e);return}const r=this.getAction(t);if(r){Promise.resolve(r.run()).then(void 0,Jt);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,r,s){this._modelData&&this._modelData.viewModel.compositionType(t,n,r,s,e)}_paste(e,t,n,r,s){if(!this._modelData||t.length===0)return;const o=this._modelData.viewModel.getSelection().getStartPosition();this._modelData.viewModel.paste(t,n,r,e);const a=this._modelData.viewModel.getSelection().getStartPosition();e==="keyboard"&&this._onDidPaste.fire({range:new H(o.lineNumber,o.column,a.lineNumber,a.column),languageId:s})}_cut(e){this._modelData&&this._modelData.viewModel.cut(e)}_triggerEditorCommand(e,t,n){const r=Yg.getEditorCommand(t);return r?(n=n||{},n.source=e,this._instantiationService.invokeFunction(s=>{Promise.resolve(r.runEditorCommand(s,this,n)).then(void 0,Jt)}),!0):!1}_getViewModel(){return this._modelData?this._modelData.viewModel:null}pushUndoStop(){return!this._modelData||this._configuration.options.get(81)?!1:(this._modelData.model.pushStackElement(),!0)}popUndoStop(){return!this._modelData||this._configuration.options.get(81)?!1:(this._modelData.model.popStackElement(),!0)}executeEdits(e,t,n){if(!this._modelData||this._configuration.options.get(81))return!1;let r;return n?Array.isArray(n)?r=()=>n:r=n:r=()=>null,this._modelData.viewModel.executeEdits(e,t,r),!0}executeCommand(e,t){this._modelData&&this._modelData.viewModel.executeCommand(t,e)}executeCommands(e,t){this._modelData&&this._modelData.viewModel.executeCommands(t,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,My(this._configuration.options)):null}getDecorationsInRange(e){return this._modelData?this._modelData.model.getDecorationsInRange(e,this._id,My(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){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(131)}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}delegateVerticalScrollbarMouseDown(e){!this._modelData||!this._modelData.hasRealView||this._modelData.view.delegateVerticalScrollbarMouseDown(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)}}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,r=n.get(131),s=kL._getVerticalOffsetForPosition(this._modelData,t.lineNumber,t.column)-this.getScrollTop(),o=this._modelData.view.getOffsetForColumn(t.lineNumber,t.column)+r.glyphMarginWidth+r.lineNumbersWidth+r.decorationsWidth-this.getScrollLeft();return{top:s,left:o,height:n.get(59)}}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){ys(e,this._configuration.options.get(44))}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()),e.onBeforeAttached();const n=new Pxe(this._id,this._configuration,e,AD.create(),xD.create(this._configuration.options),o=>dc(o),this.languageConfigurationService,this._themeService);t.push(e.onDidChangeDecorations(o=>this._onDidChangeModelDecorations.fire(o))),t.push(e.onDidChangeLanguage(o=>{this._domElement.setAttribute("data-mode-id",e.getLanguageId()),this._onDidChangeModelLanguage.fire(o)})),t.push(e.onDidChangeLanguageConfiguration(o=>this._onDidChangeModelLanguageConfiguration.fire(o))),t.push(e.onDidChangeContent(o=>this._onDidChangeModelContent.fire(o))),t.push(e.onDidChangeOptions(o=>this._onDidChangeModelOptions.fire(o))),t.push(e.onWillDispose(()=>this.setModel(null))),t.push(n.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:{o.reachedMaxCursorCount&&this._notificationService.warn(C("cursors.maximum","The number of cursors has been limited to {0}.",r1.MAX_CURSOR_COUNT));const a=[];for(let u=0,d=o.selections.length;u{this._paste("keyboard",s,o,a,l)},type:s=>{this._type("keyboard",s)},compositionType:(s,o,a,l)=>{this._compositionType("keyboard",s,o,a,l)},startComposition:()=>{this._startComposition()},endComposition:()=>{this._endComposition("keyboard")},cut:()=>{this._cut("keyboard")}}:t={paste:(s,o,a,l)=>{const c={text:s,pasteOnNewLine:o,multicursorText:a,mode:l};this._commandService.executeCommand("paste",c)},type:s=>{const o={text:s};this._commandService.executeCommand("type",o)},compositionType:(s,o,a,l)=>{if(a||l){const c={text:s,replacePrevCharCnt:o,replaceNextCharCnt:a,positionDelta:l};this._commandService.executeCommand("compositionType",c)}else{const c={text:s,replaceCharCnt:o};this._commandService.executeCommand("replacePreviousChar",c)}},startComposition:()=>{this._commandService.executeCommand("compositionStart",{})},endComposition:()=>{this._commandService.executeCommand("compositionEnd",{})},cut:()=>{this._commandService.executeCommand("cut",{})}};const n=new dk(e.coordinatesConverter);return n.onKeyDown=s=>this._onKeyDown.fire(s),n.onKeyUp=s=>this._onKeyUp.fire(s),n.onContextMenu=s=>this._onContextMenu.fire(s),n.onMouseMove=s=>this._onMouseMove.fire(s),n.onMouseLeave=s=>this._onMouseLeave.fire(s),n.onMouseDown=s=>this._onMouseDown.fire(s),n.onMouseUp=s=>this._onMouseUp.fire(s),n.onMouseDrag=s=>this._onMouseDrag.fire(s),n.onMouseDrop=s=>this._onMouseDrop.fire(s),n.onMouseDropCanceled=s=>this._onMouseDropCanceled.fire(s),n.onMouseWheel=s=>this._onMouseWheel.fire(s),[new DEe(t,this._configuration,this._themeService.getColorTheme(),e,n,this._overflowWidgetsDomNode),!0]}_postDetachModelCleanup(e){e&&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}};Bv=jxe([Sd(3,_n),Sd(4,Zn),Sd(5,rr),Sd(6,Yt),Sd(7,Ei),Sd(8,or),Sd(9,zo),Sd(10,Ss),Sd(11,yt)],Bv);class Gq extends Ne{constructor(){super(),this._onDidChangeToTrue=this._register(new be),this.onDidChangeToTrue=this._onDidChangeToTrue.event,this._onDidChangeToFalse=this._register(new be),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 Kxe extends Ne{constructor(e,t){super(),this._editor=e,t.createKey("editorId",e.getId()),this._editorSimpleInput=ie.editorSimpleInput.bindTo(t),this._editorFocus=ie.focus.bindTo(t),this._textInputFocus=ie.textInputFocus.bindTo(t),this._editorTextFocus=ie.editorTextFocus.bindTo(t),this._editorTabMovesFocus=ie.tabMovesFocus.bindTo(t),this._editorReadonly=ie.readOnly.bindTo(t),this._inDiffEditor=ie.inDiffEditor.bindTo(t),this._editorColumnSelection=ie.columnSelection.bindTo(t),this._hasMultipleSelections=ie.hasMultipleSelections.bindTo(t),this._hasNonEmptySelection=ie.hasNonEmptySelection.bindTo(t),this._canUndo=ie.canUndo.bindTo(t),this._canRedo=ie.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._updateFromConfig(),this._updateFromSelection(),this._updateFromFocus(),this._updateFromModel(),this._editorSimpleInput.set(this._editor.isSimpleWidget)}_updateFromConfig(){const e=this._editor.getOptions();this._editorTabMovesFocus.set(e.get(130)),this._editorReadonly.set(e.get(81)),this._inDiffEditor.set(e.get(54)),this._editorColumnSelection.set(e.get(18))}_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(Boolean(e&&e.canUndo())),this._canRedo.set(Boolean(e&&e.canRedo()))}}class Yxe extends Ne{constructor(e,t,n){super(),this._editor=e,this._contextKeyService=t,this._languageFeaturesService=n,this._langId=ie.languageId.bindTo(t),this._hasCompletionItemProvider=ie.hasCompletionItemProvider.bindTo(t),this._hasCodeActionsProvider=ie.hasCodeActionsProvider.bindTo(t),this._hasCodeLensProvider=ie.hasCodeLensProvider.bindTo(t),this._hasDefinitionProvider=ie.hasDefinitionProvider.bindTo(t),this._hasDeclarationProvider=ie.hasDeclarationProvider.bindTo(t),this._hasImplementationProvider=ie.hasImplementationProvider.bindTo(t),this._hasTypeDefinitionProvider=ie.hasTypeDefinitionProvider.bindTo(t),this._hasHoverProvider=ie.hasHoverProvider.bindTo(t),this._hasDocumentHighlightProvider=ie.hasDocumentHighlightProvider.bindTo(t),this._hasDocumentSymbolProvider=ie.hasDocumentSymbolProvider.bindTo(t),this._hasReferenceProvider=ie.hasReferenceProvider.bindTo(t),this._hasRenameProvider=ie.hasRenameProvider.bindTo(t),this._hasSignatureHelpProvider=ie.hasSignatureHelpProvider.bindTo(t),this._hasInlayHintsProvider=ie.hasInlayHintsProvider.bindTo(t),this._hasDocumentFormattingProvider=ie.hasDocumentFormattingProvider.bindTo(t),this._hasDocumentSelectionFormattingProvider=ie.hasDocumentSelectionFormattingProvider.bindTo(t),this._hasMultipleDocumentFormattingProvider=ie.hasMultipleDocumentFormattingProvider.bindTo(t),this._hasMultipleDocumentSelectionFormattingProvider=ie.hasMultipleDocumentSelectionFormattingProvider.bindTo(t),this._isInWalkThrough=ie.isInWalkThroughSnippet.bindTo(t);const r=()=>this._update();this._register(e.onDidChangeModel(r)),this._register(e.onDidChangeModelLanguage(r)),this._register(n.completionProvider.onDidChange(r)),this._register(n.codeActionProvider.onDidChange(r)),this._register(n.codeLensProvider.onDidChange(r)),this._register(n.definitionProvider.onDidChange(r)),this._register(n.declarationProvider.onDidChange(r)),this._register(n.implementationProvider.onDidChange(r)),this._register(n.typeDefinitionProvider.onDidChange(r)),this._register(n.hoverProvider.onDidChange(r)),this._register(n.documentHighlightProvider.onDidChange(r)),this._register(n.documentSymbolProvider.onDidChange(r)),this._register(n.referenceProvider.onDidChange(r)),this._register(n.renameProvider.onDidChange(r)),this._register(n.documentFormattingEditProvider.onDidChange(r)),this._register(n.documentRangeFormattingEditProvider.onDidChange(r)),this._register(n.signatureHelpProvider.onDidChange(r)),this._register(n.inlayHintsProvider.onDidChange(r)),r()}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===sn.walkThroughSnippet)})}}class Zxe extends Ne{constructor(e){super(),this._onChange=this._register(new be),this.onChange=this._onChange.event,this._hasFocus=!1,this._domFocusTracker=this._register(D_(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}}const Xxe=encodeURIComponent("");function MD(i){return Xxe+encodeURIComponent(i.toString())+Qxe}const Jxe=encodeURIComponent('');function tLe(i){return Jxe+encodeURIComponent(i.toString())+eLe}_i((i,e)=>{const t=i.getColor(FU);t&&e.addRule(`.monaco-editor .squiggly-error { border-bottom: 4px double ${t}; }`);const n=i.getColor(zh);n&&e.addRule(`.monaco-editor .squiggly-error { background: url("data:image/svg+xml,${MD(n)}") repeat-x bottom left; }`);const r=i.getColor(KSe);r&&e.addRule(`.monaco-editor .squiggly-error::before { display: block; content: ''; width: 100%; height: 100%; background: ${r}; }`);const s=i.getColor(US);s&&e.addRule(`.monaco-editor .squiggly-warning { border-bottom: 4px double ${s}; }`);const o=i.getColor(El);o&&e.addRule(`.monaco-editor .squiggly-warning { background: url("data:image/svg+xml,${MD(o)}") repeat-x bottom left; }`);const a=i.getColor(YSe);a&&e.addRule(`.monaco-editor .squiggly-warning::before { display: block; content: ''; width: 100%; height: 100%; background: ${a}; }`);const l=i.getColor(u6);l&&e.addRule(`.monaco-editor .squiggly-info { border-bottom: 4px double ${l}; }`);const c=i.getColor(ma);c&&e.addRule(`.monaco-editor .squiggly-info { background: url("data:image/svg+xml,${MD(c)}") repeat-x bottom left; }`);const u=i.getColor(ZSe);u&&e.addRule(`.monaco-editor .squiggly-info::before { display: block; content: ''; width: 100%; height: 100%; background: ${u}; }`);const d=i.getColor(QSe);d&&e.addRule(`.monaco-editor .squiggly-hint { border-bottom: 2px dotted ${d}; }`);const h=i.getColor(XSe);h&&e.addRule(`.monaco-editor .squiggly-hint { background: url("data:image/svg+xml,${tLe(h)}") no-repeat bottom left; }`);const f=i.getColor(J4e);f&&e.addRule(`.monaco-editor.showUnused .squiggly-inline-unnecessary { opacity: ${f.rgba.a}; }`);const g=i.getColor(Q4e);g&&e.addRule(`.monaco-editor.showUnused .squiggly-unnecessary { border-bottom: 2px dashed ${g}; }`);const p=i.getColor($h)||"inherit";e.addRule(`.monaco-editor.showDeprecated .squiggly-inline-deprecated { text-decoration: line-through; text-decoration-color: ${p}}`)});const fpt="";class si{constructor(e,t,n){const r=s=>this.emitter.fire(s);this.emitter=new be({onFirstListenerAdd:()=>e.addEventListener(t,r,n),onLastListenerRemove:()=>e.removeEventListener(t,r,n)})}get event(){return this.emitter.event}dispose(){this.emitter.dispose()}}function Kq(i){return i.preventDefault(),i.stopPropagation(),i}const gpt="";var d1=globalThis&&globalThis.__decorate||function(i,e,t,n){var r=arguments.length,s=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(s=(r<3?o(s):r>3?o(e,t,s):o(e,t))||s);return r>3&&s&&Object.defineProperty(e,t,s),s};let nLe=!1;var jk;(function(i){i.North="north",i.South="south",i.East="east",i.West="west"})(jk||(jk={}));let iLe=4;const rLe=new be;let sLe=300;const oLe=new be;class PD{constructor(){this.disposables=new Je}get onPointerMove(){return this.disposables.add(new si(window,"mousemove")).event}get onPointerUp(){return this.disposables.add(new si(window,"mouseup")).event}dispose(){this.disposables.dispose()}}d1([kr],PD.prototype,"onPointerMove",null),d1([kr],PD.prototype,"onPointerUp",null);class FD{constructor(e){this.el=e,this.disposables=new Je}get onPointerMove(){return this.disposables.add(new si(this.el,bi.Change)).event}get onPointerUp(){return this.disposables.add(new si(this.el,bi.End)).event}dispose(){this.disposables.dispose()}}d1([kr],FD.prototype,"onPointerMove",null),d1([kr],FD.prototype,"onPointerUp",null);class qk{constructor(e){this.factory=e}get onPointerMove(){return this.factory.onPointerMove}get onPointerUp(){return this.factory.onPointerUp}dispose(){}}d1([kr],qk.prototype,"onPointerMove",null),d1([kr],qk.prototype,"onPointerUp",null);const Yq="pointer-events-disabled";class Ls extends Ne{constructor(e,t,n){super(),this.hoverDelay=sLe,this.hoverDelayer=this._register(new tu(this.hoverDelay)),this._state=3,this.onDidEnablementChange=this._register(new be),this._onDidStart=this._register(new be),this._onDidChange=this._register(new be),this._onDidReset=this._register(new be),this._onDidEnd=this._register(new be),this.orthogonalStartSashDisposables=this._register(new Je),this.orthogonalStartDragHandleDisposables=this._register(new Je),this.orthogonalEndSashDisposables=this._register(new Je),this.orthogonalEndDragHandleDisposables=this._register(new Je),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=$e(e,Ze(".monaco-sash")),n.orthogonalEdge&&this.el.classList.add(`orthogonal-edge-${n.orthogonalEdge}`),gn&&this.el.classList.add("mac");const r=this._register(new si(this.el,"mousedown")).event;this._register(r(d=>this.onPointerStart(d,new PD),this));const s=this._register(new si(this.el,"dblclick")).event;this._register(s(this.onPointerDoublePress,this));const o=this._register(new si(this.el,"mouseenter")).event;this._register(o(()=>Ls.onMouseEnter(this)));const a=this._register(new si(this.el,"mouseleave")).event;this._register(a(()=>Ls.onMouseLeave(this))),this._register(ei.addTarget(this.el));const l=kt.map(this._register(new si(this.el,bi.Start)).event,d=>{var h;return Object.assign(Object.assign({},d),{target:(h=d.initialTarget)!==null&&h!==void 0?h:null})});this._register(l(d=>this.onPointerStart(d,new FD(this.el)),this));const c=this._register(new si(this.el,bi.Tap)).event,u=kt.map(kt.filter(kt.debounce(c,(d,h)=>{var f;return{event:h,count:((f=d==null?void 0:d.count)!==null&&f!==void 0?f:0)+1}},250),({count:d})=>d===2),({event:d})=>{var h;return Object.assign(Object.assign({},d),{target:(h=d.initialTarget)!==null&&h!==void 0?h:null})});this._register(u(this.onPointerDoublePress,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=iLe,this._register(rLe.event(d=>{this.size=d,this.layout()}))),this._register(oLe.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",nLe),this.layout()}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.orthogonalStartDragHandleDisposables.clear(),this.orthogonalStartSashDisposables.clear(),e){const t=n=>{this.orthogonalStartDragHandleDisposables.clear(),n!==0&&(this._orthogonalStartDragHandle=$e(this.el,Ze(".orthogonal-drag-handle.start")),this.orthogonalStartDragHandleDisposables.add(fn(()=>this._orthogonalStartDragHandle.remove())),this.orthogonalStartDragHandleDisposables.add(new si(this._orthogonalStartDragHandle,"mouseenter")).event(()=>Ls.onMouseEnter(e),void 0,this.orthogonalStartDragHandleDisposables),this.orthogonalStartDragHandleDisposables.add(new si(this._orthogonalStartDragHandle,"mouseleave")).event(()=>Ls.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.orthogonalEndDragHandleDisposables.clear(),this.orthogonalEndSashDisposables.clear(),e){const t=n=>{this.orthogonalEndDragHandleDisposables.clear(),n!==0&&(this._orthogonalEndDragHandle=$e(this.el,Ze(".orthogonal-drag-handle.end")),this.orthogonalEndDragHandleDisposables.add(fn(()=>this._orthogonalEndDragHandle.remove())),this.orthogonalEndDragHandleDisposables.add(new si(this._orthogonalEndDragHandle,"mouseenter")).event(()=>Ls.onMouseEnter(e),void 0,this.orthogonalEndDragHandleDisposables),this.orthogonalEndDragHandleDisposables.add(new si(this._orthogonalEndDragHandle,"mouseleave")).event(()=>Ls.onMouseLeave(e),void 0,this.orthogonalEndDragHandleDisposables))};this.orthogonalEndSashDisposables.add(e.onDidEnablementChange.event(t,this)),t(e.state)}this._orthogonalEndSash=e}onPointerStart(e,t){Xn.stop(e);let n=!1;if(!e.__orthogonalSashEvent){const g=this.getOrthogonalSash(e);g&&(n=!0,e.__orthogonalSashEvent=!0,g.onPointerStart(e,new qk(t)))}if(this.linkedSash&&!e.__linkedSashEvent&&(e.__linkedSashEvent=!0,this.linkedSash.onPointerStart(e,new qk(t))),!this.state)return;const r=dSe("iframe");for(const g of r)g.classList.add(Yq);const s=e.pageX,o=e.pageY,a=e.altKey,l={startX:s,currentX:s,startY:o,currentY:o,altKey:a};this.el.classList.add("active"),this._onDidStart.fire(l);const c=Ka(this.el),u=()=>{let g="";n?g="all-scroll":this.orientation===1?this.state===1?g="s-resize":this.state===2?g="n-resize":g=gn?"row-resize":"ns-resize":this.state===1?g="e-resize":this.state===2?g="w-resize":g=gn?"col-resize":"ew-resize",c.textContent=`* { cursor: ${g} !important; }`},d=new Je;u(),n||this.onDidEnablementChange.event(u,null,d);const h=g=>{Xn.stop(g,!1);const p={startX:s,currentX:g.pageX,startY:o,currentY:g.pageY,altKey:a};this._onDidChange.fire(p)},f=g=>{Xn.stop(g,!1),this.el.removeChild(c),this.el.classList.remove("active"),this._onDidEnd.fire(),d.dispose();for(const p of r)p.classList.remove(Yq)};t.onPointerMove(h,null,d),t.onPointerUp(f,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&&Ls.onMouseEnter(e.linkedSash,!0)}static onMouseLeave(e,t=!1){e.hoverDelayer.cancel(),e.el.classList.remove("hover"),!t&&e.linkedSash&&Ls.onMouseLeave(e.linkedSash,!0)}clearSashHoverState(){Ls.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){if(!(!e.target||!(e.target instanceof HTMLElement))&&e.target.classList.contains("orthogonal-drag-handle"))return e.target.classList.contains("start")?this.orthogonalStartSash:this.orthogonalEndSash}dispose(){super.dispose(),this.el.remove()}}class rf{constructor(e,t,n){this._visiblePosition=e,this._visiblePositionScrollDelta=t,this._cursorPosition=n}static capture(e){let t=null,n=0;if(e.getScrollTop()!==0){const r=e.getVisibleRanges();if(r.length>0){t=r[0].getStartPosition();const s=e.getTopForPosition(t.lineNumber,t.column);n=e.getScrollTop()-s}}return new rf(t,n,e.getPosition())}restore(e){if(this._visiblePosition){const t=e.getTopForPosition(this._visiblePosition.lineNumber,this._visiblePosition.column);e.setScrollTop(t+this._visiblePositionScrollDelta)}}restoreRelativeVerticalPositionOfCursor(e){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)}}const ppt="",Zq={RESOURCES:"ResourceURLs",DOWNLOAD_URL:"DownloadURL",FILES:"Files",TEXT:fc.text,TERMINALS:"Terminals"};class aLe{constructor(e){this.data=e}update(){}getData(){return this.data}}const kd={CurrentDragAndDropData:void 0},mpt="";class _u extends Ne{constructor(e,t,n={}){super(),this.options=n,this._context=e||this,this._action=t,t instanceof Ho&&this._register(t.onDidChange(r=>{this.element&&this.handleActionChangeEvent(r)}))}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 N_)),this._actionRunner}set actionRunner(e){this._actionRunner=e}getAction(){return this._action}isEnabled(){return this._action.enabled}setActionContext(e){this._context=e}render(e){const t=this.element=e;this._register(ei.addTarget(e));const n=this.options&&this.options.draggable;n&&(e.draggable=!0,ua&&this._register(Xe(e,Nt.DRAG_START,r=>{var s;return(s=r.dataTransfer)===null||s===void 0?void 0:s.setData(Zq.TEXT,this._action.label)}))),this._register(Xe(t,bi.Tap,r=>this.onClick(r,!0))),this._register(Xe(t,Nt.MOUSE_DOWN,r=>{n||Xn.stop(r,!0),this._action.enabled&&r.button===0&&t.classList.add("active")})),gn&&this._register(Xe(t,Nt.CONTEXT_MENU,r=>{r.button===0&&r.ctrlKey===!0&&this.onClick(r)})),this._register(Xe(t,Nt.CLICK,r=>{Xn.stop(r,!0),this.options&&this.options.isMenu||this.onClick(r)})),this._register(Xe(t,Nt.DBLCLICK,r=>{Xn.stop(r,!0)})),[Nt.MOUSE_UP,Nt.MOUSE_OUT].forEach(r=>{this._register(Xe(t,r,s=>{Xn.stop(s),t.classList.remove("active")}))})}onClick(e,t=!1){var n;Xn.stop(e,!0);const r=sa(this._context)?!((n=this.options)===null||n===void 0)&&n.useEventAsContext?e:{preserveFocus:t}:this._context;this.actionRunner.run(this._action,r)}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(){}updateTooltip(){}updateClass(){}updateChecked(){}dispose(){this.element&&(this.element.remove(),this.element=void 0),super.dispose()}}class Vv extends _u{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=$e(this.element,Ze("a.action-label"))),this.label&&(this._action.id===Ya.ID?this.label.setAttribute("role","presentation"):this.options.isMenu?this.label.setAttribute("role","menuitem"):this.label.setAttribute("role","button")),this.options.label&&this.options.keybinding&&this.element&&($e(this.element,Ze("span.keybinding")).textContent=this.options.keybinding),this.updateClass(),this.updateLabel(),this.updateTooltip(),this.updateEnabled(),this.updateChecked()}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.getAction().label)}updateTooltip(){let e=null;this.getAction().tooltip?e=this.getAction().tooltip:!this.options.label&&this.getAction().label&&this.options.icon&&(e=this.getAction().label,this.options.keybinding&&(e=C({key:"titleLabel",comment:["action title","action keybinding"]},"{0} ({1})",e,this.options.keybinding))),e&&this.label&&(this.label.title=e)}updateClass(){this.cssClass&&this.label&&this.label.classList.remove(...this.cssClass.split(" ")),this.options.icon?(this.cssClass=this.getAction().class,this.label&&(this.label.classList.add("codicon"),this.cssClass&&this.label.classList.add(...this.cssClass.split(" "))),this.updateEnabled()):this.label&&this.label.classList.remove("codicon")}updateEnabled(){this.getAction().enabled?(this.label&&(this.label.removeAttribute("aria-disabled"),this.label.classList.remove("disabled")),this.element&&this.element.classList.remove("disabled")):(this.label&&(this.label.setAttribute("aria-disabled","true"),this.label.classList.add("disabled")),this.element&&this.element.classList.add("disabled"))}updateChecked(){this.label&&(this.getAction().checked?this.label.classList.add("checked"):this.label.classList.remove("checked"))}}var lLe=globalThis&&globalThis.__awaiter||function(i,e,t,n){function r(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(u){try{c(n.next(u))}catch(d){o(d)}}function l(u){try{c(n.throw(u))}catch(d){o(d)}}function c(u){u.done?s(u.value):r(u.value).then(a,l)}c((n=n.apply(i,e||[])).next())})};class bu extends Ne{constructor(e,t={}){var n,r,s,o,a,l;super(),this.triggerKeyDown=!1,this.focusable=!0,this._onDidBlur=this._register(new be),this.onDidBlur=this._onDidBlur.event,this._onDidCancel=this._register(new be({onFirstListenerAdd:()=>this.cancelHasListener=!0})),this.onDidCancel=this._onDidCancel.event,this.cancelHasListener=!1,this._onDidRun=this._register(new be),this.onDidRun=this._onDidRun.event,this._onBeforeRun=this._register(new be),this.onBeforeRun=this._onBeforeRun.event,this.options=t,this._context=(n=t.context)!==null&&n!==void 0?n:null,this._orientation=(r=this.options.orientation)!==null&&r!==void 0?r:0,this._triggerKeys={keyDown:(o=(s=this.options.triggerKeys)===null||s===void 0?void 0:s.keyDown)!==null&&o!==void 0?o:!1,keys:(l=(a=this.options.triggerKeys)===null||a===void 0?void 0:a.keys)!==null&&l!==void 0?l:[3,10]},this.options.actionRunner?this._actionRunner=this.options.actionRunner:(this._actionRunner=new N_,this._register(this._actionRunner)),this._register(this._actionRunner.onDidRun(d=>this._onDidRun.fire(d))),this._register(this._actionRunner.onBeforeRun(d=>this._onBeforeRun.fire(d))),this._actionIds=[],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 c,u;switch(this._orientation){case 0:c=[15],u=[17];break;case 1:c=[16],u=[18],this.domNode.className+=" vertical";break}this._register(Xe(this.domNode,Nt.KEY_DOWN,d=>{const h=new ki(d);let f=!0;const g=typeof this.focusedItem=="number"?this.viewItems[this.focusedItem]:void 0;c&&(h.equals(c[0])||h.equals(c[1]))?f=this.focusPrevious():u&&(h.equals(u[0])||h.equals(u[1]))?f=this.focusNext():h.equals(9)&&this.cancelHasListener?this._onDidCancel.fire():h.equals(14)?f=this.focusFirst():h.equals(13)?f=this.focusLast():h.equals(2)&&g instanceof _u&&g.trapsArrowNavigation?f=this.focusNext():this.isTriggerKeyEvent(h)?this._triggerKeys.keyDown?this.doTrigger(h):this.triggerKeyDown=!0:f=!1,f&&(h.preventDefault(),h.stopPropagation())})),this._register(Xe(this.domNode,Nt.KEY_UP,d=>{const h=new ki(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(D_(this.domNode)),this._register(this.focusTracker.onDidBlur(()=>{(I_()===this.domNode||!ld(I_(),this.domNode))&&(this._onDidBlur.fire(),this.focusedItem=void 0,this.previouslyFocusedItem=void 0,this.triggerKeyDown=!1)})),this._register(this.focusTracker.onDidFocus(()=>this.updateFocusedItem())),this.actionsList=document.createElement("ul"),this.actionsList.className="actions-container",this.actionsList.setAttribute("role","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","toolbar"):this.actionsList.setAttribute("role","presentation")}setFocusable(e){if(this.focusable=e,this.focusable){const t=this.viewItems.find(n=>n instanceof _u&&n.isEnabled());t instanceof _u&&t.setFocusable(!0)}else this.viewItems.forEach(t=>{t instanceof _u&&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){e&&(this._actionRunner=e,this.viewItems.forEach(t=>t.actionRunner=e))}getContainer(){return this.domNode}push(e,t={}){const n=Array.isArray(e)?e:[e];let r=xg(t.index)?t.index:null;n.forEach(s=>{const o=document.createElement("li");o.className="action-item",o.setAttribute("role","presentation"),this.options.allowContextMenu||this._register(Xe(o,Nt.CONTEXT_MENU,l=>{Xn.stop(l,!0)}));let a;this.options.actionViewItemProvider&&(a=this.options.actionViewItemProvider(s)),a||(a=new Vv(this.context,s,t)),a.actionRunner=this._actionRunner,a.setActionContext(this.context),a.render(o),this.focusable&&a instanceof _u&&this.viewItems.length===0&&a.setFocusable(!0),r===null||r<0||r>=this.actionsList.children.length?(this.actionsList.appendChild(o),this.viewItems.push(a),this._actionIds.push(s.id)):(this.actionsList.insertBefore(o,this.actionsList.children[r]),this.viewItems.splice(r,0,a),this._actionIds.splice(r,0,s.id),r++)}),typeof this.focusedItem=="number"&&this.focus(this.focusedItem),this.refreshRole()}clear(){Nn(this.viewItems),this.viewItems=[],this._actionIds=[],Dr(this.actionsList),this.refreshRole()}length(){return this.viewItems.length}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 r=this.viewItems.findIndex(s=>s.isEnabled());this.focusedItem=r===-1?void 0:r,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());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());return this.updateFocus(!0),!0}updateFocus(e,t,n=!1){var r;typeof this.focusedItem>"u"&&this.actionsList.focus({preventScroll:t}),this.previouslyFocusedItem!==void 0&&this.previouslyFocusedItem!==this.focusedItem&&((r=this.viewItems[this.previouslyFocusedItem])===null||r===void 0||r.blur());const s=this.focusedItem!==void 0&&this.viewItems[this.focusedItem];if(s){let o=!0;Ry(s.focus)||(o=!1),this.options.focusOnlyEnabledItems&&Ry(s.isEnabled)&&!s.isEnabled()&&(o=!1),o?(n||this.previouslyFocusedItem!==this.focusedItem)&&(s.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 _u){const n=t._context===null||t._context===void 0?e:t._context;this.run(t._action,n)}}run(e,t){return lLe(this,void 0,void 0,function*(){yield this._actionRunner.run(e,t)})}dispose(){Nn(this.viewItems),this.viewItems=[],this._actionIds=[],this.getContainer().remove(),super.dispose()}}const cLe={IconContribution:"base.contributions.icons"};var Xq;(function(i){function e(t,n){let r=t.defaults;for(;hi.isThemeIcon(r);){const s=Cp.getIcon(r.id);if(!s)return;r=s.defaults}return r}i.getDefinition=e})(Xq||(Xq={}));class uLe{constructor(){this._onDidChange=new be,this.onDidChange=this._onDidChange.event,this.iconSchema={definitions:{icons:{type:"object",properties:{fontId:{type:"string",description:C("iconDefinition.fontId","The id of the font to use. If not set, the font that is defined first is used.")},fontCharacter:{type:"string",description:C("iconDefinition.fontCharacter","The font character associated with the icon definition.")}},additionalProperties:!1,defaultSnippets:[{body:{fontCharacter:"\\\\e030"}}]}},type:"object",properties:{}},this.iconReferenceSchema={type:"string",pattern:`^${Gs.iconNameExpression}$`,enum:[],enumDescriptions:[]},this.iconsById={},this.iconFontsById={}}registerIcon(e,t,n,r){const s=this.iconsById[e];if(s){if(n&&!s.description){s.description=n,this.iconSchema.properties[e].markdownDescription=`${n} $(${e})`;const l=this.iconReferenceSchema.enum.indexOf(e);l!==-1&&(this.iconReferenceSchema.enumDescriptions[l]=n),this._onDidChange.fire()}return s}let o={id:e,description:n,defaults:t,deprecationMessage:r};this.iconsById[e]=o;let a={$ref:"#/definitions/icons"};return r&&(a.deprecationMessage=r),n&&(a.markdownDescription=`${n}: $(${e})`),this.iconSchema.properties[e]=a,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=(s,o)=>s.id.localeCompare(o.id),t=s=>{for(;hi.isThemeIcon(s.defaults);)s=this.iconsById[s.defaults.id];return`codicon codicon-${s?s.id:""}`};let n=[];n.push("| preview | identifier | default codicon ID | description"),n.push("| ----------- | --------------------------------- | --------------------------------- | --------------------------------- |");const r=Object.keys(this.iconsById).map(s=>this.iconsById[s]);for(const s of r.filter(o=>!!o.description).sort(e))n.push(`||${s.id}|${hi.isThemeIcon(s.defaults)?s.defaults.id:s.id}|${s.description||""}|`);n.push("| preview | identifier "),n.push("| ----------- | --------------------------------- |");for(const s of r.filter(o=>!hi.isThemeIcon(o.defaults)).sort(e))n.push(`||${s.id}|`);return n.join(` +`)}}const Cp=new uLe;sr.add(cLe.IconContribution,Cp);function Ar(i,e,t,n){return Cp.registerIcon(i,e,t,n)}function Qq(){return Cp}function dLe(){for(const i of k.getAll())Cp.registerIcon(i.id,i.definition,i.description)}dLe();const Jq="vscode://schemas/icons";let eG=sr.as(WS.JSONContribution);eG.registerSchema(Jq,Cp.getIconSchema());const tG=new ri(()=>eG.notifySchemaChanged(Jq),200);Cp.onDidChange(()=>{tG.isScheduled()||tG.schedule()});const nG=Ar("widget-close",k.close,C("widgetClose","Icon for the close action in widgets."));Ar("goto-previous-location",k.arrowUp,C("previousChangeIcon","Icon for goto previous editor location.")),Ar("goto-next-location",k.arrowDown,C("nextChangeIcon","Icon for goto next editor location.")),hi.modify(k.sync,"spin"),hi.modify(k.loading,"spin");var hLe=globalThis&&globalThis.__decorate||function(i,e,t,n){var r=arguments.length,s=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(s=(r<3?o(s):r>3?o(e,t,s):o(e,t))||s);return r>3&&s&&Object.defineProperty(e,t,s),s},fLe=globalThis&&globalThis.__param||function(i,e){return function(t,n){e(t,n,i)}},gLe=globalThis&&globalThis.__awaiter||function(i,e,t,n){function r(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(u){try{c(n.next(u))}catch(d){o(d)}}function l(u){try{c(n.throw(u))}catch(d){o(d)}}function c(u){u.done?s(u.value):r(u.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},BD;const Gk=3;class Wv{constructor(e,t,n,r){this.originalLineStart=e,this.originalLineEnd=t,this.modifiedLineStart=n,this.modifiedLineEnd=r}getType(){return this.originalLineStart===0?1:this.modifiedLineStart===0?2:0}}class VD{constructor(e){this.entries=e}}const pLe=Ar("diff-review-insert",k.add,C("diffReviewInsertIcon","Icon for 'Insert' in diff review.")),mLe=Ar("diff-review-remove",k.remove,C("diffReviewRemoveIcon","Icon for 'Remove' in diff review.")),_Le=Ar("diff-review-close",k.close,C("diffReviewCloseIcon","Icon for 'Close' in diff review."));let Kk=class jm extends Ne{constructor(e,t){super(),this._languageService=t,this._width=0,this._diffEditor=e,this._isVisible=!1,this.shadow=Rn(document.createElement("div")),this.shadow.setClassName("diff-review-shadow"),this.actionBarContainer=Rn(document.createElement("div")),this.actionBarContainer.setClassName("diff-review-actions"),this._actionBar=this._register(new bu(this.actionBarContainer.domNode)),this._actionBar.push(new Ho("diffreview.close",C("label.close","Close"),"close-diff-review "+hi.asClassName(_Le),!0,()=>gLe(this,void 0,void 0,function*(){return this.hide()})),{label:!1,icon:!0}),this.domNode=Rn(document.createElement("div")),this.domNode.setClassName("diff-review monaco-editor-background"),this._content=Rn(document.createElement("div")),this._content.setClassName("diff-review-content"),this._content.setAttribute("role","code"),this.scrollbar=this._register(new dv(this._content.domNode,{})),this.domNode.domNode.appendChild(this.scrollbar.getDomNode()),this._register(e.onDidUpdateDiff(()=>{this._isVisible&&(this._diffs=this._compute(),this._render())})),this._register(e.getModifiedEditor().onDidChangeCursorPosition(()=>{this._isVisible&&this._render()})),this._register(Zr(this.domNode.domNode,"click",n=>{n.preventDefault();const r=J$(n.target,"diff-review-row");r&&this._goToRow(r)})),this._register(Zr(this.domNode.domNode,"keydown",n=>{(n.equals(18)||n.equals(2066)||n.equals(530))&&(n.preventDefault(),this._goToRow(this._getNextRow())),(n.equals(16)||n.equals(2064)||n.equals(528))&&(n.preventDefault(),this._goToRow(this._getPrevRow())),(n.equals(9)||n.equals(2057)||n.equals(521)||n.equals(1033))&&(n.preventDefault(),this.hide()),(n.equals(10)||n.equals(3))&&(n.preventDefault(),this.accept())})),this._diffs=[],this._currentDiff=null}prev(){let e=0;if(this._isVisible||(this._diffs=this._compute()),this._isVisible){let n=-1;for(let r=0,s=this._diffs.length;r0){const T=e[c-1];T.originalEndLineNumber===0?w=T.originalStartLineNumber+1:w=T.originalEndLineNumber+1,T.modifiedEndLineNumber===0?E=T.modifiedStartLineNumber+1:E=T.modifiedEndLineNumber+1}let I=b-Gk+1,x=v-Gk+1;if(Iw){const T=w-I;I=I+T,x=x+T}if(x>E){const T=E-x;I=I+T,x=x+T}m[_++]=new Wv(b,I,v,x)}r[s++]=new VD(m)}let o=r[0].entries;const a=[];let l=0;for(let c=1,u=r.length;cd)&&(d=N),P!==0&&(h===0||Pf)&&(f=$)}const g=document.createElement("div");g.className="diff-review-row";const p=document.createElement("div");p.className="diff-review-cell diff-review-summary";const m=d-u+1,_=f-h+1;p.appendChild(document.createTextNode(`${a+1}/${this._diffs.length}: @@ -${u},${m} +${h},${_} @@`)),g.setAttribute("data-line",String(h));const b=x=>x===0?C("no_lines_changed","no lines changed"):x===1?C("one_line_changed","1 line changed"):C("more_lines_changed","{0} lines changed",x),v=b(m),w=b(_);g.setAttribute("aria-label",C({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}",a+1,this._diffs.length,u,v,h,w)),g.appendChild(p),g.setAttribute("role","listitem"),c.appendChild(g);const E=t.get(59);let I=h;for(let x=0,T=l.length;xi}),Kk=hLe([fLe(1,Mi)],Kk),_i((i,e)=>{const t=i.getColor(cj);t&&e.addRule(`.monaco-diff-editor .diff-review-line-number { color: ${t}; }`);const n=i.getColor(F_);n&&e.addRule(`.monaco-diff-editor .diff-review-shadow { box-shadow: ${n} 0 -6px 6px -6px inset; }`)});class bLe extends wt{constructor(){super({id:"editor.action.diffReview.next",label:C("editor.action.diffReview.next","Go to Next Difference"),alias:"Go to Next Difference",precondition:ht.has("isInDiffEditor"),kbOpts:{kbExpr:null,primary:65,weight:100}})}run(e,t){const n=iG(e);n&&n.diffReviewNext()}}class vLe extends wt{constructor(){super({id:"editor.action.diffReview.prev",label:C("editor.action.diffReview.prev","Go to Previous Difference"),alias:"Go to Previous Difference",precondition:ht.has("isInDiffEditor"),kbOpts:{kbExpr:null,primary:1089,weight:100}})}run(e,t){const n=iG(e);n&&n.diffReviewPrev()}}function iG(i){const e=i.get(Zn),t=e.listDiffEditors(),n=e.getActiveCodeEditor();if(!n)return null;for(let r=0,s=t.length;rr.modifiedStartLineNumber?C("diff.clipboard.copyDeletedLinesContent.label","Copy deleted lines"):C("diff.clipboard.copyDeletedLinesContent.single.label","Copy deleted line"):r.originalEndLineNumber>r.modifiedStartLineNumber?C("diff.clipboard.copyChangedLinesContent.label","Copy changed lines"):C("diff.clipboard.copyChangedLinesContent.single.label","Copy changed line"),void 0,!0,()=>WD(this,void 0,void 0,function*(){const p=new H(r.originalStartLineNumber,1,r.originalEndLineNumber+1,1),m=r.originalModel.getValueInRange(p);yield this._clipboardService.writeText(m)})));let d=0,h;r.originalEndLineNumber>r.modifiedStartLineNumber&&(h=new Ho("diff.clipboard.copyDeletedLineContent",u?C("diff.clipboard.copyDeletedLineContent.label","Copy deleted line ({0})",r.originalStartLineNumber):C("diff.clipboard.copyChangedLineContent.label","Copy changed line ({0})",r.originalStartLineNumber),void 0,!0,()=>WD(this,void 0,void 0,function*(){const p=r.originalModel.getLineContent(r.originalStartLineNumber+d);if(p===""){const m=r.originalModel.getEndOfLineSequence();yield this._clipboardService.writeText(m===0?` +`:`\r +`)}else yield this._clipboardService.writeText(p)})),c.push(h)),n.getOption(81)||c.push(new Ho("diff.inline.revertChange",C("diff.inline.revertChange.label","Revert this change"),void 0,!0,()=>WD(this,void 0,void 0,function*(){const p=new H(r.originalStartLineNumber,1,r.originalEndLineNumber,r.originalModel.getLineMaxColumn(r.originalEndLineNumber)),m=r.originalModel.getValueInRange(p);if(r.modifiedEndLineNumber===0){const _=n.getModel().getLineMaxColumn(r.modifiedStartLineNumber);n.executeEdits("diffEditor",[{range:new H(r.modifiedStartLineNumber,_,r.modifiedStartLineNumber,_),text:l+m}])}else{const _=n.getModel().getLineMaxColumn(r.modifiedEndLineNumber);n.executeEdits("diffEditor",[{range:new H(r.modifiedStartLineNumber,1,r.modifiedEndLineNumber,_),text:m}])}})));const g=(p,m)=>{this._contextMenuService.showContextMenu({getAnchor:()=>({x:p,y:m}),getActions:()=>(h&&(h.label=u?C("diff.clipboard.copyDeletedLineContent.label","Copy deleted line ({0})",r.originalStartLineNumber+d):C("diff.clipboard.copyChangedLineContent.label","Copy changed line ({0})",r.originalStartLineNumber+d)),c),autoSelectFirstItem:!0})};this._register(Zr(this._diffActions,"mousedown",p=>{const{top:m,height:_}=ss(this._diffActions),b=Math.floor(a/3);p.preventDefault(),g(p.posx,m+_+b)})),this._register(n.onMouseMove(p=>{p.target.type===8||p.target.type===5?p.target.detail.viewZoneId===this._viewZoneId?(this.visibility=!0,d=this._updateLightBulbPosition(this._marginDomNode,p.event.browserEvent.y,a)):this.visibility=!1:this.visibility=!1})),this._register(n.onMouseDown(p=>{p.event.rightButton&&(p.target.type===8||p.target.type===5)&&p.target.detail.viewZoneId===this._viewZoneId&&(p.event.preventDefault(),d=this._updateLightBulbPosition(this._marginDomNode,p.event.browserEvent.y,a),g(p.event.posx,p.event.posy+a))}))}get visibility(){return this._visibility}set visibility(e){this._visibility!==e&&(this._visibility=e,e?this._diffActions.style.visibility="visible":this._diffActions.style.visibility="hidden")}_updateLightBulbPosition(e,t,n){const{top:r}=ss(e),s=t-r,o=Math.floor(s/n),a=o*n;if(this._diffActions.style.top=`${a}px`,this.diff.viewLineCounts){let l=0;for(let c=0;c=0;a--)(o=i[a])&&(s=(r<3?o(s):r>3?o(e,t,s):o(e,t))||s);return r>3&&s&&Object.defineProperty(e,t,s),s},Ed=globalThis&&globalThis.__param||function(i,e){return function(t,n){e(t,n,i)}},HD;class rG{constructor(e,t){this._contextMenuService=e,this._clipboardService=t,this._zones=[],this._inlineDiffMargins=[],this._zonesMap={},this._decorations=[]}getForeignViewZones(e){return e.filter(t=>!this._zonesMap[String(t.id)])}clean(e){this._zones.length>0&&e.changeViewZones(t=>{for(const n of this._zones)t.removeZone(n)}),this._zones=[],this._zonesMap={},this._decorations=e.deltaDecorations(this._decorations,[])}apply(e,t,n,r){const s=r?rf.capture(e):null;e.changeViewZones(o=>{var a;for(const l of this._zones)o.removeZone(l);for(const l of this._inlineDiffMargins)l.dispose();this._zones=[],this._zonesMap={},this._inlineDiffMargins=[];for(let l=0,c=n.zones.length;li});let af=class Rs extends Ne{constructor(e,t,n,r,s,o,a,l,c,u,d,h){super(),this._editorProgressService=h,this._onDidDispose=this._register(new be),this.onDidDispose=this._onDidDispose.event,this._onDidUpdateDiff=this._register(new be),this.onDidUpdateDiff=this._onDidUpdateDiff.event,this._onDidContentSizeChange=this._register(new be),this._lastOriginalWarning=null,this._lastModifiedWarning=null,this._editorWorkerService=s,this._codeEditorService=l,this._contextKeyService=this._register(o.createScoped(e)),this._instantiationService=a.createChild(new $k([Yt,this._contextKeyService])),this._contextKeyService.createKey("isInDiffEditor",!0),this._themeService=c,this._notificationService=u,this._id=++yLe,this._state=0,this._updatingDiffProgress=null,this._domElement=e,t=t||{},this._options=dG(t,{enableSplitViewResizing:!0,renderSideBySide:!0,maxComputationTime:5e3,maxFileSize:50,ignoreTrimWhitespace:!0,renderIndicators:!0,originalEditable:!1,diffCodeLens:!1,renderOverviewRuler:!0,diffWordWrap:"inherit"}),typeof t.isInEmbeddedEditor<"u"?this._contextKeyService.createKey("isInEmbeddedDiffEditor",t.isInEmbeddedEditor):this._contextKeyService.createKey("isInEmbeddedDiffEditor",!1),this._updateDecorationsRunner=this._register(new ri(()=>this._updateDecorations(),0)),this._containerDomElement=document.createElement("div"),this._containerDomElement.className=Rs._getClassName(this._themeService.getColorTheme(),this._options.renderSideBySide),this._containerDomElement.style.position="relative",this._containerDomElement.style.height="100%",this._domElement.appendChild(this._containerDomElement),this._overviewViewportDomElement=Rn(document.createElement("div")),this._overviewViewportDomElement.setClassName("diffViewport"),this._overviewViewportDomElement.setPosition("absolute"),this._overviewDomElement=document.createElement("div"),this._overviewDomElement.className="diffOverview",this._overviewDomElement.style.position="absolute",this._overviewDomElement.appendChild(this._overviewViewportDomElement.domNode),this._register(Zr(this._overviewDomElement,"mousedown",g=>{this._modifiedEditor.delegateVerticalScrollbarMouseDown(g)})),this._options.renderOverviewRuler&&this._containerDomElement.appendChild(this._overviewDomElement),this._originalDomNode=document.createElement("div"),this._originalDomNode.className="editor original",this._originalDomNode.style.position="absolute",this._originalDomNode.style.height="100%",this._containerDomElement.appendChild(this._originalDomNode),this._modifiedDomNode=document.createElement("div"),this._modifiedDomNode.className="editor modified",this._modifiedDomNode.style.position="absolute",this._modifiedDomNode.style.height="100%",this._containerDomElement.appendChild(this._modifiedDomNode),this._beginUpdateDecorationsTimeout=-1,this._currentlyChangingViewZones=!1,this._diffComputationToken=0,this._originalEditorState=new rG(d,r),this._modifiedEditorState=new rG(d,r),this._isVisible=!0,this._isHandlingScrollEvent=!1,this._elementSizeObserver=this._register(new yU(this._containerDomElement,t.dimension)),this._register(this._elementSizeObserver.onDidChange(()=>this._onDidContainerSizeChanged())),t.automaticLayout&&this._elementSizeObserver.startObserving(),this._diffComputationResult=null,this._originalEditor=this._createLeftHandSideEditor(t,n.originalEditor||{}),this._modifiedEditor=this._createRightHandSideEditor(t,n.modifiedEditor||{}),this._originalOverviewRuler=null,this._modifiedOverviewRuler=null,this._reviewPane=a.createInstance(Kk,this),this._containerDomElement.appendChild(this._reviewPane.domNode.domNode),this._containerDomElement.appendChild(this._reviewPane.shadow.domNode),this._containerDomElement.appendChild(this._reviewPane.actionBarContainer.domNode),this._options.renderSideBySide?this._setStrategy(new Ld(this._createDataSource(),this._options.enableSplitViewResizing)):this._setStrategy(new cG(this._createDataSource(),this._options.enableSplitViewResizing)),this._register(c.onDidColorThemeChange(g=>{this._strategy&&this._strategy.applyColors(g)&&this._updateDecorationsRunner.schedule(),this._containerDomElement.className=Rs._getClassName(this._themeService.getColorTheme(),this._options.renderSideBySide)}));const f=Yg.getDiffEditorContributions();for(const g of f)try{this._register(a.createInstance(g.ctor,this))}catch(p){Jt(p)}this._codeEditorService.addDiffEditor(this)}_setState(e){this._state!==e&&(this._state=e,this._updatingDiffProgress&&(this._updatingDiffProgress.done(),this._updatingDiffProgress=null),this._state===1&&(this._updatingDiffProgress=this._editorProgressService.show(!0,1e3)))}diffReviewNext(){this._reviewPane.next()}diffReviewPrev(){this._reviewPane.prev()}static _getClassName(e,t){let n="monaco-diff-editor monaco-editor-background ";return t&&(n+="side-by-side "),n+=PS(e.type),n}_recreateOverviewRulers(){this._options.renderOverviewRuler&&(this._originalOverviewRuler&&(this._overviewDomElement.removeChild(this._originalOverviewRuler.getDomNode()),this._originalOverviewRuler.dispose()),this._originalEditor.hasModel()&&(this._originalOverviewRuler=this._originalEditor.createOverviewRuler("original diffOverviewRuler"),this._overviewDomElement.appendChild(this._originalOverviewRuler.getDomNode())),this._modifiedOverviewRuler&&(this._overviewDomElement.removeChild(this._modifiedOverviewRuler.getDomNode()),this._modifiedOverviewRuler.dispose()),this._modifiedEditor.hasModel()&&(this._modifiedOverviewRuler=this._modifiedEditor.createOverviewRuler("modified diffOverviewRuler"),this._overviewDomElement.appendChild(this._modifiedOverviewRuler.getDomNode())),this._layoutOverviewRulers())}_createLeftHandSideEditor(e,t){const n=this._createInnerEditor(this._instantiationService,this._originalDomNode,this._adjustOptionsForLeftHandSide(e),t);this._register(n.onDidScrollChange(s=>{this._isHandlingScrollEvent||!s.scrollTopChanged&&!s.scrollLeftChanged&&!s.scrollHeightChanged||(this._isHandlingScrollEvent=!0,this._modifiedEditor.setScrollPosition({scrollLeft:s.scrollLeft,scrollTop:s.scrollTop}),this._isHandlingScrollEvent=!1,this._layoutOverviewViewport())})),this._register(n.onDidChangeViewZones(()=>{this._onViewZonesChanged()})),this._register(n.onDidChangeConfiguration(s=>{n.getModel()&&(s.hasChanged(44)&&this._updateDecorationsRunner.schedule(),s.hasChanged(132)&&(this._updateDecorationsRunner.cancel(),this._updateDecorations()))})),this._register(n.onDidChangeHiddenAreas(()=>{this._updateDecorationsRunner.cancel(),this._updateDecorations()})),this._register(n.onDidChangeModelContent(()=>{this._isVisible&&this._beginUpdateDecorationsSoon()}));const r=this._contextKeyService.createKey("isInDiffLeftEditor",n.hasWidgetFocus());return this._register(n.onDidFocusEditorWidget(()=>r.set(!0))),this._register(n.onDidBlurEditorWidget(()=>r.set(!1))),this._register(n.onDidContentSizeChange(s=>{const o=this._originalEditor.getContentWidth()+this._modifiedEditor.getContentWidth()+Rs.ONE_OVERVIEW_WIDTH,a=Math.max(this._modifiedEditor.getContentHeight(),this._originalEditor.getContentHeight());this._onDidContentSizeChange.fire({contentHeight:a,contentWidth:o,contentHeightChanged:s.contentHeightChanged,contentWidthChanged:s.contentWidthChanged})})),n}_createRightHandSideEditor(e,t){const n=this._createInnerEditor(this._instantiationService,this._modifiedDomNode,this._adjustOptionsForRightHandSide(e),t);this._register(n.onDidScrollChange(s=>{this._isHandlingScrollEvent||!s.scrollTopChanged&&!s.scrollLeftChanged&&!s.scrollHeightChanged||(this._isHandlingScrollEvent=!0,this._originalEditor.setScrollPosition({scrollLeft:s.scrollLeft,scrollTop:s.scrollTop}),this._isHandlingScrollEvent=!1,this._layoutOverviewViewport())})),this._register(n.onDidChangeViewZones(()=>{this._onViewZonesChanged()})),this._register(n.onDidChangeConfiguration(s=>{n.getModel()&&(s.hasChanged(44)&&this._updateDecorationsRunner.schedule(),s.hasChanged(132)&&(this._updateDecorationsRunner.cancel(),this._updateDecorations()))})),this._register(n.onDidChangeHiddenAreas(()=>{this._updateDecorationsRunner.cancel(),this._updateDecorations()})),this._register(n.onDidChangeModelContent(()=>{this._isVisible&&this._beginUpdateDecorationsSoon()})),this._register(n.onDidChangeModelOptions(s=>{s.tabSize&&this._updateDecorationsRunner.schedule()}));const r=this._contextKeyService.createKey("isInDiffRightEditor",n.hasWidgetFocus());return this._register(n.onDidFocusEditorWidget(()=>r.set(!0))),this._register(n.onDidBlurEditorWidget(()=>r.set(!1))),this._register(n.onDidContentSizeChange(s=>{const o=this._originalEditor.getContentWidth()+this._modifiedEditor.getContentWidth()+Rs.ONE_OVERVIEW_WIDTH,a=Math.max(this._modifiedEditor.getContentHeight(),this._originalEditor.getContentHeight());this._onDidContentSizeChange.fire({contentHeight:a,contentWidth:o,contentHeightChanged:s.contentHeightChanged,contentWidthChanged:s.contentWidthChanged})})),n}_createInnerEditor(e,t,n,r){return e.createInstance(Bv,t,n,r)}dispose(){this._codeEditorService.removeDiffEditor(this),this._beginUpdateDecorationsTimeout!==-1&&(window.clearTimeout(this._beginUpdateDecorationsTimeout),this._beginUpdateDecorationsTimeout=-1),this._cleanViewZonesAndDecorations(),this._originalOverviewRuler&&(this._overviewDomElement.removeChild(this._originalOverviewRuler.getDomNode()),this._originalOverviewRuler.dispose()),this._modifiedOverviewRuler&&(this._overviewDomElement.removeChild(this._modifiedOverviewRuler.getDomNode()),this._modifiedOverviewRuler.dispose()),this._overviewDomElement.removeChild(this._overviewViewportDomElement.domNode),this._options.renderOverviewRuler&&this._containerDomElement.removeChild(this._overviewDomElement),this._containerDomElement.removeChild(this._originalDomNode),this._originalEditor.dispose(),this._containerDomElement.removeChild(this._modifiedDomNode),this._modifiedEditor.dispose(),this._strategy.dispose(),this._containerDomElement.removeChild(this._reviewPane.domNode.domNode),this._containerDomElement.removeChild(this._reviewPane.shadow.domNode),this._containerDomElement.removeChild(this._reviewPane.actionBarContainer.domNode),this._reviewPane.dispose(),this._domElement.removeChild(this._containerDomElement),this._onDidDispose.fire(),super.dispose()}getId(){return this.getEditorType()+":"+this._id}getEditorType(){return xb.IDiffEditor}getLineChanges(){return this._diffComputationResult?this._diffComputationResult.changes:null}getOriginalEditor(){return this._originalEditor}getModifiedEditor(){return this._modifiedEditor}updateOptions(e){const t=dG(e,this._options),n=LLe(this._options,t);this._options=t;const r=n.ignoreTrimWhitespace||n.renderIndicators,s=this._isVisible&&(n.maxComputationTime||n.maxFileSize);r?this._beginUpdateDecorations():s&&this._beginUpdateDecorationsSoon(),this._modifiedEditor.updateOptions(this._adjustOptionsForRightHandSide(e)),this._originalEditor.updateOptions(this._adjustOptionsForLeftHandSide(e)),this._strategy.setEnableSplitViewResizing(this._options.enableSplitViewResizing),n.renderSideBySide&&(this._options.renderSideBySide?this._setStrategy(new Ld(this._createDataSource(),this._options.enableSplitViewResizing)):this._setStrategy(new cG(this._createDataSource(),this._options.enableSplitViewResizing)),this._containerDomElement.className=Rs._getClassName(this._themeService.getColorTheme(),this._options.renderSideBySide)),n.renderOverviewRuler&&(this._options.renderOverviewRuler?this._containerDomElement.appendChild(this._overviewDomElement):this._containerDomElement.removeChild(this._overviewDomElement))}getModel(){return{original:this._originalEditor.getModel(),modified:this._modifiedEditor.getModel()}}setModel(e){if(e&&(!e.original||!e.modified))throw new Error(e.original?"DiffEditorWidget.setModel: Modified model is null":"DiffEditorWidget.setModel: Original model is null");this._cleanViewZonesAndDecorations(),this._originalEditor.setModel(e?e.original:null),this._modifiedEditor.setModel(e?e.modified:null),this._updateDecorationsRunner.cancel(),e&&(this._originalEditor.setScrollTop(0),this._modifiedEditor.setScrollTop(0)),this._diffComputationResult=null,this._diffComputationToken++,this._setState(0),e&&(this._recreateOverviewRulers(),this._beginUpdateDecorations()),this._layoutOverviewViewport()}getContainerDomNode(){return this._domElement}getVisibleColumnFromPosition(e){return this._modifiedEditor.getVisibleColumnFromPosition(e)}getPosition(){return this._modifiedEditor.getPosition()}setPosition(e,t="api"){this._modifiedEditor.setPosition(e,t)}revealLine(e,t=0){this._modifiedEditor.revealLine(e,t)}revealLineInCenter(e,t=0){this._modifiedEditor.revealLineInCenter(e,t)}revealLineInCenterIfOutsideViewport(e,t=0){this._modifiedEditor.revealLineInCenterIfOutsideViewport(e,t)}revealLineNearTop(e,t=0){this._modifiedEditor.revealLineNearTop(e,t)}revealPosition(e,t=0){this._modifiedEditor.revealPosition(e,t)}revealPositionInCenter(e,t=0){this._modifiedEditor.revealPositionInCenter(e,t)}revealPositionInCenterIfOutsideViewport(e,t=0){this._modifiedEditor.revealPositionInCenterIfOutsideViewport(e,t)}revealPositionNearTop(e,t=0){this._modifiedEditor.revealPositionNearTop(e,t)}getSelection(){return this._modifiedEditor.getSelection()}getSelections(){return this._modifiedEditor.getSelections()}setSelection(e,t="api"){this._modifiedEditor.setSelection(e,t)}setSelections(e,t="api"){this._modifiedEditor.setSelections(e,t)}revealLines(e,t,n=0){this._modifiedEditor.revealLines(e,t,n)}revealLinesInCenter(e,t,n=0){this._modifiedEditor.revealLinesInCenter(e,t,n)}revealLinesInCenterIfOutsideViewport(e,t,n=0){this._modifiedEditor.revealLinesInCenterIfOutsideViewport(e,t,n)}revealLinesNearTop(e,t,n=0){this._modifiedEditor.revealLinesNearTop(e,t,n)}revealRange(e,t=0,n=!1,r=!0){this._modifiedEditor.revealRange(e,t,n,r)}revealRangeInCenter(e,t=0){this._modifiedEditor.revealRangeInCenter(e,t)}revealRangeInCenterIfOutsideViewport(e,t=0){this._modifiedEditor.revealRangeInCenterIfOutsideViewport(e,t)}revealRangeNearTop(e,t=0){this._modifiedEditor.revealRangeNearTop(e,t)}revealRangeNearTopIfOutsideViewport(e,t=0){this._modifiedEditor.revealRangeNearTopIfOutsideViewport(e,t)}revealRangeAtTop(e,t=0){this._modifiedEditor.revealRangeAtTop(e,t)}getSupportedActions(){return this._modifiedEditor.getSupportedActions()}saveViewState(){const e=this._originalEditor.saveViewState(),t=this._modifiedEditor.saveViewState();return{original:e,modified:t}}restoreViewState(e){if(e&&e.original&&e.modified){const t=e;this._originalEditor.restoreViewState(t.original),this._modifiedEditor.restoreViewState(t.modified)}}layout(e){this._elementSizeObserver.observe(e)}focus(){this._modifiedEditor.focus()}hasTextFocus(){return this._originalEditor.hasTextFocus()||this._modifiedEditor.hasTextFocus()}trigger(e,t,n){this._modifiedEditor.trigger(e,t,n)}changeDecorations(e){return this._modifiedEditor.changeDecorations(e)}_onDidContainerSizeChanged(){this._doLayout()}_getReviewHeight(){return this._reviewPane.isVisible()?this._elementSizeObserver.getHeight():0}_layoutOverviewRulers(){if(!this._options.renderOverviewRuler||!this._originalOverviewRuler||!this._modifiedOverviewRuler)return;const e=this._elementSizeObserver.getHeight(),t=this._getReviewHeight(),n=Rs.ENTIRE_DIFF_OVERVIEW_WIDTH-2*Rs.ONE_OVERVIEW_WIDTH;this._modifiedEditor.getLayoutInfo()&&(this._originalOverviewRuler.setLayout({top:0,width:Rs.ONE_OVERVIEW_WIDTH,right:n+Rs.ONE_OVERVIEW_WIDTH,height:e-t}),this._modifiedOverviewRuler.setLayout({top:0,right:0,width:Rs.ONE_OVERVIEW_WIDTH,height:e-t}))}_onViewZonesChanged(){this._currentlyChangingViewZones||this._updateDecorationsRunner.schedule()}_beginUpdateDecorationsSoon(){this._beginUpdateDecorationsTimeout!==-1&&(window.clearTimeout(this._beginUpdateDecorationsTimeout),this._beginUpdateDecorationsTimeout=-1),this._beginUpdateDecorationsTimeout=window.setTimeout(()=>this._beginUpdateDecorations(),Rs.UPDATE_DIFF_DECORATIONS_DELAY)}static _equals(e,t){return!e&&!t?!0:!e||!t?!1:e.toString()===t.toString()}_beginUpdateDecorations(){this._beginUpdateDecorationsTimeout=-1;const e=this._originalEditor.getModel(),t=this._modifiedEditor.getModel();if(!e||!t)return;this._diffComputationToken++;const n=this._diffComputationToken,r=this._options.maxFileSize*1024*1024,s=o=>{const a=o.getValueLength();return r===0||a<=r};if(!s(e)||!s(t)){(!Rs._equals(e.uri,this._lastOriginalWarning)||!Rs._equals(t.uri,this._lastModifiedWarning))&&(this._lastOriginalWarning=e.uri,this._lastModifiedWarning=t.uri,this._notificationService.warn(C("diff.tooLarge","Cannot compare files because one file is too large.")));return}this._setState(1),this._editorWorkerService.computeDiff(e.uri,t.uri,this._options.ignoreTrimWhitespace,this._options.maxComputationTime).then(o=>{n===this._diffComputationToken&&e===this._originalEditor.getModel()&&t===this._modifiedEditor.getModel()&&(this._setState(2),this._diffComputationResult=o,this._updateDecorationsRunner.schedule(),this._onDidUpdateDiff.fire())},o=>{n===this._diffComputationToken&&e===this._originalEditor.getModel()&&t===this._modifiedEditor.getModel()&&(this._setState(2),this._diffComputationResult=null,this._updateDecorationsRunner.schedule())})}_cleanViewZonesAndDecorations(){this._originalEditorState.clean(this._originalEditor),this._modifiedEditorState.clean(this._modifiedEditor)}_updateDecorations(){if(!this._originalEditor.getModel()||!this._modifiedEditor.getModel())return;const e=this._diffComputationResult?this._diffComputationResult.changes:[],t=this._originalEditorState.getForeignViewZones(this._originalEditor.getWhitespaces()),n=this._modifiedEditorState.getForeignViewZones(this._modifiedEditor.getWhitespaces()),r=this._strategy.getEditorsDiffDecorations(e,this._options.ignoreTrimWhitespace,this._options.renderIndicators,t,n);try{this._currentlyChangingViewZones=!0,this._originalEditorState.apply(this._originalEditor,this._originalOverviewRuler,r.original,!1),this._modifiedEditorState.apply(this._modifiedEditor,this._modifiedOverviewRuler,r.modified,!0)}finally{this._currentlyChangingViewZones=!1}}_adjustOptionsForSubEditor(e){const t=Object.assign({},e);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,t.fixedOverflowWidgets=!0,t.minimap=Object.assign({},t.minimap||{}),t.minimap.enabled=!1,t}_adjustOptionsForLeftHandSide(e){const t=this._adjustOptionsForSubEditor(e);return this._options.renderSideBySide?t.wordWrapOverride1=this._options.diffWordWrap:(t.wordWrapOverride1="off",t.wordWrapOverride2="off"),e.originalAriaLabel&&(t.ariaLabel=e.originalAriaLabel),t.readOnly=!this._options.originalEditable,t.extraEditorClassName="original-in-monaco-diff-editor",Object.assign(Object.assign({},t),{dimension:{height:0,width:0}})}_adjustOptionsForRightHandSide(e){const t=this._adjustOptionsForSubEditor(e);return e.modifiedAriaLabel&&(t.ariaLabel=e.modifiedAriaLabel),t.wordWrapOverride1=this._options.diffWordWrap,t.revealHorizontalRightPadding=nc.revealHorizontalRightPadding.defaultValue+Rs.ENTIRE_DIFF_OVERVIEW_WIDTH,t.scrollbar.verticalHasArrows=!1,t.extraEditorClassName="modified-in-monaco-diff-editor",Object.assign(Object.assign({},t),{dimension:{height:0,width:0}})}doLayout(){this._elementSizeObserver.observe(),this._doLayout()}_doLayout(){const e=this._elementSizeObserver.getWidth(),t=this._elementSizeObserver.getHeight(),n=this._getReviewHeight(),r=this._strategy.layout();this._originalDomNode.style.width=r+"px",this._originalDomNode.style.left="0px",this._modifiedDomNode.style.width=e-r+"px",this._modifiedDomNode.style.left=r+"px",this._overviewDomElement.style.top="0px",this._overviewDomElement.style.height=t-n+"px",this._overviewDomElement.style.width=Rs.ENTIRE_DIFF_OVERVIEW_WIDTH+"px",this._overviewDomElement.style.left=e-Rs.ENTIRE_DIFF_OVERVIEW_WIDTH+"px",this._overviewViewportDomElement.setWidth(Rs.ENTIRE_DIFF_OVERVIEW_WIDTH),this._overviewViewportDomElement.setHeight(30),this._originalEditor.layout({width:r,height:t-n}),this._modifiedEditor.layout({width:e-r-(this._options.renderOverviewRuler?Rs.ENTIRE_DIFF_OVERVIEW_WIDTH:0),height:t-n}),(this._originalOverviewRuler||this._modifiedOverviewRuler)&&this._layoutOverviewRulers(),this._reviewPane.layout(t-n,e,n),this._layoutOverviewViewport()}_layoutOverviewViewport(){const e=this._computeOverviewViewport();e?(this._overviewViewportDomElement.setTop(e.top),this._overviewViewportDomElement.setHeight(e.height)):(this._overviewViewportDomElement.setTop(0),this._overviewViewportDomElement.setHeight(0))}_computeOverviewViewport(){const e=this._modifiedEditor.getLayoutInfo();if(!e)return null;const t=this._modifiedEditor.getScrollTop(),n=this._modifiedEditor.getScrollHeight(),r=Math.max(0,e.height),s=Math.max(0,r-2*0),o=n>0?s/n:0,a=Math.max(0,Math.floor(e.height*o)),l=Math.floor(t*o);return{height:a,top:l}}_createDataSource(){return{getWidth:()=>this._elementSizeObserver.getWidth(),getHeight:()=>this._elementSizeObserver.getHeight()-this._getReviewHeight(),getOptions:()=>({renderOverviewRuler:this._options.renderOverviewRuler}),getContainerDomNode:()=>this._containerDomElement,relayoutEditors:()=>{this._doLayout()},getOriginalEditor:()=>this._originalEditor,getModifiedEditor:()=>this._modifiedEditor}}_setStrategy(e){this._strategy&&this._strategy.dispose(),this._strategy=e,e.applyColors(this._themeService.getColorTheme()),this._diffComputationResult&&this._updateDecorations(),this._doLayout()}_getLineChangeAtOrBeforeLineNumber(e,t){const n=this._diffComputationResult?this._diffComputationResult.changes:[];if(n.length===0||e=l?r=o+1:(r=o,s=o)}return n[r]}_getEquivalentLineForOriginalLineNumber(e){const t=this._getLineChangeAtOrBeforeLineNumber(e,l=>l.originalStartLineNumber);if(!t)return e;const n=t.originalStartLineNumber+(t.originalEndLineNumber>0?-1:0),r=t.modifiedStartLineNumber+(t.modifiedEndLineNumber>0?-1:0),s=t.originalEndLineNumber>0?t.originalEndLineNumber-t.originalStartLineNumber+1:0,o=t.modifiedEndLineNumber>0?t.modifiedEndLineNumber-t.modifiedStartLineNumber+1:0,a=e-n;return a<=s?r+Math.min(a,o):r+o-s+a}_getEquivalentLineForModifiedLineNumber(e){const t=this._getLineChangeAtOrBeforeLineNumber(e,l=>l.modifiedStartLineNumber);if(!t)return e;const n=t.originalStartLineNumber+(t.originalEndLineNumber>0?-1:0),r=t.modifiedStartLineNumber+(t.modifiedEndLineNumber>0?-1:0),s=t.originalEndLineNumber>0?t.originalEndLineNumber-t.originalStartLineNumber+1:0,o=t.modifiedEndLineNumber>0?t.modifiedEndLineNumber-t.modifiedStartLineNumber+1:0,a=e-r;return a<=o?n+Math.min(a,s):n+s-o+a}getDiffLineInformationForOriginal(e){return this._diffComputationResult?{equivalentLineNumber:this._getEquivalentLineForOriginalLineNumber(e)}:null}getDiffLineInformationForModified(e){return this._diffComputationResult?{equivalentLineNumber:this._getEquivalentLineForModifiedLineNumber(e)}:null}};af.ONE_OVERVIEW_WIDTH=15,af.ENTIRE_DIFF_OVERVIEW_WIDTH=30,af.UPDATE_DIFF_DECORATIONS_DELAY=200,af=CLe([Ed(3,yp),Ed(4,tl),Ed(5,Yt),Ed(6,_n),Ed(7,Zn),Ed(8,Ei),Ed(9,or),Ed(10,sf),Ed(11,of)],af);class aG extends Ne{constructor(e){super(),this._dataSource=e,this._insertColor=null,this._removeColor=null}applyColors(e){const t=e.getColor(xke)||(e.getColor(VU)||m6).transparent(2),n=e.getColor(Lke)||(e.getColor(WU)||_6).transparent(2),r=!t.equals(this._insertColor)||!n.equals(this._removeColor);return this._insertColor=t,this._removeColor=n,r}getEditorsDiffDecorations(e,t,n,r,s){s=s.sort((c,u)=>c.afterLineNumber-u.afterLineNumber),r=r.sort((c,u)=>c.afterLineNumber-u.afterLineNumber);const o=this._getViewZones(e,r,s,n),a=this._getOriginalEditorDecorations(o,e,t,n),l=this._getModifiedEditorDecorations(o,e,t,n);return{original:{decorations:a.decorations,overviewZones:a.overviewZones,zones:o.original},modified:{decorations:l.decorations,overviewZones:l.overviewZones,zones:o.modified}}}}class lG{constructor(e){this._source=e,this._index=-1,this.current=null,this.advance()}advance(){this._index++,this._indexI.afterLineNumber-x.afterLineNumber,_=(I,x)=>{if(x.domNode===null&&I.length>0){const T=I[I.length-1];if(T.afterLineNumber===x.afterLineNumber&&T.domNode===null){T.heightInLines+=x.heightInLines;return}}I.push(x)},b=new lG(this._modifiedForeignVZ),v=new lG(this._originalForeignVZ);let w=1,E=1;for(let I=0,x=this._lineChanges.length;I<=x;I++){const T=I0?-1:0),f=T.modifiedStartLineNumber+(T.modifiedEndLineNumber>0?-1:0),d=T.originalEndLineNumber>0?kp._getViewLineCount(this._originalEditor,T.originalStartLineNumber,T.originalEndLineNumber):0,u=T.modifiedEndLineNumber>0?kp._getViewLineCount(this._modifiedEditor,T.modifiedStartLineNumber,T.modifiedEndLineNumber):0,g=Math.max(T.originalStartLineNumber,T.originalEndLineNumber),p=Math.max(T.modifiedStartLineNumber,T.modifiedEndLineNumber)):(h+=1e7+d,f+=1e7+u,g=h,p=f);let L=[],O=[];if(s){let $;T?T.originalEndLineNumber>0?$=T.originalStartLineNumber-w:$=T.modifiedStartLineNumber-E:$=o.getLineCount()-w+1;for(let ne=0;ne<$;ne++){const z=w+ne,K=E+ne,ce=a.getModelLineViewLineCount(z),re=l.getModelLineViewLineCount(K);cere&&O.push({afterLineNumber:K,heightInLines:ce-re,domNode:null,marginDomNode:null})}T&&(w=(T.originalEndLineNumber>0?T.originalEndLineNumber:T.originalStartLineNumber)+1,E=(T.modifiedEndLineNumber>0?T.modifiedEndLineNumber:T.modifiedStartLineNumber)+1)}for(;b.current&&b.current.afterLineNumber<=p;){let $;b.current.afterLineNumber<=f?$=h-f+b.current.afterLineNumber:$=g;let ne=null;T&&T.modifiedStartLineNumber<=b.current.afterLineNumber&&b.current.afterLineNumber<=T.modifiedEndLineNumber&&(ne=this._createOriginalMarginDomNodeForModifiedForeignViewZoneInAddedRegion()),L.push({afterLineNumber:$,heightInLines:b.current.height/t,domNode:null,marginDomNode:ne}),b.advance()}for(;v.current&&v.current.afterLineNumber<=g;){let $;v.current.afterLineNumber<=h?$=f-h+v.current.afterLineNumber:$=p,O.push({afterLineNumber:$,heightInLines:v.current.height/e,domNode:null}),v.advance()}if(T!==null&&h1(T)){const $=this._produceOriginalFromDiff(T,d,u);$&&L.push($)}if(T!==null&&f1(T)){const $=this._produceModifiedFromDiff(T,d,u);$&&O.push($)}let N=0,P=0;for(L=L.sort(m),O=O.sort(m);N=ne.heightInLines?($.heightInLines-=ne.heightInLines,P++):(ne.heightInLines-=$.heightInLines,N++)}for(;N(t.domNode||(t.domNode=uG()),t))}}function xd(i,e,t,n,r){return{range:new H(i,e,t,n),options:r}}const wo={charDelete:cn.register({description:"diff-editor-char-delete",className:"char-delete"}),charDeleteWholeLine:cn.register({description:"diff-editor-char-delete-whole-line",className:"char-delete",isWholeLine:!0}),charInsert:cn.register({description:"diff-editor-char-insert",className:"char-insert"}),charInsertWholeLine:cn.register({description:"diff-editor-char-insert-whole-line",className:"char-insert",isWholeLine:!0}),lineInsert:cn.register({description:"diff-editor-line-insert",className:"line-insert",marginClassName:"gutter-insert",isWholeLine:!0}),lineInsertWithSign:cn.register({description:"diff-editor-line-insert-with-sign",className:"line-insert",linesDecorationsClassName:"insert-sign "+hi.asClassName(SLe),marginClassName:"gutter-insert",isWholeLine:!0}),lineDelete:cn.register({description:"diff-editor-line-delete",className:"line-delete",marginClassName:"gutter-delete",isWholeLine:!0}),lineDeleteWithSign:cn.register({description:"diff-editor-line-delete-with-sign",className:"line-delete",linesDecorationsClassName:"delete-sign "+hi.asClassName(sG),marginClassName:"gutter-delete",isWholeLine:!0}),lineDeleteMargin:cn.register({description:"diff-editor-line-delete-margin",marginClassName:"gutter-delete"})};class Ld extends aG{constructor(e,t){super(e),this._disableSash=t===!1,this._sashRatio=null,this._sashPosition=null,this._startSashPosition=null,this._sash=this._register(new Ls(this._dataSource.getContainerDomNode(),this,{orientation:0})),this._disableSash&&(this._sash.state=0),this._sash.onDidStart(()=>this._onSashDragStart()),this._sash.onDidChange(n=>this._onSashDrag(n)),this._sash.onDidEnd(()=>this._onSashDragEnd()),this._sash.onDidReset(()=>this._onSashReset())}setEnableSplitViewResizing(e){const t=e===!1;this._disableSash!==t&&(this._disableSash=t,this._sash.state=this._disableSash?0:3)}layout(e=this._sashRatio){const n=this._dataSource.getWidth()-(this._dataSource.getOptions().renderOverviewRuler?af.ENTIRE_DIFF_OVERVIEW_WIDTH:0);let r=Math.floor((e||.5)*n);const s=Math.floor(.5*n);return r=this._disableSash?s:r||s,n>Ld.MINIMUM_EDITOR_WIDTH*2?(rn-Ld.MINIMUM_EDITOR_WIDTH&&(r=n-Ld.MINIMUM_EDITOR_WIDTH)):r=s,this._sashPosition!==r&&(this._sashPosition=r),this._sash.layout(),this._sashPosition}_onSashDragStart(){this._startSashPosition=this._sashPosition}_onSashDrag(e){const n=this._dataSource.getWidth()-(this._dataSource.getOptions().renderOverviewRuler?af.ENTIRE_DIFF_OVERVIEW_WIDTH:0),r=this.layout((this._startSashPosition+(e.currentX-e.startX))/n);this._sashRatio=r/n,this._dataSource.relayoutEditors()}_onSashDragEnd(){this._sash.layout()}_onSashReset(){this._sashRatio=.5,this._dataSource.relayoutEditors(),this._sash.layout()}getVerticalSashTop(e){return 0}getVerticalSashLeft(e){return this._sashPosition}getVerticalSashHeight(e){return this._dataSource.getHeight()}_getViewZones(e,t,n){const r=this._dataSource.getOriginalEditor(),s=this._dataSource.getModifiedEditor();return new kLe(e,t,n,r,s).getViewZones()}_getOriginalEditorDecorations(e,t,n,r){const s=this._dataSource.getOriginalEditor(),o=String(this._removeColor),a={decorations:[],overviewZones:[]},l=s.getModel(),c=s._getViewModel();for(const u of t)if(f1(u)){a.decorations.push({range:new H(u.originalStartLineNumber,1,u.originalEndLineNumber,1073741824),options:r?wo.lineDeleteWithSign:wo.lineDelete}),(!h1(u)||!u.charChanges)&&a.decorations.push(xd(u.originalStartLineNumber,1,u.originalEndLineNumber,1073741824,wo.charDeleteWholeLine));const d=zv(l,c,u.originalStartLineNumber,u.originalEndLineNumber);if(a.overviewZones.push(new bv(d.startLineNumber,d.endLineNumber,0,o)),u.charChanges){for(const h of u.charChanges)if(f1(h))if(n)for(let f=h.originalStartLineNumber;f<=h.originalEndLineNumber;f++){let g,p;f===h.originalStartLineNumber?g=h.originalStartColumn:g=l.getLineFirstNonWhitespaceColumn(f),f===h.originalEndLineNumber?p=h.originalEndColumn:p=l.getLineLastNonWhitespaceColumn(f),a.decorations.push(xd(f,g,f,p,wo.charDelete))}else a.decorations.push(xd(h.originalStartLineNumber,h.originalStartColumn,h.originalEndLineNumber,h.originalEndColumn,wo.charDelete))}}return a}_getModifiedEditorDecorations(e,t,n,r){const s=this._dataSource.getModifiedEditor(),o=String(this._insertColor),a={decorations:[],overviewZones:[]},l=s.getModel(),c=s._getViewModel();for(const u of t)if(h1(u)){a.decorations.push({range:new H(u.modifiedStartLineNumber,1,u.modifiedEndLineNumber,1073741824),options:r?wo.lineInsertWithSign:wo.lineInsert}),(!f1(u)||!u.charChanges)&&a.decorations.push(xd(u.modifiedStartLineNumber,1,u.modifiedEndLineNumber,1073741824,wo.charInsertWholeLine));const d=zv(l,c,u.modifiedStartLineNumber,u.modifiedEndLineNumber);if(a.overviewZones.push(new bv(d.startLineNumber,d.endLineNumber,0,o)),u.charChanges){for(const h of u.charChanges)if(h1(h))if(n)for(let f=h.modifiedStartLineNumber;f<=h.modifiedEndLineNumber;f++){let g,p;f===h.modifiedStartLineNumber?g=h.modifiedStartColumn:g=l.getLineFirstNonWhitespaceColumn(f),f===h.modifiedEndLineNumber?p=h.modifiedEndColumn:p=l.getLineLastNonWhitespaceColumn(f),a.decorations.push(xd(f,g,f,p,wo.charInsert))}else a.decorations.push(xd(h.modifiedStartLineNumber,h.modifiedStartColumn,h.modifiedEndLineNumber,h.modifiedEndColumn,wo.charInsert))}}return a}}Ld.MINIMUM_EDITOR_WIDTH=100;class kLe extends kp{constructor(e,t,n,r,s){super(e,t,n,r,s)}_createOriginalMarginDomNodeForModifiedForeignViewZoneInAddedRegion(){return null}_produceOriginalFromDiff(e,t,n){return n>t?{afterLineNumber:Math.max(e.originalStartLineNumber,e.originalEndLineNumber),heightInLines:n-t,domNode:null}:null}_produceModifiedFromDiff(e,t,n){return t>n?{afterLineNumber:Math.max(e.modifiedStartLineNumber,e.modifiedEndLineNumber),heightInLines:t-n,domNode:null}:null}}class cG extends aG{constructor(e,t){super(e),this._decorationsLeft=e.getOriginalEditor().getLayoutInfo().decorationsLeft,this._register(e.getOriginalEditor().onDidLayoutChange(n=>{this._decorationsLeft!==n.decorationsLeft&&(this._decorationsLeft=n.decorationsLeft,e.relayoutEditors())}))}setEnableSplitViewResizing(e){}_getViewZones(e,t,n,r){const s=this._dataSource.getOriginalEditor(),o=this._dataSource.getModifiedEditor();return new ELe(e,t,n,s,o,r).getViewZones()}_getOriginalEditorDecorations(e,t,n,r){const s=String(this._removeColor),o={decorations:[],overviewZones:[]},a=this._dataSource.getOriginalEditor(),l=a.getModel(),c=a._getViewModel();let u=0;for(const d of t)if(f1(d)){for(o.decorations.push({range:new H(d.originalStartLineNumber,1,d.originalEndLineNumber,1073741824),options:wo.lineDeleteMargin});u=d.originalStartLineNumber)break;u++}let h=0;if(u0,O=Og(1e4);let N=0,P=0,$=null;for(let K=w.originalStartLineNumber;K<=w.originalEndLineNumber;K++){const ce=K-w.originalStartLineNumber,re=this._originalModel.getLineTokens(K),B=re.getLineContent(),Ae=_[b++],we=da.filter(T,K,1,B.length+1);if(Ae){let ke=0;for(const De of Ae.breakOffsets){const Ge=re.sliceAndInflate(ke,De,0),lt=B.substring(ke,De);N=Math.max(N,this._renderOriginalLine(P++,lt,Ge,da.extractWrapped(we,ke,De),L,l,c,r,s,u,h,f,g,p,m,n,O,x)),ke=De}for($||($=[]);$.lengthv.afterLineNumber-w.afterLineNumber)}_renderOriginalLine(e,t,n,r,s,o,a,l,c,u,d,h,f,g,p,m,_,b){_.appendASCIIString('
');const v=ha.isBasicASCII(t,o),w=ha.containsRTL(t,v,a),E=fS(new Hg(l.isMonospace&&!c,l.canUseHalfwidthRightwardsArrow,t,!1,v,w,0,n,r,m,0,l.spaceWidth,l.middotWidth,l.wsmiddotWidth,h,f,g,p!==oa.OFF,null),_);if(_.appendASCIIString("
"),this._renderIndicators){const I=document.createElement("div");I.className=`delete-sign ${hi.asClassName(sG)}`,I.setAttribute("style",`position:absolute;top:${e*u}px;width:${d}px;height:${u}px;right:0;`),b.appendChild(I)}return E.characterMapping.getAbsoluteOffset(E.characterMapping.length)}}function xLe(i,e){return ho(i,e,["off","on","inherit"])}function h1(i){return i.modifiedEndLineNumber>0}function f1(i){return i.originalEndLineNumber>0}function uG(){const i=document.createElement("div");return i.className="diagonal-fill",i}function zv(i,e,t,n){const r=i.getLineCount();return t=Math.min(r,Math.max(1,t)),n=Math.min(r,Math.max(1,n)),e.coordinatesConverter.convertModelRangeToViewRange(new H(t,i.getLineMinColumn(t),n,i.getLineMaxColumn(n)))}function dG(i,e){return{enableSplitViewResizing:Mt(i.enableSplitViewResizing,e.enableSplitViewResizing),renderSideBySide:Mt(i.renderSideBySide,e.renderSideBySide),maxComputationTime:I8(i.maxComputationTime,e.maxComputationTime,0,1073741824),maxFileSize:I8(i.maxFileSize,e.maxFileSize,0,1073741824),ignoreTrimWhitespace:Mt(i.ignoreTrimWhitespace,e.ignoreTrimWhitespace),renderIndicators:Mt(i.renderIndicators,e.renderIndicators),originalEditable:Mt(i.originalEditable,e.originalEditable),diffCodeLens:Mt(i.diffCodeLens,e.diffCodeLens),renderOverviewRuler:Mt(i.renderOverviewRuler,e.renderOverviewRuler),diffWordWrap:xLe(i.diffWordWrap,e.diffWordWrap)}}function LLe(i,e){return{enableSplitViewResizing:i.enableSplitViewResizing!==e.enableSplitViewResizing,renderSideBySide:i.renderSideBySide!==e.renderSideBySide,maxComputationTime:i.maxComputationTime!==e.maxComputationTime,maxFileSize:i.maxFileSize!==e.maxFileSize,ignoreTrimWhitespace:i.ignoreTrimWhitespace!==e.ignoreTrimWhitespace,renderIndicators:i.renderIndicators!==e.renderIndicators,originalEditable:i.originalEditable!==e.originalEditable,diffCodeLens:i.diffCodeLens!==e.diffCodeLens,renderOverviewRuler:i.renderOverviewRuler!==e.renderOverviewRuler,diffWordWrap:i.diffWordWrap!==e.diffWordWrap}}_i((i,e)=>{const t=i.getColor(VU);t&&e.addRule(`.monaco-editor .char-insert, .monaco-diff-editor .char-insert { background-color: ${t}; }`);const n=i.getColor(yke)||t;n&&e.addRule(`.monaco-editor .line-insert, .monaco-diff-editor .line-insert { background-color: ${n}; }`);const r=i.getColor(kke)||n;r&&(e.addRule(`.monaco-editor .inline-added-margin-view-zone { background-color: ${r}; }`),e.addRule(`.monaco-editor .gutter-insert, .monaco-diff-editor .gutter-insert { background-color: ${r}; }`));const s=i.getColor(WU);s&&e.addRule(`.monaco-editor .char-delete, .monaco-diff-editor .char-delete { background-color: ${s}; }`);const o=i.getColor(Ske)||s;o&&e.addRule(`.monaco-editor .line-delete, .monaco-diff-editor .line-delete { background-color: ${o}; }`);const a=i.getColor(Eke)||o;a&&(e.addRule(`.monaco-editor .inline-deleted-margin-view-zone { background-color: ${a}; }`),e.addRule(`.monaco-editor .gutter-delete, .monaco-diff-editor .gutter-delete { background-color: ${a}; }`));const l=i.getColor(Tke);l&&e.addRule(`.monaco-editor .line-insert, .monaco-editor .char-insert { border: 1px ${i.type==="hc"?"dashed":"solid"} ${l}; }`);const c=i.getColor(Ike);c&&e.addRule(`.monaco-editor .line-delete, .monaco-editor .char-delete { border: 1px ${i.type==="hc"?"dashed":"solid"} ${c}; }`);const u=i.getColor(F_);u&&e.addRule(`.monaco-diff-editor.side-by-side .editor.modified { box-shadow: -6px 0 5px -5px ${u}; }`);const d=i.getColor(Dke);d&&e.addRule(`.monaco-diff-editor.side-by-side .editor.modified { border-left: 1px solid ${d}; }`);const h=i.getColor(B_);h&&e.addRule(` + .monaco-diff-editor .diffViewport { + background: ${h}; + } + `);const f=i.getColor(V_);f&&e.addRule(` + .monaco-diff-editor .diffViewport:hover { + background: ${f}; + } + `);const g=i.getColor(W_);g&&e.addRule(` + .monaco-diff-editor .diffViewport:active { + background: ${g}; + } + `);const p=i.getColor(Nke);e.addRule(` + .monaco-editor .diagonal-fill { + background-image: linear-gradient( + -45deg, + ${p} 12.5%, + #0000 12.5%, #0000 50%, + ${p} 50%, ${p} 62.5%, + #0000 62.5%, #0000 100% + ); + background-size: 8px 8px; + } + `)});var TLe=globalThis&&globalThis.__decorate||function(i,e,t,n){var r=arguments.length,s=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(s=(r<3?o(s):r>3?o(e,t,s):o(e,t))||s);return r>3&&s&&Object.defineProperty(e,t,s),s},ILe=globalThis&&globalThis.__param||function(i,e){return function(t,n){e(t,n,i)}};let zD=class extends Ne{constructor(e){super(),this._themeService=e,this._onCodeEditorAdd=this._register(new be),this.onCodeEditorAdd=this._onCodeEditorAdd.event,this._onCodeEditorRemove=this._register(new be),this.onCodeEditorRemove=this._onCodeEditorRemove.event,this._onDiffEditorAdd=this._register(new be),this.onDiffEditorAdd=this._onDiffEditorAdd.event,this._onDiffEditorRemove=this._register(new be),this.onDiffEditorRemove=this._onDiffEditorRemove.event,this._decorationOptionProviders=new Map,this._modelProperties=new Map,this._codeEditors=Object.create(null),this._diffEditors=Object.create(null),this._globalStyleSheet=null}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])}addDiffEditor(e){this._diffEditors[e.getId()]=e,this._onDiffEditorAdd.fire(e)}removeDiffEditor(e){delete this._diffEditors[e.getId()]&&this._onDiffEditorRemove.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.removeDecorations(e))))}setModelProperty(e,t,n){const r=e.toString();let s;this._modelProperties.has(r)?s=this._modelProperties.get(r):(s=new Map,this._modelProperties.set(r,s)),s.set(t,n)}getModelProperty(e,t){const n=e.toString();if(this._modelProperties.has(n))return this._modelProperties.get(n).get(t)}};zD=TLe([ILe(0,Ei)],zD);var DLe=globalThis&&globalThis.__decorate||function(i,e,t,n){var r=arguments.length,s=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(s=(r<3?o(s):r>3?o(e,t,s):o(e,t))||s);return r>3&&s&&Object.defineProperty(e,t,s),s},hG=globalThis&&globalThis.__param||function(i,e){return function(t,n){e(t,n,i)}};let Yk=class extends zD{constructor(e,t){super(t),this.onCodeEditorAdd(()=>this._checkContextKey()),this.onCodeEditorRemove(()=>this._checkContextKey()),this._editorIsOpen=e.createKey("editorIsOpen",!1),this._activeCodeEditor=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}openCodeEditor(e,t,n){return t?Promise.resolve(this.doOpenEditor(t,e)):Promise.resolve(null)}doOpenEditor(e,t){if(!this.findModel(e,t.resource)){if(t.resource){const s=t.resource.scheme;if(s===sn.http||s===sn.https)return aU(t.resource.toString()),e}return null}const r=t.options?t.options.selection:null;if(r)if(typeof r.endLineNumber=="number"&&typeof r.endColumn=="number")e.setSelection(r),e.revealRangeInCenter(r,1);else{const s={lineNumber:r.startLineNumber,column:r.startColumn};e.setPosition(s),e.revealPositionInCenter(s,1)}return e}findModel(e,t){const n=e.getModel();return n&&n.uri.toString()!==t.toString()?null:n}};Yk=DLe([hG(0,Yt),hG(1,Ei)],Yk),On(Zn,Yk);const $v=Ln("layoutService");var fG=globalThis&&globalThis.__decorate||function(i,e,t,n){var r=arguments.length,s=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(s=(r<3?o(s):r>3?o(e,t,s):o(e,t))||s);return r>3&&s&&Object.defineProperty(e,t,s),s},gG=globalThis&&globalThis.__param||function(i,e){return function(t,n){e(t,n,i)}};let Zk=class{constructor(e){this._codeEditorService=e,this.onDidLayout=kt.None}get dimension(){return this._dimension||(this._dimension=vS(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()}};Zk=fG([gG(0,Zn)],Zk);let $D=class extends Zk{constructor(e,t){super(t),this._container=e}get hasContainer(){return!1}get container(){return this._container}};$D=fG([gG(1,Zn)],$D),On($v,Zk);const Uv=Ln("dialogService");var NLe=globalThis&&globalThis.__decorate||function(i,e,t,n){var r=arguments.length,s=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(s=(r<3?o(s):r>3?o(e,t,s):o(e,t))||s);return r>3&&s&&Object.defineProperty(e,t,s),s},pG=globalThis&&globalThis.__param||function(i,e){return function(t,n){e(t,n,i)}},Xk=globalThis&&globalThis.__awaiter||function(i,e,t,n){function r(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(u){try{c(n.next(u))}catch(d){o(d)}}function l(u){try{c(n.throw(u))}catch(d){o(d)}}function c(u){u.done?s(u.value):r(u.value).then(a,l)}c((n=n.apply(i,e||[])).next())})};function Qk(i){return i.scheme===sn.file?i.fsPath:i.path}let mG=0;class Jk{constructor(e,t,n,r,s,o,a){this.id=++mG,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=r,this.groupOrder=s,this.sourceId=o,this.sourceOrder=a,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 _G{constructor(e,t){this.resourceLabel=e,this.reason=t}}class bG{constructor(){this.elements=new Map}createMessage(){const e=[],t=[];for(const[,r]of this.elements)(r.reason===0?e:t).push(r.resourceLabel);let n=[];return e.length>0&&n.push(C({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(C({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 ALe{constructor(e,t,n,r,s,o,a){this.id=++mG,this.type=1,this.actual=e,this.label=e.label,this.confirmBeforeUndo=e.confirmBeforeUndo||!1,this.resourceLabels=t,this.strResources=n,this.groupId=r,this.groupOrder=s,this.sourceId=o,this.sourceOrder=a,this.removedResources=null,this.invalidatedResources=null}canSplit(){return typeof this.actual.split=="function"}removeResource(e,t,n){this.removedResources||(this.removedResources=new bG),this.removedResources.has(t)||this.removedResources.set(t,new _G(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 bG),this.invalidatedResources.has(t)||this.invalidatedResources.set(t,new _G(e,0)))}toString(){return`[id:${this.id}] [group:${this.groupId}] [${this.invalidatedResources?"INVALID":" VALID"}] ${this.actual.constructor.name} - ${this.actual}`}}class vG{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(){let 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,r=this._past.length;n=0;n--)t.push(this._future[n].id);return new Rq(e,t)}restoreSnapshot(e){const t=e.elements.length;let n=!0,r=0,s=-1;for(let a=0,l=this._past.length;a=t||c.id!==e.elements[r])&&(n=!1,s=0),!n&&c.type===1&&c.removeResource(this.resourceLabel,this.strResource,0)}let o=-1;for(let a=this._future.length-1;a>=0;a--,r++){const l=this._future[a];n&&(r>=t||l.id!==e.elements[r])&&(n=!1,o=a),!n&&l.type===1&&l.removeResource(this.resourceLabel,this.strResource,0)}s!==-1&&(this._past=this._past.slice(0,s)),o!==-1&&(this._future=this._future.slice(o+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 UD{constructor(e){this.editStacks=e,this._versionIds=[];for(let t=0,n=this.editStacks.length;tt.sourceOrder)&&(t=o,n=r)}return[t,n]}canUndo(e){if(e instanceof mu){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){Jt(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,r,s){const o=this._acquireLocks(n);let a;try{a=t()}catch(l){return o(),r.dispose(),this._onError(l,e)}return a?a.then(()=>(o(),r.dispose(),s()),l=>(o(),r.dispose(),this._onError(l,e))):(o(),r.dispose(),s())}_invokeWorkspacePrepare(e){return Xk(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?N8(n)?t(n):n.then(r=>t(r)):t(Ne.None)}_getAffectedEditStacks(e){const t=[];for(const n of e.strResources)t.push(this._editStacks.get(n)||wG);return new UD(t)}_tryToSplitAndUndo(e,t,n,r){if(t.canSplit())return this._splitPastWorkspaceElement(t,n),this._notificationService.warn(r),new e4(this._undo(e,0,!0));for(const s of t.strResources)this.removeElements(s);return this._notificationService.warn(r),new e4}_checkWorkspaceUndo(e,t,n,r){if(t.removedResources)return this._tryToSplitAndUndo(e,t,t.removedResources,C({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(r&&t.invalidatedResources)return this._tryToSplitAndUndo(e,t,t.invalidatedResources,C({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 s=[];for(const a of n.editStacks)a.getClosestPastElement()!==t&&s.push(a.resourceLabel);if(s.length>0)return this._tryToSplitAndUndo(e,t,null,C({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,s.join(", ")));const o=[];for(const a of n.editStacks)a.locked&&o.push(a.resourceLabel);return o.length>0?this._tryToSplitAndUndo(e,t,null,C({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,o.join(", "))):n.isValid()?null:this._tryToSplitAndUndo(e,t,null,C({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 r=this._getAffectedEditStacks(t),s=this._checkWorkspaceUndo(e,t,r,!1);return s?s.returnValue:this._confirmAndExecuteWorkspaceUndo(e,t,r,n)}_isPartOfUndoGroup(e){if(!e.groupId)return!1;for(const[,t]of this._editStacks){const n=t.getClosestPastElement();if(n){if(n===e){const r=t.getSecondClosestPastElement();if(r&&r.groupId===e.groupId)return!0}if(n.groupId===e.groupId)return!0}}return!1}_confirmAndExecuteWorkspaceUndo(e,t,n,r){return Xk(this,void 0,void 0,function*(){if(t.canSplit()&&!this._isPartOfUndoGroup(t)){const a=yield this._dialogService.show(Bi.Info,C("confirmWorkspace","Would you like to undo '{0}' across all files?",t.label),[C({key:"ok",comment:["{0} denotes a number that is > 1"]},"Undo in {0} Files",n.editStacks.length),C("nok","Undo this File"),C("cancel","Cancel")],{cancelId:2});if(a.choice===2)return;if(a.choice===1)return this._splitPastWorkspaceElement(t,null),this._undo(e,0,!0);const l=this._checkWorkspaceUndo(e,t,n,!1);if(l)return l.returnValue;r=!0}let s;try{s=yield this._invokeWorkspacePrepare(t)}catch(a){return this._onError(a,t)}const o=this._checkWorkspaceUndo(e,t,n,!0);if(o)return s.dispose(),o.returnValue;for(const a of n.editStacks)a.moveBackward(t);return this._safeInvokeWithLocks(t,()=>t.actual.undo(),n,s,()=>this._continueUndoInGroup(t.groupId,r))})}_resourceUndo(e,t,n){if(!t.isValid){e.flushAllElements();return}if(e.locked){const r=C({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(r);return}return this._invokeResourcePrepare(t,r=>(e.moveBackward(t),this._safeInvokeWithLocks(t,()=>t.actual.undo(),new UD([e]),r,()=>this._continueUndoInGroup(t.groupId,n))))}_findClosestUndoElementInGroup(e){if(!e)return[null,null];let t=null,n=null;for(const[r,s]of this._editStacks){const o=s.getClosestPastElement();o&&o.groupId===e&&(!t||o.groupOrder>t.groupOrder)&&(t=o,n=r)}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 mu){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 r=this._editStacks.get(e),s=r.getClosestPastElement();if(!s)return;if(s.groupId){const[a,l]=this._findClosestUndoElementInGroup(s.groupId);if(s!==a&&l)return this._undo(l,t,n)}if((s.sourceId!==t||s.confirmBeforeUndo)&&!n)return this._confirmAndContinueUndo(e,t,s);try{return s.type===1?this._workspaceUndo(e,s,n):this._resourceUndo(r,s,n)}finally{}}_confirmAndContinueUndo(e,t,n){return Xk(this,void 0,void 0,function*(){if((yield this._dialogService.show(Bi.Info,C("confirmDifferentSource","Would you like to undo '{0}'?",n.label),[C("confirmDifferentSource.yes","Yes"),C("confirmDifferentSource.no","No")],{cancelId:1})).choice!==1)return this._undo(e,t,!0)})}_findClosestRedoElementWithSource(e){if(!e)return[null,null];let t=null,n=null;for(const[r,s]of this._editStacks){const o=s.getClosestFutureElement();o&&o.sourceId===e&&(!t||o.sourceOrder0)return this._tryToSplitAndRedo(e,t,null,C({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,s.join(", ")));const o=[];for(const a of n.editStacks)a.locked&&o.push(a.resourceLabel);return o.length>0?this._tryToSplitAndRedo(e,t,null,C({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,o.join(", "))):n.isValid()?null:this._tryToSplitAndRedo(e,t,null,C({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),r=this._checkWorkspaceRedo(e,t,n,!1);return r?r.returnValue:this._executeWorkspaceRedo(e,t,n)}_executeWorkspaceRedo(e,t,n){return Xk(this,void 0,void 0,function*(){let r;try{r=yield this._invokeWorkspacePrepare(t)}catch(o){return this._onError(o,t)}const s=this._checkWorkspaceRedo(e,t,n,!0);if(s)return r.dispose(),s.returnValue;for(const o of n.editStacks)o.moveForward(t);return this._safeInvokeWithLocks(t,()=>t.actual.redo(),n,r,()=>this._continueRedoInGroup(t.groupId))})}_resourceRedo(e,t){if(!t.isValid){e.flushAllElements();return}if(e.locked){const n=C({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 UD([e]),n,()=>this._continueRedoInGroup(t.groupId))))}_findClosestRedoElementInGroup(e){if(!e)return[null,null];let t=null,n=null;for(const[r,s]of this._editStacks){const o=s.getClosestFutureElement();o&&o.groupId===e&&(!t||o.groupOrder=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){return new g1(new PLe(e))}static forStrings(){return new g1(new RLe)}static forConfigKeys(){return new g1(new OLe)}clear(){this._root=void 0}set(e,t){const n=this._iter.reset(e);let r;this._root||(this._root=new t4,this._root.segment=n.value());const s=[];for(r=this._root;;){const a=n.cmp(r.segment);if(a>0)r.left||(r.left=new t4,r.left.segment=n.value()),s.push([-1,r]),r=r.left;else if(a<0)r.right||(r.right=new t4,r.right.segment=n.value()),s.push([1,r]),r=r.right;else if(n.hasNext())n.next(),r.mid||(r.mid=new t4,r.mid.segment=n.value()),s.push([0,r]),r=r.mid;else break}const o=r.value;r.value=t,r.key=e;for(let a=s.length-1;a>=0;a--){const l=s[a][1];l.updateHeight();const c=l.balanceFactor();if(c<-1||c>1){const u=s[a][0],d=s[a+1][0];if(u===1&&d===1)s[a][1]=l.rotateLeft();else if(u===-1&&d===-1)s[a][1]=l.rotateRight();else if(u===1&&d===-1)l.right=s[a+1][1]=s[a+1][1].rotateRight(),s[a][1]=l.rotateLeft();else if(u===-1&&d===1)l.left=s[a+1][1]=s[a+1][1].rotateLeft(),s[a][1]=l.rotateRight();else throw new Error;if(a>0)switch(s[a-1][0]){case-1:s[a-1][1].left=s[a][1];break;case 1:s[a-1][1].right=s[a][1];break;case 0:s[a-1][1].mid=s[a][1];break}else this._root=s[0][1]}}return o}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 r=t.cmp(n.segment);if(r>0)n=n.left;else if(r<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 r=this._iter.reset(e),s=[];let o=this._root;for(;o;){const a=r.cmp(o.segment);if(a>0)s.push([-1,o]),o=o.left;else if(a<0)s.push([1,o]),o=o.right;else if(r.hasNext())r.next(),s.push([0,o]),o=o.mid;else break}if(o){if(t?(o.left=void 0,o.mid=void 0,o.right=void 0,o.height=1):(o.key=void 0,o.value=void 0),!o.mid&&!o.value)if(o.left&&o.right){const a=this._min(o.right),{key:l,value:c,segment:u}=a;this._delete(a.key,!1),o.key=l,o.value=c,o.segment=u}else{const a=(n=o.left)!==null&&n!==void 0?n:o.right;if(s.length>0){const[l,c]=s[s.length-1];switch(l){case-1:c.left=a;break;case 0:c.mid=a;break;case 1:c.right=a;break}}else this._root=a}for(let a=s.length-1;a>=0;a--){const l=s[a][1];l.updateHeight();const c=l.balanceFactor();if(c>1?(l.right.balanceFactor()>=0||(l.right=l.right.rotateRight()),s[a][1]=l.rotateLeft()):c<-1&&(l.left.balanceFactor()<=0||(l.left=l.left.rotateLeft()),s[a][1]=l.rotateRight()),a>0)switch(s[a-1][0]){case-1:s[a-1][1].left=s[a][1];break;case 1:s[a-1][1].right=s[a][1];break;case 0:s[a-1][1].mid=s[a][1];break}else this._root=s[0][1]}}}_min(e){for(;e.left;)e=e.left;return e}findSubstr(e){const t=this._iter.reset(e);let n=this._root,r;for(;n;){const s=t.cmp(n.segment);if(s>0)n=n.left;else if(s<0)n=n.right;else if(t.hasNext())t.next(),r=n.value||r,n=n.mid;else break}return n&&n.value||r}findSuperstr(e){const t=this._iter.reset(e);let n=this._root;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(),n=n.mid;else return n.mid?this._entries(n.mid):void 0}}forEach(e){for(const[t,n]of this)e(n,t)}*[Symbol.iterator](){yield*this._entries(this._root)}*_entries(e){e&&(e.left&&(yield*this._entries(e.left)),e.value&&(yield[e.key,e.value]),e.mid&&(yield*this._entries(e.mid)),e.right&&(yield*this._entries(e.right)))}}class FLe{constructor(e,t){this.uri=e,this.value=t}}class Xs{constructor(e,t){this[CG]="ResourceMap",e instanceof Xs?(this.map=new Map(e.map),this.toKey=t??Xs.defaultToKey):(this.map=new Map,this.toKey=e??Xs.defaultToKey)}set(e,t){return this.map.set(this.toKey(e),new FLe(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(let[n,r]of this.map)e(r.value,r.uri,this)}*values(){for(let e of this.map.values())yield e.value}*keys(){for(let e of this.map.values())yield e.uri}*entries(){for(let e of this.map.values())yield[e.uri,e.value]}*[(CG=Symbol.toStringTag,Symbol.iterator)](){for(let[,e]of this.map)yield[e.uri,e.value]}}Xs.defaultToKey=i=>i.toString();class BLe{constructor(){this[yG]="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 r=this._map.get(e);if(r)r.value=t,n!==0&&this.touch(r,n);else{switch(r={key:e,value:t,next:void 0,previous:void 0},n){case 0:this.addItemLast(r);break;case 1:this.addItemFirst(r);break;case 2:this.addItemLast(r);break;default:this.addItemLast(r);break}this._map.set(e,r),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 r=this._head;for(;r;){if(t?e.bind(t)(r.value,r.key,this):e(r.value,r.key,this),this._state!==n)throw new Error("LinkedMap got modified during iteration.");r=r.next}}keys(){const e=this,t=this._state;let n=this._head;const r={[Symbol.iterator](){return r},next(){if(e._state!==t)throw new Error("LinkedMap got modified during iteration.");if(n){const s={value:n.key,done:!1};return n=n.next,s}else return{value:void 0,done:!0}}};return r}values(){const e=this,t=this._state;let n=this._head;const r={[Symbol.iterator](){return r},next(){if(e._state!==t)throw new Error("LinkedMap got modified during iteration.");if(n){const s={value:n.value,done:!1};return n=n.next,s}else return{value:void 0,done:!0}}};return r}entries(){const e=this,t=this._state;let n=this._head;const r={[Symbol.iterator](){return r},next(){if(e._state!==t)throw new Error("LinkedMap got modified during iteration.");if(n){const s={value:[n.key,n.value],done:!1};return n=n.next,s}else return{value:void 0,done:!0}}};return r}[(yG=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,r=e.previous;e===this._tail?(r.next=void 0,this._tail=r):(n.previous=r,r.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,r=e.previous;e===this._head?(n.previous=void 0,this._head=n):(n.previous=r,r.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 lf extends BLe{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))}}function jo(i,e,t){return Math.min(Math.max(i,e),t)}class SG{constructor(){this._n=1,this._val=0}update(e){return this._val=this._val+(e-this._val)/this._n,this._n+=1,this._val}get value(){return this._val}}class VLe{constructor(e){this._n=0,this._val=0,this._values=[],this._index=0,this._sum=0,this._values=new Array(e),this._values.fill(0,0,e)}update(e){const t=this._values[this._index];return this._values[this._index]=e,this._index=(this._index+1)%this._values.length,this._sum-=t,this._sum+=e,this._n=0;a--)(o=i[a])&&(s=(r<3?o(s):r>3?o(e,t,s):o(e,t))||s);return r>3&&s&&Object.defineProperty(e,t,s),s},HLe=globalThis&&globalThis.__param||function(i,e){return function(t,n){e(t,n,i)}};const nl=Ln("ILanguageFeatureDebounceService");var n4;(function(i){const e=new WeakMap;let t=0;function n(r){let s=e.get(r);return s===void 0&&(s=++t,e.set(r,s)),s}i.of=n})(n4||(n4={}));class zLe{constructor(e,t,n,r,s,o){this._logService=e,this._name=t,this._registry=n,this._default=r,this._min=s,this._max=o,this._cache=new lf(50,.7)}_key(e){return e.id+this._registry.all(e).reduce((t,n)=>aS(n4.of(n),t),0)}get(e){const t=this._key(e),n=this._cache.get(t);return n?jo(n.value,this._min,this._max):this.default()}update(e,t){const n=this._key(e);let r=this._cache.get(n);r||(r=new VLe(6),this._cache.set(n,r));const s=jo(r.update(t),this._min,this._max);return this._logService.trace(`[DEBOUNCE: ${this._name}] for ${e.uri.toString()} is ${s}ms`),s}_overall(){const e=new SG;for(const[,t]of this._cache)e.update(t.value);return e.value}default(){const e=this._overall()|0||this._default;return jo(e,this._min,this._max)}}let qD=class{constructor(e){this._logService=e,this._data=new Map}for(e,t,n){var r,s,o;const a=(r=n==null?void 0:n.min)!==null&&r!==void 0?r:50,l=(s=n==null?void 0:n.max)!==null&&s!==void 0?s:Math.pow(a,2),c=(o=n==null?void 0:n.key)!==null&&o!==void 0?o:void 0,u=`${n4.of(e)},${a}${c?","+c:""}`;let d=this._data.get(u);return d||(d=new zLe(this._logService,t,e,this._overallAverage()|0||a*1.5,a,l),this._data.set(u,d)),d}_overallAverage(){let e=new SG;for(let t of this._data.values())e.update(t.default());return e.value}};qD=WLe([HLe(0,yl)],qD),On(nl,qD,!0);const GD=Ln("IWorkspaceEditService");function $Le(i){return uo(i)&&(Boolean(i.newUri)||Boolean(i.oldUri))}function ULe(i){return uo(i)&&Pt.isUri(i.resource)&&uo(i.edit)}class i4{constructor(e){this.metadata=e}static convert(e){return e.edits.map(t=>{if(ULe(t))return new kG(t.resource,t.edit,t.modelVersionId,t.metadata);if($Le(t))return new jLe(t.oldUri,t.newUri,t.options,t.metadata);throw new Error("Unsupported edit")})}}class kG extends i4{constructor(e,t,n,r){super(r),this.resource=e,this.textEdit=t,this.versionId=n}}class jLe extends i4{constructor(e,t,n,r){super(r),this.oldResource=e,this.newResource=t,this.options=n}}const qLe=Object.freeze({id:"editor",order:5,type:"object",title:C("editorConfigurationTitle","Editor"),scope:5}),r4=Object.assign(Object.assign({},qLe),{properties:{"editor.tabSize":{type:"number",default:Os.tabSize,minimum:1,markdownDescription:C("tabSize","The number of spaces a tab is equal to. This setting is overridden based on the file contents when `#editor.detectIndentation#` is on.")},"editor.insertSpaces":{type:"boolean",default:Os.insertSpaces,markdownDescription:C("insertSpaces","Insert spaces when pressing `Tab`. This setting is overridden based on the file contents when `#editor.detectIndentation#` is on.")},"editor.detectIndentation":{type:"boolean",default:Os.detectIndentation,markdownDescription:C("detectIndentation","Controls whether `#editor.tabSize#` and `#editor.insertSpaces#` will be automatically detected when a file is opened based on the file contents.")},"editor.trimAutoWhitespace":{type:"boolean",default:Os.trimAutoWhitespace,description:C("trimAutoWhitespace","Remove trailing auto inserted whitespace.")},"editor.largeFileOptimizations":{type:"boolean",default:Os.largeFileOptimizations,description:C("largeFileOptimizations","Special handling for large files to disable certain memory intensive features.")},"editor.wordBasedSuggestions":{type:"boolean",default:!0,description:C("wordBasedSuggestions","Controls whether completions should be computed based on words in the document.")},"editor.wordBasedSuggestionsMode":{enum:["currentDocument","matchingDocuments","allDocuments"],default:"matchingDocuments",enumDescriptions:[C("wordBasedSuggestionsMode.currentDocument","Only suggest words from the active document."),C("wordBasedSuggestionsMode.matchingDocuments","Suggest words from all open documents of the same language."),C("wordBasedSuggestionsMode.allDocuments","Suggest words from all open documents.")],description:C("wordBasedSuggestionsMode","Controls from which documents word based completions are computed.")},"editor.semanticHighlighting.enabled":{enum:[!0,!1,"configuredByTheme"],enumDescriptions:[C("semanticHighlighting.true","Semantic highlighting enabled for all color themes."),C("semanticHighlighting.false","Semantic highlighting disabled for all color themes."),C("semanticHighlighting.configuredByTheme","Semantic highlighting is configured by the current color theme's `semanticHighlighting` setting.")],default:"configuredByTheme",description:C("semanticHighlighting.enabled","Controls whether the semanticHighlighting is shown for the languages that support it.")},"editor.stablePeek":{type:"boolean",default:!1,markdownDescription:C("stablePeek","Keep peek editors open even when double clicking their content or when hitting `Escape`.")},"editor.maxTokenizationLineLength":{type:"integer",default:2e4,description:C("maxTokenizationLineLength","Lines above this length will not be tokenized for performance reasons")},"editor.language.brackets":{type:"array",default:!1,description:C("schema.brackets","Defines the bracket symbols that increase or decrease the indentation."),items:{type:"array",items:[{type:"string",description:C("schema.openBracket","The opening bracket character or string sequence.")},{type:"string",description:C("schema.closeBracket","The closing bracket character or string sequence.")}]}},"editor.language.colorizedBracketPairs":{type:"array",default:!1,description:C("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:C("schema.openBracket","The opening bracket character or string sequence.")},{type:"string",description:C("schema.closeBracket","The closing bracket character or string sequence.")}]}},"diffEditor.maxComputationTime":{type:"number",default:5e3,description:C("maxComputationTime","Timeout in milliseconds after which diff computation is cancelled. Use 0 for no timeout.")},"diffEditor.maxFileSize":{type:"number",default:50,description:C("maxFileSize","Maximum file size in MB for which to compute diffs. Use 0 for no limit.")},"diffEditor.renderSideBySide":{type:"boolean",default:!0,description:C("sideBySide","Controls whether the diff editor shows the diff side by side or inline.")},"diffEditor.ignoreTrimWhitespace":{type:"boolean",default:!0,description:C("ignoreTrimWhitespace","When enabled, the diff editor ignores changes in leading or trailing whitespace.")},"diffEditor.renderIndicators":{type:"boolean",default:!0,description:C("renderIndicators","Controls whether the diff editor shows +/- indicators for added/removed changes.")},"diffEditor.codeLens":{type:"boolean",default:!1,description:C("codeLens","Controls whether the editor shows CodeLens.")},"diffEditor.wordWrap":{type:"string",enum:["off","on","inherit"],default:"inherit",markdownEnumDescriptions:[C("wordWrap.off","Lines will never wrap."),C("wordWrap.on","Lines will wrap at the viewport width."),C("wordWrap.inherit","Lines will wrap according to the `#editor.wordWrap#` setting.")]}}});function GLe(i){return typeof i.type<"u"||typeof i.anyOf<"u"}for(const i of l_){const e=i.schema;if(typeof e<"u")if(GLe(e))r4.properties[`editor.${i.name}`]=e;else for(const t in e)Object.hasOwnProperty.call(e,t)&&(r4.properties[t]=e[t])}let s4=null;function EG(){return s4===null&&(s4=Object.create(null),Object.keys(r4.properties).forEach(i=>{s4[i]=!0})),s4}function KLe(i){return EG()[`editor.${i}`]||!1}function YLe(i){return EG()[`diffEditor.${i}`]||!1}sr.as(pp.Configuration).registerConfiguration(r4);class ji{static insert(e,t){return{range:new H(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}}}class il{constructor(e={},t=[],n=[]){this._contents=e,this._keys=t,this._overrides=n,this.isFrozen=!1,this.overrideConfigurations=new Map}get contents(){return this.checkAndFreeze(this._contents)}get overrides(){return this.checkAndFreeze(this._overrides)}get keys(){return this.checkAndFreeze(this._keys)}isEmpty(){return this._keys.length===0&&Object.keys(this._contents).length===0&&this._overrides.length===0}getValue(e){return e?i$(this.contents,e):this.contents}getOverrideValue(e,t){const n=this.getContentsForOverrideIdentifer(t);return n?e?i$(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){const t=nd(this.contents),n=nd(this.overrides),r=[...this.keys];for(const s of e){this.mergeContents(t,s.contents);for(const o of s.overrides){const[a]=n.filter(l=>ra(l.identifiers,o.identifiers));a?(this.mergeContents(a.contents,o.contents),a.keys.push(...o.keys),a.keys=vh(a.keys)):n.push(nd(o))}for(const o of s.keys)r.indexOf(o)===-1&&r.push(o)}return new il(t,r,n)}freeze(){return this.isFrozen=!0,this}createOverrideConfigurationModel(e){const t=this.getContentsForOverrideIdentifer(e);if(!t||typeof t!="object"||!Object.keys(t).length)return this;let n={};for(const r of vh([...Object.keys(this.contents),...Object.keys(t)])){let s=this.contents[r],o=t[r];o&&(typeof s=="object"&&typeof o=="object"?(s=nd(s),this.mergeContents(s,o)):s=o),n[r]=s}return new il(n,this.keys,this.overrides)}mergeContents(e,t){for(const n of Object.keys(t)){if(n in e&&uo(e[n])&&uo(t[n])){this.mergeContents(e[n],t[n]);continue}e[n]=nd(t[n])}}checkAndFreeze(e){return this.isFrozen&&!Object.isFrozen(e)?owe(e):e}getContentsForOverrideIdentifer(e){let t=null,n=null;const r=s=>{s&&(n?this.mergeContents(n,s):n=nd(s))};for(const s of this.overrides)ra(s.identifiers,[e])?t=s.contents:s.identifiers.includes(e)&&r(s.contents);return r(t),n}toJSON(){return{contents:this.contents,overrides:this.overrides,keys:this.keys}}setValue(e,t){this.addKey(e),nI(this.contents,e,t,n=>{throw new Error(n)})}removeValue(e){this.removeKey(e)&&g2e(this.contents,e)}addKey(e){let t=this.keys.length;for(let n=0;nconsole.error(`Conflict in default settings: ${c}`))}for(const o of Object.keys(r))yv.test(o)&&s.push({identifiers:Zj(o),keys:Object.keys(r[o]),contents:t$(r[o],a=>console.error(`Conflict in default settings file: ${a}`))});super(r,n,s)}}class o4{constructor(e,t,n=new il,r=new il,s=new Xs,o=new il,a=new Xs,l=!0){this._defaultConfiguration=e,this._localUserConfiguration=t,this._remoteUserConfiguration=n,this._workspaceConfiguration=r,this._folderConfigurations=s,this._memoryConfiguration=o,this._memoryConfigurationByResource=a,this._freeze=l,this._workspaceConsolidatedConfiguration=null,this._foldersConsolidatedConfigurations=new Xs,this._userConfiguration=null}getValue(e,t,n){return this.getConsolidateConfigurationModel(t,n).getValue(e)}updateValue(e,t,n={}){let r;n.resource?(r=this._memoryConfigurationByResource.get(n.resource),r||(r=new il,this._memoryConfigurationByResource.set(n.resource,r))):r=this._memoryConfiguration,t===void 0?r.removeValue(e):r.setValue(e,t),n.resource||(this._workspaceConsolidatedConfiguration=null)}inspect(e,t,n){const r=this.getConsolidateConfigurationModel(t,n),s=this.getFolderConfigurationModelForResource(t.resource,n),o=t.resource?this._memoryConfigurationByResource.get(t.resource)||this._memoryConfiguration:this._memoryConfiguration,a=t.overrideIdentifier?this._defaultConfiguration.freeze().override(t.overrideIdentifier).getValue(e):this._defaultConfiguration.freeze().getValue(e),l=t.overrideIdentifier?this.userConfiguration.freeze().override(t.overrideIdentifier).getValue(e):this.userConfiguration.freeze().getValue(e),c=t.overrideIdentifier?this.localUserConfiguration.freeze().override(t.overrideIdentifier).getValue(e):this.localUserConfiguration.freeze().getValue(e),u=t.overrideIdentifier?this.remoteUserConfiguration.freeze().override(t.overrideIdentifier).getValue(e):this.remoteUserConfiguration.freeze().getValue(e),d=n?t.overrideIdentifier?this._workspaceConfiguration.freeze().override(t.overrideIdentifier).getValue(e):this._workspaceConfiguration.freeze().getValue(e):void 0,h=s?t.overrideIdentifier?s.freeze().override(t.overrideIdentifier).getValue(e):s.freeze().getValue(e):void 0,f=t.overrideIdentifier?o.override(t.overrideIdentifier).getValue(e):o.getValue(e),g=r.getValue(e),p=vh(S8(r.overrides.map(m=>m.identifiers))).filter(m=>r.getOverrideValue(e,m)!==void 0);return{defaultValue:a,userValue:l,userLocalValue:c,userRemoteValue:u,workspaceValue:d,workspaceFolderValue:h,memoryValue:f,value:g,default:a!==void 0?{value:this._defaultConfiguration.freeze().getValue(e),override:t.overrideIdentifier?this._defaultConfiguration.freeze().getOverrideValue(e,t.overrideIdentifier):void 0}:void 0,user:l!==void 0?{value:this.userConfiguration.freeze().getValue(e),override:t.overrideIdentifier?this.userConfiguration.freeze().getOverrideValue(e,t.overrideIdentifier):void 0}:void 0,userLocal:c!==void 0?{value:this.localUserConfiguration.freeze().getValue(e),override:t.overrideIdentifier?this.localUserConfiguration.freeze().getOverrideValue(e,t.overrideIdentifier):void 0}:void 0,userRemote:u!==void 0?{value:this.remoteUserConfiguration.freeze().getValue(e),override:t.overrideIdentifier?this.remoteUserConfiguration.freeze().getOverrideValue(e,t.overrideIdentifier):void 0}:void 0,workspace:d!==void 0?{value:this._workspaceConfiguration.freeze().getValue(e),override:t.overrideIdentifier?this._workspaceConfiguration.freeze().getOverrideValue(e,t.overrideIdentifier):void 0}:void 0,workspaceFolder:h!==void 0?{value:s==null?void 0:s.freeze().getValue(e),override:t.overrideIdentifier?s==null?void 0:s.freeze().getOverrideValue(e,t.overrideIdentifier):void 0}:void 0,memory:f!==void 0?{value:o.getValue(e),override:t.overrideIdentifier?o.getOverrideValue(e,t.overrideIdentifier):void 0}:void 0,overrideIdentifiers:p.length?p:void 0}}get userConfiguration(){return this._userConfiguration||(this._userConfiguration=this._remoteUserConfiguration.isEmpty()?this._localUserConfiguration:this._localUserConfiguration.merge(this._remoteUserConfiguration),this._freeze&&this._userConfiguration.freeze()),this._userConfiguration}get localUserConfiguration(){return this._localUserConfiguration}get remoteUserConfiguration(){return this._remoteUserConfiguration}getConsolidateConfigurationModel(e,t){let n=this.getConsolidatedConfigurationModelForResource(e,t);return e.overrideIdentifier?n.override(e.overrideIdentifier):n}getConsolidatedConfigurationModelForResource({resource:e},t){let n=this.getWorkspaceConsolidatedConfiguration();if(t&&e){const r=t.getFolder(e);r&&(n=this.getFolderConsolidatedConfiguration(r.uri)||n);const s=this._memoryConfigurationByResource.get(e);s&&(n=n.merge(s))}return n}getWorkspaceConsolidatedConfiguration(){return this._workspaceConsolidatedConfiguration||(this._workspaceConsolidatedConfiguration=this._defaultConfiguration.merge(this.userConfiguration,this._workspaceConfiguration,this._memoryConfiguration),this._freeze&&(this._workspaceConfiguration=this._workspaceConfiguration.freeze())),this._workspaceConsolidatedConfiguration}getFolderConsolidatedConfiguration(e){let t=this._foldersConsolidatedConfigurations.get(e);if(!t){const n=this.getWorkspaceConsolidatedConfiguration(),r=this._folderConfigurations.get(e);r?(t=n.merge(r),this._freeze&&(t=t.freeze()),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},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:r,keys:s}=this._folderConfigurations.get(t);return e.push([t,{contents:n,overrides:r,keys:s}]),e},[])}}static parse(e){const t=this.parseConfigurationModel(e.defaults),n=this.parseConfigurationModel(e.user),r=this.parseConfigurationModel(e.workspace),s=e.folders.reduce((o,a)=>(o.set(Pt.revive(a[0]),this.parseConfigurationModel(a[1])),o),new Xs);return new o4(t,n,new il,r,s,new il,new Xs,!1)}static parseConfigurationModel(e){return new il(e.contents,e.keys,e.overrides).freeze()}}class XLe{constructor(e,t,n,r){this.change=e,this.previous=t,this.currentConfiguraiton=n,this.currentWorkspace=r,this._previousConfiguration=void 0;const s=new Set;e.keys.forEach(a=>s.add(a)),e.overrides.forEach(([,a])=>a.forEach(l=>s.add(l))),this.affectedKeys=[...s.values()];const o=new il;this.affectedKeys.forEach(a=>o.setValue(a,{})),this.affectedKeysTree=o.contents}get previousConfiguration(){return!this._previousConfiguration&&this.previous&&(this._previousConfiguration=o4.parse(this.previous.data)),this._previousConfiguration}affectsConfiguration(e,t){var n;if(this.doesAffectedKeysTreeContains(this.affectedKeysTree,e)){if(t){const r=this.previousConfiguration?this.previousConfiguration.getValue(e,t,(n=this.previous)===null||n===void 0?void 0:n.workspace):void 0,s=this.currentConfiguraiton.getValue(e,t,this.currentWorkspace);return!Va(r,s)}return!0}return!1}doesAffectedKeysTreeContains(e,t){let n=t$({[t]:!0},()=>{}),r;for(;typeof n=="object"&&(r=Object.keys(n)[0]);){if(e=e[r],!e)return!1;n=n[r]}return!0}}const QLe=/^(cursor|delete)/;class JLe extends Ne{constructor(e,t,n,r,s){super(),this._contextKeyService=e,this._commandService=t,this._telemetryService=n,this._notificationService=r,this._logService=s,this._onDidUpdateKeybindings=this._register(new be),this._currentChord=null,this._currentChordChecker=new Nb,this._currentChordStatusMessage=null,this._ignoreSingleModifiers=p1.EMPTY,this._currentSingleModifier=null,this._currentSingleModifierClearTimeout=new Wo,this._logging=!1}get onDidUpdateKeybindings(){return this._onDidUpdateKeybindings?this._onDidUpdateKeybindings.event:kt.None}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){const n=this.resolveKeyboardEvent(e);if(n.isChord())return console.warn("Unexpected keyboard event mapped to a chord"),null;const[r]=n.getDispatchParts();if(r===null)return null;const s=this._contextKeyService.getContext(t),o=this._currentChord?this._currentChord.keypress:null;return this._getResolver().resolve(s,o,r)}_enterChordMode(e,t){this._currentChord={keypress:e,label:t},this._currentChordStatusMessage=this._notificationService.status(C("first.chord","({0}) was pressed. Waiting for second key of chord...",t));const n=Date.now();this._currentChordChecker.cancelAndSet(()=>{if(!this._documentHasFocus()){this._leaveChordMode();return}Date.now()-n>5e3&&this._leaveChordMode()},500)}_leaveChordMode(){this._currentChordStatusMessage&&(this._currentChordStatusMessage.dispose(),this._currentChordStatusMessage=null),this._currentChordChecker.cancel(),this._currentChord=null}_dispatch(e,t){return this._doDispatch(this.resolveKeyboardEvent(e),t,!1)}_singleModifierDispatch(e,t){const n=this.resolveKeyboardEvent(e),[r]=n.getSingleModifierDispatchParts();if(r)return this._ignoreSingleModifiers.has(r)?(this._log(`+ Ignoring single modifier ${r} due to it being pressed together with other keys.`),this._ignoreSingleModifiers=p1.EMPTY,this._currentSingleModifierClearTimeout.cancel(),this._currentSingleModifier=null,!1):(this._ignoreSingleModifiers=p1.EMPTY,this._currentSingleModifier===null?(this._log(`+ Storing single modifier for possible chord ${r}.`),this._currentSingleModifier=r,this._currentSingleModifierClearTimeout.cancelAndSet(()=>{this._log("+ Clearing single modifier due to 300ms elapsed."),this._currentSingleModifier=null},300),!1):r===this._currentSingleModifier?(this._log(`/ Dispatching single modifier chord ${r} ${r}`),this._currentSingleModifierClearTimeout.cancel(),this._currentSingleModifier=null,this._doDispatch(n,t,!0)):(this._log(`+ Clearing single modifier due to modifier mismatch: ${this._currentSingleModifier} ${r}`),this._currentSingleModifierClearTimeout.cancel(),this._currentSingleModifier=null,!1));const[s]=n.getParts();return this._ignoreSingleModifiers=new p1(s),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){let r=!1;if(e.isChord())return console.warn("Unexpected keyboard event mapped to a chord"),!1;let s=null,o=null;if(n){const[u]=e.getSingleModifierDispatchParts();s=u,o=u}else[s]=e.getDispatchParts(),o=this._currentChord?this._currentChord.keypress:null;if(s===null)return this._log("\\ Keyboard event cannot be dispatched in keydown phase."),r;const a=this._contextKeyService.getContext(t),l=e.getLabel(),c=this._getResolver().resolve(a,o,s);return this._logService.trace("KeybindingService#dispatch",l,c==null?void 0:c.commandId),c&&c.enterChord?(r=!0,this._enterChordMode(s,l),r):(this._currentChord&&(!c||!c.commandId)&&(this._notificationService.status(C("missing.chord","The key combination ({0}, {1}) is not a command.",this._currentChord.label,l),{hideAfter:10*1e3}),r=!0),this._leaveChordMode(),c&&c.commandId&&(c.bubble||(r=!0),typeof c.commandArgs>"u"?this._commandService.executeCommand(c.commandId).then(void 0,u=>this._notificationService.warn(u)):this._commandService.executeCommand(c.commandId,c.commandArgs).then(void 0,u=>this._notificationService.warn(u)),QLe.test(c.commandId)||this._telemetryService.publicLog2("workbenchActionExecuted",{id:c.commandId,from:"keybinding"})),r)}mightProducePrintableCharacter(e){return e.ctrlKey||e.metaKey?!1:e.keyCode>=31&&e.keyCode<=56||e.keyCode>=21&&e.keyCode<=30}}class p1{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}}}p1.EMPTY=new p1(null);const qi=Ln("keybindingService");class jv{constructor(e,t,n){this._log=n,this._defaultKeybindings=e,this._defaultBoundCommands=new Map;for(const r of e){const s=r.command;s&&s.charAt(0)!=="-"&&this._defaultBoundCommands.set(s,!0)}this._map=new Map,this._lookupMap=new Map,this._keybindings=jv.handleRemovals([].concat(e).concat(t));for(let r=0,s=this._keybindings.length;r"u"){this._map.set(e,[t]),this._addToLookupMap(t);return}for(let r=n.length-1;r>=0;r--){let s=n[r];if(s.command===t.command)continue;const o=s.keypressParts.length>1,a=t.keypressParts.length>1;o&&a&&s.keypressParts[1]!==t.keypressParts[1]||jv.whenIsEntirelyIncluded(s.when,t.when)&&this._removeFromLookupMap(s)}n.push(t),this._addToLookupMap(t)}_addToLookupMap(e){if(!e.command)return;let t=this._lookupMap.get(e.command);typeof t>"u"?(t=[e],this._lookupMap.set(e.command,t)):t.push(e)}_removeFromLookupMap(e){if(!e.command)return;let t=this._lookupMap.get(e.command);if(!(typeof t>"u")){for(let n=0,r=t.length;n"u"||n.length===0)return null;if(n.length===1)return n[0];for(let r=n.length-1;r>=0;r--){const s=n[r];if(t.contextMatchesRules(s.when))return s}return n[n.length-1]}resolve(e,t,n){this._log(`| Resolving ${n}${t?` chorded from ${t}`:""}`);let r=null;if(t!==null){const o=this._map.get(t);if(typeof o>"u")return this._log("\\ No keybinding entries."),null;r=[];for(let a=0,l=o.length;a"u")return this._log("\\ No keybinding entries."),null;r=o}let s=this._findCommand(e,r);return s?t===null&&s.keypressParts.length>1&&s.keypressParts[1]!==null?(this._log(`\\ From ${r.length} keybinding entries, matched chord, when: ${xG(s.when)}, source: ${LG(s)}.`),{enterChord:!0,leaveChord:!1,commandId:null,commandArgs:null,bubble:!1}):(this._log(`\\ From ${r.length} keybinding entries, matched ${s.command}, when: ${xG(s.when)}, source: ${LG(s)}.`),{enterChord:!1,leaveChord:s.keypressParts.length>1,commandId:s.command,commandArgs:s.commandArgs,bubble:s.bubble}):(this._log(`\\ From ${r.length} keybinding entries, no when clauses matched the context.`),null)}_findCommand(e,t){for(let n=t.length-1;n>=0;n--){let r=t[n];if(jv._contextMatchesRules(e,r.when))return r}return null}static _contextMatchesRules(e,t){return t?t.evaluate(e):!0}}function xG(i){return i?`${i.serialize()}`:"no when condition"}function LG(i){return i.extensionId?i.isBuiltinExtension?`built-in extension ${i.extensionId}`:`user extension ${i.extensionId}`:i.isDefault?"built-in":"user"}class TG{constructor(e,t,n,r,s,o,a){this._resolvedKeybindingItemBrand=void 0,this.resolvedKeybinding=e,this.keypressParts=e?KD(e.getDispatchParts()):[],e&&this.keypressParts.length===0&&(this.keypressParts=KD(e.getSingleModifierDispatchParts())),this.bubble=t?t.charCodeAt(0)===94:!1,this.command=this.bubble?t.substr(1):t,this.commandArgs=n,this.when=r,this.isDefault=s,this.extensionId=o,this.isBuiltinExtension=a}}function KD(i){let e=[];for(let t=0,n=i.length;tthis._getLabel(e))}getAriaLabel(){return e8e.toLabel(this._os,this._parts,e=>this._getAriaLabel(e))}getElectronAccelerator(){return this._parts.length>1||this._parts[0].isDuplicateModifierCase()?null:t8e.toLabel(this._os,this._parts,e=>this._getElectronAccelerator(e))}isChord(){return this._parts.length>1}getParts(){return this._parts.map(e=>this._getPart(e))}_getPart(e){return new Hye(e.ctrlKey,e.shiftKey,e.altKey,e.metaKey,this._getLabel(e),this._getAriaLabel(e))}getDispatchParts(){return this._parts.map(e=>this._getDispatchPart(e))}getSingleModifierDispatchParts(){return this._parts.map(e=>this._getSingleModifierDispatchPart(e))}}class qv extends i8e{constructor(e,t){super(t,e.parts)}_keyCodeToUILabel(e){if(this._os===2)switch(e){case 15:return"←";case 16:return"↑";case 17:return"→";case 18:return"↓"}return Ig.toString(e)}_getLabel(e){return e.isDuplicateModifierCase()?"":this._keyCodeToUILabel(e.keyCode)}_getAriaLabel(e){return e.isDuplicateModifierCase()?"":Ig.toString(e.keyCode)}_getElectronAccelerator(e){return Ig.toElectronAccelerator(e.keyCode)}_getDispatchPart(e){return qv.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+=Ig.toString(e.keyCode),t}_getSingleModifierDispatchPart(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=F8[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 83;case 52:return 81;case 53:return 87;case 54:return 89;case 55:return 88;case 56:return 0;case 57:return 80;case 58:return 90;case 59:return 86;case 60:return 82;case 61:return 84;case 62:return 85;case 106:return 92}return 0}static _resolveSimpleUserBinding(e){if(!e)return null;if(e instanceof zg)return e;const t=this._scanCodeToKeyCode(e.scanCode);return t===0?null:new zg(e.ctrlKey,e.shiftKey,e.altKey,e.metaKey,t)}static resolveUserBinding(e,t){const n=KD(e.map(r=>this._resolveSimpleUserBinding(r)));return n.length>0?[new qv(new bS(n),t)]:[]}}const Gv=Ln("labelService"),IG=Ln("contextService");function DG(i){const e=i;return typeof(e==null?void 0:e.id)=="string"&&Pt.isUri(e.uri)}function r8e(i){if(i.configuration)return{id:i.id,configPath:i.configuration};if(i.folders.length===1)return{id:i.id,uri:i.folders[0].uri}}class s8e{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 ZD="code-workspace";C("codeWorkspace","Code Workspace");var br;(function(i){i.noSelection=C("noSelection","No selection"),i.singleSelectionRange=C("singleSelectionRange","Line {0}, Column {1} ({2} selected)"),i.singleSelection=C("singleSelection","Line {0}, Column {1}"),i.multiSelectionRange=C("multiSelectionRange","{0} selections ({1} characters selected)"),i.multiSelection=C("multiSelection","{0} selections"),i.emergencyConfOn=C("emergencyConfOn","Now changing the setting `accessibilitySupport` to 'on'."),i.openingDocs=C("openingDocs","Now opening the Editor Accessibility documentation page."),i.readonlyDiffEditor=C("readonlyDiffEditor"," in a read-only pane of a diff editor."),i.editableDiffEditor=C("editableDiffEditor"," in a pane of a diff editor."),i.readonlyEditor=C("readonlyEditor"," in a read-only code editor"),i.editableEditor=C("editableEditor"," in a code editor"),i.changeConfigToOnMac=C("changeConfigToOnMac","To configure the editor to be optimized for usage with a Screen Reader press Command+E now."),i.changeConfigToOnWinLinux=C("changeConfigToOnWinLinux","To configure the editor to be optimized for usage with a Screen Reader press Control+E now."),i.auto_on=C("auto_on","The editor is configured to be optimized for usage with a Screen Reader."),i.auto_off=C("auto_off","The editor is configured to never be optimized for usage with a Screen Reader, which is not the case at this time."),i.tabFocusModeOnMsg=C("tabFocusModeOnMsg","Pressing Tab in the current editor will move focus to the next focusable element. Toggle this behavior by pressing {0}."),i.tabFocusModeOnMsgNoKb=C("tabFocusModeOnMsgNoKb","Pressing Tab in the current editor will move focus to the next focusable element. The command {0} is currently not triggerable by a keybinding."),i.tabFocusModeOffMsg=C("tabFocusModeOffMsg","Pressing Tab in the current editor will insert the tab character. Toggle this behavior by pressing {0}."),i.tabFocusModeOffMsgNoKb=C("tabFocusModeOffMsgNoKb","Pressing Tab in the current editor will insert the tab character. The command {0} is currently not triggerable by a keybinding."),i.openDocMac=C("openDocMac","Press Command+H now to open a browser window with more information related to editor accessibility."),i.openDocWinLinux=C("openDocWinLinux","Press Control+H now to open a browser window with more information related to editor accessibility."),i.outroMsg=C("outroMsg","You can dismiss this tooltip and return to the editor by pressing Escape or Shift+Escape."),i.showAccessibilityHelpAction=C("showAccessibilityHelpAction","Show Accessibility Help")})(br||(br={}));var XD;(function(i){i.inspectTokensAction=C("inspectTokens","Developer: Inspect Tokens")})(XD||(XD={}));var l4;(function(i){i.gotoLineActionLabel=C("gotoLineActionLabel","Go to Line/Column...")})(l4||(l4={}));var QD;(function(i){i.helpQuickAccessActionLabel=C("helpQuickAccess","Show all Quick Access Providers")})(QD||(QD={}));var c4;(function(i){i.quickCommandActionLabel=C("quickCommandActionLabel","Command Palette"),i.quickCommandHelp=C("quickCommandActionHelp","Show And Run Commands")})(c4||(c4={}));var Kv;(function(i){i.quickOutlineActionLabel=C("quickOutlineActionLabel","Go to Symbol..."),i.quickOutlineByCategoryActionLabel=C("quickOutlineByCategoryActionLabel","Go to Symbol by Category...")})(Kv||(Kv={}));var u4;(function(i){i.editorViewAccessibleLabel=C("editorViewAccessibleLabel","Editor content"),i.accessibilityHelpMessage=C("accessibilityHelpMessage","Press Alt+F1 for Accessibility Options.")})(u4||(u4={}));var JD;(function(i){i.toggleHighContrast=C("toggleHighContrast","Toggle High Contrast Theme")})(JD||(JD={}));var e9;(function(i){i.bulkEditServiceSummary=C("bulkEditServiceSummary","Made {0} edits in {1} files")})(e9||(e9={}));const NG=Ln("workspaceTrustManagementService");var Ts;(function(i){function e(s,o){if(s.start>=o.end||o.start>=s.end)return{start:0,end:0};const a=Math.max(s.start,o.start),l=Math.min(s.end,o.end);return l-a<=0?{start:0,end:0}:{start:a,end:l}}i.intersect=e;function t(s){return s.end-s.start<=0}i.isEmpty=t;function n(s,o){return!t(e(s,o))}i.intersects=n;function r(s,o){const a=[],l={start:s.start,end:Math.min(o.start,s.end)},c={start:Math.max(o.end,s.start),end:s.end};return t(l)||a.push(l),t(c)||a.push(c),a}i.relativeComplement=r})(Ts||(Ts={}));const vpt="";var cf;(function(i){i[i.AVOID=0]="AVOID",i[i.ALIGN=1]="ALIGN"})(cf||(cf={}));function m1(i,e,t){const n=t.mode===cf.ALIGN?t.offset:t.offset+t.size,r=t.mode===cf.ALIGN?t.offset+t.size:t.offset;return t.position===0?e<=i-n?n:e<=r?r-e:Math.max(i-e,0):e<=r?r-e:e<=i-n?n:0}class _1 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=Ze(".context-view"),this.useFixedPosition=!1,this.useShadowDOM=!1,po(this.view),this.setContainer(e,t),this._register(fn(()=>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=Ze(".shadow-root-host"),this.container.appendChild(this.shadowRootHostElement),this.shadowRoot=this.shadowRootHostElement.attachShadow({mode:"open"});const s=document.createElement("style");s.textContent=o8e,this.shadowRoot.appendChild(s),this.shadowRoot.appendChild(this.view),this.shadowRoot.appendChild(Ze("slot"))}else this.container.appendChild(this.view);const r=new Je;_1.BUBBLE_UP_EVENTS.forEach(s=>{r.add(Zr(this.container,s,o=>{this.onDOMEvent(o,!1)}))}),_1.BUBBLE_DOWN_EVENTS.forEach(s=>{r.add(Zr(this.container,s,o=>{this.onDOMEvent(o,!0)},!0))}),this.toDisposeOnSetContainer=r}}show(e){this.isVisible()&&this.hide(),Dr(this.view),this.view.className="context-view",this.view.style.top="0px",this.view.style.left="0px",this.view.style.zIndex="2500",this.view.style.position=this.useFixedPosition?"fixed":"absolute",fa(this.view),this.toDisposeOnClean=e.render(this.view)||Ne.None,this.delegate=e,this.doLayout(),this.delegate.focus&&this.delegate.focus()}getViewElement(){return this.view}layout(){if(this.isVisible()){if(this.delegate.canRelayout===!1&&!(tc&&_S.pointerEvents)){this.hide();return}this.delegate.layout&&this.delegate.layout(),this.doLayout()}}doLayout(){if(!this.isVisible())return;let e=this.delegate.getAnchor(),t;if(rU(e)){let d=ss(e);t={top:d.top,left:d.left,width:d.width,height:d.height}}else t={top:e.y,left:e.x,width:e.width||1,height:e.height||2};const n=Sl(this.view),r=$I(this.view),s=this.delegate.anchorPosition||0,o=this.delegate.anchorAlignment||0,a=this.delegate.anchorAxisAlignment||0;let l,c;if(a===0){const d={offset:t.top-window.pageYOffset,size:t.height,position:s===0?0:1},h={offset:t.left,size:t.width,position:o===0?0:1,mode:cf.ALIGN};l=m1(window.innerHeight,r,d)+window.pageYOffset,Ts.intersects({start:l,end:l+r},{start:d.offset,end:d.offset+d.size})&&(h.mode=cf.AVOID),c=m1(window.innerWidth,n,h)}else{const d={offset:t.left,size:t.width,position:o===0?0:1},h={offset:t.top,size:t.height,position:s===0?0:1,mode:cf.ALIGN};c=m1(window.innerWidth,n,d),Ts.intersects({start:c,end:c+n},{start:d.offset,end:d.offset+d.size})&&(h.mode=cf.AVOID),l=m1(window.innerHeight,r,h)+window.pageYOffset}this.view.classList.remove("top","bottom","left","right"),this.view.classList.add(s===0?"bottom":"top"),this.view.classList.add(o===0?"left":"right"),this.view.classList.toggle("fixed",this.useFixedPosition);const u=ss(this.container);this.view.style.top=`${l-(this.useFixedPosition?ss(this.view).top:u.top)}px`,this.view.style.left=`${c-(this.useFixedPosition?ss(this.view).left:u.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(),po(this.view)}isVisible(){return!!this.delegate}onDOMEvent(e,t){this.delegate&&(this.delegate.onDOMEvent?this.delegate.onDOMEvent(e,document.activeElement):t&&!ld(e.target,this.container)&&this.hide())}dispose(){this.hide(),super.dispose()}}_1.BUBBLE_UP_EVENTS=["click","keydown","focus","blur"],_1.BUBBLE_DOWN_EVENTS=["click"];let o8e=` + :host { + all: initial; /* 1st rule so subsequent properties are reset. */ + } + + @font-face { + font-family: "codicon"; + font-display: block; + src: url("./codicon.ttf?5d4d76ab2ce5108968ad644d591a16a6") format("truetype"); + } + + .codicon[class*='codicon-'] { + font: normal normal normal 16px/1 codicon; + display: inline-block; + text-decoration: none; + text-rendering: auto; + text-align: center; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + user-select: none; + -webkit-user-select: none; + -ms-user-select: none; + } + + :host { + font-family: -apple-system, BlinkMacSystemFont, "Segoe WPC", "Segoe UI", "HelveticaNeue-Light", system-ui, "Ubuntu", "Droid Sans", sans-serif; + } + + :host-context(.mac) { font-family: -apple-system, BlinkMacSystemFont, sans-serif; } + :host-context(.mac:lang(zh-Hans)) { font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", sans-serif; } + :host-context(.mac:lang(zh-Hant)) { font-family: -apple-system, BlinkMacSystemFont, "PingFang TC", sans-serif; } + :host-context(.mac:lang(ja)) { font-family: -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic Pro", sans-serif; } + :host-context(.mac:lang(ko)) { font-family: -apple-system, BlinkMacSystemFont, "Nanum Gothic", "Apple SD Gothic Neo", "AppleGothic", sans-serif; } + + :host-context(.windows) { font-family: "Segoe WPC", "Segoe UI", sans-serif; } + :host-context(.windows:lang(zh-Hans)) { font-family: "Segoe WPC", "Segoe UI", "Microsoft YaHei", sans-serif; } + :host-context(.windows:lang(zh-Hant)) { font-family: "Segoe WPC", "Segoe UI", "Microsoft Jhenghei", sans-serif; } + :host-context(.windows:lang(ja)) { font-family: "Segoe WPC", "Segoe UI", "Yu Gothic UI", "Meiryo UI", sans-serif; } + :host-context(.windows:lang(ko)) { font-family: "Segoe WPC", "Segoe UI", "Malgun Gothic", "Dotom", sans-serif; } + + :host-context(.linux) { font-family: system-ui, "Ubuntu", "Droid Sans", sans-serif; } + :host-context(.linux:lang(zh-Hans)) { font-family: system-ui, "Ubuntu", "Droid Sans", "Source Han Sans SC", "Source Han Sans CN", "Source Han Sans", sans-serif; } + :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 a8e=globalThis&&globalThis.__decorate||function(i,e,t,n){var r=arguments.length,s=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(s=(r<3?o(s):r>3?o(e,t,s):o(e,t))||s);return r>3&&s&&Object.defineProperty(e,t,s),s},l8e=globalThis&&globalThis.__param||function(i,e){return function(t,n){e(t,n,i)}};let t9=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 _1(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.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.contextView.show(e);const r=fn(()=>{this.currentViewDisposable===r&&this.hideContextView()});return this.currentViewDisposable=r,r}getContextViewElement(){return this.contextView.getViewElement()}layout(){this.contextView.layout()}hideContextView(e){this.contextView.hide(e)}};t9=a8e([l8e(0,$v)],t9);const n9="**",AG="/",d4="[/\\\\]",h4="[^/\\\\]",c8e=/\//g;function RG(i){switch(i){case 0:return"";case 1:return`${h4}*?`;default:return`(?:${d4}|${h4}+${d4}|${d4}${h4}+)*?`}}function OG(i,e){if(!i)return[];const t=[];let n=!1,r=!1,s="";for(const o of i){switch(o){case e:if(!n&&!r){t.push(s),s="";continue}break;case"{":n=!0;break;case"}":n=!1;break;case"[":r=!0;break;case"]":r=!1;break}s+=o}return s&&t.push(s),t}function MG(i){if(!i)return"";let e="";const t=OG(i,AG);if(t.every(n=>n===n9))e=".*";else{let n=!1;t.forEach((r,s)=>{if(r===n9){n||(e+=RG(2),n=!0);return}let o=!1,a="",l=!1,c="";for(const u of r){if(u!=="}"&&o){a+=u;continue}if(l&&(u!=="]"||!c)){let d;u==="-"?d=u:(u==="^"||u==="!")&&!c?d="^":u===AG?d="":d=za(u),c+=d;continue}switch(u){case"{":o=!0;continue;case"[":l=!0;continue;case"}":{const h=`(?:${OG(a,",").map(f=>MG(f)).join("|")})`;e+=h,o=!1,a="";break}case"]":e+="["+c+"]",l=!1,c="";break;case"?":e+=h4;continue;case"*":e+=RG(1);continue;default:e+=za(u)}}si9(a,e)).filter(a=>a!==vu),i),n=t.length;if(!n)return vu;if(n===1)return t[0];const r=function(a,l){for(let c=0,u=t.length;c!!a.allBasenames);s&&(r.allBasenames=s.allBasenames);const o=t.reduce((a,l)=>l.allPaths?a.concat(l.allPaths):a,[]);return o.length&&(r.allPaths=o),r}function VG(i,e,t){const n=qc===tr.sep,r=n?i:i.replace(c8e,qc),s=qc+r,o=tr.sep+i,a=t?function(l,c){return typeof l=="string"&&(l===r||l.endsWith(s)||!n&&(l===i||l.endsWith(o)))?e:null}:function(l,c){return typeof l=="string"&&(l===r||!n&&l===i)?e:null};return a.allPaths=[(t?"*/":"./")+i],a}function b8e(i){try{const e=new RegExp(`^${MG(i)}$`);return function(t){return e.lastIndex=0,typeof t=="string"&&e.test(t)?i:null}}catch{return vu}}function v8e(i,e,t){return!i||typeof e!="string"?!1:WG(i)(e,void 0,t)}function WG(i,e={}){if(!i)return FG;if(typeof i=="string"||w8e(i)){const t=i9(i,e);if(t===vu)return FG;const n=function(r,s){return!!t(r,s)};return t.allBasenames&&(n.allBasenames=t.allBasenames),t.allPaths&&(n.allPaths=t.allPaths),n}return C8e(i,e)}function w8e(i){const e=i;return e?typeof e.base=="string"&&typeof e.pattern=="string":!1}function C8e(i,e){const t=HG(Object.getOwnPropertyNames(i).map(a=>y8e(a,i[a],e)).filter(a=>a!==vu)),n=t.length;if(!n)return vu;if(!t.some(a=>!!a.requiresSiblings)){if(n===1)return t[0];const a=function(u,d){for(let h=0,f=t.length;h!!u.allBasenames);l&&(a.allBasenames=l.allBasenames);const c=t.reduce((u,d)=>d.allPaths?u.concat(d.allPaths):u,[]);return c.length&&(a.allPaths=c),a}const r=function(a,l,c){let u;for(let d=0,h=t.length;d!!a.allBasenames);s&&(r.allBasenames=s.allBasenames);const o=t.reduce((a,l)=>l.allPaths?a.concat(l.allPaths):a,[]);return o.length&&(r.allPaths=o),r}function y8e(i,e,t){if(e===!1)return vu;const n=i9(i,t);if(n===vu)return vu;if(typeof e=="boolean")return n;if(e){const r=e.when;if(typeof r=="string"){const s=(o,a,l,c)=>{if(!c||!n(o,a))return null;const u=r.replace("$(basename)",l),d=c(u);return w2e(d)?d.then(h=>h?i:null):d?i:null};return s.requiresSiblings=!0,s}}return n}function HG(i,e){const t=i.filter(a=>!!a.basenames);if(t.length<2)return i;const n=t.reduce((a,l)=>{const c=l.basenames;return c?a.concat(c):a},[]);let r;if(e){r=[];for(let a=0,l=n.length;a{const c=l.patterns;return c?a.concat(c):a},[]);const s=function(a,l){if(typeof a!="string")return null;if(!l){let u;for(u=a.length;u>0;u--){const d=a.charCodeAt(u-1);if(d===47||d===92)break}l=a.substr(u)}const c=n.indexOf(l);return c!==-1?r[c]:null};s.basenames=n,s.patterns=r,s.allBasenames=n;const o=i.filter(a=>!a.basenames);return o.push(s),o}let b1=[],s9=[],zG=[];function f4(i,e=!1){S8e(i,!1,e)}function S8e(i,e,t){const n=k8e(i,e);b1.push(n),n.userConfigured?zG.push(n):s9.push(n),t&&!n.userConfigured&&b1.forEach(r=>{r.mime===n.mime||r.userConfigured||(n.extension&&r.extension===n.extension&&console.warn(`Overwriting extension <<${n.extension}>> to now point to mime <<${n.mime}>>`),n.filename&&r.filename===n.filename&&console.warn(`Overwriting filename <<${n.filename}>> to now point to mime <<${n.mime}>>`),n.filepattern&&r.filepattern===n.filepattern&&console.warn(`Overwriting filepattern <<${n.filepattern}>> to now point to mime <<${n.mime}>>`),n.firstline&&r.firstline===n.firstline&&console.warn(`Overwriting firstline <<${n.firstline}>> to now point to mime <<${n.mime}>>`))})}function k8e(i,e){return{id:i.id,mime:i.mime,filename:i.filename,extension:i.extension,filepattern:i.filepattern,firstline:i.firstline,userConfigured:e,filenameLowercase:i.filename?i.filename.toLowerCase():void 0,extensionLowercase:i.extension?i.extension.toLowerCase():void 0,filepatternLowercase:i.filepattern?WG(i.filepattern.toLowerCase()):void 0,filepatternOnPath:i.filepattern?i.filepattern.indexOf(tr.sep)>=0:!1}}function E8e(){b1=b1.filter(i=>i.userConfigured),s9=[]}function x8e(i,e){let t;if(i)switch(i.scheme){case sn.file:t=i.fsPath;break;case sn.data:{t=Jh.parseMetaData(i).get(Jh.META_DATA_LABEL);break}default:t=i.path}if(!t)return[fc.unknown];t=t.toLowerCase();const n=Ng(t),r=$G(t,n,zG);if(r)return[r,fc.text];const s=$G(t,n,s9);if(s)return[s,fc.text];if(e){const o=L8e(e);if(o)return[o,fc.text]}return[fc.unknown]}function $G(i,e,t){var n;let r,s,o;for(let a=t.length-1;a>=0;a--){const l=t[a];if(e===l.filenameLowercase){r=l;break}if(l.filepattern&&(!s||l.filepattern.length>s.filepattern.length)){const c=l.filepatternOnPath?i:e;!((n=l.filepatternLowercase)===null||n===void 0)&&n.call(l,c)&&(s=l)}l.extension&&(!o||l.extension.length>o.extension.length)&&e.endsWith(l.extensionLowercase)&&(o=l)}if(r)return r.mime;if(s)return s.mime;if(o)return o.mime}function L8e(i){if(VT(i)&&(i=i.substr(1)),i.length>0)for(let e=b1.length-1;e>=0;e--){const t=b1[e];if(!t.firstline)continue;const n=i.match(t.firstline);if(n&&n.length>0)return t.mime}}const g4=Object.prototype.hasOwnProperty,o9="vs.editor.nullLanguage";gr.register(o9,{});class T8e{constructor(){this._languageIdToLanguage=[],this._languageToLanguageId=new Map,this._register(o9,0),this._register(uu,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]||o9}}class Yv extends Ne{constructor(e=!0,t=!1){super(),this._onDidChange=this._register(new be),this.onDidChange=this._onDidChange.event,Yv.instanceCount++,this._warnOnOverwrite=t,this.languageIdCodec=new T8e,this._dynamicLanguages=[],this._languages={},this._mimeTypesMap={},this._nameMap={},this._lowercaseNameMap={},e&&(this._initializeFromRegistry(),this._register(s1.onDidChangeLanguages(n=>{this._initializeFromRegistry()})))}dispose(){Yv.instanceCount--,super.dispose()}_initializeFromRegistry(){this._languages={},this._mimeTypesMap={},this._nameMap={},this._lowercaseNameMap={},E8e();const e=[].concat(s1.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(r=>{this._lowercaseNameMap[r.toLowerCase()]=n.identifier}),n.mimetypes.forEach(r=>{this._mimeTypesMap[r]=n.identifier})}),sr.as(pp.Configuration).registerOverrideIdentifiers(this.getRegisteredLanguageIds()),this._onDidChange.fire()}_registerLanguage(e){const t=e.id;let n;g4.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 r=null;if(Array.isArray(t.mimetypes)&&t.mimetypes.length>0&&(e.mimetypes.push(...t.mimetypes),r=t.mimetypes[0]),r||(r=`text/x-${n}`,e.mimetypes.push(r)),Array.isArray(t.extensions)){t.configuration?e.extensions=t.extensions.concat(e.extensions):e.extensions=e.extensions.concat(t.extensions);for(let a of t.extensions)f4({id:n,mime:r,extension:a},this._warnOnOverwrite)}if(Array.isArray(t.filenames))for(let a of t.filenames)f4({id:n,mime:r,filename:a},this._warnOnOverwrite),e.filenames.push(a);if(Array.isArray(t.filenamePatterns))for(let a of t.filenamePatterns)f4({id:n,mime:r,filepattern:a},this._warnOnOverwrite);if(typeof t.firstLine=="string"&&t.firstLine.length>0){let a=t.firstLine;a.charAt(0)!=="^"&&(a="^"+a);try{const l=new RegExp(a);SCe(l)||f4({id:n,mime:r,firstline:l},this._warnOnOverwrite)}catch(l){Jt(l)}}e.aliases.push(n);let s=null;if(typeof t.aliases<"u"&&Array.isArray(t.aliases)&&(t.aliases.length===0?s=[null]:s=t.aliases),s!==null)for(const a of s)!a||a.length===0||e.aliases.push(a);const o=s!==null&&s.length>0;if(!(o&&s[0]===null)){const a=(o?s[0]:null)||n;(o||!e.name)&&(e.name=a)}t.configuration&&e.configurationFiles.push(t.configuration),t.icon&&e.icons.push(t.icon)}isRegisteredLanguageId(e){return e?g4.call(this._languages,e):!1}getRegisteredLanguageIds(){return Object.keys(this._languages)}getLanguageIdByLanguageName(e){const t=e.toLowerCase();return g4.call(this._lowercaseNameMap,t)?this._lowercaseNameMap[t]:null}getLanguageIdByMimeType(e){return e&&g4.call(this._mimeTypesMap,e)?this._mimeTypesMap[e]:null}guessLanguageIdByFilepathOrFirstLine(e,t){if(!e&&!t)return[];const n=x8e(e,t);return Eg(n.map(r=>this.getLanguageIdByMimeType(r)))}}Yv.instanceCount=0;class Zv extends Ne{constructor(e=!1){super(),this._onDidEncounterLanguage=this._register(new be),this.onDidEncounterLanguage=this._onDidEncounterLanguage.event,this._onDidChange=this._register(new be({leakWarningThreshold:200})),this.onDidChange=this._onDidChange.event,Zv.instanceCount++,this._encounteredLanguages=new Set,this._registry=this._register(new Yv(!0,e)),this.languageIdCodec=this._registry.languageIdCodec,this._register(this._registry.onDidChange(()=>this._onDidChange.fire()))}dispose(){Zv.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 oz(n,null)}createById(e){return new UG(this.onDidChange,()=>this._createAndGetLanguageIdentifier(e))}createByFilepathOrFirstLine(e,t){return new UG(this.onDidChange,()=>{const n=this.guessLanguageIdByFilepathOrFirstLine(e,t);return this._createAndGetLanguageIdentifier(n)})}_createAndGetLanguageIdentifier(e){return(!e||!this.isRegisteredLanguageId(e))&&(e=uu),this._encounteredLanguages.has(e)||(this._encounteredLanguages.add(e),Oi.getOrCreate(e),this._onDidEncounterLanguage.fire(e)),e}}Zv.instanceCount=0;class UG{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 be({onLastListenerRemove:()=>{this._dispose()}})),this._emitter.event}_evaluate(){const e=this._selector();e!==this.languageId&&(this.languageId=e,this._emitter&&this._emitter.fire(this.languageId))}}const wpt="",Cpt="";function jG(i){let e=i.definition;for(;e instanceof k;)e=e.definition;return`.codicon-${i.id}:before { content: '${e.fontCharacter}'; }`}function a9(...i){return function(e,t){for(let n=0,r=i.length;n0?[{start:0,end:e.length}]:[]:null}function GG(i,e){const t=e.toLowerCase().indexOf(i.toLowerCase());return t===-1?null:[{start:t,end:t+i.length}]}function I8e(i,e){return l9(i.toLowerCase(),e.toLowerCase(),0,0)}function l9(i,e,t,n){if(t===i.length)return[];if(n===e.length)return null;if(i[t]===e[n]){let r=null;return(r=l9(i,e,t+1,n+1))?d9({start:n,end:n+1},r):null}return l9(i,e,t,n+1)}function c9(i){return 97<=i&&i<=122}function m4(i){return 65<=i&&i<=90}function u9(i){return 48<=i&&i<=57}function KG(i){return i===32||i===9||i===10||i===13}const YG=new Set;"()[]{}<>`'\"-/;:,.?!".split("").forEach(i=>YG.add(i.charCodeAt(0)));function _4(i){return KG(i)||YG.has(i)}function D8e(i,e){return i===e||_4(i)&&_4(e)}function ZG(i){return c9(i)||m4(i)||u9(i)}function d9(i,e){return e.length===0?e=[i]:i.end===e[0].start?e[0].start=i.start:e.unshift(i),e}function XG(i,e){for(let t=e;t0&&!ZG(i.charCodeAt(t-1)))return t}return i.length}function h9(i,e,t,n){if(t===i.length)return[];if(n===e.length)return null;if(i[t]!==e[n].toLowerCase())return null;{let r=null,s=n+1;for(r=h9(i,e,t+1,n+1);!r&&(s=XG(e,s)).6}function R8e(i){const{upperPercent:e,lowerPercent:t,alphaPercent:n,numericPercent:r}=i;return t>.2&&e<.8&&n>.6&&r<.2}function O8e(i){let e=0,t=0,n=0,r=0;for(let s=0;s60)return null;const t=N8e(e);if(!R8e(t)){if(!A8e(t))return null;e=e.toLowerCase()}let n=null,r=0;for(i=i.toLowerCase();r0&&_4(i.charCodeAt(t-1)))return t;return i.length}const P8e=a9(p4,QG,GG),F8e=a9(p4,QG,I8e),eK=new lf(1e4);function tK(i,e,t=!1){if(typeof i!="string"||typeof e!="string")return null;let n=eK.get(i);n||(n=new RegExp(CCe(i),"i"),eK.set(i,n));const r=n.exec(e);return r?[{start:r.index,end:r.index+r[0].length}]:t?F8e(i,e):P8e(i,e)}function B8e(i,e,t,n,r,s){const o=Math.min(13,i.length);for(;t"u")return[];const e=[],t=i[1];for(let n=i.length-1;n>1;n--){const r=i[n]+t,s=e[e.length-1];s&&s.end===r?s.end=r+1:e.push({start:r,end:r+1})}return e}const uf=128;function g9(){const i=[],e=[];for(let t=0;t<=uf;t++)e[t]=0;for(let t=0;t<=uf;t++)i.push(e.slice(0));return i}function nK(i){const e=[];for(let t=0;t<=i;t++)e[t]=0;return e}const iK=nK(2*uf),p9=nK(2*uf),Td=g9(),Ep=g9(),v4=g9();function w4(i,e){if(e<0||e>=i.length)return!1;const t=i.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 40:case 91:return!0;case void 0:return!1;default:return!!BT(t)}}function rK(i,e){if(e<0||e>=i.length)return!1;switch(i.charCodeAt(e)){case 32:case 9:return!0;default:return!1}}function C4(i,e,t){return e[i]!==t[i]}function V8e(i,e,t,n,r,s,o=!1){for(;euf?uf:i.length,l=n.length>uf?uf:n.length;if(t>=a||s>=l||a-t>l-s||!V8e(e,t,a,r,s,l,!0))return;W8e(a,l,t,s,e,r);let c=1,u=1,d=t,h=s;const f=[!1];for(c=1,d=t;db,L=T?Ep[c][u-1]+(Td[c][u-1]>0?-5:0):0,O=h>b+1&&Td[c][u-1]>0,N=O?Ep[c][u-2]+(Td[c][u-2]>0?-5:0):0;if(O&&(!T||N>=L)&&(!I||N>=x))Ep[c][u]=N,v4[c][u]=3,Td[c][u]=0;else if(T&&(!I||L>=x))Ep[c][u]=L,v4[c][u]=2,Td[c][u]=0;else if(I)Ep[c][u]=x,v4[c][u]=1,Td[c][u]=Td[c-1][u-1]+1;else throw new Error("not possible")}}if(!f[0]&&!o)return;c--,u--;const g=[Ep[c][u],s];let p=0,m=0;for(;c>=1;){let b=u;do{const v=v4[c][b];if(v===3)b=b-2;else if(v===2)b=b-1;else break}while(b>=1);p>1&&e[t+c-1]===r[s+u-1]&&!C4(b+s-1,n,r)&&p+1>Td[c][b]&&(b=u),b===u?p++:p=1,m||(m=b),c--,u=b-1,g.push(u)}l===a&&(g[0]+=2);const _=m-a;return g[0]-=_,g}function W8e(i,e,t,n,r,s){let o=i-1,a=e-1;for(;o>=t&&a>=n;)r[o]===s[a]&&(p9[o]=a,o--),a--}function H8e(i,e,t,n,r,s,o,a,l,c,u){if(e[t]!==s[o])return Number.MIN_SAFE_INTEGER;let d=1,h=!1;return o===t-n?d=i[t]===r[o]?7:5:C4(o,r,s)&&(o===0||!C4(o-1,r,s))?(d=i[t]===r[o]?7:5,h=!0):w4(s,o)&&(o===0||!w4(s,o-1))?d=5:(w4(s,o-1)||rK(s,o-1))&&(d=5,h=!0),d>1&&t===n&&(u[0]=!0),h||(h=C4(o,r,s)||w4(s,o-1)||rK(s,o-1)),t===n?o>l&&(d-=h?3:5):c?d+=h?2:0:d+=h?0:1,o+1===a&&(d-=h?3:5),d}function z8e(i,e,t,n,r,s,o){return $8e(i,e,t,n,r,s,!0,o)}function $8e(i,e,t,n,r,s,o,a){let l=v1(i,e,t,n,r,s,a);if(l&&!o)return l;if(i.length>=3){const c=Math.min(7,i.length-1);for(let u=t+1;ul[0])&&(l=h))}}}return l}function U8e(i,e){if(e+1>=i.length)return;const t=i[e],n=i[e+1];if(t!==n)return i.slice(0,e)+n+t+i.slice(e+2)}const Xv="$(",m9=new RegExp(`\\$\\(${Gs.iconNameExpression}(?:${Gs.iconModifierExpression})?\\)`,"g"),j8e=new RegExp(Gs.iconNameCharacter),q8e=new RegExp(`(\\\\)?${m9.source}`,"g");function G8e(i){return i.replace(q8e,(e,t)=>t?e:`\\${e}`)}const K8e=new RegExp(`\\\\${m9.source}`,"g");function Y8e(i){return i.replace(K8e,e=>`\\${e}`)}const Z8e=new RegExp(`(\\s)?(\\\\)?${m9.source}(\\s)?`,"g");function _9(i){return i.indexOf(Xv)===-1?i:i.replace(Z8e,(e,t,n,r)=>n?e:t||r||"")}function y4(i){const e=i.indexOf(Xv);return e===-1?{text:i}:X8e(i,e)}function X8e(i,e){const t=[];let n="";function r(h){if(h){n+=h;for(const f of h)t.push(a)}}let s=-1,o="",a=0,l,c,u=e;const d=i.length;for(r(i.substr(0,e));uthis.doGetActionViewItem(a,n,s),context:n.context,actionRunner:n.actionRunner,ariaLabel:n.ariaLabel,focusOnlyEnabledItems:!0,triggerKeys:{keys:[3,...gn||ws?[10]:[]],keyDown:!0}}),this.menuElement=r,this.actionsList.setAttribute("role","menu"),this.actionsList.tabIndex=0,this.menuDisposables=this._register(new Je),this.initializeOrUpdateStyleSheet(e,{}),this._register(ei.addTarget(r)),Xe(r,Nt.KEY_DOWN,a=>{new ki(a).equals(2)&&a.preventDefault()}),n.enableMnemonics&&this.menuDisposables.add(Xe(r,Nt.KEY_DOWN,a=>{const l=a.key.toLocaleLowerCase();if(this.mnemonics.has(l)){Xn.stop(a,!0);const c=this.mnemonics.get(l);if(c.length===1&&(c[0]instanceof sK&&c[0].container&&this.focusItemByElement(c[0].container),c[0].onClick(a)),c.length>1){const u=c.shift();u&&u.container&&(this.focusItemByElement(u.container),c.push(u)),this.mnemonics.set(l,c)}}})),ws&&this._register(Xe(r,Nt.KEY_DOWN,a=>{const l=new ki(a);l.equals(14)||l.equals(11)?(this.focusedItem=this.viewItems.length-1,this.focusNext(),Xn.stop(a,!0)):(l.equals(13)||l.equals(12))&&(this.focusedItem=0,this.focusPrevious(),Xn.stop(a,!0))})),this._register(Xe(this.domNode,Nt.MOUSE_OUT,a=>{let l=a.relatedTarget;ld(l,this.domNode)||(this.focusedItem=void 0,this.updateFocus(),a.stopPropagation())})),this._register(Xe(this.actionsList,Nt.MOUSE_OVER,a=>{let l=a.target;if(!(!l||!ld(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(ei.addTarget(this.actionsList)),this._register(Xe(this.actionsList,bi.Tap,a=>{let l=a.initialTarget;if(!(!l||!ld(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()}}}));let s={parent:this};this.mnemonics=new Map,this.scrollableElement=this._register(new dv(r,{alwaysConsumeMouseWheel:!0,horizontal:2,vertical:3,verticalScrollbarSize:7,handleMouseWheel:!0,useShadows:!0}));const o=this.scrollableElement.getDomNode();o.style.position="",this._register(Xe(r,bi.Change,a=>{Xn.stop(a,!0);const l=this.scrollableElement.getScrollPosition().scrollTop;this.scrollableElement.setScrollPosition({scrollTop:l-a.translationY})})),this._register(Xe(o,Nt.MOUSE_UP,a=>{a.preventDefault()})),r.style.maxHeight=`${Math.max(10,window.innerHeight-e.getBoundingClientRect().top-35)}px`,t=t.filter(a=>{var l;return!((l=n.submenuIds)===null||l===void 0)&&l.has(a.id)?(console.warn(`Found submenu cycle: ${a.id}`),!1):!0}),this.push(t,{icon:!0,label:!0,isMenu:!0}),e.appendChild(this.scrollableElement.getDomNode()),this.scrollableElement.scanDomNode(),this.viewItems.filter(a=>!(a instanceof C9)).forEach((a,l,c)=>{a.updatePositionInSet(l+1,c.length)})}initializeOrUpdateStyleSheet(e,t){this.styleSheet||($b(e)?this.styleSheet=Ka(e):(Qv.globalStyleSheet||(Qv.globalStyleSheet=Ka()),this.styleSheet=Qv.globalStyleSheet)),this.styleSheet.textContent=J8e(t,$b(e))}style(e){const t=this.getContainer();this.initializeOrUpdateStyleSheet(t,e);const n=e.foregroundColor?`${e.foregroundColor}`:"",r=e.backgroundColor?`${e.backgroundColor}`:"",s=e.borderColor?`1px solid ${e.borderColor}`:"",o=e.shadowColor?`0 2px 4px ${e.shadowColor}`:"";t.style.border=s,this.domNode.style.color=n,this.domNode.style.backgroundColor=r,t.style.boxShadow=o,this.viewItems&&this.viewItems.forEach(a=>{(a instanceof w9||a instanceof C9)&&a.style(e)})}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(Xe(this.element,Nt.MOUSE_UP,r=>{if(Xn.stop(r,!0),ua){if(new Ga(r).rightButton)return;this.onClick(r)}else setTimeout(()=>{this.onClick(r)},0)})),this._register(Xe(this.element,Nt.CONTEXT_MENU,r=>{Xn.stop(r,!0)})))},100),this._register(this.runOnceToEnableMouseUp)}render(e){super.render(e),this.element&&(this.container=e,this.item=$e(this.element,Ze("a.action-menu-item")),this._action.id===Ya.ID?this.item.setAttribute("role","presentation"):(this.item.setAttribute("role","menuitem"),this.mnemonic&&this.item.setAttribute("aria-keyshortcuts",`${this.mnemonic}`)),this.check=$e(this.item,Ze("span.menu-item-check"+k.menuSelection.cssSelector)),this.check.setAttribute("role","none"),this.label=$e(this.item,Ze("span.action-label")),this.options.label&&this.options.keybinding&&($e(this.item,Ze("span.keybinding")).textContent=this.options.keybinding),this.runOnceToEnableMouseUp.schedule(),this.updateClass(),this.updateLabel(),this.updateTooltip(),this.updateEnabled(),this.updateChecked())}blur(){super.blur(),this.applyStyle()}focus(){super.focus(),this.item&&this.item.focus(),this.applyStyle()}updatePositionInSet(e,t){this.item&&(this.item.setAttribute("aria-posinset",`${e}`),this.item.setAttribute("aria-setsize",`${t}`))}updateLabel(){if(this.label&&this.options.label){Dr(this.label);let e=_9(this.getAction().label);if(e){const t=Q8e(e);this.options.enableMnemonics||(e=t),this.label.setAttribute("aria-label",t.replace(/&&/g,"&"));const n=b9.exec(e);if(n){e=IT(e),v9.lastIndex=0;let r=v9.exec(e);for(;r&&r[1];)r=v9.exec(e);const s=o=>o.replace(/&&/g,"&");r?this.label.append(DT(s(e.substr(0,r.index))," "),Ze("u",{"aria-hidden":"true"},r[3]),Oz(s(e.substr(r.index+r[0].length))," ")):this.label.innerText=s(e).trim(),this.item&&this.item.setAttribute("aria-keyshortcuts",(n[1]?n[1]:n[3]).toLocaleLowerCase())}else this.label.innerText=e.replace(/&&/g,"&").trim()}}}updateTooltip(){}updateClass(){this.cssClass&&this.item&&this.item.classList.remove(...this.cssClass.split(" ")),this.options.icon&&this.label?(this.cssClass=this.getAction().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.getAction().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.getAction().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(){if(!this.menuStyle)return;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,r=e&&this.menuStyle.selectionBorderColor?`thin solid ${this.menuStyle.selectionBorderColor}`:"";this.item&&(this.item.style.color=t?t.toString():"",this.item.style.backgroundColor=n?n.toString():""),this.check&&(this.check.style.color=t?t.toString():""),this.container&&(this.container.style.border=r)}style(e){this.menuStyle=e,this.applyStyle()}}class sK extends w9{constructor(e,t,n,r){super(e,e,r),this.submenuActions=t,this.parentData=n,this.submenuOptions=r,this.mysubmenu=null,this.submenuDisposables=this._register(new Je),this.mouseOver=!1,this.expandDirection=r&&r.expandDirection!==void 0?r.expandDirection:k4.Right,this.showScheduler=new ri(()=>{this.mouseOver&&(this.cleanupExistingSubmenu(!1),this.createSubmenu(!1))},250),this.hideScheduler=new ri(()=>{this.element&&!ld(I_(),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=$e(this.item,Ze("span.submenu-indicator"+k.menuSubmenu.cssSelector)),this.submenuIndicator.setAttribute("aria-hidden","true")),this._register(Xe(this.element,Nt.KEY_UP,t=>{let n=new ki(t);(n.equals(17)||n.equals(3))&&(Xn.stop(t,!0),this.createSubmenu(!0))})),this._register(Xe(this.element,Nt.KEY_DOWN,t=>{let n=new ki(t);I_()===this.item&&(n.equals(17)||n.equals(3))&&Xn.stop(t,!0)})),this._register(Xe(this.element,Nt.MOUSE_OVER,t=>{this.mouseOver||(this.mouseOver=!0,this.showScheduler.schedule())})),this._register(Xe(this.element,Nt.MOUSE_LEAVE,t=>{this.mouseOver=!1})),this._register(Xe(this.element,Nt.FOCUS_OUT,t=>{this.element&&!ld(I_(),this.element)&&this.hideScheduler.schedule()})),this._register(this.parentData.parent.onScroll(()=>{this.parentData.parent.focus(!1),this.cleanupExistingSubmenu(!1)})))}updateEnabled(){}onClick(e){Xn.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,r){const s={top:0,left:0};return s.left=m1(e.width,t.width,{position:r===k4.Right?0:1,offset:n.left,size:n.width}),s.left>=n.left&&s.left{new ki(c).equals(15)&&(Xn.stop(c,!0),this.parentData.parent.focus(),this.cleanupExistingSubmenu(!0))})),this.submenuDisposables.add(Xe(this.submenuContainer,Nt.KEY_DOWN,c=>{new ki(c).equals(15)&&Xn.stop(c,!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(){if(super.applyStyle(),!this.menuStyle)return;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?`${t}`:""),this.parentData.submenu&&this.parentData.submenu.style(this.menuStyle)}dispose(){super.dispose(),this.hideScheduler.dispose(),this.mysubmenu&&(this.mysubmenu.dispose(),this.mysubmenu=null),this.submenuContainer&&(this.submenuContainer=void 0)}}class C9 extends Vv{style(e){this.label&&(this.label.style.borderBottomColor=e.separatorColor?`${e.separatorColor}`:"")}}function Q8e(i){const e=b9,t=e.exec(i);if(!t)return i;const n=!t[1];return i.replace(e,n?"$2$3":"").trim()}function J8e(i,e){let t=` +.monaco-menu { + font-size: 13px; + +} + +${jG(k.menuSelection)} +${jG(k.menuSubmenu)} + +.monaco-menu .monaco-action-bar { + text-align: right; + overflow: hidden; + white-space: nowrap; +} + +.monaco-menu .monaco-action-bar .actions-container { + display: flex; + margin: 0 auto; + padding: 0; + width: 100%; + justify-content: flex-end; +} + +.monaco-menu .monaco-action-bar.vertical .actions-container { + display: inline-block; +} + +.monaco-menu .monaco-action-bar.reverse .actions-container { + flex-direction: row-reverse; +} + +.monaco-menu .monaco-action-bar .action-item { + cursor: pointer; + display: inline-block; + transition: transform 50ms ease; + position: relative; /* DO NOT REMOVE - this is the key to preventing the ghosting icon bug in Chrome 42 */ +} + +.monaco-menu .monaco-action-bar .action-item.disabled { + cursor: default; +} + +.monaco-menu .monaco-action-bar.animated .action-item.active { + transform: scale(1.272019649, 1.272019649); /* 1.272019649 = √φ */ +} + +.monaco-menu .monaco-action-bar .action-item .icon, +.monaco-menu .monaco-action-bar .action-item .codicon { + display: inline-block; +} + +.monaco-menu .monaco-action-bar .action-item .codicon { + display: flex; + align-items: center; +} + +.monaco-menu .monaco-action-bar .action-label { + font-size: 11px; + margin-right: 4px; +} + +.monaco-menu .monaco-action-bar .action-item.disabled .action-label, +.monaco-menu .monaco-action-bar .action-item.disabled .action-label:hover { + opacity: 0.4; +} + +/* Vertical actions */ + +.monaco-menu .monaco-action-bar.vertical { + text-align: left; +} + +.monaco-menu .monaco-action-bar.vertical .action-item { + display: block; +} + +.monaco-menu .monaco-action-bar.vertical .action-label.separator { + display: block; + border-bottom: 1px solid #bbb; + padding-top: 1px; + margin-left: .8em; + margin-right: .8em; +} + +.monaco-menu .secondary-actions .monaco-action-bar .action-label { + margin-left: 6px; +} + +/* Action Items */ +.monaco-menu .monaco-action-bar .action-item.select-container { + overflow: hidden; /* somehow the dropdown overflows its container, we prevent it here to not push */ + flex: 1; + max-width: 170px; + min-width: 60px; + display: flex; + align-items: center; + justify-content: center; + margin-right: 10px; +} + +.monaco-menu .monaco-action-bar.vertical { + margin-left: 0; + overflow: visible; +} + +.monaco-menu .monaco-action-bar.vertical .actions-container { + display: block; +} + +.monaco-menu .monaco-action-bar.vertical .action-item { + padding: 0; + transform: none; + display: flex; +} + +.monaco-menu .monaco-action-bar.vertical .action-item.active { + transform: none; +} + +.monaco-menu .monaco-action-bar.vertical .action-menu-item { + flex: 1 1 auto; + display: flex; + height: 2em; + align-items: center; + position: relative; +} + +.monaco-menu .monaco-action-bar.vertical .action-label { + flex: 1 1 auto; + text-decoration: none; + padding: 0 1em; + background: none; + font-size: 12px; + line-height: 1; +} + +.monaco-menu .monaco-action-bar.vertical .keybinding, +.monaco-menu .monaco-action-bar.vertical .submenu-indicator { + display: inline-block; + flex: 2 1 auto; + padding: 0 1em; + text-align: right; + font-size: 12px; + line-height: 1; +} + +.monaco-menu .monaco-action-bar.vertical .submenu-indicator { + height: 100%; +} + +.monaco-menu .monaco-action-bar.vertical .submenu-indicator.codicon { + font-size: 16px !important; + display: flex; + align-items: center; +} + +.monaco-menu .monaco-action-bar.vertical .submenu-indicator.codicon::before { + margin-left: auto; + margin-right: -20px; +} + +.monaco-menu .monaco-action-bar.vertical .action-item.disabled .keybinding, +.monaco-menu .monaco-action-bar.vertical .action-item.disabled .submenu-indicator { + opacity: 0.4; +} + +.monaco-menu .monaco-action-bar.vertical .action-label:not(.separator) { + display: inline-block; + box-sizing: border-box; + margin: 0; +} + +.monaco-menu .monaco-action-bar.vertical .action-item { + position: static; + overflow: visible; +} + +.monaco-menu .monaco-action-bar.vertical .action-item .monaco-submenu { + position: absolute; +} + +.monaco-menu .monaco-action-bar.vertical .action-label.separator { + padding: 0.5em 0 0 0; + margin-bottom: 0.5em; + width: 100%; + height: 0px !important; + margin-left: .8em !important; + margin-right: .8em !important; +} + +.monaco-menu .monaco-action-bar.vertical .action-label.separator.text { + padding: 0.7em 1em 0.1em 1em; + font-weight: bold; + opacity: 1; +} + +.monaco-menu .monaco-action-bar.vertical .action-label:hover { + color: inherit; +} + +.monaco-menu .monaco-action-bar.vertical .menu-item-check { + position: absolute; + visibility: hidden; + width: 1em; + height: 100%; +} + +.monaco-menu .monaco-action-bar.vertical .action-menu-item.checked .menu-item-check { + visibility: visible; + display: flex; + align-items: center; + justify-content: center; +} + +/* Context Menu */ + +.context-view.monaco-menu-container { + outline: 0; + border: none; + animation: fadeIn 0.083s linear; + -webkit-app-region: no-drag; +} + +.context-view.monaco-menu-container :focus, +.context-view.monaco-menu-container .monaco-action-bar.vertical:focus, +.context-view.monaco-menu-container .monaco-action-bar.vertical :focus { + outline: 0; +} + +.monaco-menu .monaco-action-bar.vertical .action-item { + border: thin solid transparent; /* prevents jumping behaviour on hover or focus */ +} + + +/* High Contrast Theming */ +:host-context(.hc-black) .context-view.monaco-menu-container { + box-shadow: none; +} + +:host-context(.hc-black) .monaco-menu .monaco-action-bar.vertical .action-item.focused { + background: none; +} + +/* Vertical Action Bar Styles */ + +.monaco-menu .monaco-action-bar.vertical { + padding: .5em 0; +} + +.monaco-menu .monaco-action-bar.vertical .action-menu-item { + height: 1.8em; +} + +.monaco-menu .monaco-action-bar.vertical .action-label:not(.separator), +.monaco-menu .monaco-action-bar.vertical .keybinding { + font-size: inherit; + padding: 0 2em; +} + +.monaco-menu .monaco-action-bar.vertical .menu-item-check { + font-size: inherit; + width: 2em; +} + +.monaco-menu .monaco-action-bar.vertical .action-label.separator { + font-size: inherit; + padding: 0.2em 0 0 0; + margin-bottom: 0.2em; +} + +:host-context(.linux) .monaco-menu .monaco-action-bar.vertical .action-label.separator { + margin-left: 0; + margin-right: 0; +} + +.monaco-menu .monaco-action-bar.vertical .submenu-indicator { + font-size: 60%; + padding: 0 1.8em; +} + +:host-context(.linux) .monaco-menu .monaco-action-bar.vertical .submenu-indicator { + height: 100%; + mask-size: 10px 10px; + -webkit-mask-size: 10px 10px; +} + +.monaco-menu .action-item { + cursor: default; +}`;if(e){t+=` + /* Arrows */ + .monaco-scrollable-element > .scrollbar > .scra { + cursor: pointer; + font-size: 11px !important; + } + + .monaco-scrollable-element > .visible { + opacity: 1; + + /* Background rule added for IE9 - to allow clicks on dom node */ + background:rgba(0,0,0,0); + + transition: opacity 100ms linear; + } + .monaco-scrollable-element > .invisible { + opacity: 0; + pointer-events: none; + } + .monaco-scrollable-element > .invisible.fade { + transition: opacity 800ms linear; + } + + /* Scrollable Content Inset Shadow */ + .monaco-scrollable-element > .shadow { + position: absolute; + display: none; + } + .monaco-scrollable-element > .shadow.top { + display: block; + top: 0; + left: 3px; + height: 3px; + width: 100%; + } + .monaco-scrollable-element > .shadow.left { + display: block; + top: 3px; + left: 0; + height: 100%; + width: 3px; + } + .monaco-scrollable-element > .shadow.top-left-corner { + display: block; + top: 0; + left: 0; + height: 3px; + width: 3px; + } + `;const n=i.scrollbarShadow;n&&(t+=` + .monaco-scrollable-element > .shadow.top { + box-shadow: ${n} 0 6px 6px -6px inset; + } + + .monaco-scrollable-element > .shadow.left { + box-shadow: ${n} 6px 0 6px -6px inset; + } + + .monaco-scrollable-element > .shadow.top.left { + box-shadow: ${n} 6px 6px 6px -6px inset; + } + `);const r=i.scrollbarSliderBackground;r&&(t+=` + .monaco-scrollable-element > .scrollbar > .slider { + background: ${r}; + } + `);const s=i.scrollbarSliderHoverBackground;s&&(t+=` + .monaco-scrollable-element > .scrollbar > .slider:hover { + background: ${s}; + } + `);const o=i.scrollbarSliderActiveBackground;o&&(t+=` + .monaco-scrollable-element > .scrollbar > .slider.active { + background: ${o}; + } + `)}return t}const ypt="";function mc(i,e){const t=Object.create(null);for(let n in e){const r=e[n];r&&(t[n]=fd(r,i))}return t}function y9(i,e,t){function n(){const r=mc(i.getColorTheme(),e);typeof t=="function"?t(r):t.style(r)}return n(),i.onDidColorThemeChange(n)}function eTe(i,e,t){return y9(e,{badgeBackground:(t==null?void 0:t.badgeBackground)||Yb,badgeForeground:(t==null?void 0:t.badgeForeground)||Zb,badgeBorder:Ai},i)}function xp(i,e,t){return y9(e,Object.assign(Object.assign({},E4),t||{}),i)}const E4={listFocusBackground:Ake,listFocusForeground:Rke,listFocusOutline:Oke,listActiveSelectionBackground:qh,listActiveSelectionForeground:Gh,listActiveSelectionIconForeground:jS,listFocusAndSelectionBackground:qh,listFocusAndSelectionForeground:Gh,listInactiveSelectionBackground:Mke,listInactiveSelectionIconForeground:Fke,listInactiveSelectionForeground:Pke,listInactiveFocusBackground:Bke,listInactiveFocusOutline:Vke,listHoverBackground:Wke,listHoverForeground:Hke,listDropBackground:zke,listSelectionOutline:Fs,listHoverOutline:Fs,listFilterWidgetBackground:$ke,listFilterWidgetOutline:Uke,listFilterWidgetNoMatchesOutline:jke,listMatchesShadow:Hh,treeIndentGuidesStroke:qke,tableColumnsBorder:Gke,tableOddRowsBackgroundColor:Kke},tTe={shadowColor:Hh,borderColor:Yke,foregroundColor:Zke,backgroundColor:Xke,selectionForegroundColor:Qke,selectionBackgroundColor:Jke,selectionBorderColor:e4e,separatorColor:t4e,scrollbarShadow:F_,scrollbarSliderBackground:B_,scrollbarSliderHoverBackground:V_,scrollbarSliderActiveBackground:W_};function nTe(i,e,t){return y9(e,Object.assign(Object.assign({},tTe),t),i)}class iTe{constructor(e,t,n,r,s){this.contextViewService=e,this.telemetryService=t,this.notificationService=n,this.keybindingService=r,this.themeService=s,this.focusToReturn=null,this.block=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,r=rU(e.domForShadowRoot)?e.domForShadowRoot:void 0;this.contextViewService.showContextView({getAnchor:()=>e.getAnchor(),canRelayout:!1,anchorAlignment:e.anchorAlignment,anchorAxisAlignment:e.anchorAxisAlignment,render:s=>{let o=e.getMenuClassName?e.getMenuClassName():"";o&&(s.className+=" "+o),this.options.blockMouse&&(this.block=s.appendChild(Ze(".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",Xe(this.block,Nt.MOUSE_DOWN,c=>c.stopPropagation()));const a=new Je,l=e.actionRunner||new N_;return l.onBeforeRun(this.onActionRun,this,a),l.onDidRun(this.onDidActionRun,this,a),n=new Qv(s,t,{actionViewItemProvider:e.getActionViewItem,context:e.getActionsContext?e.getActionsContext():null,actionRunner:l,getKeyBinding:e.getKeyBinding?e.getKeyBinding:c=>this.keybindingService.lookupKeybinding(c.id)}),a.add(nTe(n,this.themeService)),n.onDidCancel(()=>this.contextViewService.hideContextView(!0),null,a),n.onDidBlur(()=>this.contextViewService.hideContextView(!0),null,a),a.add(Xe(window,Nt.BLUR,()=>this.contextViewService.hideContextView(!0))),a.add(Xe(window,Nt.MOUSE_DOWN,c=>{if(c.defaultPrevented)return;let u=new Ga(c),d=u.target;if(!u.rightButton){for(;d;){if(d===s)return;d=d.parentElement}this.contextViewService.hideContextView(!0)}})),rd(a,n)},focus:()=>{n&&n.focus(!!e.autoSelectFirstItem)},onHide:s=>{e.onHide&&e.onHide(!!s),this.block&&(this.block.remove(),this.block=null),this.focusToReturn&&this.focusToReturn.focus()}},r,!!r)}onActionRun(e){this.telemetryService.publicLog2("workbenchActionExecuted",{id:e.action.id,from:"contextMenu"}),this.contextViewService.hideContextView(!1),this.focusToReturn&&this.focusToReturn.focus()}onDidActionRun(e){e.error&&!jc(e.error)&&this.notificationService.error(e.error)}}var rTe=globalThis&&globalThis.__decorate||function(i,e,t,n){var r=arguments.length,s=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(s=(r<3?o(s):r>3?o(e,t,s):o(e,t))||s);return r>3&&s&&Object.defineProperty(e,t,s),s},Jv=globalThis&&globalThis.__param||function(i,e){return function(t,n){e(t,n,i)}};let S9=class extends Ne{constructor(e,t,n,r,s){super(),this._onDidShowContextMenu=new be,this._onDidHideContextMenu=new be,this.contextMenuHandler=new iTe(n,e,t,r,s)}configure(e){this.contextMenuHandler.configure(e)}showContextMenu(e){this.contextMenuHandler.showContextMenu(Object.assign(Object.assign({},e),{onHide:t=>{e.onHide&&e.onHide(t),this._onDidHideContextMenu.fire()}})),Ug.getInstance().resetKeyStatus(),this._onDidShowContextMenu.fire()}};S9=rTe([Jv(0,ru),Jv(1,or),Jv(2,Hv),Jv(3,qi),Jv(4,Ei)],S9);function k9(i){let e=JSON.parse(i);return e=E9(e),e}function E9(i,e=0){if(!i||e>200)return i;if(typeof i=="object"){switch(i.$mid){case 1:return Pt.revive(i);case 2:return new RegExp(i.source,i.flags);case 14:return new Date(i.source)}if(i instanceof tS||i instanceof Uint8Array)return i;if(Array.isArray(i))for(let t=0;taK(i,t))}function oTe(i){let e;const t=/^L?(\d+)(?:,(\d+))?(-L?(\d+)(?:,(\d+))?)?/.exec(i.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},i=i.with({fragment:""})),{selection:e,uri:i}}var x9=globalThis&&globalThis.__decorate||function(i,e,t,n){var r=arguments.length,s=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(s=(r<3?o(s):r>3?o(e,t,s):o(e,t))||s);return r>3&&s&&Object.defineProperty(e,t,s),s},L4=globalThis&&globalThis.__param||function(i,e){return function(t,n){e(t,n,i)}},Lp=globalThis&&globalThis.__awaiter||function(i,e,t,n){function r(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(u){try{c(n.next(u))}catch(d){o(d)}}function l(u){try{c(n.throw(u))}catch(d){o(d)}}function c(u){u.done?s(u.value):r(u.value).then(a,l)}c((n=n.apply(i,e||[])).next())})};let L9=class{constructor(e){this._commandService=e}open(e,t){return Lp(this,void 0,void 0,function*(){if(!aK(e,sn.command))return!1;if(!(t!=null&&t.allowCommands))return!0;typeof e=="string"&&(e=Pt.parse(e));let n=[];try{n=k9(decodeURIComponent(e.query))}catch{try{n=k9(e.query)}catch{}}return Array.isArray(n)||(n=[n]),yield this._commandService.executeCommand(e.path,...n),!0})}};L9=x9([L4(0,rr)],L9);let T9=class{constructor(e){this._editorService=e}open(e,t){return Lp(this,void 0,void 0,function*(){typeof e=="string"&&(e=Pt.parse(e));const{selection:n,uri:r}=oTe(e);return e=r,e.scheme===sn.file&&(e=U5e(e)),yield this._editorService.openCodeEditor({resource:e,options:Object.assign({selection:n,source:t!=null&&t.fromUserGesture?x4.USER:x4.API},t==null?void 0:t.editorOptions)},this._editorService.getFocusedCodeEditor(),t==null?void 0:t.openToSide),!0})}};T9=x9([L4(0,Zn)],T9);let I9=class{constructor(e,t){this._openers=new la,this._validators=new la,this._resolvers=new la,this._resolvedUriTargets=new Xs(n=>n.with({path:null,fragment:null,query:null}).toString()),this._externalOpeners=new la,this._defaultExternalOpener={openExternal:n=>Lp(this,void 0,void 0,function*(){return lK(n,sn.http,sn.https)?aU(n):window.location.href=n,!0})},this._openers.push({open:(n,r)=>Lp(this,void 0,void 0,function*(){return r!=null&&r.openExternal||lK(n,sn.mailto,sn.http,sn.https,sn.vsls)?(yield this._doOpenExternal(n,r),!0):!1})}),this._openers.push(new L9(t)),this._openers.push(new T9(e))}registerOpener(e){return{dispose:this._openers.unshift(e)}}registerValidator(e){return{dispose:this._validators.push(e)}}registerExternalUriResolver(e){return{dispose:this._resolvers.push(e)}}setDefaultExternalOpener(e){this._defaultExternalOpener=e}registerExternalOpener(e){return{dispose:this._externalOpeners.push(e)}}open(e,t){var n;return Lp(this,void 0,void 0,function*(){const r=typeof e=="string"?Pt.parse(e):e,s=(n=this._resolvedUriTargets.get(r))!==null&&n!==void 0?n:e;for(const o of this._validators)if(!(yield o.shouldOpen(s)))return!1;for(const o of this._openers)if(yield o.open(e,t))return!0;return!1})}resolveExternalUri(e,t){return Lp(this,void 0,void 0,function*(){for(const n of this._resolvers)try{const r=yield n.resolveExternalUri(e,t);if(r)return this._resolvedUriTargets.has(r.resolved)||this._resolvedUriTargets.set(r.resolved,e),r}catch{}throw new Error("Could not resolve external URI: "+e.toString())})}_doOpenExternal(e,t){return Lp(this,void 0,void 0,function*(){const n=typeof e=="string"?Pt.parse(e):e;let r;try{r=(yield this.resolveExternalUri(n,t)).resolved}catch{r=n}let s;if(typeof e=="string"&&n.toString()===r.toString()?s=e:s=encodeURI(r.toString(!0)),t!=null&&t.allowContributedOpeners){const o=typeof(t==null?void 0:t.allowContributedOpeners)=="string"?t==null?void 0:t.allowContributedOpeners:void 0;for(const a of this._externalOpeners)if(yield a.openExternal(s,{sourceUri:n,preferredOpenerId:o},mn.None))return!0}return this._defaultExternalOpener.openExternal(s,{sourceUri:n},mn.None)})}dispose(){this._validators.clear()}};I9=x9([L4(0,Zn),L4(1,rr)],I9);var Vi;(function(i){i[i.Hint=1]="Hint",i[i.Info=2]="Info",i[i.Warning=4]="Warning",i[i.Error=8]="Error"})(Vi||(Vi={})),function(i){function e(o,a){return a-o}i.compare=e;const t=Object.create(null);t[i.Error]=C("sev.error","Error"),t[i.Warning]=C("sev.warning","Warning"),t[i.Info]=C("sev.info","Info");function n(o){return t[o]||""}i.toString=n;function r(o){switch(o){case Bi.Error:return i.Error;case Bi.Warning:return i.Warning;case Bi.Info:return i.Info;case Bi.Ignore:return i.Hint}}i.fromSeverity=r;function s(o){switch(o){case i.Error:return Bi.Error;case i.Warning:return Bi.Warning;case i.Info:return Bi.Info;case i.Hint:return Bi.Ignore}}i.toSeverity=s}(Vi||(Vi={}));var T4;(function(i){const e="";function t(r){return n(r,!0)}i.makeKey=t;function n(r,s){let o=[e];return r.source?o.push(r.source.replace("¦","\\¦")):o.push(e),r.code?typeof r.code=="string"?o.push(r.code.replace("¦","\\¦")):o.push(r.code.value.replace("¦","\\¦")):o.push(e),r.severity!==void 0&&r.severity!==null?o.push(Vi.toString(r.severity)):o.push(e),r.message&&s?o.push(r.message.replace("¦","\\¦")):o.push(e),r.startLineNumber!==void 0&&r.startLineNumber!==null?o.push(r.startLineNumber.toString()):o.push(e),r.startColumn!==void 0&&r.startColumn!==null?o.push(r.startColumn.toString()):o.push(e),r.endLineNumber!==void 0&&r.endLineNumber!==null?o.push(r.endLineNumber.toString()):o.push(e),r.endColumn!==void 0&&r.endColumn!==null?o.push(r.endColumn.toString()):o.push(e),o.push(e),o.join("¦")}i.makeKeyOptionalMessage=n})(T4||(T4={}));const Id=Ln("markerService");var aTe=globalThis&&globalThis.__decorate||function(i,e,t,n){var r=arguments.length,s=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(s=(r<3?o(s):r>3?o(e,t,s):o(e,t))||s);return r>3&&s&&Object.defineProperty(e,t,s),s},cK=globalThis&&globalThis.__param||function(i,e){return function(t,n){e(t,n,i)}};class lTe extends Ne{constructor(e){super(),this.model=e,this._markersData=new Map,this._register(fn(()=>{this.model.deltaDecorations([...this._markersData.keys()],[]),this._markersData.clear()}))}update(e,t){const n=[...this._markersData.keys()];this._markersData.clear();const r=this.model.deltaDecorations(n,t);for(let s=0;sthis._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 lTe(e);this._markerDecorations.set(e.uri,t),this._updateDecorations(t)}_onModelRemoved(e){const t=this._markerDecorations.get(e.uri);t&&(t.dispose(),this._markerDecorations.delete(e.uri)),(e.uri.scheme===sn.inMemory||e.uri.scheme===sn.internal||e.uri.scheme===sn.vscode)&&this._markerService&&this._markerService.read({resource:e.uri}).map(n=>n.owner).forEach(n=>this._markerService.remove(n,[e.uri]))}_updateDecorations(e){const t=this._markerService.read({resource:e.model.uri,take:500}),n=t.map(r=>({range:this._createDecorationRange(e.model,r),options:this._createDecorationOption(r)}));e.update(t,n)&&this._onDidChangeMarker.fire(e.model)}_createDecorationRange(e,t){let n=H.lift(t);if(t.severity===Vi.Hint&&!this._hasMarkerTag(t,1)&&!this._hasMarkerTag(t,2)&&(n=n.setEndPosition(n.startLineNumber,n.startColumn+2)),n=e.validateRange(n),n.isEmpty()){const r=e.getLineLastNonWhitespaceColumn(n.startLineNumber)||e.getLineMaxColumn(n.startLineNumber);if(r===1||n.endColumn>=r)return n;const s=e.getWordAtPosition(n.getStartPosition());s&&(n=new H(n.startLineNumber,s.startColumn,n.endLineNumber,s.endColumn))}else if(t.endColumn===Number.MAX_VALUE&&t.startColumn===1&&n.startLineNumber===n.endLineNumber){let r=e.getLineFirstNonWhitespaceColumn(t.startLineNumber);r=0:!1}};D9=aTe([cK(0,Pi),cK(1,Id)],D9);class ew{constructor(e,t){this._startLineNumber=e,this._tokens=t,this._endLineNumber=this._startLineNumber+this._tokens.getMaxDeltaLine()}static create(e,t){return new ew(e,new I4(t))}get startLineNumber(){return this._startLineNumber}get endLineNumber(){return this._endLineNumber}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 H(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,[r,s,o]=this._tokens.split(t,e.startColumn-1,n,e.endColumn-1);return[new ew(this._startLineNumber,r),new ew(this._startLineNumber+o,s)]}applyEdit(e,t){const[n,r,s]=vp(t);this.acceptEdit(e,n,r,s,t.length>0?t.charCodeAt(0):0)}acceptEdit(e,t,n,r,s){this._acceptDeleteRange(e),this._acceptInsertText(new ye(e.startLineNumber,e.startColumn),t,n,r,s),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 s=n-t;this._startLineNumber-=s;return}const r=this._tokens.getMaxDeltaLine();if(!(t>=r+1)){if(t<0&&n>=r+1){this._startLineNumber=0,this._tokens.clear();return}if(t<0){const s=-t;this._startLineNumber-=s,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,r,s){if(t===0&&n===0)return;const o=e.lineNumber-this._startLineNumber;if(o<0){this._startLineNumber+=t;return}const a=this._tokens.getMaxDeltaLine();o>=a+1||this._tokens.acceptInsertText(o,e.column-1,t,n,r,s)}}class I4{constructor(e){this._tokens=e,this._tokenCount=e.length/4}toString(e){const t=[];for(let n=0;ne)n=r-1;else{let o=r;for(;o>t&&this._getDeltaLine(o-1)===e;)o--;let a=r;for(;ae||h===e&&g>=t)&&(he||g===e&&m>=t){if(gs?p-=s-n:p=n;else if(f===t&&g===n)if(f===r&&p>s)p-=s-n;else{u=!0;continue}else if(fs)f===t?(g=n,p=g+(p-s)):(g=0,p=g+(p-s));else{u=!0;continue}else if(f>r){if(l===0&&!u){c=a;break}f-=l}else if(f===r&&g>=s)e&&f===0&&(g+=e,p+=e),f-=l,g-=s-n,p-=s-n;else throw new Error("Not possible!");const _=4*c;o[_]=f,o[_+1]=g,o[_+2]=p,o[_+3]=m,c++}this._tokenCount=c}acceptInsertText(e,t,n,r,s,o){const a=n===0&&r===1&&(o>=48&&o<=57||o>=65&&o<=90||o>=97&&o<=122),l=this._tokens,c=this._tokenCount;for(let u=0;u=0;a--)(o=i[a])&&(s=(r<3?o(s):r>3?o(e,t,s):o(e,t))||s);return r>3&&s&&Object.defineProperty(e,t,s),s},N9=globalThis&&globalThis.__param||function(i,e){return function(t,n){e(t,n,i)}};let A9=class{constructor(e,t,n,r){this._legend=e,this._themeService=t,this._languageService=n,this._logService=r,this._hashTable=new Dd,this._hasWarnedOverlappingTokens=!1}getMetadata(e,t,n){const r=this._languageService.languageIdCodec.encodeLanguageId(n),s=this._hashTable.get(e,t,r);let o;if(s)o=s.metadata,this._logService.getLevel()===cc.Trace&&this._logService.trace(`SemanticTokensProviderStyling [CACHED] ${e} / ${t}: foreground ${Cs.getForeground(o)}, fontStyle ${Cs.getFontStyle(o).toString(2)}`);else{let a=this._legend.tokenTypes[e];const l=[];if(a){let c=t;for(let d=0;c>0&&d>1;c>0&&this._logService.getLevel()===cc.Trace&&(this._logService.trace(`SemanticTokensProviderStyling: unknown token modifier index: ${t.toString(2)} for legend: ${JSON.stringify(this._legend.tokenModifiers)}`),l.push("not-in-legend"));const u=this._themeService.getColorTheme().getTokenStyleMetadata(a,l,n);if(typeof u>"u")o=2147483647;else{if(o=0,typeof u.italic<"u"){const d=(u.italic?1:0)<<10;o|=d|1}if(typeof u.bold<"u"){const d=(u.bold?2:0)<<10;o|=d|2}if(typeof u.underline<"u"){const d=(u.underline?4:0)<<10;o|=d|4}if(typeof u.strikethrough<"u"){const d=(u.strikethrough?8:0)<<10;o|=d|8}if(u.foreground){const d=u.foreground<<14;o|=d|16}o===0&&(o=2147483647)}}else this._logService.getLevel()===cc.Trace&&this._logService.trace(`SemanticTokensProviderStyling: unknown token type index: ${e} for legend: ${JSON.stringify(this._legend.tokenTypes)}`),o=2147483647,a="not-in-legend";this._hashTable.add(e,t,r,o),this._logService.getLevel()===cc.Trace&&this._logService.trace(`SemanticTokensProviderStyling ${e} (${a}) / ${t} (${l.join(" ")}): foreground ${Cs.getForeground(o)}, fontStyle ${Cs.getFontStyle(o).toString(2)}`)}return o}warnOverlappingSemanticTokens(e,t){this._hasWarnedOverlappingTokens||(this._hasWarnedOverlappingTokens=!0,console.warn(`Overlapping semantic tokens detected at lineNumber ${e}, column ${t}`))}};A9=cTe([N9(1,Ei),N9(2,Mi),N9(3,yl)],A9);function dK(i,e,t){const n=i.data,r=i.data.length/5|0,s=Math.max(Math.ceil(r/1024),400),o=[];let a=0,l=1,c=0;for(;au&&n[5*v]===0;)v--;if(v-1===u){let w=d;for(;w+1x&&(e.warnOverlappingSemanticTokens(I,x+1),m=this._growCount){const s=this._elements;this._currentLengthIndex++,this._currentLength=Dd._SIZES[this._currentLengthIndex],this._growCount=Math.round(this._currentLengthIndex+10?t[0]:[]}function pK(i,e,t,n,r){return df(this,void 0,void 0,function*(){const s=pTe(i,e),o=yield Promise.all(s.map(a=>df(this,void 0,void 0,function*(){let l,c=null;try{l=yield a.provideDocumentSemanticTokens(e,a===t?n:null,r)}catch(u){c=u,l=null}return(!l||!D4(l)&&!fK(l))&&(l=null),new gTe(a,l,c)})));for(const a of o){if(a.error)throw a.error;if(a.tokens)return a}return o.length>0?o[0]:null})}function mTe(i,e){const t=i.orderedGroups(e);return t.length>0?t[0]:null}class _Te{constructor(e,t){this.provider=e,this.tokens=t}}function bTe(i,e){return i.has(e)}function mK(i,e){const t=i.orderedGroups(e);return t.length>0?t[0]:[]}function R9(i,e,t,n){return df(this,void 0,void 0,function*(){const r=mK(i,e),s=yield Promise.all(r.map(o=>df(this,void 0,void 0,function*(){let a;try{a=yield o.provideDocumentRangeSemanticTokens(e,t,n)}catch(l){Or(l),a=null}return(!a||!D4(a))&&(a=null),new _Te(o,a)})));for(const o of s)if(o.tokens)return o;return s.length>0?s[0]:null})}An.registerCommand("_provideDocumentSemanticTokensLegend",(i,...e)=>df(void 0,void 0,void 0,function*(){const[t]=e;ci(t instanceof Pt);const n=i.get(Pi).getModel(t);if(!n)return;const{documentSemanticTokensProvider:r}=i.get(yt),s=mTe(r,n);return s?s[0].getLegend():i.get(rr).executeCommand("_provideDocumentRangeSemanticTokensLegend",t)})),An.registerCommand("_provideDocumentSemanticTokens",(i,...e)=>df(void 0,void 0,void 0,function*(){const[t]=e;ci(t instanceof Pt);const n=i.get(Pi).getModel(t);if(!n)return;const{documentSemanticTokensProvider:r}=i.get(yt);if(!gK(r,n))return i.get(rr).executeCommand("_provideDocumentRangeSemanticTokens",t,n.getFullModelRange());const s=yield pK(r,n,null,null,mn.None);if(!s)return;const{provider:o,tokens:a}=s;if(!a||!D4(a))return;const l=hK({id:0,type:"full",data:a.data});return a.resultId&&o.releaseDocumentSemanticTokens(a.resultId),l})),An.registerCommand("_provideDocumentRangeSemanticTokensLegend",(i,...e)=>df(void 0,void 0,void 0,function*(){const[t,n]=e;ci(t instanceof Pt);const r=i.get(Pi).getModel(t);if(!r)return;const{documentRangeSemanticTokensProvider:s}=i.get(yt),o=mK(s,r);if(o.length===0)return;if(o.length===1)return o[0].getLegend();if(!n||!H.isIRange(n))return console.warn("provideDocumentRangeSemanticTokensLegend might be out-of-sync with provideDocumentRangeSemanticTokens unless a range argument is passed in"),o[0].getLegend();const a=yield R9(s,r,H.lift(n),mn.None);if(a)return a.provider.getLegend()})),An.registerCommand("_provideDocumentRangeSemanticTokens",(i,...e)=>df(void 0,void 0,void 0,function*(){const[t,n]=e;ci(t instanceof Pt),ci(H.isIRange(n));const r=i.get(Pi).getModel(t);if(!r)return;const{documentRangeSemanticTokensProvider:s}=i.get(yt),o=yield R9(s,r,H.lift(n),mn.None);if(!(!o||!o.tokens))return hK({id:0,type:"full",data:o.tokens.data})}));var O9=globalThis&&globalThis.__decorate||function(i,e,t,n){var r=arguments.length,s=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(s=(r<3?o(s):r>3?o(e,t,s):o(e,t))||s);return r>3&&s&&Object.defineProperty(e,t,s),s},Qs=globalThis&&globalThis.__param||function(i,e){return function(t,n){e(t,n,i)}};function hf(i){return i.toString()}function _K(i){const e=new lS,t=i.createSnapshot();let n;for(;n=t.read();)e.update(n);return e.digest()}class vTe{constructor(e,t,n){this._modelEventListeners=new Je,this.model=e,this._languageSelection=null,this._languageSelectionListener=null,this._modelEventListeners.add(e.onWillDispose(()=>t(e))),this._modelEventListeners.add(e.onDidChangeLanguage(r=>n(e,r)))}_disposeLanguageSelection(){this._languageSelectionListener&&(this._languageSelectionListener.dispose(),this._languageSelectionListener=null)}dispose(){this._modelEventListeners.dispose(),this._disposeLanguageSelection()}setLanguage(e){this._disposeLanguageSelection(),this._languageSelection=e,this._languageSelectionListener=this._languageSelection.onDidChange(()=>this.model.setMode(e.languageId)),this.model.setMode(e.languageId)}}const wTe=ws||gn?1:2;class CTe{constructor(e,t,n,r,s,o,a,l){this.uri=e,this.initialUndoRedoSnapshot=t,this.time=n,this.sharesUndoRedoStack=r,this.heapSize=s,this.sha1=o,this.versionId=a,this.alternativeVersionId=l}}let N4=class B2 extends Ne{constructor(e,t,n,r,s,o,a,l,c){super(),this._configurationService=e,this._resourcePropertiesService=t,this._themeService=n,this._logService=r,this._undoRedoService=s,this._languageService=o,this._languageConfigurationService=a,this._languageFeatureDebounceService=l,this._onModelAdded=this._register(new be),this.onModelAdded=this._onModelAdded.event,this._onModelRemoved=this._register(new be),this.onModelRemoved=this._onModelRemoved.event,this._onModelModeChanged=this._register(new be),this.onModelLanguageChanged=this._onModelModeChanged.event,this._modelCreationOptionsByLanguageAndResource=Object.create(null),this._models={},this._disposedModels=new Map,this._disposedModelsHeapSize=0,this._semanticStyling=this._register(new yTe(this._themeService,this._languageService,this._logService)),this._register(this._configurationService.onDidChangeConfiguration(()=>this._updateModelOptions())),this._updateModelOptions(),this._register(new F9(this._semanticStyling,this,this._themeService,this._configurationService,this._languageFeatureDebounceService,c))}static _readModelOptions(e,t){var n;let r=Os.tabSize;if(e.editor&&typeof e.editor.tabSize<"u"){const f=parseInt(e.editor.tabSize,10);isNaN(f)||(r=f),r<1&&(r=1)}let s=r;if(e.editor&&typeof e.editor.indentSize<"u"&&e.editor.indentSize!=="tabSize"){const f=parseInt(e.editor.indentSize,10);isNaN(f)||(s=f),s<1&&(s=1)}let o=Os.insertSpaces;e.editor&&typeof e.editor.insertSpaces<"u"&&(o=e.editor.insertSpaces==="false"?!1:Boolean(e.editor.insertSpaces));let a=wTe;const l=e.eol;l===`\r +`?a=2:l===` +`&&(a=1);let c=Os.trimAutoWhitespace;e.editor&&typeof e.editor.trimAutoWhitespace<"u"&&(c=e.editor.trimAutoWhitespace==="false"?!1:Boolean(e.editor.trimAutoWhitespace));let u=Os.detectIndentation;e.editor&&typeof e.editor.detectIndentation<"u"&&(u=e.editor.detectIndentation==="false"?!1:Boolean(e.editor.detectIndentation));let d=Os.largeFileOptimizations;e.editor&&typeof e.editor.largeFileOptimizations<"u"&&(d=e.editor.largeFileOptimizations==="false"?!1:Boolean(e.editor.largeFileOptimizations));let h=Os.bracketPairColorizationOptions;return!((n=e.editor)===null||n===void 0)&&n.bracketPairColorization&&typeof e.editor.bracketPairColorization=="object"&&(h={enabled:!!e.editor.bracketPairColorization.enabled}),{isForSimpleWidget:t,tabSize:r,indentSize:s,insertSpaces:o,detectIndentation:u,defaultEOL:a,trimAutoWhitespace:c,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:Pa===3||Pa===2?` +`:`\r +`}_shouldRestoreUndoStack(){const e=this._configurationService.getValue("files.restoreUndoStack");return typeof e=="boolean"?e:!0}getCreationOptions(e,t,n){let r=this._modelCreationOptionsByLanguageAndResource[e+t];if(!r){const s=this._configurationService.getValue("editor",{overrideIdentifier:e,resource:t}),o=this._getEOL(t,e);r=B2._readModelOptions({editor:s,eol:o},n),this._modelCreationOptionsByLanguageAndResource[e+t]=r}return r}_updateModelOptions(){const e=this._modelCreationOptionsByLanguageAndResource;this._modelCreationOptionsByLanguageAndResource=Object.create(null);const t=Object.keys(this._models);for(let n=0,r=t.length;ne){const t=[];for(this._disposedModels.forEach(n=>{n.sharesUndoRedoStack||t.push(n)}),t.sort((n,r)=>n.time-r.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,r){const s=this.getCreationOptions(t,n,r),o=new yd(e,t,s,n,this._undoRedoService,this._languageService,this._languageConfigurationService);if(n&&this._disposedModels.has(hf(n))){const c=this._removeDisposedModel(n),u=this._undoRedoService.getElements(n),d=_K(o)===c.sha1;if(d||c.sharesUndoRedoStack){for(const h of u.past)md(h)&&h.matchesResource(n)&&h.setModel(o);for(const h of u.future)md(h)&&h.matchesResource(n)&&h.setModel(o);this._undoRedoService.setElementsValidFlag(n,!0,h=>md(h)&&h.matchesResource(n)),d&&(o._overwriteVersionId(c.versionId),o._overwriteAlternativeVersionId(c.alternativeVersionId),o._overwriteInitialUndoRedoSnapshot(c.initialUndoRedoSnapshot))}else c.initialUndoRedoSnapshot!==null&&this._undoRedoService.restoreSnapshot(c.initialUndoRedoSnapshot)}const a=hf(o.uri);if(this._models[a])throw new Error("ModelService: Cannot add model because it already exists!");const l=new vTe(o,c=>this._onWillDispose(c),(c,u)=>this._onDidChangeLanguage(c,u));return this._models[a]=l,l}createModel(e,t,n,r=!1){let s;return t?(s=this._createModelData(e,t.languageId,n,r),this.setMode(s.model,t)):s=this._createModelData(e,uu,n,r),this._onModelAdded.fire(s.model),s.model}setMode(e,t){if(!t)return;const n=this._models[hf(e.uri)];n&&n.setLanguage(t)}getModels(){const e=[],t=Object.keys(this._models);for(let n=0,r=t.length;n0||l.future.length>0){for(const c of l.past)md(c)&&c.matchesResource(e.uri)&&(s=!0,o+=c.heapSize(e.uri),c.setModel(e.uri));for(const c of l.future)md(c)&&c.matchesResource(e.uri)&&(s=!0,o+=c.heapSize(e.uri),c.setModel(e.uri))}}const a=B2.MAX_MEMORY_FOR_CLOSED_FILES_UNDO_STACK;if(s)if(!r&&o>a){const l=n.model.getInitialUndoRedoSnapshot();l!==null&&this._undoRedoService.restoreSnapshot(l)}else this._ensureDisposedModelsHeapSize(a-o),this._undoRedoService.setElementsValidFlag(e.uri,!1,l=>md(l)&&l.matchesResource(e.uri)),this._insertDisposedModel(new CTe(e.uri,n.model.getInitialUndoRedoSnapshot(),Date.now(),r,o,_K(e),e.getVersionId(),e.getAlternativeVersionId()));else if(!r){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,r=e.getLanguageId(),s=this.getCreationOptions(n,e.uri,e.isForSimpleWidget),o=this.getCreationOptions(r,e.uri,e.isForSimpleWidget);B2._setModelOptionsForModel(e,o,s),this._onModelModeChanged.fire({model:e,oldLanguageId:n})}};N4.MAX_MEMORY_FOR_CLOSED_FILES_UNDO_STACK=20*1024*1024,N4=O9([Qs(0,ui),Qs(1,D$),Qs(2,Ei),Qs(3,yl),Qs(4,Vk),Qs(5,Mi),Qs(6,Ss),Qs(7,nl),Qs(8,yt)],N4);const M9="editor.semanticHighlighting";function P9(i,e,t){var n;const r=(n=t.getValue(M9,{overrideIdentifier:i.getLanguageId(),resource:i.uri}))===null||n===void 0?void 0:n.enabled;return typeof r=="boolean"?r:e.getColorTheme().semanticHighlighting}let F9=class extends Ne{constructor(e,t,n,r,s,o){super(),this._watchers=Object.create(null),this._semanticStyling=e;const a=u=>{this._watchers[u.uri.toString()]=new tw(u,this._semanticStyling,n,s,o)},l=(u,d)=>{d.dispose(),delete this._watchers[u.uri.toString()]},c=()=>{for(let u of t.getModels()){const d=this._watchers[u.uri.toString()];P9(u,n,r)?d||a(u):d&&l(u,d)}};this._register(t.onModelAdded(u=>{P9(u,n,r)&&a(u)})),this._register(t.onModelRemoved(u=>{const d=this._watchers[u.uri.toString()];d&&l(u,d)})),this._register(r.onDidChangeConfiguration(u=>{u.affectsConfiguration(M9)&&c()})),this._register(n.onDidColorThemeChange(c))}};F9=O9([Qs(1,Pi),Qs(2,Ei),Qs(3,ui),Qs(4,nl),Qs(5,yt)],F9);class yTe extends Ne{constructor(e,t,n){super(),this._themeService=e,this._languageService=t,this._logService=n,this._caches=new WeakMap,this._register(this._themeService.onDidColorThemeChange(()=>{this._caches=new WeakMap}))}get(e){return this._caches.has(e)||this._caches.set(e,new A9(e.getLegend(),this._themeService,this._languageService,this._logService)),this._caches.get(e)}}class STe{constructor(e,t,n){this.provider=e,this.resultId=t,this.data=n}dispose(){this.provider.releaseDocumentSemanticTokens(this.resultId)}}let tw=class qm extends Ne{constructor(e,t,n,r,s){super(),this._isDisposed=!1,this._model=e,this._semanticStyling=t,this._provider=s.documentSemanticTokensProvider,this._debounceInformation=r.for(this._provider,"DocumentSemanticTokens",{min:qm.REQUEST_MIN_DELAY,max:qm.REQUEST_MAX_DELAY}),this._fetchDocumentSemanticTokens=this._register(new ri(()=>this._fetchDocumentSemanticTokensNow(),qm.REQUEST_MIN_DELAY)),this._currentDocumentResponse=null,this._currentDocumentRequestCancellationTokenSource=null,this._documentProvidersChangeListeners=[],this._register(this._model.onDidChangeContent(()=>{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 o=()=>{Nn(this._documentProvidersChangeListeners),this._documentProvidersChangeListeners=[];for(const a of this._provider.all(e))typeof a.onDidChange=="function"&&this._documentProvidersChangeListeners.push(a.onDidChange(()=>this._fetchDocumentSemanticTokens.schedule(0)))};o(),this._register(this._provider.onDidChange(()=>{o(),this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))})),this._register(n.onDidColorThemeChange(a=>{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),this._setDocumentSemanticTokens(null,null,null,[]),this._isDisposed=!0,super.dispose()}_fetchDocumentSemanticTokensNow(){if(this._currentDocumentRequestCancellationTokenSource)return;if(!gK(this._provider,this._model)){this._currentDocumentResponse&&this._model.setSemanticTokens(null,!1);return}const e=new rs,t=this._currentDocumentResponse?this._currentDocumentResponse.provider:null,n=this._currentDocumentResponse&&this._currentDocumentResponse.resultId||null,r=pK(this._provider,this._model,t,n,e.token);this._currentDocumentRequestCancellationTokenSource=e;const s=[],o=this._model.onDidChangeContent(l=>{s.push(l)}),a=new go(!1);r.then(l=>{if(this._debounceInformation.update(this._model,a.elapsed()),this._currentDocumentRequestCancellationTokenSource=null,o.dispose(),!l)this._setDocumentSemanticTokens(null,null,null,s);else{const{provider:c,tokens:u}=l,d=this._semanticStyling.get(c);this._setDocumentSemanticTokens(c,u||null,d,s)}},l=>{l&&(jc(l)||typeof l.message=="string"&&l.message.indexOf("busy")!==-1)||Jt(l),this._currentDocumentRequestCancellationTokenSource=null,o.dispose(),s.length>0&&(this._fetchDocumentSemanticTokens.isScheduled()||this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model)))})}static _copy(e,t,n,r,s){for(let o=0;o{r.length>0&&!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.setSemanticTokens(null,!1);return}if(!t){this._model.setSemanticTokens(null,!0),o();return}if(fK(t)){if(!s){this._model.setSemanticTokens(null,!0);return}if(t.edits.length===0)t={resultId:t.resultId,data:s.data};else{let a=0;for(const h of t.edits)a+=(h.data?h.data.length:0)-h.deleteCount;const l=s.data,c=new Uint32Array(l.length+a);let u=l.length,d=c.length;for(let h=t.edits.length-1;h>=0;h--){const f=t.edits[h],g=u-(f.start+f.deleteCount);g>0&&(qm._copy(l,u-g,c,d-g,g),d-=g),f.data&&(qm._copy(f.data,0,c,d-f.data.length,f.data.length),d-=f.data.length),u=f.start}u>0&&qm._copy(l,0,c,0,u),t={resultId:t.resultId,data:c}}}if(D4(t)){this._currentDocumentResponse=new STe(e,t.resultId,t.data);const a=dK(t,n,this._model.getLanguageId());if(r.length>0)for(const l of r)for(const c of a)for(const u of l.changes)c.applyEdit(u.range,u.text);this._model.setSemanticTokens(a,!0)}else this._model.setSemanticTokens(null,!0);o()}};tw.REQUEST_MIN_DELAY=300,tw.REQUEST_MAX_DELAY=2e3,tw=O9([Qs(2,Ei),Qs(3,nl),Qs(4,yt)],tw);const Spt="",kTe=new RegExp(`(\\\\)?\\$\\((${Gs.iconNameExpression}(?:${Gs.iconModifierExpression})?)\\)`,"g");function Tp(i){const e=new Array;let t,n=0,r=0;for(;(t=kTe.exec(i))!==null;){r=t.index||0,e.push(i.substring(n,r)),n=(t.index||0)+t[0].length;const[,s,o]=t;e.push(s?`$(${o})`:ETe({id:o}))}return n{this._register(Xe(this._element,n,r=>{if(!this.enabled){Xn.stop(r);return}this._onDidClick.fire(r)}))}),this._register(Xe(this._element,Nt.KEY_DOWN,n=>{const r=new ki(n);let s=!1;this.enabled&&(r.equals(3)||r.equals(10))?(this._onDidClick.fire(n),s=!0):r.equals(9)&&(this._element.blur(),s=!0),s&&Xn.stop(r,!0)})),this._register(Xe(this._element,Nt.MOUSE_OVER,n=>{this._element.classList.contains("disabled")||this.setHoverBackground()})),this._register(Xe(this._element,Nt.MOUSE_OUT,n=>{this.applyStyles()})),this.focusTracker=this._register(D_(this._element)),this._register(this.focusTracker.onDidFocus(()=>this.setHoverBackground())),this._register(this.focusTracker.onDidBlur(()=>this.applyStyles())),this.applyStyles()}get onDidClick(){return this._onDidClick.event}setHoverBackground(){let e;this.options.secondary?e=this.buttonSecondaryHoverBackground?this.buttonSecondaryHoverBackground.toString():null:e=this.buttonHoverBackground?this.buttonHoverBackground.toString():null,e&&(this._element.style.backgroundColor=e)}style(e){this.buttonForeground=e.buttonForeground,this.buttonBackground=e.buttonBackground,this.buttonHoverBackground=e.buttonHoverBackground,this.buttonSecondaryForeground=e.buttonSecondaryForeground,this.buttonSecondaryBackground=e.buttonSecondaryBackground,this.buttonSecondaryHoverBackground=e.buttonSecondaryHoverBackground,this.buttonBorder=e.buttonBorder,this.applyStyles()}applyStyles(){if(this._element){let e,t;this.options.secondary?(t=this.buttonSecondaryForeground?this.buttonSecondaryForeground.toString():"",e=this.buttonSecondaryBackground?this.buttonSecondaryBackground.toString():""):(t=this.buttonForeground?this.buttonForeground.toString():"",e=this.buttonBackground?this.buttonBackground.toString():"");const n=this.buttonBorder?this.buttonBorder.toString():"";this._element.style.color=t,this._element.style.backgroundColor=e,this._element.style.borderWidth=n?"1px":"",this._element.style.borderStyle=n?"solid":"",this._element.style.borderColor=n}}get element(){return this._element}set label(e){this._element.classList.add("monaco-text-button"),this.options.supportIcons?Mh(this._element,...Tp(e)):this._element.textContent=e,typeof this.options.title=="string"?this._element.title=this.options.title:this.options.title&&(this._element.title=e)}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")}}const Ept="",LTe={badgeBackground:Ie.fromHex("#4D4D4D"),badgeForeground:Ie.fromHex("#FFFFFF")};class B9{constructor(e,t){this.count=0,this.options=t||Object.create(null),Hc(this.options,LTe,!1),this.badgeBackground=this.options.badgeBackground,this.badgeForeground=this.options.badgeForeground,this.badgeBorder=this.options.badgeBorder,this.element=$e(e,Ze(".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(){this.element.textContent=Ha(this.countFormat,this.count),this.element.title=Ha(this.titleFormat,this.count),this.applyStyles()}style(e){this.badgeBackground=e.badgeBackground,this.badgeForeground=e.badgeForeground,this.badgeBorder=e.badgeBorder,this.applyStyles()}applyStyles(){if(this.element){const e=this.badgeBackground?this.badgeBackground.toString():"",t=this.badgeForeground?this.badgeForeground.toString():"",n=this.badgeBorder?this.badgeBorder.toString():"";this.element.style.backgroundColor=e,this.element.style.color=t,this.element.style.borderWidth=n?"1px":"",this.element.style.borderStyle=n?"solid":"",this.element.style.borderColor=n}}}const xpt="",vK="done",wK="active",V9="infinite",W9="infinite-long-running",CK="discrete",TTe={progressBarBackground:Ie.fromHex("#0E70C0")};class A4 extends Ne{constructor(e,t){super(),this.options=t||Object.create(null),Hc(this.options,TTe,!1),this.workedVal=0,this.progressBarBackground=this.options.progressBarBackground,this.showDelayedScheduler=this._register(new ri(()=>fa(this.element),0)),this.longRunningScheduler=this._register(new ri(()=>this.infiniteLongRunning(),A4.LONG_RUNNING_INFINITE_THRESHOLD)),this.create(e)}create(e){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.element.appendChild(this.bit),this.applyStyles()}off(){this.bit.style.width="inherit",this.bit.style.opacity="1",this.element.classList.remove(wK,V9,W9,CK),this.workedVal=0,this.totalWork=void 0,this.longRunningScheduler.cancel()}stop(){return this.doDone(!1)}doDone(e){return this.element.classList.add(vK),this.element.classList.contains(V9)?(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(CK,vK,W9),this.element.classList.add(wK,V9),this.longRunningScheduler.schedule(),this}infiniteLongRunning(){this.element.classList.add(W9)}getContainer(){return this.element}style(e){this.progressBarBackground=e.progressBarBackground,this.applyStyles()}applyStyles(){if(this.bit){const e=this.progressBarBackground?this.progressBarBackground.toString():"";this.bit.style.backgroundColor=e}}}A4.LONG_RUNNING_INFINITE_THRESHOLD=1e4;class H9{constructor(e){this._prefix=e,this._lastId=0}nextId(){return this._prefix+ ++this._lastId}}const yK=new H9("id#"),Lpt="",z9={},ITe=new H9("quick-input-button-icon-");function $9(i){if(!i)return;let e;const t=i.dark.toString();return z9[t]?e=z9[t]:(e=ITe.nextId(),jI(`.${e}`,`background-image: ${$g(i.light||i.dark)}`),jI(`.vs-dark .${e}, .hc-black .${e}`,`background-image: ${$g(i.dark)}`),z9[t]=e),e}const DTe={ctrlCmd:!1,alt:!1};var nw;(function(i){i[i.Blur=1]="Blur",i[i.Gesture=2]="Gesture",i[i.Other=3]="Other"})(nw||(nw={}));var _c;(function(i){i[i.NONE=0]="NONE",i[i.FIRST=1]="FIRST",i[i.SECOND=2]="SECOND",i[i.LAST=3]="LAST"})(_c||(_c={}));function NTe(i,e={}){const t=U9(e);return t.textContent=i,t}function SK(i,e={}){const t=U9(e);return kK(t,RTe(i,!!e.renderCodeSegments),e.actionHandler,e.renderCodeSegments),t}function U9(i){const e=i.inline?"span":"div",t=document.createElement(e);return i.className&&(t.className=i.className),t}class ATe{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 kK(i,e,t,n){let r;if(e.type===2)r=document.createTextNode(e.content||"");else if(e.type===3)r=document.createElement("b");else if(e.type===4)r=document.createElement("i");else if(e.type===7&&n)r=document.createElement("code");else if(e.type===5&&t){const s=document.createElement("a");t.disposables.add(Zr(s,"click",o=>{t.callback(String(e.index),o)})),r=s}else e.type===8?r=document.createElement("br"):e.type===1&&(r=i);r&&i!==r&&i.appendChild(r),r&&Array.isArray(e.children)&&e.children.forEach(s=>{kK(r,s,t,n)})}function RTe(i,e){const t={type:1,children:[]};let n=0,r=t;const s=[],o=new ATe(i);for(;!o.eos();){let a=o.next();const l=a==="\\"&&j9(o.peek(),e)!==0;if(l&&(a=o.next()),!l&&OTe(a,e)&&a===o.peek()){o.advance(),r.type===2&&(r=s.pop());const c=j9(a,e);if(r.type===c||r.type===5&&c===6)r=s.pop();else{const u={type:c,children:[]};c===5&&(u.index=n,n++),r.children.push(u),s.push(r),r=u}}else if(a===` +`)r.type===2&&(r=s.pop()),r.children.push({type:8});else if(r.type!==2){const c={type:2,content:a};r.children.push(c),s.push(r),r=c}else r.content+=a}return r.type===2&&(r=s.pop()),t}function OTe(i,e){return j9(i,e)!==0}function j9(i,e){switch(i){case"*":return 3;case"_":return 4;case"[":return 5;case"]":return 6;case"`":return e?7:0;default:return 0}}class MTe{constructor(e,t=0,n=e.length,r=t-1){this.items=e,this.start=t,this.end=n,this.index=r}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 PTe{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._currentPosition()!==this._elements.length-1?this._navigator.next():null}previous(){return this._currentPosition()!==0?this._navigator.previous():null}current(){return this._navigator.current()}first(){return this._navigator.first()}last(){return this._navigator.last()}has(e){return this._history.has(e)}_onChange(){this._reduceToLimit();const e=this._elements;this._navigator=new MTe(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 Tpt="",iw=Ze,FTe={inputBackground:Ie.fromHex("#3C3C3C"),inputForeground:Ie.fromHex("#CCCCCC"),inputValidationInfoBorder:Ie.fromHex("#55AAFF"),inputValidationInfoBackground:Ie.fromHex("#063B49"),inputValidationWarningBorder:Ie.fromHex("#B89500"),inputValidationWarningBackground:Ie.fromHex("#352A05"),inputValidationErrorBorder:Ie.fromHex("#BE1100"),inputValidationErrorBackground:Ie.fromHex("#5A1D1D")};class EK extends Ll{constructor(e,t,n){var r;super(),this.state="idle",this.maxHeight=Number.POSITIVE_INFINITY,this._onDidChange=this._register(new be),this.onDidChange=this._onDidChange.event,this._onDidHeightChange=this._register(new be),this.onDidHeightChange=this._onDidHeightChange.event,this.contextViewProvider=t,this.options=n||Object.create(null),Hc(this.options,FTe,!1),this.message=null,this.placeholder=this.options.placeholder||"",this.tooltip=(r=this.options.tooltip)!==null&&r!==void 0?r:this.placeholder||"",this.ariaLabel=this.options.ariaLabel||"",this.inputBackground=this.options.inputBackground,this.inputForeground=this.options.inputForeground,this.inputBorder=this.options.inputBorder,this.inputValidationInfoBorder=this.options.inputValidationInfoBorder,this.inputValidationInfoBackground=this.options.inputValidationInfoBackground,this.inputValidationInfoForeground=this.options.inputValidationInfoForeground,this.inputValidationWarningBorder=this.options.inputValidationWarningBorder,this.inputValidationWarningBackground=this.options.inputValidationWarningBackground,this.inputValidationWarningForeground=this.options.inputValidationWarningForeground,this.inputValidationErrorBorder=this.options.inputValidationErrorBorder,this.inputValidationErrorBackground=this.options.inputValidationErrorBackground,this.inputValidationErrorForeground=this.options.inputValidationErrorForeground,this.options.validationOptions&&(this.validation=this.options.validationOptions.validation),this.element=$e(e,iw(".monaco-inputbox.idle"));let s=this.options.flexibleHeight?"textarea":"input",o=$e(this.element,iw(".ibwrapper"));if(this.input=$e(o,iw(s+".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=$e(o,iw("div.mirror")),this.mirror.innerText=" ",this.scrollableElement=new Ij(this.element,{vertical:1}),this.options.flexibleWidth&&(this.input.setAttribute("wrap","off"),this.mirror.style.whiteSpace="pre",this.mirror.style.wordWrap="initial"),$e(e,this.scrollableElement.getDomNode()),this._register(this.scrollableElement),this._register(this.scrollableElement.onScroll(c=>this.input.scrollTop=c.scrollTop));const a=this._register(new si(document,"selectionchange")),l=kt.filter(a.event,()=>{const c=document.getSelection();return(c==null?void 0:c.anchorNode)===o});this._register(l(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.ignoreGesture(this.input),setTimeout(()=>this.updateMirror(),0),this.options.actions&&(this.actionbar=this._register(new bu(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}setAriaLabel(e){this.ariaLabel=e,e?this.input.setAttribute("aria-label",this.ariaLabel):this.input.removeAttribute("aria-label")}getAriaLabel(){return this.ariaLabel}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:$I(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()}get width(){return Sl(this.input)}set width(e){if(this.options.flexibleHeight&&this.options.flexibleWidth){let t=0;if(this.mirror){const n=parseFloat(this.mirror.style.paddingLeft||"")||0,r=parseFloat(this.mirror.style.paddingRight||"")||0;t=n+r}this.input.style.width=e-t+"px"}else this.input.style.width=e+"px";this.mirror&&(this.mirror.style.width=e+"px")}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){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=n.border?`1px solid ${n.border}`:"",(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){switch(e){case 1:return{border:this.inputValidationInfoBorder,background:this.inputValidationInfoBackground,foreground:this.inputValidationInfoForeground};case 2:return{border:this.inputValidationWarningBorder,background:this.inputValidationWarningBackground,foreground:this.inputValidationWarningForeground};default:return{border:this.inputValidationErrorBorder,background:this.inputValidationErrorBackground,foreground:this.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,t=()=>e.style.width=Sl(this.element)+"px";this.contextViewProvider.showContextView({getAnchor:()=>this.element,anchorAlignment:1,render:r=>{if(!this.message)return null;e=$e(r,iw(".monaco-inputbox-container")),t();const s={inline:!0,className:"monaco-inputbox-message"},o=this.message.formatContent?SK(this.message.content,s):NTe(this.message.content,s);o.classList.add(this.classForType(this.message.type));const a=this.stylesForType(this.message.type);return o.style.backgroundColor=a.background?a.background.toString():"",o.style.color=a.foreground?a.foreground.toString():"",o.style.border=a.border?`1px solid ${a.border}`:"",$e(e,o),null},onHide:()=>{this.state="closed"},layout:t});let n;this.message.type===3?n=C("alertErrorMessage","Error: {0}",this.message.content):this.message.type===2?n=C("alertWarningMessage","Warning: {0}",this.message.content):n=C("alertInfoMessage","Info: {0}",this.message.content),os(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()}style(e){this.inputBackground=e.inputBackground,this.inputForeground=e.inputForeground,this.inputBorder=e.inputBorder,this.inputValidationInfoBackground=e.inputValidationInfoBackground,this.inputValidationInfoForeground=e.inputValidationInfoForeground,this.inputValidationInfoBorder=e.inputValidationInfoBorder,this.inputValidationWarningBackground=e.inputValidationWarningBackground,this.inputValidationWarningForeground=e.inputValidationWarningForeground,this.inputValidationWarningBorder=e.inputValidationWarningBorder,this.inputValidationErrorBackground=e.inputValidationErrorBackground,this.inputValidationErrorForeground=e.inputValidationErrorForeground,this.inputValidationErrorBorder=e.inputValidationErrorBorder,this.applyStyles()}applyStyles(){const e=this.inputBackground?this.inputBackground.toString():"",t=this.inputForeground?this.inputForeground.toString():"",n=this.inputBorder?this.inputBorder.toString():"";this.element.style.backgroundColor=e,this.element.style.color=t,this.input.style.backgroundColor="inherit",this.input.style.color=t,this.element.style.borderWidth=n?"1px":"",this.element.style.borderStyle=n?"solid":"",this.element.style.borderColor=n}layout(){if(!this.mirror)return;const e=this.cachedContentHeight;this.cachedContentHeight=$I(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,r=t.selectionEnd,s=t.value;n!==null&&r!==null&&(this.value=s.substr(0,n)+e+s.substr(r),t.setSelectionRange(n+1,n+1),this.layout())}dispose(){this._hideMessage(),this.message=null,this.actionbar&&this.actionbar.dispose(),super.dispose()}}class xK extends EK{constructor(e,t,n){const r=C({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"),s=` or ⇅ ${r}`,o=` (⇅ ${r})`;super(e,t,n),this.history=new PTe(n.history,100);const a=()=>{if(n.showHistoryHint&&n.showHistoryHint()&&!this.placeholder.endsWith(s)&&!this.placeholder.endsWith(o)&&this.history.getHistory().length){const l=this.placeholder.endsWith(")")?s:o,c=this.placeholder+l;n.showPlaceholderOnFocus&&document.activeElement!==this.input?this.placeholder=c:this.setPlaceHolder(c)}};this.observer=new MutationObserver((l,c)=>{l.forEach(u=>{u.target.textContent||a()})}),this.observer.observe(this.input,{attributeFilter:["class"]}),this.onfocus(this.input,()=>a()),this.onblur(this.input,()=>{const l=c=>{if(this.placeholder.endsWith(c)){const u=this.placeholder.slice(0,this.placeholder.length-c.length);return n.showPlaceholderOnFocus?this.placeholder=u:this.setPlaceHolder(u),!0}else return!1};l(o)||l(s)})}dispose(){super.dispose(),this.observer&&(this.observer.disconnect(),this.observer=void 0)}addToHistory(){this.value&&this.value!==this.getCurrentValue()&&this.history.add(this.value)}showNextValue(){this.history.has(this.value)||this.addToHistory();let e=this.getNextValue();e&&(e=e===this.value?this.getNextValue():e),e&&(this.value=e,SS(this.value))}showPreviousValue(){this.history.has(this.value)||this.addToHistory();let e=this.getPreviousValue();e&&(e=e===this.value?this.getPreviousValue():e),e&&(this.value=e,SS(this.value))}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()||this.history.last()}}const BTe=Ze;class VTe extends Ne{constructor(e){super(),this.parent=e,this.onKeyDown=t=>Xe(this.inputBox.inputElement,Nt.KEY_DOWN,n=>{t(new ki(n))}),this.onMouseDown=t=>Xe(this.inputBox.inputElement,Nt.MOUSE_DOWN,n=>{t(new Ga(n))}),this.onDidChange=t=>this.inputBox.onDidChange(t),this.container=$e(this.parent,BTe(".quick-input-box")),this.inputBox=this._register(new EK(this.container,void 0))}get value(){return this.inputBox.value}set value(e){this.inputBox.value=e}select(e=null){this.inputBox.select(e)}isSelectionAtEnd(){return this.inputBox.isSelectionAtEnd()}get placeholder(){return this.inputBox.inputElement.getAttribute("placeholder")||""}set placeholder(e){this.inputBox.setPlaceHolder(e)}get ariaLabel(){return this.inputBox.getAriaLabel()}set ariaLabel(e){this.inputBox.setAriaLabel(e)}get password(){return this.inputBox.inputElement.type==="password"}set password(e){this.inputBox.inputElement.type=e?"password":"text"}setAttribute(e,t){this.inputBox.inputElement.setAttribute(e,t)}removeAttribute(e){this.inputBox.inputElement.removeAttribute(e)}showDecoration(e){e===Bi.Ignore?this.inputBox.hideMessage():this.inputBox.showMessage({type:e===Bi.Info?1:e===Bi.Warning?2:3,content:""})}stylesForType(e){return this.inputBox.stylesForType(e===Bi.Info?1:e===Bi.Warning?2:3)}setFocus(){this.inputBox.focus()}layout(){this.inputBox.layout()}style(e){this.inputBox.style(e)}}class Ip{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=$e(e,Ze("span.monaco-highlighted-label"))}get element(){return this.domNode}set(e,t=[],n="",r){e||(e=""),r&&(e=Ip.escapeNewLines(e,t)),!(this.didEverRender&&this.text===e&&this.title===n&&Va(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{r=s===`\r +`?-1:0,o+=n;for(const a of t)a.end<=o||(a.start>=o&&(a.start+=r),a.end>=o&&(a.end+=r));return n+=r,"⏎"})}}class va{constructor(e="",t=!1){var n,r,s;if(this.value=e,typeof this.value!="string")throw ic("value");typeof t=="boolean"?(this.isTrusted=t,this.supportThemeIcons=!1,this.supportHtml=!1):(this.isTrusted=(n=t.isTrusted)!==null&&n!==void 0?n:void 0,this.supportThemeIcons=(r=t.supportThemeIcons)!==null&&r!==void 0?r:!1,this.supportHtml=(s=t.supportHtml)!==null&&s!==void 0?s:!1)}appendText(e,t=0){return this.value+=WTe(this.supportThemeIcons?G8e(e):e).replace(/([ \t]+)/g,(n,r)=>" ".repeat(r.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}}function w1(i){return LK(i)?!i.value:Array.isArray(i)?i.every(w1):!0}function LK(i){return i instanceof va?!0:i&&typeof i=="object"?typeof i.value=="string"&&(typeof i.isTrusted=="boolean"||i.isTrusted===void 0)&&(typeof i.supportThemeIcons=="boolean"||i.supportThemeIcons===void 0):!1}function WTe(i){return i.replace(/[\\`*_{}[\]()#+\-!]/g,"\\$&")}function q9(i){return i&&i.replace(/\\([\\`*_{}[\]()#+\-.!])/g,"$1")}function HTe(i){const e=[],t=i.split("|").map(r=>r.trim());i=t[0];const n=t[1];if(n){const r=/height=(\d+)/.exec(n),s=/width=(\d+)/.exec(n),o=r?r[1]:"",a=s?s[1]:"",l=isFinite(parseInt(a)),c=isFinite(parseInt(o));l&&e.push(`width="${a}"`),c&&e.push(`height="${o}"`)}return{href:i,dimensions:e}}var G9=globalThis&&globalThis.__awaiter||function(i,e,t,n){function r(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(u){try{c(n.next(u))}catch(d){o(d)}}function l(u){try{c(n.throw(u))}catch(d){o(d)}}function c(u){u.done?s(u.value):r(u.value).then(a,l)}c((n=n.apply(i,e||[])).next())})};function zTe(i,e){Ba(e)?i.title=_9(e):e!=null&&e.markdownNotSupportedFallback?i.title=e.markdownNotSupportedFallback:i.removeAttribute("title")}class $Te{constructor(e,t,n){this.hoverDelegate=e,this.target=t,this.fadeInAnimation=n}update(e,t){var n;return G9(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||Ba(e)||e instanceof HTMLElement)r=e;else if(!Ry(e.markdown))r=(n=e.markdown)!==null&&n!==void 0?n:e.markdownNotSupportedFallback;else{this._hoverWidget||this.show(C("iconLabel.loading","Loading..."),t),this._cancellationTokenSource=new rs;const s=this._cancellationTokenSource.token;if(r=yield e.markdown(s),r===void 0&&(r=e.markdownNotSupportedFallback),this.isDisposed||s.isCancellationRequested)return}this.show(r,t)})}show(e,t){const n=this._hoverWidget;if(this.hasContent(e)){const r={content:e,target:this.target,showPointer:this.hoverDelegate.placement==="element",hoverPosition:2,skipFadeInAnimation:!this.fadeInAnimation||!!n};this._hoverWidget=this.hoverDelegate.showHover(r,t)}n==null||n.dispose()}hasContent(e){return e?LK(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 UTe(i,e,t){let n,r;const s=(u,d)=>{var h;u&&(r==null||r.dispose(),r=void 0),d&&(n==null||n.dispose(),n=void 0),(h=i.onDidHideHover)===null||h===void 0||h.call(i)},o=(u,d,h)=>new Wo(()=>G9(this,void 0,void 0,function*(){(!r||r.isDisposed)&&(r=new $Te(i,h||e,u>0),yield r.update(t,d))}),u),a=()=>{if(n)return;const u=new Je,d=g=>s(!1,g.fromElement===e);u.add(Xe(e,Nt.MOUSE_LEAVE,d,!0));const h=()=>s(!0,!0);u.add(Xe(e,Nt.MOUSE_DOWN,h,!0));const f={targetElements:[e],dispose:()=>{}};if(i.placement===void 0||i.placement==="mouse"){const g=p=>f.x=p.x+10;u.add(Xe(e,Nt.MOUSE_MOVE,g,!0))}u.add(o(i.delay,!1,f)),n=u},l=Xe(e,Nt.MOUSE_OVER,a,!0);return{show:u=>{s(!1,!0),o(0,u)},hide:()=>{s(!0,!0)},update:u=>G9(this,void 0,void 0,function*(){t=u,yield r==null?void 0:r.update(t)}),dispose:()=>{l.dispose(),s(!0,!0)}}}const Ipt="";class K9{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 R4 extends Ne{constructor(e,t){super(),this.customHovers=new Map,this.domNode=this._register(new K9($e(e,Ze(".monaco-icon-label")))),this.labelContainer=$e(this.domNode.element,Ze(".monaco-icon-label-container"));const n=$e(this.labelContainer,Ze("span.monaco-icon-name-container"));this.descriptionContainer=this._register(new K9($e(this.labelContainer,Ze("span.monaco-icon-description-container")))),t!=null&&t.supportHighlights||t!=null&&t.supportIcons?this.nameNode=new GTe(n,!!t.supportIcons):this.nameNode=new jTe(n),t!=null&&t.supportDescriptionHighlights?this.descriptionNodeFactory=()=>new Ip($e(this.descriptionContainer.element,Ze("span.label-description")),{supportIcons:!!t.supportIcons}):this.descriptionNodeFactory=()=>this._register(new K9($e(this.descriptionContainer.element,Ze("span.label-description")))),this.hoverDelegate=t==null?void 0:t.hoverDelegate}get element(){return this.domNode.element}setLabel(e,t,n){const r=["monaco-icon-label"];n&&(n.extraClasses&&r.push(...n.extraClasses),n.italic&&r.push("italic"),n.strikethrough&&r.push("strikethrough")),this.domNode.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)&&(this.descriptionNode||(this.descriptionNode=this.descriptionNodeFactory()),this.descriptionNode instanceof Ip?(this.descriptionNode.set(t||"",n?n.descriptionMatches:void 0),this.setupHover(this.descriptionNode.element,n==null?void 0:n.descriptionTitle)):(this.descriptionNode.textContent=t||"",this.setupHover(this.descriptionNode.element,(n==null?void 0:n.descriptionTitle)||""),this.descriptionNode.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)zTe(e,t);else{const r=UTe(this.hoverDelegate,e,t);r&&this.customHovers.set(e,r)}}dispose(){super.dispose();for(const e of this.customHovers.values())e.dispose();this.customHovers.clear()}}class jTe{constructor(e){this.container=e,this.label=void 0,this.singleLabel=void 0}setLabel(e,t){if(!(this.label===e&&Va(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=$e(this.container,Ze("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 s={start:n,end:n+r.length},o=t.map(a=>Ts.intersect(s,a)).filter(a=>!Ts.isEmpty(a)).map(({start:a,end:l})=>({start:a-n,end:l-n}));return n=s.end+e.length,o})}class GTe{constructor(e,t){this.container=e,this.supportIcons=t,this.label=void 0,this.singleLabel=void 0}setLabel(e,t){if(!(this.label===e&&Va(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 Ip($e(this.container,Ze("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)||"/",r=qTe(e,n,t==null?void 0:t.matches);for(let s=0;s{const i=new Intl.Collator(void 0,{numeric:!0,sensitivity:"base"});return{collator:i,collatorIsNumeric:i.resolvedOptions().numeric}});new Ih(()=>({collator:new Intl.Collator(void 0,{numeric:!0})})),new Ih(()=>({collator:new Intl.Collator(void 0,{numeric:!0,sensitivity:"accent"})}));function KTe(i,e,t=!1){const n=i||"",r=e||"",s=TK.value.collator.compare(n,r);return TK.value.collatorIsNumeric&&s===0&&n!==r?nr.length)return 1}return 0}var IK=globalThis&&globalThis.__decorate||function(i,e,t,n){var r=arguments.length,s=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(s=(r<3?o(s):r>3?o(e,t,s):o(e,t))||s);return r>3&&s&&Object.defineProperty(e,t,s),s},XTe=globalThis&&globalThis.__awaiter||function(i,e,t,n){function r(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(u){try{c(n.next(u))}catch(d){o(d)}}function l(u){try{c(n.throw(u))}catch(d){o(d)}}function c(u){u.done?s(u.value):r(u.value).then(a,l)}c((n=n.apply(i,e||[])).next())})};const wu=Ze;class QTe{constructor(e){this.hidden=!1,this._onChecked=new be,this.onChecked=this._onChecked.event,Object.assign(this,e)}get checked(){return!!this._checked}set checked(e){e!==this._checked&&(this._checked=e,this._onChecked.fire(e))}dispose(){this._onChecked.dispose()}}class rw{get templateId(){return rw.ID}renderTemplate(e){const t=Object.create(null);t.toDisposeElement=[],t.toDisposeTemplate=[],t.entry=$e(e,wu(".quick-input-list-entry"));const n=$e(t.entry,wu("label.quick-input-list-label"));t.toDisposeTemplate.push(Zr(n,Nt.CLICK,c=>{t.checkbox.offsetParent||c.preventDefault()})),t.checkbox=$e(n,wu("input.quick-input-list-checkbox")),t.checkbox.type="checkbox",t.toDisposeTemplate.push(Zr(t.checkbox,Nt.CHANGE,c=>{t.element.checked=t.checkbox.checked}));const r=$e(n,wu(".quick-input-list-rows")),s=$e(r,wu(".quick-input-list-row")),o=$e(r,wu(".quick-input-list-row"));t.label=new R4(s,{supportHighlights:!0,supportDescriptionHighlights:!0,supportIcons:!0});const a=$e(s,wu(".quick-input-list-entry-keybinding"));t.keybinding=new Y9(a,Pa);const l=$e(o,wu(".quick-input-list-label-meta"));return t.detail=new R4(l,{supportHighlights:!0,supportIcons:!0}),t.separator=$e(t.entry,wu(".quick-input-list-separator")),t.actionBar=new bu(t.entry),t.actionBar.domNode.classList.add("quick-input-list-entry-action-bar"),t.toDisposeTemplate.push(t.actionBar),t}renderElement(e,t,n){n.toDisposeElement=Nn(n.toDisposeElement),n.element=e,n.checkbox.checked=e.checked,n.toDisposeElement.push(e.onChecked(c=>n.checkbox.checked=c));const{labelHighlights:r,descriptionHighlights:s,detailHighlights:o}=e,a=Object.create(null);a.matches=r||[],a.descriptionTitle=e.saneDescription,a.descriptionMatches=s||[],a.extraClasses=e.item.iconClasses,a.italic=e.item.italic,a.strikethrough=e.item.strikethrough,n.label.setLabel(e.saneLabel,e.saneDescription,a),n.keybinding.set(e.item.keybinding),e.saneDetail&&n.detail.setLabel(e.saneDetail,void 0,{matches:o,title:e.saneDetail}),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),n.actionBar.clear();const l=e.item.buttons;l&&l.length?(n.actionBar.push(l.map((c,u)=>{let d=c.iconClass||(c.iconPath?$9(c.iconPath):void 0);c.alwaysVisible&&(d=d?`${d} always-visible`:"always-visible");const h=new Ho(`id-${u}`,"",d,!0,()=>XTe(this,void 0,void 0,function*(){e.fireButtonTriggered({button:c,item:e.item})}));return h.tooltip=c.tooltip||"",h}),{icon:!0,label:!1}),n.entry.classList.add("has-actions")):n.entry.classList.remove("has-actions")}disposeElement(e,t,n){n.toDisposeElement=Nn(n.toDisposeElement)}disposeTemplate(e){e.toDisposeElement=Nn(e.toDisposeElement),e.toDisposeTemplate=Nn(e.toDisposeTemplate)}}rw.ID="listelement";class JTe{getHeight(e){return e.saneDetail?44:22}getTemplateId(e){return rw.ID}}var ar;(function(i){i[i.First=1]="First",i[i.Second=2]="Second",i[i.Last=3]="Last",i[i.Next=4]="Next",i[i.Previous=5]="Previous",i[i.NextPage=6]="NextPage",i[i.PreviousPage=7]="PreviousPage"})(ar||(ar={}));class Z9{constructor(e,t,n){this.parent=e,this.inputElements=[],this.elements=[],this.elementsToIndexes=new Map,this.matchOnDescription=!1,this.matchOnDetail=!1,this.matchOnLabel=!0,this.matchOnMeta=!0,this.sortByLabel=!0,this._onChangedAllVisibleChecked=new be,this.onChangedAllVisibleChecked=this._onChangedAllVisibleChecked.event,this._onChangedCheckedCount=new be,this.onChangedCheckedCount=this._onChangedCheckedCount.event,this._onChangedVisibleCount=new be,this.onChangedVisibleCount=this._onChangedVisibleCount.event,this._onChangedCheckedElements=new be,this.onChangedCheckedElements=this._onChangedCheckedElements.event,this._onButtonTriggered=new be,this.onButtonTriggered=this._onButtonTriggered.event,this._onKeyDown=new be,this.onKeyDown=this._onKeyDown.event,this._onLeave=new be,this.onLeave=this._onLeave.event,this._fireCheckedEvents=!0,this.elementDisposables=[],this.disposables=[],this.id=t,this.container=$e(this.parent,wu(".quick-input-list"));const r=new JTe,s=new tIe;this.list=n.createList("QuickInput",this.container,r,[new rw],{identityProvider:{getId:o=>o.saneLabel},setRowLineHeight:!1,multipleSelectionSupport:!1,horizontalScrolling:!1,accessibilityProvider:s}),this.list.getHTMLElement().id=t,this.disposables.push(this.list),this.disposables.push(this.list.onKeyDown(o=>{const a=new ki(o);switch(a.keyCode){case 10:this.toggleCheckbox();break;case 31:(gn?o.metaKey:o.ctrlKey)&&this.list.setFocus(js(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(a)})),this.disposables.push(this.list.onMouseDown(o=>{o.browserEvent.button!==2&&o.browserEvent.preventDefault()})),this.disposables.push(Xe(this.container,Nt.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]))})),this.disposables.push(this._onChangedAllVisibleChecked,this._onChangedCheckedCount,this._onChangedVisibleCount,this._onChangedCheckedElements,this._onButtonTriggered,this._onLeave,this._onKeyDown)}get onDidChangeFocus(){return kt.map(this.list.onDidChangeFocus,e=>e.elements.map(t=>t.item))}get onDidChangeSelection(){return kt.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}getAllVisibleChecked(){return this.allVisibleChecked(this.elements,!1)}allVisibleChecked(e,t=!0){for(let n=0,r=e.length;n{t.hidden||(t.checked=e)})}finally{this._fireCheckedEvents=!0,this.fireCheckedEvents()}}setElements(e){this.elementDisposables=Nn(this.elementDisposables);const t=n=>this.fireButtonTriggered(n);this.inputElements=e,this.elements=e.reduce((n,r,s)=>{var o,a,l;if(r.type!=="separator"){const c=s&&e[s-1],u=r.label&&r.label.replace(/\r?\n/g," "),d=r.meta&&r.meta.replace(/\r?\n/g," "),h=r.description&&r.description.replace(/\r?\n/g," "),f=r.detail&&r.detail.replace(/\r?\n/g," "),g=r.ariaLabel||[u,h,f].map(m=>mCe(m)).filter(m=>!!m).join(", "),p=this.parent.classList.contains("show-checkboxes");n.push(new QTe({hasCheckbox:p,index:s,item:r,saneLabel:u,saneMeta:d,saneAriaLabel:g,saneDescription:h,saneDetail:f,labelHighlights:(o=r.highlights)===null||o===void 0?void 0:o.label,descriptionHighlights:(a=r.highlights)===null||a===void 0?void 0:a.description,detailHighlights:(l=r.highlights)===null||l===void 0?void 0:l.detail,checked:!1,separator:c&&c.type==="separator"?c:void 0,fireButtonTriggered:t}))}return n},[]),this.elementDisposables.push(...this.elements),this.elementDisposables.push(...this.elements.map(n=>n.onChecked(()=>this.fireCheckedEvents()))),this.elementsToIndexes=this.elements.reduce((n,r,s)=>(n.set(r.item,s),n),new Map),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)}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===ar.Next&&this.list.getFocus()[0]===this.list.length-1&&(e=ar.First),e===ar.Previous&&this.list.getFocus()[0]===0&&(e=ar.Last),e===ar.Second&&this.list.length<2&&(e=ar.First),e){case ar.First:this.list.focusFirst();break;case ar.Second:this.list.focusNth(1);break;case ar.Last:this.list.focusLast();break;case ar.Next:this.list.focusNext();break;case ar.Previous:this.list.focusPrevious();break;case ar.NextPage:this.list.focusNextPage();break;case ar.PreviousPage:this.list.focusPreviousPage();break}const t=this.list.getFocus()[0];typeof t=="number"&&this.list.reveal(t)}clearFocus(){this.list.setFocus([])}domFocus(){this.list.domFocus()}layout(e){this.list.getHTMLElement().style.maxHeight=e?`calc(${Math.floor(e/44)*44}px)`:"",this.list.layout()}filter(e){if(!(this.sortByLabel||this.matchOnLabel||this.matchOnDescription||this.matchOnDetail))return this.list.layout(),!1;if(e=e.trim(),!e||!(this.matchOnLabel||this.matchOnDescription||this.matchOnDetail))this.elements.forEach(n=>{n.labelHighlights=void 0,n.descriptionHighlights=void 0,n.detailHighlights=void 0,n.hidden=!1;const r=n.index&&this.inputElements[n.index-1];n.separator=r&&r.type==="separator"?r:void 0});else{let n;this.elements.forEach(r=>{const s=this.matchOnLabel?Fo(S4(e,y4(r.saneLabel))):void 0,o=this.matchOnDescription?Fo(S4(e,y4(r.saneDescription||""))):void 0,a=this.matchOnDetail?Fo(S4(e,y4(r.saneDetail||""))):void 0,l=this.matchOnMeta?Fo(S4(e,y4(r.saneMeta||""))):void 0;if(s||o||a||l?(r.labelHighlights=s,r.descriptionHighlights=o,r.detailHighlights=a,r.hidden=!1):(r.labelHighlights=void 0,r.descriptionHighlights=void 0,r.detailHighlights=void 0,r.hidden=!r.item.alwaysShow),r.separator=void 0,!this.sortByLabel){const c=r.index&&this.inputElements[r.index-1];n=c&&c.type==="separator"?c:n,n&&!r.hidden&&(r.separator=n,n=void 0)}})}const t=this.elements.filter(n=>!n.hidden);if(this.sortByLabel&&e){const n=e.toLowerCase();t.sort((r,s)=>eIe(r,s,n))}return this.elementsToIndexes=t.reduce((n,r,s)=>(n.set(r.item,s),n),new Map),this.list.splice(0,this.list.length,t),this.list.setFocus([]),this.list.layout(),this._onChangedAllVisibleChecked.fire(this.getAllVisibleChecked()),this._onChangedVisibleCount.fire(t.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=Nn(this.elementDisposables),this.disposables=Nn(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)}style(e){this.list.style(e)}}IK([kr],Z9.prototype,"onDidChangeFocus",null),IK([kr],Z9.prototype,"onDidChangeSelection",null);function eIe(i,e,t){const n=i.labelHighlights||[],r=e.labelHighlights||[];return n.length&&!r.length?-1:!n.length&&r.length?1:n.length===0&&r.length===0?0:YTe(i.saneLabel,e.saneLabel,t)}class tIe{getWidgetAriaLabel(){return C("quickInput","Quick Input")}getAriaLabel(e){return 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 DK=globalThis&&globalThis.__awaiter||function(i,e,t,n){function r(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(u){try{c(n.next(u))}catch(d){o(d)}}function l(u){try{c(n.throw(u))}catch(d){o(d)}}function c(u){u.done?s(u.value):r(u.value).then(a,l)}c((n=n.apply(i,e||[])).next())})};const wa=Ze,X9={iconClass:k.quickInputBack.classNames,tooltip:C("quickInput.back","Back"),handle:-1};class M4 extends Ne{constructor(e){super(),this.ui=e,this.visible=!1,this._enabled=!0,this._busy=!1,this._ignoreFocusOut=!1,this._buttons=[],this.noValidationMessage=M4.noPromptMessage,this._severity=Bi.Ignore,this.buttonsUpdated=!1,this.onDidTriggerButtonEmitter=this._register(new be),this.onDidHideEmitter=this._register(new be),this.onDisposeEmitter=this._register(new be),this.visibleDisposables=this._register(new Je),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&&!tc;this._ignoreFocusOut=e&&!tc,t&&this.update()}get buttons(){return this._buttons}set buttons(e){this._buttons=e,this.buttonsUpdated=!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.update())}hide(){this.visible&&this.ui.hide()}didHide(e=nw.Other){this.visible=!1,this.visibleDisposables.clear(),this.onDidHideEmitter.fire({reason:e})}update(){if(!this.visible)return;const e=this.getTitle();e&&this.ui.title.textContent!==e?this.ui.title.textContent=e:!e&&this.ui.title.innerHTML!==" "&&(this.ui.title.innerText=" ");const t=this.getDescription();if(this.ui.description1.textContent!==t&&(this.ui.description1.textContent=t),this.ui.description2.textContent!==t&&(this.ui.description2.textContent=t),this.busy&&!this.busyDelay&&(this.busyDelay=new Wo,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 r=this.buttons.filter(o=>o===X9);this.ui.leftActionBar.push(r.map((o,a)=>{const l=new Ho(`id-${a}`,"",o.iconClass||$9(o.iconPath),!0,()=>DK(this,void 0,void 0,function*(){this.onDidTriggerButtonEmitter.fire(o)}));return l.tooltip=o.tooltip||"",l}),{icon:!0,label:!1}),this.ui.rightActionBar.clear();const s=this.buttons.filter(o=>o!==X9);this.ui.rightActionBar.push(s.map((o,a)=>{const l=new Ho(`id-${a}`,"",o.iconClass||$9(o.iconPath),!0,()=>DK(this,void 0,void 0,function*(){this.onDidTriggerButtonEmitter.fire(o)}));return l.tooltip=o.tooltip||"",l}),{icon:!0,label:!1})}this.ui.ignoreFocusOut=this.ignoreFocusOut,this.ui.setEnabled(this.enabled),this.ui.setContextKey(this.contextKey);const n=this.validationMessage||this.noValidationMessage;this._lastValidationMessage!==n&&(this._lastValidationMessage=n,Mh(this.ui.message,...Tp(n))),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?C("quickInput.steps","{0}/{1}",this.step,this.totalSteps):this.step?String(this.step):""}showMessageDecoration(e){if(this.ui.inputBox.showDecoration(e),e!==Bi.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()}}M4.noPromptMessage=C("inputModeEntry","Press 'Enter' to confirm your input or 'Escape' to cancel");class sw extends M4{constructor(){super(...arguments),this._value="",this.onDidChangeValueEmitter=this._register(new be),this.onWillAcceptEmitter=this._register(new be),this.onDidAcceptEmitter=this._register(new be),this.onDidCustomEmitter=this._register(new be),this._items=[],this.itemsUpdated=!1,this._canSelectMany=!1,this._canAcceptInBackground=!1,this._matchOnDescription=!1,this._matchOnDetail=!1,this._matchOnLabel=!0,this._sortByLabel=!0,this._autoFocusOnList=!0,this._keepScrollPosition=!1,this._itemActivation=this.ui.isScreenReaderOptimized()?_c.NONE:_c.FIRST,this._activeItems=[],this.activeItemsUpdated=!1,this.activeItemsToConfirm=[],this.onDidChangeActiveEmitter=this._register(new be),this._selectedItems=[],this.selectedItemsUpdated=!1,this.selectedItemsToConfirm=[],this.onDidChangeSelectionEmitter=this._register(new be),this.onDidTriggerItemButtonEmitter=this._register(new be),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}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 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?DTe: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(ar.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(ar.Next),this.canSelectMany&&this.ui.list.domFocus(),Xn.stop(e,!0);break;case 16:this.ui.list.getFocusedElements().length?this.ui.list.focus(ar.Previous):this.ui.list.focus(ar.Last),this.canSelectMany&&this.ui.list.domFocus(),Xn.stop(e,!0);break;case 12:this.ui.list.focus(ar.NextPage),this.canSelectMany&&this.ui.list.domFocus(),Xn.stop(e,!0);break;case 11:this.ui.list.focus(ar.PreviousPage),this.canSelectMany&&this.ui.list.domFocus(),Xn.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(ar.First),Xn.stop(e,!0));break;case 13:(e.ctrlKey||e.metaKey)&&!e.shiftKey&&!e.altKey&&(this.ui.list.focus(ar.Last),Xn.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&&ra(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&&ra(e,this._selectedItems,(n,r)=>n===r)||(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&&ra(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.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 Xe(this.ui.container,Nt.KEY_UP,e=>{if(this.canSelectMany||!this._quickNavigate)return;const t=new ki(e),n=t.keyCode;this._quickNavigate.keybindings.some(o=>{const[a,l]=o.getParts();return l?!1:a.shiftKey&&n===4?!(t.ctrlKey||t.altKey||t.metaKey):!!(a.altKey&&n===6||a.ctrlKey&&n===5||a.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._hideInput&&this._items.length>0;this.ui.container.classList.toggle("hidden-input",t&&!this.description);const n={title:!!this.title||!!this.step||!!this.buttons.length,description:!!this.description,checkAll:this.canSelectMany&&!this._hideCheckAll,checkBox:this.canSelectMany,inputBox:!t,progressBar:!t,visibleCount:!0,count:this.canSelectMany,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||"");const r=this.ariaLabel||this.placeholder||sw.DEFAULT_ARIA_LABEL;if(this.ui.inputBox.ariaLabel!==r&&(this.ui.inputBox.ariaLabel=r),this.ui.list.matchOnDescription=this.matchOnDescription,this.ui.list.matchOnDetail=this.matchOnDetail,this.ui.list.matchOnLabel=this.matchOnLabel,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 _c.NONE:this._itemActivation=_c.FIRST;break;case _c.SECOND:this.ui.list.focus(ar.Second),this._itemActivation=_c.FIRST;break;case _c.LAST:this.ui.list.focus(ar.Last),this._itemActivation=_c.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||"",this.ui.setComboboxAccessibility(!0),n.inputBox||(this.ui.list.domFocus(),this.canSelectMany&&this.ui.list.focus(ar.First)),this.keepScrollPosition&&(this.scrollTop=e)}}sw.DEFAULT_ARIA_LABEL=C("quickInputBox.ariaLabel","Type to narrow down results.");class P4 extends Ne{constructor(e){super(),this.options=e,this.comboboxAccessibility=!1,this.enabled=!0,this.onDidAcceptEmitter=this._register(new be),this.onDidCustomEmitter=this._register(new be),this.onDidTriggerButtonEmitter=this._register(new be),this.keyMods={ctrlCmd:!1,alt:!1},this.controller=null,this.onShowEmitter=this._register(new be),this.onShow=this.onShowEmitter.event,this.onHideEmitter=this._register(new be),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(Xe(window,Nt.KEY_DOWN,e,!0)),this._register(Xe(window,Nt.KEY_UP,e,!0)),this._register(Xe(window,Nt.MOUSE_DOWN,e,!0))}getUI(){if(this.ui)return this.ui;const e=$e(this.parentElement,wa(".quick-input-widget.show-file-icons"));e.tabIndex=-1,e.style.display="none";const t=Ka(e),n=$e(e,wa(".quick-input-titlebar")),r=this._register(new bu(n));r.domNode.classList.add("quick-input-left-action-bar");const s=$e(n,wa(".quick-input-title")),o=this._register(new bu(n));o.domNode.classList.add("quick-input-right-action-bar");const a=$e(e,wa(".quick-input-description")),l=$e(e,wa(".quick-input-header")),c=$e(l,wa("input.quick-input-check-all"));c.type="checkbox",this._register(Zr(c,Nt.CHANGE,O=>{const N=c.checked;x.setAllVisibleChecked(N)})),this._register(Xe(c,Nt.CLICK,O=>{(O.x||O.y)&&f.setFocus()}));const u=$e(l,wa(".quick-input-description")),d=$e(l,wa(".quick-input-and-message")),h=$e(d,wa(".quick-input-filter")),f=this._register(new VTe(h));f.setAttribute("aria-describedby",`${this.idPrefix}message`);const g=$e(h,wa(".quick-input-visible-count"));g.setAttribute("aria-live","polite"),g.setAttribute("aria-atomic","true");const p=new B9(g,{countFormat:C({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")}),m=$e(h,wa(".quick-input-count"));m.setAttribute("aria-live","polite");const _=new B9(m,{countFormat:C({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")}),b=$e(l,wa(".quick-input-action")),v=new bK(b);v.label=C("ok","OK"),this._register(v.onDidClick(O=>{this.onDidAcceptEmitter.fire()}));const w=$e(l,wa(".quick-input-action")),E=new bK(w);E.label=C("custom","Custom"),this._register(E.onDidClick(O=>{this.onDidCustomEmitter.fire()}));const I=$e(d,wa(`#${this.idPrefix}message.quick-input-message`)),x=this._register(new Z9(e,this.idPrefix+"list",this.options));this._register(x.onChangedAllVisibleChecked(O=>{c.checked=O})),this._register(x.onChangedVisibleCount(O=>{p.setCount(O)})),this._register(x.onChangedCheckedCount(O=>{_.setCount(O)})),this._register(x.onLeave(()=>{setTimeout(()=>{f.setFocus(),this.controller instanceof sw&&this.controller.canSelectMany&&x.clearFocus()},0)})),this._register(x.onDidChangeFocus(()=>{this.comboboxAccessibility&&this.getUI().inputBox.setAttribute("aria-activedescendant",this.getUI().list.getActiveDescendant()||"")}));const T=new A4(e);T.getContainer().classList.add("quick-input-progress");const L=D_(e);return this._register(L),this._register(Xe(e,Nt.FOCUS,O=>{this.previousFocusElement=O.relatedTarget instanceof HTMLElement?O.relatedTarget:void 0},!0)),this._register(L.onDidBlur(()=>{!this.getUI().ignoreFocusOut&&!this.options.ignoreFocusOut()&&this.hide(nw.Blur),this.previousFocusElement=void 0})),this._register(Xe(e,Nt.FOCUS,O=>{f.setFocus()})),this._register(Xe(e,Nt.KEY_DOWN,O=>{const N=new ki(O);switch(N.keyCode){case 3:Xn.stop(O,!0),this.onDidAcceptEmitter.fire();break;case 9:Xn.stop(O,!0),this.hide(nw.Gesture);break;case 2:if(!N.altKey&&!N.ctrlKey&&!N.metaKey){const P=[".action-label.codicon"];e.classList.contains("show-checkboxes")?P.push("input"):P.push("input[type=text]"),this.getUI().list.isDisplayed()&&P.push(".monaco-list");const $=e.querySelectorAll(P.join(", "));N.shiftKey&&N.target===$[0]?(Xn.stop(O,!0),$[$.length-1].focus()):!N.shiftKey&&N.target===$[$.length-1]&&(Xn.stop(O,!0),$[0].focus())}break}})),this.ui={container:e,styleSheet:t,leftActionBar:r,titleBar:n,title:s,description1:a,description2:u,rightActionBar:o,checkAll:c,filterContainer:h,inputBox:f,visibleCountContainer:g,visibleCount:p,countContainer:m,count:_,okContainer:b,ok:v,message:I,customButtonContainer:w,customButton:E,list:x,progressBar:T,onDidAccept:this.onDidAcceptEmitter.event,onDidCustom:this.onDidCustomEmitter.event,onDidTriggerButton:this.onDidTriggerButtonEmitter.event,ignoreFocusOut:!1,keyMods:this.keyMods,isScreenReaderOptimized:()=>this.options.isScreenReaderOptimized(),show:O=>this.show(O),hide:()=>this.hide(),setVisibilities:O=>this.setVisibilities(O),setComboboxAccessibility:O=>this.setComboboxAccessibility(O),setEnabled:O=>this.setEnabled(O),setContextKey:O=>this.options.setContextKey(O)},this.updateStyles(),this.ui}pick(e,t={},n=mn.None){return new Promise((r,s)=>{let o=u=>{o=r,t.onKeyMods&&t.onKeyMods(a.keyMods),r(u)};if(n.isCancellationRequested){o(void 0);return}const a=this.createQuickPick();let l;const c=[a,a.onDidAccept(()=>{if(a.canSelectMany)o(a.selectedItems.slice()),a.hide();else{const u=a.activeItems[0];u&&(o(u),a.hide())}}),a.onDidChangeActive(u=>{const d=u[0];d&&t.onDidFocus&&t.onDidFocus(d)}),a.onDidChangeSelection(u=>{if(!a.canSelectMany){const d=u[0];d&&(o(d),a.hide())}}),a.onDidTriggerItemButton(u=>t.onDidTriggerItemButton&&t.onDidTriggerItemButton(Object.assign(Object.assign({},u),{removeItem:()=>{const d=a.items.indexOf(u.item);if(d!==-1){const h=a.items.slice(),f=h.splice(d,1),g=a.activeItems.filter(m=>m!==f[0]),p=a.keepScrollPosition;a.keepScrollPosition=!0,a.items=h,g&&(a.activeItems=g),a.keepScrollPosition=p}}}))),a.onDidChangeValue(u=>{l&&!u&&(a.activeItems.length!==1||a.activeItems[0]!==l)&&(a.activeItems=[l])}),n.onCancellationRequested(()=>{a.hide()}),a.onDidHide(()=>{Nn(c),o(void 0)})];a.title=t.title,a.canSelectMany=!!t.canPickMany,a.placeholder=t.placeHolder,a.ignoreFocusOut=!!t.ignoreFocusLost,a.matchOnDescription=!!t.matchOnDescription,a.matchOnDetail=!!t.matchOnDetail,a.matchOnLabel=t.matchOnLabel===void 0||t.matchOnLabel,a.autoFocusOnList=t.autoFocusOnList===void 0||t.autoFocusOnList,a.quickNavigate=t.quickNavigate,a.contextKey=t.contextKey,a.busy=!0,Promise.all([e,t.activeItem]).then(([u,d])=>{l=d,a.busy=!1,a.items=u,a.canSelectMany&&(a.selectedItems=u.filter(h=>h.type!=="separator"&&h.picked)),l&&(a.activeItems=[l])}),a.show(),Promise.resolve(e).then(void 0,u=>{s(u),a.hide()})})}createQuickPick(){const e=this.getUI();return new sw(e)}show(e){const t=this.getUI();this.onShowEmitter.fire();const n=this.controller;this.controller=e,n&&n.didHide(),this.setEnabled(!0),t.leftActionBar.clear(),t.title.textContent="",t.description1.textContent="",t.description2.textContent="",t.rightActionBar.clear(),t.checkAll.checked=!1,t.inputBox.placeholder="",t.inputBox.password=!1,t.inputBox.showDecoration(Bi.Ignore),t.visibleCount.setCount(0),t.count.setCount(0),Mh(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,this.setComboboxAccessibility(!1),t.inputBox.ariaLabel="";const r=this.options.backKeybindingLabel();X9.tooltip=r?C("quickInput.backWithKeybinding","Back ({0})",r):C("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.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[e.checkBox?"add":"remove"]("show-checkboxes"),this.updateLayout()}setComboboxAccessibility(e){if(e!==this.comboboxAccessibility){const t=this.getUI();this.comboboxAccessibility=e,this.comboboxAccessibility?(t.inputBox.setAttribute("role","combobox"),t.inputBox.setAttribute("aria-haspopup","true"),t.inputBox.setAttribute("aria-autocomplete","list"),t.inputBox.setAttribute("aria-activedescendant",t.list.getActiveDescendant()||"")):(t.inputBox.removeAttribute("role"),t.inputBox.removeAttribute("aria-haspopup"),t.inputBox.removeAttribute("aria-autocomplete"),t.inputBox.removeAttribute("aria-activedescendant"))}}setEnabled(e){if(e!==this.enabled){this.enabled=e;for(const t of this.getUI().leftActionBar.viewItems)t.getAction().enabled=e;for(const t of this.getUI().rightActionBar.viewItems)t.getAction().enabled=e;this.getUI().checkAll.disabled=!e,this.getUI().ok.enabled=e,this.getUI().list.enabled=e}}hide(e){var t;const n=this.controller;if(n){const r=!(!((t=this.ui)===null||t===void 0)&&t.container.contains(document.activeElement));if(this.controller=null,this.onHideEmitter.fire(),this.getUI().container.style.display="none",!r){let s=this.previousFocusElement;for(;s&&!s.offsetParent;)s=Fo(s.parentElement);s!=null&&s.offsetParent?(s.focus(),this.previousFocusElement=void 0):this.options.returnFocus()}n.didHide(e)}}layout(e,t){this.dimension=e,this.titleBarOffset=t,this.updateLayout()}updateLayout(){if(this.ui){this.ui.container.style.top=`${this.titleBarOffset}px`;const e=this.ui.container.style,t=Math.min(this.dimension.width*.62,P4.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,contrastBorder:r,widgetShadow:s}=this.styles.widget;this.ui.titleBar.style.backgroundColor=e?e.toString():"",this.ui.container.style.backgroundColor=t?t.toString():"",this.ui.container.style.color=n?n.toString():"",this.ui.container.style.border=r?`1px solid ${r}`:"",this.ui.container.style.boxShadow=s?`0 0 8px 2px ${s}`:"",this.ui.inputBox.style(this.styles.inputBox),this.ui.count.style(this.styles.countBadge),this.ui.ok.style(this.styles.button),this.ui.customButton.style(this.styles.button),this.ui.progressBar.style(this.styles.progressBar),this.ui.list.style(this.styles.list);const o=[];this.styles.list.pickerGroupBorder&&o.push(`.quick-input-list .quick-input-list-entry { border-top-color: ${this.styles.list.pickerGroupBorder}; }`),this.styles.list.pickerGroupForeground&&o.push(`.quick-input-list .quick-input-list-separator { color: ${this.styles.list.pickerGroupForeground}; }`),(this.styles.keybindingLabel.keybindingLabelBackground||this.styles.keybindingLabel.keybindingLabelBorder||this.styles.keybindingLabel.keybindingLabelBottomBorder||this.styles.keybindingLabel.keybindingLabelShadow||this.styles.keybindingLabel.keybindingLabelForeground)&&(o.push(".quick-input-list .monaco-keybinding > .monaco-keybinding-key {"),this.styles.keybindingLabel.keybindingLabelBackground&&o.push(`background-color: ${this.styles.keybindingLabel.keybindingLabelBackground};`),this.styles.keybindingLabel.keybindingLabelBorder&&o.push(`border-color: ${this.styles.keybindingLabel.keybindingLabelBorder};`),this.styles.keybindingLabel.keybindingLabelBottomBorder&&o.push(`border-bottom-color: ${this.styles.keybindingLabel.keybindingLabelBottomBorder};`),this.styles.keybindingLabel.keybindingLabelShadow&&o.push(`box-shadow: inset 0 -1px 0 ${this.styles.keybindingLabel.keybindingLabelShadow};`),this.styles.keybindingLabel.keybindingLabelForeground&&o.push(`color: ${this.styles.keybindingLabel.keybindingLabelForeground};`),o.push("}"));const a=o.join(` +`);a!==this.ui.styleSheet.textContent&&(this.ui.styleSheet.textContent=a)}}}P4.MAX_WIDTH=600;const Npt="";class nIe{constructor(e){this.spliceables=e}splice(e,t,n){this.spliceables.forEach(r=>r.splice(e,t,n))}}class Dp extends Error{constructor(e,t){super(`ListError [${e}] ${t}`)}}function NK(i,e){const t=[];for(let n of e){if(i.start>=n.range.end)continue;if(i.ende.concat(t),[]))}class AK{constructor(){this.groups=[],this._size=0}splice(e,t,n=[]){const r=n.length-t,s=NK({start:0,end:e},this.groups),o=NK({start:e+t,end:Number.POSITIVE_INFINITY},this.groups).map(l=>({range:Q9(l.range,r),size:l.size})),a=n.map((l,c)=>({range:{start:e+c,end:e+c+1},size:l.size}));this.groups=rIe(s,a,o),this._size=this.groups.reduce((l,c)=>l+c.size*(c.range.end-c.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;let t=0,n=0;for(let r of this.groups){const s=r.range.end-r.range.start,o=n+s*r.size;if(e{for(const n of e)this.getRenderer(t).disposeTemplate(n.templateData),n.templateData=null}),this.cache.clear()}getRenderer(e){const t=this.renderers.get(e);if(!t)throw new Error(`No renderer found for ${e}`);return t}}var Np=globalThis&&globalThis.__decorate||function(i,e,t,n){var r=arguments.length,s=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(s=(r<3?o(s):r>3?o(e,t,s):o(e,t))||s);return r>3&&s&&Object.defineProperty(e,t,s),s};const Cu={useShadows:!0,verticalScrollMode:1,setRowLineHeight:!0,setRowHeight:!0,supportDynamicHeights:!1,dnd:{getDragElements(i){return[i]},getDragURI(){return null},onDragStart(){},onDragOver(){return!1},drop(){}},horizontalScrolling:!1,transformOptimization:!0,alwaysConsumeMouseWheel:!0};class ow{constructor(e){this.elements=e}update(){}getData(){return this.elements}}class aIe{constructor(e){this.elements=e}update(){}getData(){return this.elements}}class lIe{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;tr,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 bc{constructor(e,t,n,r=Cu){if(this.virtualDelegate=t,this.domId=`list_id_${++bc.InstanceCount}`,this.renderers=new Map,this.renderWidth=0,this._scrollHeight=0,this.scrollableElementUpdateDisposable=null,this.scrollableElementWidthDelayer=new tu(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 Je,this._onDidChangeContentHeight=new be,this._horizontalScrolling=!1,r.horizontalScrolling&&r.supportDynamicHeights)throw new Error("Horizontal scrolling and dynamic heights not supported simultaneously");this.items=[],this.itemId=0,this.rangeMap=new AK;for(const o of n)this.renderers.set(o.templateId,o);this.cache=this.disposables.add(new oIe(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 r.mouseSupport=="boolean"?r.mouseSupport:!0),this._horizontalScrolling=zc(r,o=>o.horizontalScrolling,Cu.horizontalScrolling),this.domNode.classList.toggle("horizontal-scrolling",this._horizontalScrolling),this.additionalScrollHeight=typeof r.additionalScrollHeight>"u"?0:r.additionalScrollHeight,this.accessibilityProvider=new uIe(r.accessibilityProvider),this.rowsContainer=document.createElement("div"),this.rowsContainer.className="monaco-list-rows",zc(r,o=>o.transformOptimization,Cu.transformOptimization)&&(this.rowsContainer.style.transform="translate3d(0px, 0px, 0px)"),this.disposables.add(ei.addTarget(this.rowsContainer)),this.scrollable=new cv({forceIntegerValues:!0,smoothScrollDuration:zc(r,o=>o.smoothScrolling,!1)?125:0,scheduleAtNextAnimationFrame:o=>dc(o)}),this.scrollableElement=this.disposables.add(new W6(this.rowsContainer,{alwaysConsumeMouseWheel:zc(r,o=>o.alwaysConsumeMouseWheel,Cu.alwaysConsumeMouseWheel),horizontal:1,vertical:zc(r,o=>o.verticalScrollMode,Cu.verticalScrollMode),useShadows:zc(r,o=>o.useShadows,Cu.useShadows),mouseWheelScrollSensitivity:r.mouseWheelScrollSensitivity,fastScrollSensitivity:r.fastScrollSensitivity},this.scrollable)),this.domNode.appendChild(this.scrollableElement.getDomNode()),e.appendChild(this.domNode),this.scrollableElement.onScroll(this.onScroll,this,this.disposables),this.disposables.add(Xe(this.rowsContainer,bi.Change,o=>this.onTouchChange(o))),this.disposables.add(Xe(this.scrollableElement.getDomNode(),"scroll",o=>o.target.scrollTop=0)),this.disposables.add(Xe(this.domNode,"dragover",o=>this.onDragOver(this.toDragEvent(o)))),this.disposables.add(Xe(this.domNode,"drop",o=>this.onDrop(this.toDragEvent(o)))),this.disposables.add(Xe(this.domNode,"dragleave",o=>this.onDragLeave(this.toDragEvent(o)))),this.disposables.add(Xe(this.domNode,"dragend",o=>this.onDragEnd(o))),this.setRowLineHeight=zc(r,o=>o.setRowLineHeight,Cu.setRowLineHeight),this.setRowHeight=zc(r,o=>o.setRowHeight,Cu.setRowHeight),this.supportDynamicHeights=zc(r,o=>o.supportDynamicHeights,Cu.supportDynamicHeights),this.dnd=zc(r,o=>o.dnd,Cu.dnd),this.layout()}get contentHeight(){return this.rangeMap.size}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:zI(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=""}}updateOptions(e){e.additionalScrollHeight!==void 0&&(this.additionalScrollHeight=e.additionalScrollHeight,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),e.mouseWheelScrollSensitivity!==void 0&&this.scrollableElement.updateOptions({mouseWheelScrollSensitivity:e.mouseWheelScrollSensitivity}),e.fastScrollSensitivity!==void 0&&this.scrollableElement.updateOptions({fastScrollSensitivity:e.fastScrollSensitivity})}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 r=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight),s={start:e,end:e+t},o=Ts.intersect(r,s),a=new Map;for(let I=o.end-1;I>=o.start;I--){const x=this.items[I];if(x.dragStartDisposable.dispose(),x.row){let T=a.get(x.templateId);T||(T=[],a.set(x.templateId,T));const L=this.renderers.get(x.templateId);L&&L.disposeElement&&L.disposeElement(x.element,I,x.row.templateData,x.size),T.push(x.row)}x.row=null}const l={start:e+t,end:this.items.length},c=Ts.intersect(l,r),u=Ts.relativeComplement(l,r),d=n.map(I=>({id:String(this.itemId++),element:I,templateId:this.virtualDelegate.getTemplateId(I),size:this.virtualDelegate.getHeight(I),width:void 0,hasDynamicHeight:!!this.virtualDelegate.hasDynamicHeight&&this.virtualDelegate.hasDynamicHeight(I),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 AK,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 f=n.length-t,g=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight),p=Q9(c,f),m=Ts.intersect(g,p);for(let I=m.start;IQ9(I,f)),w=[{start:e,end:e+n.length},...b].map(I=>Ts.intersect(g,I)),E=this.getNextToLastElement(w);for(const I of w)for(let x=I.start;xI.element)}eventuallyUpdateScrollDimensions(){this._scrollHeight=this.contentHeight,this.rowsContainer.style.height=`${this._scrollHeight}px`,this.scrollableElementUpdateDisposable||(this.scrollableElementUpdateDisposable=dc(()=>{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})}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}element(e){return this.items[e].element}domElement(e){const t=this.items[e].row;return t&&t.domNode}elementHeight(e){return this.items[e].size}elementTop(e){return this.rangeMap.positionAt(e)}indexAt(e){return this.rangeMap.indexAt(e)}indexAfter(e){return this.rangeMap.indexAfter(e)}layout(e,t){let n={height:typeof e=="number"?e:sSe(this.domNode)};this.scrollableElementUpdateDisposable&&(this.scrollableElementUpdateDisposable.dispose(),this.scrollableElementUpdateDisposable=null,n.scrollHeight=this.scrollHeight),this.scrollableElement.setScrollDimensions(n),typeof t<"u"&&(this.renderWidth=t,this.supportDynamicHeights&&this._rerender(this.scrollTop,this.renderHeight)),this.horizontalScrolling&&this.scrollableElement.setScrollDimensions({width:typeof t=="number"?t:zI(this.domNode)})}render(e,t,n,r,s,o=!1){const a=this.getRenderRange(t,n),l=Ts.relativeComplement(a,e),c=Ts.relativeComplement(e,a),u=this.getNextToLastElement(l);if(o){const d=Ts.intersect(e,a);for(let h=d.start;hr.row.domNode.setAttribute("aria-checked",String(!!u));c(o.value),r.checkedDisposable=o.onDidChange(c)}r.row.domNode.parentElement||(t?this.rowsContainer.insertBefore(r.row.domNode,t):this.rowsContainer.appendChild(r.row.domNode)),this.updateItemInDOM(r,e);const a=this.renderers.get(r.templateId);if(!a)throw new Error(`No renderer found for template id ${r.templateId}`);a&&a.renderElement(r.element,e,r.row.templateData,r.size);const l=this.dnd.getDragURI(r.element);r.dragStartDisposable.dispose(),r.row.domNode.draggable=!!l,l&&(r.dragStartDisposable=Xe(r.row.domNode,"dragstart",c=>this.onDragStart(r.element,l,c))),this.horizontalScrolling&&(this.measureItemWidth(r),this.eventuallyUpdateScrollWidth())}measureItemWidth(e){if(!e.row||!e.row.domNode)return;e.row.domNode.style.width=ua?"-moz-fit-content":"fit-content",e.width=zI(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.additionalScrollHeight}get onMouseClick(){return kt.map(this.disposables.add(new si(this.domNode,"click")).event,e=>this.toMouseEvent(e))}get onMouseDblClick(){return kt.map(this.disposables.add(new si(this.domNode,"dblclick")).event,e=>this.toMouseEvent(e))}get onMouseMiddleClick(){return kt.filter(kt.map(this.disposables.add(new si(this.domNode,"auxclick")).event,e=>this.toMouseEvent(e)),e=>e.browserEvent.button===1)}get onMouseDown(){return kt.map(this.disposables.add(new si(this.domNode,"mousedown")).event,e=>this.toMouseEvent(e))}get onContextMenu(){return kt.any(kt.map(this.disposables.add(new si(this.domNode,"contextmenu")).event,e=>this.toMouseEvent(e)),kt.map(this.disposables.add(new si(this.domNode,bi.Contextmenu)).event,e=>this.toGestureEvent(e)))}get onTouchStart(){return kt.map(this.disposables.add(new si(this.domNode,"touchstart")).event,e=>this.toTouchEvent(e))}get onTap(){return kt.map(this.disposables.add(new si(this.rowsContainer,bi.Tap)).event,e=>this.toGestureEvent(e))}toMouseEvent(e){const t=this.getItemIndexFromEventTarget(e.target||null),n=typeof t>"u"?void 0:this.items[t],r=n&&n.element;return{browserEvent:e,index:t,element:r}}toTouchEvent(e){const t=this.getItemIndexFromEventTarget(e.target||null),n=typeof t>"u"?void 0:this.items[t],r=n&&n.element;return{browserEvent:e,index:t,element:r}}toGestureEvent(e){const t=this.getItemIndexFromEventTarget(e.initialTarget||null),n=typeof t>"u"?void 0:this.items[t],r=n&&n.element;return{browserEvent:e,index:t,element:r}}toDragEvent(e){const t=this.getItemIndexFromEventTarget(e.target||null),n=typeof t>"u"?void 0:this.items[t],r=n&&n.element;return{browserEvent:e,index:t,element:r}}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){if(!n.dataTransfer)return;const r=this.dnd.getDragElements(e);if(n.dataTransfer.effectAllowed="copyMove",n.dataTransfer.setData(Zq.TEXT,t),n.dataTransfer.setDragImage){let s;this.dnd.getDragLabel&&(s=this.dnd.getDragLabel(r,n)),typeof s>"u"&&(s=String(r.length));const o=Ze(".monaco-drag-image");o.textContent=s,document.body.appendChild(o),n.dataTransfer.setDragImage(o,-10,-10),setTimeout(()=>document.body.removeChild(o),0)}this.currentDragData=new ow(r),kd.CurrentDragAndDropData=new aIe(r),this.dnd.onDragStart&&this.dnd.onDragStart(this.currentDragData,n)}onDragOver(e){if(e.browserEvent.preventDefault(),this.onDragLeaveTimeout.dispose(),kd.CurrentDragAndDropData&&kd.CurrentDragAndDropData.getData()==="vscode-ui"||(this.setupDragAndDropScrollTopAnimation(e.browserEvent),!e.browserEvent.dataTransfer))return!1;if(!this.currentDragData)if(kd.CurrentDragAndDropData)this.currentDragData=kd.CurrentDragAndDropData;else{if(!e.browserEvent.dataTransfer.types)return!1;this.currentDragData=new lIe}const t=this.dnd.onDragOver(this.currentDragData,e.element,e.index,e.browserEvent);if(this.canDrop=typeof t=="boolean"?t:t.accept,!this.canDrop)return this.currentDragFeedback=void 0,this.currentDragFeedbackDisposable.dispose(),!1;e.browserEvent.dataTransfer.dropEffect=typeof t!="boolean"&&t.effect===0?"copy":"move";let n;if(typeof t!="boolean"&&t.feedback?n=t.feedback:typeof e.index>"u"?n=[-1]:n=[e.index],n=vh(n).filter(r=>r>=-1&&rr-s),n=n[0]===-1?[-1]:n,cIe(this.currentDragFeedback,n))return!0;if(this.currentDragFeedback=n,this.currentDragFeedbackDisposable.dispose(),n[0]===-1)this.domNode.classList.add("drop-target"),this.rowsContainer.classList.add("drop-target"),this.currentDragFeedbackDisposable=fn(()=>{this.domNode.classList.remove("drop-target"),this.rowsContainer.classList.remove("drop-target")});else{for(const r of n){const s=this.items[r];s.dropTarget=!0,s.row&&s.row.domNode.classList.add("drop-target")}this.currentDragFeedbackDisposable=fn(()=>{for(const r of n){const s=this.items[r];s.dropTarget=!1,s.row&&s.row.domNode.classList.remove("drop-target")}})}return!0}onDragLeave(e){var t,n;this.onDragLeaveTimeout.dispose(),this.onDragLeaveTimeout=Mg(()=>this.clearDragOverFeedback(),100),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.currentDragData=void 0,kd.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){this.canDrop=!1,this.teardownDragAndDropScrollTopAnimation(),this.clearDragOverFeedback(),this.currentDragData=void 0,kd.CurrentDragAndDropData=void 0,this.dnd.onDragEnd&&this.dnd.onDragEnd(e)}clearDragOverFeedback(){this.currentDragFeedback=void 0,this.currentDragFeedbackDisposable.dispose(),this.currentDragFeedbackDisposable=Ne.None}setupDragAndDropScrollTopAnimation(e){if(!this.dragOverAnimationDisposable){const t=Q$(this.domNode).top;this.dragOverAnimationDisposable=hSe(this.animateDragAndDropScrollTop.bind(this,t))}this.dragOverAnimationStopDisposable.dispose(),this.dragOverAnimationStopDisposable=Mg(()=>{this.dragOverAnimationDisposable&&(this.dragOverAnimationDisposable.dispose(),this.dragOverAnimationDisposable=void 0)},1e3),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 r=n.getAttribute("data-index");if(r){const s=Number(r);if(!isNaN(s))return s}n=n.parentElement}}getRenderRange(e,t){return{start:this.rangeMap.indexAt(e),end:this.rangeMap.indexAfter(e+t-1)}}_rerender(e,t,n){const r=this.getRenderRange(e,t);let s,o;e===this.elementTop(r.start)?(s=r.start,o=0):r.end-r.start>1&&(s=r.start+1,o=this.elementTop(s)-e);let a=0;for(;;){const l=this.getRenderRange(e,t);let c=!1;for(let u=l.start;u=0;a--)(o=i[a])&&(s=(r<3?o(s):r>3?o(e,t,s):o(e,t))||s);return r>3&&s&&Object.defineProperty(e,t,s),s},RK=globalThis&&globalThis.__awaiter||function(i,e,t,n){function r(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(u){try{c(n.next(u))}catch(d){o(d)}}function l(u){try{c(n.throw(u))}catch(d){o(d)}}function c(u){u.done?s(u.value):r(u.value).then(a,l)}c((n=n.apply(i,e||[])).next())})};class dIe{constructor(e){this.trait=e,this.renderedElements=[]}get templateId(){return`template:${this.trait.name}`}renderTemplate(e){return e}renderElement(e,t,n){const r=this.renderedElements.findIndex(s=>s.templateData===n);if(r>=0){const s=this.renderedElements[r];this.trait.unrender(n),s.index=t}else{const s={index:t,templateData:n};this.renderedElements.push(s)}this.trait.renderIndex(t,n)}splice(e,t,n){const r=[];for(const s of this.renderedElements)s.index=e+t&&r.push({index:s.index+n-t,templateData:s.templateData});this.renderedElements=r}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 F4=class{constructor(e){this._trait=e,this.length=0,this.indexes=[],this.sortedIndexes=[],this._onChange=new be,this.onChange=this._onChange.event}get name(){return this._trait}get renderer(){return new dIe(this)}splice(e,t,n){var r;t=Math.max(0,Math.min(t,this.length-e));const s=n.length-t,o=e+t,a=[...this.sortedIndexes.filter(c=>cc?u+e:-1).filter(c=>c!==-1),...this.sortedIndexes.filter(c=>c>=o).map(c=>c+s)],l=this.length+s;if(this.sortedIndexes.length>0&&a.length===0&&l>0){const c=(r=this.sortedIndexes.find(u=>u>=e))!==null&&r!==void 0?r:l-1;a.push(Math.min(c,l-1))}this.renderer.splice(e,t,n.length),this._set(a,a),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(HK),t)}_set(e,t,n){const r=this.indexes,s=this.sortedIndexes;this.indexes=e,this.sortedIndexes=t;const o=e7(s,e);return this.renderer.renderIndexes(o),this._onChange.fire({indexes:e,browserEvent:n}),r}get(){return this.indexes}contains(e){return C8(this.sortedIndexes,e,HK)>=0}dispose(){Nn(this._onChange)}};Ap([kr],F4.prototype,"renderer",null);class hIe extends F4{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 J9{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,n.map(()=>!1));const r=this.trait.get().map(o=>this.identityProvider.getId(this.view.element(o)).toString()),s=n.map(o=>r.indexOf(this.identityProvider.getId(o).toString())>-1);this.trait.splice(e,t,s)}}function ff(i){return i.tagName==="INPUT"||i.tagName==="TEXTAREA"}function C1(i){return i.classList.contains("monaco-editor")?!0:i.classList.contains("monaco-list")||!i.parentElement?!1:C1(i.parentElement)}class OK{constructor(e,t,n){this.list=e,this.view=t,this.disposables=new Je,this.multipleSelectionDisposables=new Je,this.onKeyDown.filter(r=>r.keyCode===3).on(this.onEnter,this,this.disposables),this.onKeyDown.filter(r=>r.keyCode===16).on(this.onUpArrow,this,this.disposables),this.onKeyDown.filter(r=>r.keyCode===18).on(this.onDownArrow,this,this.disposables),this.onKeyDown.filter(r=>r.keyCode===11).on(this.onPageUpArrow,this,this.disposables),this.onKeyDown.filter(r=>r.keyCode===12).on(this.onPageDownArrow,this,this.disposables),this.onKeyDown.filter(r=>r.keyCode===9).on(this.onEscape,this,this.disposables),n.multipleSelectionSupport!==!1&&this.onKeyDown.filter(r=>(gn?r.metaKey:r.ctrlKey)&&r.keyCode===31).on(this.onCtrlA,this,this.multipleSelectionDisposables)}get onKeyDown(){return kt.chain(this.disposables.add(new si(this.view.domNode,"keydown")).event).filter(e=>!ff(e.target)).map(e=>new ki(e))}updateOptions(e){e.multipleSelectionSupport!==void 0&&(this.multipleSelectionDisposables.clear(),e.multipleSelectionSupport&&this.onKeyDown.filter(t=>(gn?t.metaKey:t.ctrlKey)&&t.keyCode===31).on(this.onCtrlA,this,this.multipleSelectionDisposables))}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(js(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()}}Ap([kr],OK.prototype,"onKeyDown",null);var y1;(function(i){i[i.Idle=0]="Idle",i[i.Typing=1]="Typing"})(y1||(y1={}));const MK=new class{mightProducePrintableCharacter(i){return i.ctrlKey||i.metaKey||i.altKey?!1:i.keyCode>=31&&i.keyCode<=56||i.keyCode>=21&&i.keyCode<=30||i.keyCode>=93&&i.keyCode<=102||i.keyCode>=80&&i.keyCode<=90}};class fIe{constructor(e,t,n,r){this.list=e,this.view=t,this.keyboardNavigationLabelProvider=n,this.delegate=r,this.enabled=!1,this.state=y1.Idle,this.automaticKeyboardNavigation=!0,this.triggered=!1,this.previouslyFocused=-1,this.enabledDisposables=new Je,this.disposables=new Je,this.updateOptions(e.options)}updateOptions(e){(typeof e.enableKeyboardNavigation>"u"?!0:!!e.enableKeyboardNavigation)?this.enable():this.disable(),typeof e.automaticKeyboardNavigation<"u"&&(this.automaticKeyboardNavigation=e.automaticKeyboardNavigation)}enable(){if(this.enabled)return;const e=kt.chain(this.enabledDisposables.add(new si(this.view.domNode,"keydown")).event).filter(r=>!ff(r.target)).filter(()=>this.automaticKeyboardNavigation||this.triggered).map(r=>new ki(r)).filter(r=>this.delegate.mightProducePrintableCharacter(r)).forEach(r=>r.preventDefault()).map(r=>r.browserEvent.key).event,t=kt.debounce(e,()=>null,800);kt.reduce(kt.any(e,t),(r,s)=>s===null?null:(r||"")+s)(this.onInput,this,this.enabledDisposables),t(this.onClear,this,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&&os(n)}this.previouslyFocused=-1}onInput(e){if(!e){this.state=y1.Idle,this.triggered=!1;return}const t=this.list.getFocus(),n=t.length>0?t[0]:0,r=this.state===y1.Idle?1:0;this.state=y1.Typing;for(let s=0;s"u"||p4(e,l)){this.previouslyFocused=n,this.list.setFocus([o]),this.list.reveal(o);return}}}dispose(){this.disable(),this.enabledDisposables.dispose(),this.disposables.dispose()}}class gIe{constructor(e,t){this.list=e,this.view=t,this.disposables=new Je,kt.chain(this.disposables.add(new si(t.domNode,"keydown")).event).filter(r=>!ff(r.target)).map(r=>new ki(r)).filter(r=>r.keyCode===2&&!r.ctrlKey&&!r.metaKey&&!r.shiftKey&&!r.altKey).on(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 r=n.querySelector("[tabIndex]");if(!r||!(r instanceof HTMLElement)||r.tabIndex===-1)return;const s=window.getComputedStyle(r);s.visibility==="hidden"||s.display==="none"||(e.preventDefault(),e.stopPropagation(),r.focus())}dispose(){this.disposables.dispose()}}function PK(i){return gn?i.browserEvent.metaKey:i.browserEvent.ctrlKey}function FK(i){return i.browserEvent.shiftKey}function pIe(i){return i instanceof MouseEvent&&i.button===2}const BK={isSelectionSingleChangeEvent:PK,isSelectionRangeChangeEvent:FK};class VK{constructor(e){this.list=e,this.disposables=new Je,this._onPointer=new be,this.onPointer=this._onPointer.event,e.options.multipleSelectionSupport!==!1&&(this.multipleSelectionController=this.list.options.multipleSelectionController||BK),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(ei.addTarget(e.getHTMLElement()))),kt.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||BK))}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){C1(e.browserEvent.target)||document.activeElement!==e.browserEvent.target&&this.list.domFocus()}onContextMenu(e){if(C1(e.browserEvent.target))return;const t=typeof e.index>"u"?[]:[e.index];this.list.setFocus(t,e.browserEvent)}onViewPointer(e){if(!this.mouseSupport||ff(e.browserEvent.target)||C1(e.browserEvent.target))return;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.isSelectionRangeChangeEvent(e))return this.changeSelection(e);if(this.isSelectionChangeEvent(e))return this.changeSelection(e);this.list.setFocus([t],e.browserEvent),this.list.setAnchor(t),pIe(e.browserEvent)||this.list.setSelection([t],e.browserEvent),this._onPointer.fire(e)}onDoubleClick(e){if(ff(e.browserEvent.target)||C1(e.browserEvent.target)||this.isSelectionChangeEvent(e))return;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 u=this.list.getFocus()[0];n=u??t,this.list.setAnchor(n)}const r=Math.min(n,t),s=Math.max(n,t),o=js(r,s+1),a=this.list.getSelection(),l=bIe(e7(a,[n]),n);if(l.length===0)return;const c=e7(o,vIe(a,l));this.list.setSelection(c,e.browserEvent),this.list.setFocus([t],e.browserEvent)}else if(this.isSelectionSingleChangeEvent(e)){const r=this.list.getSelection(),s=r.filter(o=>o!==t);this.list.setFocus([t]),this.list.setAnchor(t),r.length===s.length?this.list.setSelection([...s,t],e.browserEvent):this.list.setSelection(s,e.browserEvent)}}dispose(){this.disposables.dispose()}}class WK{constructor(e,t){this.styleElement=e,this.selectorSuffix=t}style(e){const t=this.selectorSuffix&&`.${this.selectorSuffix}`,n=[];e.listBackground&&(e.listBackground.isOpaque()?n.push(`.monaco-list${t} .monaco-list-rows { background: ${e.listBackground}; }`):gn||console.warn(`List with id '${this.selectorSuffix}' was styled with a non-opaque background color. This will break sub-pixel antialiasing.`)),e.listFocusBackground&&(n.push(`.monaco-list${t}:focus .monaco-list-row.focused { background-color: ${e.listFocusBackground}; }`),n.push(`.monaco-list${t}:focus .monaco-list-row.focused:hover { background-color: ${e.listFocusBackground}; }`)),e.listFocusForeground&&n.push(`.monaco-list${t}:focus .monaco-list-row.focused { color: ${e.listFocusForeground}; }`),e.listActiveSelectionBackground&&(n.push(`.monaco-list${t}:focus .monaco-list-row.selected { background-color: ${e.listActiveSelectionBackground}; }`),n.push(`.monaco-list${t}:focus .monaco-list-row.selected:hover { background-color: ${e.listActiveSelectionBackground}; }`)),e.listActiveSelectionForeground&&n.push(`.monaco-list${t}:focus .monaco-list-row.selected { color: ${e.listActiveSelectionForeground}; }`),e.listActiveSelectionIconForeground&&n.push(`.monaco-list${t}:focus .monaco-list-row.selected .codicon { color: ${e.listActiveSelectionIconForeground}; }`),e.listFocusAndSelectionBackground&&n.push(` + .monaco-drag-image, + .monaco-list${t}:focus .monaco-list-row.selected.focused { background-color: ${e.listFocusAndSelectionBackground}; } + `),e.listFocusAndSelectionForeground&&n.push(` + .monaco-drag-image, + .monaco-list${t}:focus .monaco-list-row.selected.focused { color: ${e.listFocusAndSelectionForeground}; } + `),e.listInactiveFocusForeground&&(n.push(`.monaco-list${t} .monaco-list-row.focused { color: ${e.listInactiveFocusForeground}; }`),n.push(`.monaco-list${t} .monaco-list-row.focused:hover { color: ${e.listInactiveFocusForeground}; }`)),e.listInactiveSelectionIconForeground&&n.push(`.monaco-list${t} .monaco-list-row.focused .codicon { color: ${e.listInactiveSelectionIconForeground}; }`),e.listInactiveFocusBackground&&(n.push(`.monaco-list${t} .monaco-list-row.focused { background-color: ${e.listInactiveFocusBackground}; }`),n.push(`.monaco-list${t} .monaco-list-row.focused:hover { background-color: ${e.listInactiveFocusBackground}; }`)),e.listInactiveSelectionBackground&&(n.push(`.monaco-list${t} .monaco-list-row.selected { background-color: ${e.listInactiveSelectionBackground}; }`),n.push(`.monaco-list${t} .monaco-list-row.selected:hover { background-color: ${e.listInactiveSelectionBackground}; }`)),e.listInactiveSelectionForeground&&n.push(`.monaco-list${t} .monaco-list-row.selected { color: ${e.listInactiveSelectionForeground}; }`),e.listHoverBackground&&n.push(`.monaco-list${t}:not(.drop-target) .monaco-list-row:hover:not(.selected):not(.focused) { background-color: ${e.listHoverBackground}; }`),e.listHoverForeground&&n.push(`.monaco-list${t} .monaco-list-row:hover:not(.selected):not(.focused) { color: ${e.listHoverForeground}; }`),e.listSelectionOutline&&n.push(`.monaco-list${t} .monaco-list-row.selected { outline: 1px dotted ${e.listSelectionOutline}; outline-offset: -1px; }`),e.listFocusOutline&&n.push(` + .monaco-drag-image, + .monaco-list${t}:focus .monaco-list-row.focused { outline: 1px solid ${e.listFocusOutline}; outline-offset: -1px; } + .monaco-workbench.context-menu-visible .monaco-list${t}.last-focused .monaco-list-row.focused { outline: 1px solid ${e.listFocusOutline}; outline-offset: -1px; } + `),e.listInactiveFocusOutline&&n.push(`.monaco-list${t} .monaco-list-row.focused { outline: 1px dotted ${e.listInactiveFocusOutline}; outline-offset: -1px; }`),e.listHoverOutline&&n.push(`.monaco-list${t} .monaco-list-row:hover { outline: 1px dashed ${e.listHoverOutline}; outline-offset: -1px; }`),e.listDropBackground&&n.push(` + .monaco-list${t}.drop-target, + .monaco-list${t} .monaco-list-rows.drop-target, + .monaco-list${t} .monaco-list-row.drop-target { background-color: ${e.listDropBackground} !important; color: inherit !important; } + `),e.listFilterWidgetBackground&&n.push(`.monaco-list-type-filter { background-color: ${e.listFilterWidgetBackground} }`),e.listFilterWidgetOutline&&n.push(`.monaco-list-type-filter { border: 1px solid ${e.listFilterWidgetOutline}; }`),e.listFilterWidgetNoMatchesOutline&&n.push(`.monaco-list-type-filter.no-matches { border: 1px solid ${e.listFilterWidgetNoMatchesOutline}; }`),e.listMatchesShadow&&n.push(`.monaco-list-type-filter { box-shadow: 1px 1px 1px ${e.listMatchesShadow}; }`),e.tableColumnsBorder&&n.push(` + .monaco-table:hover > .monaco-split-view2, + .monaco-table:hover > .monaco-split-view2 .monaco-sash.vertical::before { + border-color: ${e.tableColumnsBorder}; + }`),e.tableOddRowsBackgroundColor&&n.push(` + .monaco-table .monaco-list-row[data-parity=odd]:not(.focused):not(.selected):not(:hover) .monaco-table-tr, + .monaco-table .monaco-list:not(:focus) .monaco-list-row[data-parity=odd].focused:not(.selected):not(:hover) .monaco-table-tr, + .monaco-table .monaco-list:not(.focused) .monaco-list-row[data-parity=odd].focused:not(.selected):not(:hover) .monaco-table-tr { + background-color: ${e.tableOddRowsBackgroundColor}; + } + `),this.styleElement.textContent=n.join(` +`)}}const mIe={listFocusBackground:Ie.fromHex("#7FB0D0"),listActiveSelectionBackground:Ie.fromHex("#0E639C"),listActiveSelectionForeground:Ie.fromHex("#FFFFFF"),listActiveSelectionIconForeground:Ie.fromHex("#FFFFFF"),listFocusAndSelectionBackground:Ie.fromHex("#094771"),listFocusAndSelectionForeground:Ie.fromHex("#FFFFFF"),listInactiveSelectionBackground:Ie.fromHex("#3F3F46"),listInactiveSelectionIconForeground:Ie.fromHex("#FFFFFF"),listHoverBackground:Ie.fromHex("#2A2D2E"),listDropBackground:Ie.fromHex("#383B3D"),treeIndentGuidesStroke:Ie.fromHex("#a9a9a9"),tableColumnsBorder:Ie.fromHex("#cccccc").transparent(.2),tableOddRowsBackgroundColor:Ie.fromHex("#cccccc").transparent(.04)},_Ie={keyboardSupport:!0,mouseSupport:!0,multipleSelectionSupport:!0,dnd:{getDragURI(){return null},onDragStart(){},onDragOver(){return!1},drop(){}}};function bIe(i,e){const t=i.indexOf(e);if(t===-1)return[];const n=[];let r=t-1;for(;r>=0&&i[r]===e-(t-r);)n.push(i[r--]);for(n.reverse(),r=t;r=i.length)t.push(e[r++]);else if(r>=e.length)t.push(i[n++]);else if(i[n]===e[r]){t.push(i[n]),n++,r++;continue}else i[n]=i.length)t.push(e[r++]);else if(r>=e.length)t.push(i[n++]);else if(i[n]===e[r]){n++,r++;continue}else i[n]i-e;class wIe{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,r){let s=0;for(const o of this.renderers)o.renderElement(e,t,n[s++],r)}disposeElement(e,t,n,r){let s=0;for(const o of this.renderers)o.disposeElement&&o.disposeElement(e,t,n[s],r),s+=1}disposeTemplate(e){let t=0;for(const n of this.renderers)n.disposeTemplate(e[t++])}}class CIe{constructor(e){this.accessibilityProvider=e,this.templateId="a18n"}renderTemplate(e){return e}renderElement(e,t,n){const r=this.accessibilityProvider.getAriaLabel(e);r?n.setAttribute("aria-label",r):n.removeAttribute("aria-label");const s=this.accessibilityProvider.getAriaLevel&&this.accessibilityProvider.getAriaLevel(e);typeof s=="number"?n.setAttribute("aria-level",`${s}`):n.removeAttribute("aria-level")}disposeTemplate(e){}}class yIe{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){this.dnd.onDragStart&&this.dnd.onDragStart(e,t)}onDragOver(e,t,n,r){return this.dnd.onDragOver(e,t,n,r)}onDragLeave(e,t,n,r){var s,o;(o=(s=this.dnd).onDragLeave)===null||o===void 0||o.call(s,e,t,n,r)}onDragEnd(e){this.dnd.onDragEnd&&this.dnd.onDragEnd(e)}drop(e,t,n,r){this.dnd.drop(e,t,n,r)}}class yu{constructor(e,t,n,r,s=_Ie){var o;this.user=e,this._options=s,this.focus=new F4("focused"),this.anchor=new F4("anchor"),this.eventBufferer=new R8,this._ariaLabel="",this.disposables=new Je,this._onDidDispose=new be,this.onDidDispose=this._onDidDispose.event;const a=this._options.accessibilityProvider&&this._options.accessibilityProvider.getWidgetRole?(o=this._options.accessibilityProvider)===null||o===void 0?void 0:o.getWidgetRole():"list";this.selection=new hIe(a!=="listbox"),Hc(s,mIe,!1);const l=[this.focus.renderer,this.selection.renderer];this.accessibilityProvider=s.accessibilityProvider,this.accessibilityProvider&&(l.push(new CIe(this.accessibilityProvider)),this.accessibilityProvider.onDidChangeActiveDescendant&&this.accessibilityProvider.onDidChangeActiveDescendant(this.onDidChangeActiveDescendant,this,this.disposables)),r=r.map(u=>new wIe(u.templateId,[...l,u]));const c=Object.assign(Object.assign({},s),{dnd:s.dnd&&new yIe(this,s.dnd)});if(this.view=new bc(t,n,r,c),this.view.domNode.setAttribute("role",a),s.styleController)this.styleController=s.styleController(this.view.domId);else{const u=Ka(this.view.domNode);this.styleController=new WK(u,this.view.domId)}if(this.spliceable=new nIe([new J9(this.focus,this.view,s.identityProvider),new J9(this.selection,this.view,s.identityProvider),new J9(this.anchor,this.view,s.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 gIe(this,this.view)),(typeof s.keyboardSupport!="boolean"||s.keyboardSupport)&&(this.keyboardController=new OK(this,this.view,s),this.disposables.add(this.keyboardController)),s.keyboardNavigationLabelProvider){const u=s.keyboardNavigationDelegate||MK;this.typeLabelController=new fIe(this,this.view,s.keyboardNavigationLabelProvider,u),this.disposables.add(this.typeLabelController)}this.mouseController=this.createMouseController(s),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")}get onDidChangeFocus(){return kt.map(this.eventBufferer.wrapEvent(this.focus.onChange),e=>this.toListEvent(e))}get onDidChangeSelection(){return kt.map(this.eventBufferer.wrapEvent(this.selection.onChange),e=>this.toListEvent(e))}get domId(){return this.view.domId}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 onTouchStart(){return this.view.onTouchStart}get onTap(){return this.view.onTap}get onContextMenu(){let e=!1;const t=kt.chain(this.disposables.add(new si(this.view.domNode,"keydown")).event).map(s=>new ki(s)).filter(s=>e=s.keyCode===58||s.shiftKey&&s.keyCode===68).map(Kq).filter(()=>!1).event,n=kt.chain(this.disposables.add(new si(this.view.domNode,"keyup")).event).forEach(()=>e=!1).map(s=>new ki(s)).filter(s=>s.keyCode===58||s.shiftKey&&s.keyCode===68).map(Kq).map(({browserEvent:s})=>{const o=this.getFocus(),a=o.length?o[0]:void 0,l=typeof a<"u"?this.view.element(a):void 0,c=typeof a<"u"?this.view.domElement(a):this.view.domNode;return{index:a,element:l,anchor:c,browserEvent:s}}).event,r=kt.chain(this.view.onContextMenu).filter(s=>!e).map(({element:s,index:o,browserEvent:a})=>({element:s,index:o,anchor:{x:a.pageX+1,y:a.pageY},browserEvent:a})).event;return kt.any(t,n,r)}get onKeyDown(){return this.disposables.add(new si(this.view.domNode,"keydown")).event}get onDidFocus(){return kt.signal(this.disposables.add(new si(this.view.domNode,"focus",!0)).event)}createMouseController(e){return new VK(this)}updateOptions(e={}){var t;this._options=Object.assign(Object.assign({},this._options),e),this.typeLabelController&&this.typeLabelController.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),(t=this.keyboardController)===null||t===void 0||t.updateOptions(e),this.view.updateOptions(e)}get options(){return this._options}splice(e,t,n=[]){if(e<0||e>this.view.length)throw new Dp(this.user,`Invalid start index: ${e}`);if(t<0)throw new Dp(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 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 Dp(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 Dp(this.user,`Invalid index ${e}`);this.anchor.set([e])}getAnchor(){return oz(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 Dp(this.user,`Invalid index ${n}`);this.focus.set(e,t)}focusNext(e=1,t=!1,n,r){if(this.length===0)return;const s=this.focus.get(),o=this.findNextIndex(s.length>0?s[0]+e:0,t,r);o>-1&&this.setFocus([o],n)}focusPrevious(e=1,t=!1,n,r){if(this.length===0)return;const s=this.focus.get(),o=this.findPreviousIndex(s.length>0?s[0]-e:0,t,r);o>-1&&this.setFocus([o],n)}focusNextPage(e,t){return RK(this,void 0,void 0,function*(){let n=this.view.indexAt(this.view.getScrollTop()+this.view.renderHeight);n=n===0?0:n-1;const r=this.view.element(n),s=this.getFocusedElements()[0];if(s!==r){const o=this.findPreviousIndex(n,!1,t);o>-1&&s!==this.view.element(o)?this.setFocus([o],e):this.setFocus([n],e)}else{const o=this.view.getScrollTop();this.view.setScrollTop(o+this.view.renderHeight-this.view.elementHeight(n)),this.view.getScrollTop()!==o&&(this.setFocus([]),yield Th(0),yield this.focusNextPage(e,t))}})}focusPreviousPage(e,t){return RK(this,void 0,void 0,function*(){let n;const r=this.view.getScrollTop();r===0?n=this.view.indexAt(r):n=this.view.indexAfter(r-1);const s=this.view.element(n),o=this.getFocusedElements()[0];if(o!==s){const a=this.findNextIndex(n,!1,t);a>-1&&o!==this.view.element(a)?this.setFocus([a],e):this.setFocus([n],e)}else{const a=r;this.view.setScrollTop(r-this.view.renderHeight),this.view.getScrollTop()!==a&&(this.setFocus([]),yield Th(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 r=this.findNextIndex(e,!1,n);r>-1&&this.setFocus([r],t)}findNextIndex(e,t=!1,n){for(let r=0;r=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 r=0;rthis.view.element(e))}reveal(e,t){if(e<0||e>=this.length)throw new Dp(this.user,`Invalid index ${e}`);const n=this.view.getScrollTop(),r=this.view.elementTop(e),s=this.view.elementHeight(e);if(xg(t)){const o=s-this.view.renderHeight;this.view.setScrollTop(o*jo(t,0,1)+r)}else{const o=r+s,a=n+this.view.renderHeight;r=a||(r=a&&s>=this.view.renderHeight?this.view.setScrollTop(r):o>=a&&this.view.setScrollTop(o-this.view.renderHeight))}}getRelativeTop(e){if(e<0||e>=this.length)throw new Dp(this.user,`Invalid index ${e}`);const t=this.view.getScrollTop(),n=this.view.elementTop(e),r=this.view.elementHeight(e);if(nt+this.view.renderHeight)return null;const s=r-this.view.renderHeight;return Math.abs((t-n)/s)}getHTMLElement(){return this.view.domNode}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()}}Ap([kr],yu.prototype,"onDidChangeFocus",null),Ap([kr],yu.prototype,"onDidChangeSelection",null),Ap([kr],yu.prototype,"onContextMenu",null),Ap([kr],yu.prototype,"onKeyDown",null),Ap([kr],yu.prototype,"onDidFocus",null);class SIe{constructor(e,t){this.renderer=e,this.modelProvider=t}get templateId(){return this.renderer.templateId}renderTemplate(e){return{data:this.renderer.renderTemplate(e),disposable:Ne.None}}renderElement(e,t,n,r){if(n.disposable&&n.disposable.dispose(),!n.data)return;const s=this.modelProvider();if(s.isResolved(e))return this.renderer.renderElement(s.get(e),e,n.data,r);const o=new rs,a=s.resolve(e,o.token);n.disposable={dispose:()=>o.cancel()},this.renderer.renderPlaceholder(e,n.data),a.then(l=>this.renderer.renderElement(l,e,n.data,r))}disposeTemplate(e){e.disposable&&(e.disposable.dispose(),e.disposable=void 0),e.data&&(this.renderer.disposeTemplate(e.data),e.data=void 0)}}class kIe{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 EIe(i,e){return Object.assign(Object.assign({},e),{accessibilityProvider:e.accessibilityProvider&&new kIe(i,e.accessibilityProvider)})}class xIe{constructor(e,t,n,r,s={}){const o=()=>this.model,a=r.map(l=>new SIe(l,o));this.list=new yu(e,t,n,a,EIe(o,s))}updateOptions(e){this.list.updateOptions(e)}getHTMLElement(){return this.list.getHTMLElement()}get onDidFocus(){return this.list.onDidFocus}get onDidDispose(){return this.list.onDidDispose}get onMouseDblClick(){return kt.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 kt.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 kt.map(this.list.onDidChangeSelection,({elements:e,indexes:t,browserEvent:n})=>({elements:e.map(r=>this._model.get(r)),indexes:t,browserEvent:n}))}get model(){return this._model}set model(e){this._model=e,this.list.splice(0,this.list.length,js(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()}}const Apt="",LIe={separatorBorder:Ie.transparent};class zK{constructor(e,t,n,r){this.container=e,this.view=t,this.disposable=r,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)}set size(e){this._size=e}get size(){return this._size}get visible(){return typeof this._cachedVisibleSize>"u"}setVisible(e,t){e!==this.visible&&(e?(this.size=jo(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),this.view.setVisible&&this.view.setVisible(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 snap(){return!!this.view.snap}set enabled(e){this.container.style.pointerEvents=e?"":"none"}layout(e,t){this.layoutContainer(e),this.view.layout(this.size,e,t)}dispose(){return this.disposable.dispose(),this.view}}class TIe extends zK{layoutContainer(e){this.container.style.top=`${e}px`,this.container.style.height=`${this.size}px`}}class IIe extends zK{layoutContainer(e){this.container.style.left=`${e}px`,this.container.style.width=`${this.size}px`}}var Nd;(function(i){i[i.Idle=0]="Idle",i[i.Busy=1]="Busy"})(Nd||(Nd={}));var B4;(function(i){i.Distribute={type:"distribute"};function e(n){return{type:"split",index:n}}i.Split=e;function t(n){return{type:"invisible",cachedVisibleSize:n}}i.Invisible=t})(B4||(B4={}));class $K extends Ne{constructor(e,t={}){var n,r,s,o,a;super(),this.size=0,this.contentSize=0,this.proportions=void 0,this.viewItems=[],this.sashItems=[],this.state=Nd.Idle,this._onDidSashChange=this._register(new be),this._onDidSashReset=this._register(new be),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=(r=t.inverseAltBehavior)!==null&&r!==void 0?r:!1,this.proportionalLayout=(s=t.proportionalLayout)!==null&&s!==void 0?s:!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=$e(this.el,Ze(".sash-container")),this.viewContainer=Ze(".split-view-container"),this.scrollable=new cv({forceIntegerValues:!0,smoothScrollDuration:125,scheduleAtNextAnimationFrame:dc}),this.scrollableElement=this._register(new W6(this.viewContainer,{vertical:this.orientation===0?(o=t.scrollbarVisibility)!==null&&o!==void 0?o:1:2,horizontal:this.orientation===1?(a=t.scrollbarVisibility)!==null&&a!==void 0?a:1:2},this.scrollable)),this.onDidScroll=this.scrollableElement.onScroll,this._register(this.onDidScroll(l=>{this.viewContainer.scrollTop=l.scrollTop,this.viewContainer.scrollLeft=l.scrollLeft})),$e(this.el,this.scrollableElement.getDomNode()),this.style(t.styles||LIe),t.descriptor&&(this.size=t.descriptor.size,t.descriptor.views.forEach((l,c)=>{const u=Po(l.visible)||l.visible?l.size:{type:"invisible",cachedVisibleSize:l.size},d=l.view;this.doAddView(d,u,c,!0)}),this.contentSize=this.viewItems.reduce((l,c)=>l+c.size,0),this.saveProportions())}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())}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,r){this.doAddView(e,t,n,r)}layout(e,t){const n=Math.max(this.size,this.contentSize);if(this.size=e,this.layoutContext=t,this.proportions)for(let r=0;rthis.viewItems[a].priority===1),o=r.filter(a=>this.viewItems[a].priority===2);this.resize(this.viewItems.length-1,e-n,void 0,s,o)}this.distributeEmptySpace(),this.layoutViews()}saveProportions(){this.proportionalLayout&&this.contentSize>0&&(this.proportions=this.viewItems.map(e=>e.size/this.contentSize))}onSashStart({sash:e,start:t,alt:n}){for(const a of this.viewItems)a.enabled=!1;const r=this.sashItems.findIndex(a=>a.sash===e),s=rd(Xe(document.body,"keydown",a=>o(this.sashDragState.current,a.altKey)),Xe(document.body,"keyup",()=>o(this.sashDragState.current,!1))),o=(a,l)=>{const c=this.viewItems.map(g=>g.size);let u=Number.NEGATIVE_INFINITY,d=Number.POSITIVE_INFINITY;if(this.inverseAltBehavior&&(l=!l),l)if(r===this.sashItems.length-1){const p=this.viewItems[r];u=(p.minimumSize-p.size)/2,d=(p.maximumSize-p.size)/2}else{const p=this.viewItems[r+1];u=(p.size-p.maximumSize)/2,d=(p.size-p.minimumSize)/2}let h,f;if(!l){const g=js(r,-1),p=js(r+1,this.viewItems.length),m=g.reduce((T,L)=>T+(this.viewItems[L].minimumSize-c[L]),0),_=g.reduce((T,L)=>T+(this.viewItems[L].viewMaximumSize-c[L]),0),b=p.length===0?Number.POSITIVE_INFINITY:p.reduce((T,L)=>T+(c[L]-this.viewItems[L].minimumSize),0),v=p.length===0?Number.NEGATIVE_INFINITY:p.reduce((T,L)=>T+(c[L]-this.viewItems[L].viewMaximumSize),0),w=Math.max(m,v),E=Math.min(b,_),I=this.findFirstSnapIndex(g),x=this.findFirstSnapIndex(p);if(typeof I=="number"){const T=this.viewItems[I],L=Math.floor(T.viewMinimumSize/2);h={index:I,limitDelta:T.visible?w-L:w+L,size:T.size}}if(typeof x=="number"){const T=this.viewItems[x],L=Math.floor(T.viewMinimumSize/2);f={index:x,limitDelta:T.visible?E+L:E-L,size:T.size}}}this.sashDragState={start:a,current:a,index:r,sizes:c,minDelta:u,maxDelta:d,alt:l,snapBefore:h,snapAfter:f,disposable:s}};o(t,n)}onSashChange({current:e}){const{index:t,start:n,sizes:r,alt:s,minDelta:o,maxDelta:a,snapBefore:l,snapAfter:c}=this.sashDragState;this.sashDragState.current=e;const u=e-n,d=this.resize(t,u,r,void 0,void 0,o,a,l,c);if(s){const h=t===this.sashItems.length-1,f=this.viewItems.map(v=>v.size),g=h?t:t+1,p=this.viewItems[g],m=p.size-p.maximumSize,_=p.size-p.minimumSize,b=h?t-1:t+1;this.resize(b,-d,f,void 0,void 0,m,_)}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=jo(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!==Nd.Idle)throw new Error("Cant modify splitview");if(this.state=Nd.Busy,e<0||e>=this.viewItems.length)return;const n=js(this.viewItems.length).filter(a=>a!==e),r=[...n.filter(a=>this.viewItems[a].priority===1),e],s=n.filter(a=>this.viewItems[a].priority===2),o=this.viewItems[e];t=Math.round(t),t=jo(t,o.minimumSize,Math.min(o.maximumSize,this.size)),o.size=t,this.relayout(r,s),this.state=Nd.Idle}distributeViewSizes(){const e=[];let t=0;for(const a of this.viewItems)a.maximumSize-a.minimumSize>0&&(e.push(a),t+=a.size);const n=Math.floor(t/e.length);for(const a of e)a.size=jo(n,a.minimumSize,a.maximumSize);const r=js(this.viewItems.length),s=r.filter(a=>this.viewItems[a].priority===1),o=r.filter(a=>this.viewItems[a].priority===2);this.relayout(s,o)}getViewSize(e){return e<0||e>=this.viewItems.length?-1:this.viewItems[e].size}doAddView(e,t,n=this.viewItems.length,r){if(this.state!==Nd.Idle)throw new Error("Cant modify splitview");this.state=Nd.Busy;const s=Ze(".split-view-view");n===this.viewItems.length?this.viewContainer.appendChild(s):this.viewContainer.insertBefore(s,this.viewContainer.children.item(n));const o=e.onDidChange(h=>this.onViewChange(u,h)),a=fn(()=>this.viewContainer.removeChild(s)),l=rd(o,a);let c;typeof t=="number"?c=t:t.type==="split"?c=this.getViewSize(t.index)/2:t.type==="invisible"?c={cachedVisibleSize:t.cachedVisibleSize}:c=e.minimumSize;const u=this.orientation===0?new TIe(s,e,c,l):new IIe(s,e,c,l);if(this.viewItems.splice(n,0,u),this.viewItems.length>1){let h={orthogonalStartSash:this.orthogonalStartSash,orthogonalEndSash:this.orthogonalEndSash};const f=this.orientation===0?new Ls(this.sashContainer,{getHorizontalSashTop:T=>this.getSashPosition(T),getHorizontalSashWidth:this.getSashOrthogonalSize},Object.assign(Object.assign({},h),{orientation:1})):new Ls(this.sashContainer,{getVerticalSashLeft:T=>this.getSashPosition(T),getVerticalSashHeight:this.getSashOrthogonalSize},Object.assign(Object.assign({},h),{orientation:0})),g=this.orientation===0?T=>({sash:f,start:T.startY,current:T.currentY,alt:T.altKey}):T=>({sash:f,start:T.startX,current:T.currentX,alt:T.altKey}),m=kt.map(f.onDidStart,g)(this.onSashStart,this),b=kt.map(f.onDidChange,g)(this.onSashChange,this),w=kt.map(f.onDidEnd,()=>this.sashItems.findIndex(T=>T.sash===f))(this.onSashEnd,this),E=f.onDidReset(()=>{const T=this.sashItems.findIndex($=>$.sash===f),L=js(T,-1),O=js(T+1,this.viewItems.length),N=this.findFirstSnapIndex(L),P=this.findFirstSnapIndex(O);typeof N=="number"&&!this.viewItems[N].visible||typeof P=="number"&&!this.viewItems[P].visible||this._onDidSashReset.fire(T)}),I=rd(m,b,w,E,f),x={sash:f,disposable:I};this.sashItems.splice(n-1,0,x)}s.appendChild(e.element);let d;typeof t!="number"&&t.type==="split"&&(d=[t.index]),r||this.relayout([n],d),this.state=Nd.Idle,!r&&typeof t!="number"&&t.type==="distribute"&&this.distributeViewSizes()}relayout(e,t){const n=this.viewItems.reduce((r,s)=>r+s.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(u=>u.size),r,s,o=Number.NEGATIVE_INFINITY,a=Number.POSITIVE_INFINITY,l,c){if(e<0||e>=this.viewItems.length)return 0;const u=js(e,-1),d=js(e+1,this.viewItems.length);if(s)for(const x of s)k8(u,x),k8(d,x);if(r)for(const x of r)Dy(u,x),Dy(d,x);const h=u.map(x=>this.viewItems[x]),f=u.map(x=>n[x]),g=d.map(x=>this.viewItems[x]),p=d.map(x=>n[x]),m=u.reduce((x,T)=>x+(this.viewItems[T].minimumSize-n[T]),0),_=u.reduce((x,T)=>x+(this.viewItems[T].maximumSize-n[T]),0),b=d.length===0?Number.POSITIVE_INFINITY:d.reduce((x,T)=>x+(n[T]-this.viewItems[T].minimumSize),0),v=d.length===0?Number.NEGATIVE_INFINITY:d.reduce((x,T)=>x+(n[T]-this.viewItems[T].maximumSize),0),w=Math.max(m,v,o),E=Math.min(b,_,a);let I=!1;if(l){const x=this.viewItems[l.index],T=t>=l.limitDelta;I=T!==x.visible,x.setVisible(T,l.size)}if(!I&&c){const x=this.viewItems[c.index],T=ta+l.size,0);let n=this.size-t;const r=js(this.viewItems.length-1,-1),s=r.filter(a=>this.viewItems[a].priority===1),o=r.filter(a=>this.viewItems[a].priority===2);for(const a of o)k8(r,a);for(const a of s)Dy(r,a);typeof e=="number"&&Dy(r,e);for(let a=0;n!==0&&at+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(l=>e=l.size-l.minimumSize>0||e);e=!1;const n=this.viewItems.map(l=>e=l.maximumSize-l.size>0||e),r=[...this.viewItems].reverse();e=!1;const s=r.map(l=>e=l.size-l.minimumSize>0||e).reverse();e=!1;const o=r.map(l=>e=l.maximumSize-l.size>0||e).reverse();let a=0;for(let l=0;l0||this.startSnappingEnabled)?c.state=1:b&&t[l]&&(a0)return;if(!n.visible&&n.snap)return t}}dispose(){super.dispose(),Nn(this.viewItems),this.viewItems=[],this.sashItems.forEach(e=>e.disposable.dispose()),this.sashItems=[]}}const Rpt="";class aw{constructor(e,t,n){this.columns=e,this.getColumnSize=n,this.templateId=aw.TemplateId,this.renderedTemplates=new Set;const r=new Map(t.map(s=>[s.templateId,s]));this.renderers=[];for(const s of e){const o=r.get(s.templateId);if(!o)throw new Error(`Table cell renderer for template id ${s.templateId} not found.`);this.renderers.push(o)}}renderTemplate(e){const t=$e(e,Ze(".monaco-table-tr")),n=[],r=[];for(let o=0;onew NIe(u,d)),l={size:a.reduce((u,d)=>u+d.column.weight,0),views:a.map(u=>({size:u.column.weight,view:u}))};this.splitview=this.disposables.add(new $K(this.domNode,{orientation:1,scrollbarVisibility:2,getSashOrthogonalSize:()=>this.cachedHeight,descriptor:l})),this.splitview.el.style.height=`${n.headerRowHeight}px`,this.splitview.el.style.lineHeight=`${n.headerRowHeight}px`;const c=new aw(r,s,u=>this.splitview.getViewSize(u));this.list=this.disposables.add(new yu(e,this.domNode,DIe(n),[c],o)),kt.any(...a.map(u=>u.onDidLayout))(([u,d])=>c.layoutColumn(u,d),null,this.disposables),this.splitview.onDidSashReset(u=>{const d=r.reduce((f,g)=>f+g.weight,0),h=r[u].weight/d*this.cachedWidth;this.splitview.resizeView(u,h)},null,this.disposables),this.styleElement=Ka(this.domNode),this.style({})}get onDidChangeFocus(){return this.list.onDidChangeFocus}get onDidChangeSelection(){return this.list.onDidChangeSelection}get onMouseDblClick(){return this.list.onMouseDblClick}get onPointer(){return this.list.onPointer}get onDidFocus(){return this.list.onDidFocus}get onDidDispose(){return this.list.onDidDispose}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()}}V4.InstanceCount=0;var lw;(function(i){i[i.Unknown=0]="Unknown",i[i.Twistie=1]="Twistie",i[i.Element=2]="Element"})(lw||(lw={}));class sl extends Error{constructor(e,t){super(`TreeError [${e}] ${t}`)}}class t7{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 n7(i){return typeof i=="object"&&"visibility"in i&&"data"in i}function cw(i){switch(i){case!0:return 1;case!1:return 0;default:return i}}function i7(i){return typeof i.collapsible=="boolean"}class AIe{constructor(e,t,n,r={}){this.user=e,this.list=t,this.rootRef=[],this.eventBufferer=new R8,this._onDidChangeCollapseState=new be,this.onDidChangeCollapseState=this.eventBufferer.wrapEvent(this._onDidChangeCollapseState.event),this._onDidChangeRenderNodeCount=new be,this.onDidChangeRenderNodeCount=this.eventBufferer.wrapEvent(this._onDidChangeRenderNodeCount.event),this._onDidSplice=new be,this.onDidSplice=this._onDidSplice.event,this.refilterDelayer=new tu(h$),this.collapseByDefault=typeof r.collapseByDefault>"u"?!1:r.collapseByDefault,this.filter=r.filter,this.autoExpandSingleChildren=typeof r.autoExpandSingleChildren>"u"?!1:r.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=Dn.empty(),r={}){if(e.length===0)throw new sl(this.user,"Invalid tree location");r.diffIdentityProvider?this.spliceSmart(r.diffIdentityProvider,e,t,n,r):this.spliceSimple(e,t,n,r)}spliceSmart(e,t,n,r,s,o){var a;r===void 0&&(r=Dn.empty()),o===void 0&&(o=(a=s.diffDepth)!==null&&a!==void 0?a:0);const{parentNode:l}=this.getParentNodeWithListIndex(t);if(!l.lastDiffIds)return this.spliceSimple(t,n,r,s);const c=[...r],u=t[t.length-1],d=new nu({getElements:()=>l.lastDiffIds},{getElements:()=>[...l.children.slice(0,u),...c,...l.children.slice(u+n)].map(m=>e.getId(m.element).toString())}).ComputeDiff(!1);if(d.quitEarly)return l.lastDiffIds=void 0,this.spliceSimple(t,n,c,s);const h=t.slice(0,-1),f=(m,_,b)=>{if(o>0)for(let v=0;vb.originalStart-_.originalStart))f(g,p,g-(m.originalStart+m.originalLength)),g=m.originalStart,p=m.modifiedStart-u,this.spliceSimple([...h,g],m.originalLength,Dn.slice(c,p,p+m.modifiedLength),s);f(g,p,g)}spliceSimple(e,t,n=Dn.empty(),{onDidCreateNode:r,onDidDeleteNode:s,diffIdentityProvider:o}){const{parentNode:a,listIndex:l,revealed:c,visible:u}=this.getParentNodeWithListIndex(e),d=[],h=Dn.map(n,x=>this.createTreeNode(x,a,a.visible?1:0,c,d,r)),f=e[e.length-1],g=a.children.length>0;let p=0;for(let x=f;x>=0&&xo.getId(x.element).toString())):a.lastDiffIds=a.children.map(x=>o.getId(x.element).toString()):a.lastDiffIds=void 0;let w=0;for(const x of v)x.visible&&w++;if(w!==0)for(let x=f+m.length;xT+(L.visible?L.renderNodeCount:0),0);this._updateAncestorsRenderNodeCount(a,b-x),this.list.splice(l,x,d)}if(v.length>0&&s){const x=T=>{s(T),T.children.forEach(x)};v.forEach(x)}this._onDidSplice.fire({insertedNodes:m,deletedNodes:v});const E=a.children.length>0;g!==E&&this.setCollapsible(e.slice(0,-1),E);let I=a;for(;I;){if(I.visibility===2){this.refilterDelayer.trigger(()=>this.refilter());break}I=I.parent}}rerender(e){if(e.length===0)throw new sl(this.user,"Invalid tree location");const{node:t,listIndex:n,revealed:r}=this.getTreeNodeWithListIndex(e);t.visible&&r&&this.list.splice(n,1,[t])}has(e){return this.hasTreeNode(e)}getListIndex(e){const{listIndex:t,visible:n,revealed:r}=this.getTreeNodeWithListIndex(e);return n&&r?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 r={collapsible:t};return this.eventBufferer.bufferEvents(()=>this._setCollapseState(e,r))}isCollapsed(e){return this.getTreeNode(e).collapsed}setCollapsed(e,t,n){const r=this.getTreeNode(e);typeof t>"u"&&(t=!r.collapsed);const s={collapsed:t,recursive:n||!1};return this.eventBufferer.bufferEvents(()=>this._setCollapseState(e,s))}_setCollapseState(e,t){const{node:n,listIndex:r,revealed:s}=this.getTreeNodeWithListIndex(e),o=this._setListNodeCollapseState(n,r,s,t);if(n!==this.root&&this.autoExpandSingleChildren&&o&&!i7(t)&&n.collapsible&&!n.collapsed&&!t.recursive){let a=-1;for(let l=0;l-1){a=-1;break}else a=l;a>-1&&this._setCollapseState([...e,a],t)}return o}_setListNodeCollapseState(e,t,n,r){const s=this._setNodeCollapseState(e,r,!1);if(!n||!e.visible||!s)return s;const o=e.renderNodeCount,a=this.updateNodeAfterCollapseChange(e),l=o-(t===-1?0:1);return this.list.splice(t+1,l,a.slice(1)),s}_setNodeCollapseState(e,t,n){let r;if(e===this.root?r=!1:(i7(t)?(r=e.collapsible!==t.collapsible,e.collapsible=t.collapsible):e.collapsible?(r=e.collapsed!==t.collapsed,e.collapsed=t.collapsed):r=!1,r&&this._onDidChangeCollapseState.fire({node:e,deep:n})),!i7(t)&&t.recursive)for(const s of e.children)r=this._setNodeCollapseState(s,t,!0)||r;return r}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,r,s,o){const a={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},l=this._filterNode(a,n);a.visibility=l,r&&s.push(a);const c=e.children||Dn.empty(),u=r&&l!==0&&!a.collapsed,d=Dn.map(c,g=>this.createTreeNode(g,a,l,u,s,o));let h=0,f=1;for(const g of d)a.children.push(g),f+=g.renderNodeCount,g.visible&&(g.visibleChildIndex=h++);return a.collapsible=a.collapsible||a.children.length>0,a.visibleChildrenCount=h,a.visible=l===2?h>0:l===1,a.visible?a.collapsed||(a.renderNodeCount=f):(a.renderNodeCount=0,r&&s.pop()),o&&o(a),a}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,r=!0){let s;if(e!==this.root){if(s=this._filterNode(e,t),s===0)return e.visible=!1,e.renderNodeCount=0,!1;r&&n.push(e)}const o=n.length;e.renderNodeCount=e===this.root?0:1;let a=!1;if(!e.collapsed||s!==0){let l=0;for(const c of e.children)a=this._updateNodeAfterFilterChange(c,s,n,r&&!e.collapsed)||a,c.visible&&(c.visibleChildIndex=l++);e.visibleChildrenCount=l}else e.visibleChildrenCount=0;return e!==this.root&&(e.visible=s===2?a:s===1,e.visibility=s),e.visible?e.collapsed||(e.renderNodeCount+=n.length-o):(e.renderNodeCount=0,r&&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):n7(n)?(e.filterData=n.data,cw(n.visibility)):(e.filterData=void 0,cw(n))}hasTreeNode(e,t=this.root){if(!e||e.length===0)return!0;const[n,...r]=e;return n<0||n>t.children.length?!1:this.hasTreeNode(r,t.children[n])}getTreeNode(e,t=this.root){if(!e||e.length===0)return t;const[n,...r]=e;if(n<0||n>t.children.length)throw new sl(this.user,"Invalid tree location");return this.getTreeNode(r,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:r,visible:s}=this.getParentNodeWithListIndex(e),o=e[e.length-1];if(o<0||o>t.children.length)throw new sl(this.user,"Invalid tree location");const a=t.children[o];return{node:a,listIndex:n,revealed:r,visible:s&&a.visible}}getParentNodeWithListIndex(e,t=this.root,n=0,r=!0,s=!0){const[o,...a]=e;if(o<0||o>t.children.length)throw new sl(this.user,"Invalid tree location");for(let l=0;lt.element)),this.data=e}}function r7(i){return i instanceof ow?new RIe(i):i}class OIe{constructor(e,t){this.modelProvider=e,this.dnd=t,this.autoExpandDisposable=Ne.None}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){this.dnd.onDragStart&&this.dnd.onDragStart(r7(e),t)}onDragOver(e,t,n,r,s=!0){const o=this.dnd.onDragOver(r7(e),t&&t.element,n,r),a=this.autoExpandNode!==t;if(a&&(this.autoExpandDisposable.dispose(),this.autoExpandNode=t),typeof t>"u")return o;if(a&&typeof o!="boolean"&&o.autoExpand&&(this.autoExpandDisposable=Mg(()=>{const h=this.modelProvider(),f=h.getNodeLocation(t);h.isCollapsed(f)&&h.setCollapsed(f,!1),this.autoExpandNode=void 0},500)),typeof o=="boolean"||!o.accept||typeof o.bubble>"u"||o.feedback){if(!s){const h=typeof o=="boolean"?o:o.accept,f=typeof o=="boolean"?void 0:o.effect;return{accept:h,effect:f,feedback:[n]}}return o}if(o.bubble===1){const h=this.modelProvider(),f=h.getNodeLocation(t),g=h.getParentNodeLocation(f),p=h.getNode(g),m=g&&h.getListIndex(g);return this.onDragOver(e,p,m,r,!1)}const l=this.modelProvider(),c=l.getNodeLocation(t),u=l.getListIndex(c),d=l.getListRenderCount(c);return Object.assign(Object.assign({},o),{feedback:js(u,u+d)})}drop(e,t,n,r){this.autoExpandDisposable.dispose(),this.autoExpandNode=void 0,this.dnd.drop(r7(e),t&&t.element,n,r)}onDragEnd(e){this.dnd.onDragEnd&&this.dnd.onDragEnd(e)}}function MIe(i,e){return e&&Object.assign(Object.assign({},e),{identityProvider:e.identityProvider&&{getId(t){return e.identityProvider.getId(t.element)}},dnd:e.dnd&&new OIe(i,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=i(),r=n.getNodeLocation(t),s=n.getParentNodeLocation(r);return n.getNode(s).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)}}),enableKeyboardNavigation:e.simpleKeyboardNavigation})}class s7{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){this.delegate.setDynamicHeight&&this.delegate.setDynamicHeight(e.element,t)}}var uw;(function(i){i.None="none",i.OnHover="onHover",i.Always="always"})(uw||(uw={}));class PIe{constructor(e,t=[]){this._elements=t,this.onDidChange=kt.forEach(e,n=>this._elements=n)}get elements(){return this._elements}}class dw{constructor(e,t,n,r,s={}){this.renderer=e,this.modelProvider=t,this.activeNodes=r,this.renderedElements=new Map,this.renderedNodes=new Map,this.indent=dw.DefaultIndent,this.hideTwistiesOfChildlessElements=!1,this.shouldRenderIndentGuides=!1,this.renderedIndentGuides=new DSe,this.activeIndentNodes=new Set,this.indentGuidesDisposable=Ne.None,this.disposables=new Je,this.templateId=e.templateId,this.updateOptions(s),kt.map(n,o=>o.node)(this.onDidChangeNodeTwistieState,this,this.disposables),e.onDidChangeTwistieState&&e.onDidChangeTwistieState(this.onDidChangeTwistieState,this,this.disposables)}updateOptions(e={}){if(typeof e.indent<"u"&&(this.indent=jo(e.indent,0,40)),typeof e.renderIndentGuides<"u"){const t=e.renderIndentGuides!==uw.None;if(t!==this.shouldRenderIndentGuides&&(this.shouldRenderIndentGuides=t,this.indentGuidesDisposable.dispose(),t)){const n=new Je;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=$e(e,Ze(".monaco-tl-row")),n=$e(t,Ze(".monaco-tl-indent")),r=$e(t,Ze(".monaco-tl-twistie")),s=$e(t,Ze(".monaco-tl-contents")),o=this.renderer.renderTemplate(s);return{container:e,indent:n,twistie:r,indentGuidesDisposable:Ne.None,templateData:o}}renderElement(e,t,n,r){typeof r=="number"&&(this.renderedNodes.set(e,{templateData:n,height:r}),this.renderedElements.set(e.element,e));const s=dw.DefaultIndent+(e.depth-1)*this.indent;n.twistie.style.paddingLeft=`${s}px`,n.indent.style.width=`${s+this.indent-16}px`,this.renderTwistie(e,n),typeof r=="number"&&this.renderIndentGuides(e,n),this.renderer.renderElement(e,t,n.templateData,r)}disposeElement(e,t,n,r){n.indentGuidesDisposable.dispose(),this.renderer.disposeElement&&this.renderer.disposeElement(e,t,n.templateData,r),typeof r=="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.renderTwistie(e,t.templateData),this._onDidChangeActiveNodes(this.activeNodes.elements),this.renderIndentGuides(e,t.templateData))}renderTwistie(e,t){t.twistie.classList.remove(...k.treeItemExpanded.classNamesArray);let n=!1;this.renderer.renderTwistie&&(n=this.renderer.renderTwistie(e.element,t.twistie)),e.collapsible&&(!this.hideTwistiesOfChildlessElements||e.visibleChildrenCount>0)?(n||t.twistie.classList.add(...k.treeItemExpanded.classNamesArray),t.twistie.classList.add("collapsible"),t.twistie.classList.toggle("collapsed",e.collapsed)):t.twistie.classList.remove("collapsible","collapsed"),e.collapsible?t.container.setAttribute("aria-expanded",String(!e.collapsed)):t.container.removeAttribute("aria-expanded")}renderIndentGuides(e,t){if(Dr(t.indent),t.indentGuidesDisposable.dispose(),!this.shouldRenderIndentGuides)return;const n=new Je,r=this.modelProvider();let s=e;for(;;){const o=r.getNodeLocation(s),a=r.getParentNodeLocation(o);if(!a)break;const l=r.getNode(a),c=Ze(".indent-guide",{style:`width: ${this.indent}px`});this.activeIndentNodes.has(l)&&c.classList.add("active"),t.indent.childElementCount===0?t.indent.appendChild(c):t.indent.insertBefore(c,t.indent.firstElementChild),this.renderedIndentGuides.add(l,c),n.add(fn(()=>this.renderedIndentGuides.delete(l,c))),s=l}t.indentGuidesDisposable=n}_onDidChangeActiveNodes(e){if(!this.shouldRenderIndentGuides)return;const t=new Set,n=this.modelProvider();e.forEach(r=>{const s=n.getNodeLocation(r);try{const o=n.getParentNodeLocation(s);r.collapsible&&r.children.length>0&&!r.collapsed?t.add(r):o&&t.add(n.getNode(o))}catch{}}),this.activeIndentNodes.forEach(r=>{t.has(r)||this.renderedIndentGuides.forEach(r,s=>s.classList.remove("active"))}),t.forEach(r=>{this.activeIndentNodes.has(r)||this.renderedIndentGuides.forEach(r,s=>s.classList.add("active"))}),this.activeIndentNodes=t}dispose(){this.renderedNodes.clear(),this.renderedElements.clear(),this.indentGuidesDisposable.dispose(),Nn(this.disposables)}}dw.DefaultIndent=8;class FIe{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 Je,e.onWillRefilter(this.reset,this,this.disposables)}get totalCount(){return this._totalCount}get matchCount(){return this._matchCount}set pattern(e){this._pattern=e,this._lowercasePattern=e.toLowerCase()}filter(e,t){if(this._filter){const s=this._filter.filter(e,t);if(this.tree.options.simpleKeyboardNavigation)return s;let o;if(typeof s=="boolean"?o=s?1:0:n7(s)?o=cw(s.visibility):o=s,o===0)return!1}if(this._totalCount++,this.tree.options.simpleKeyboardNavigation||!this._pattern)return this._matchCount++,{data:pc.Default,visibility:!0};const n=this.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(e),r=Array.isArray(n)?n:[n];for(const s of r){const o=s&&s.toString();if(typeof o>"u")return{data:pc.Default,visibility:!0};const a=v1(this._pattern,this._lowercasePattern,0,o,o.toLowerCase(),0,!0);if(a)return this._matchCount++,r.length===1?{data:a,visibility:!0}:{data:{label:o,score:a},visibility:!0}}return this.tree.options.filterOnType?2:{data:pc.Default,visibility:!0}}reset(){this._totalCount=0,this._matchCount=0}dispose(){Nn(this.disposables)}}class BIe{constructor(e,t,n,r,s){this.tree=e,this.view=n,this.filter=r,this.keyboardNavigationDelegate=s,this._enabled=!1,this._pattern="",this._empty=!1,this._onDidChangeEmptyState=new be,this.positionClassName="ne",this.automaticKeyboardNavigation=!0,this.triggered=!1,this._onDidChangePattern=new be,this.enabledDisposables=new Je,this.disposables=new Je,this.domNode=Ze(`.monaco-list-type-filter.${this.positionClassName}`),this.domNode.draggable=!0,this.disposables.add(Xe(this.domNode,"dragstart",()=>this.onDragStart())),this.messageDomNode=$e(n.getHTMLElement(),Ze(".monaco-list-type-filter-message")),this.labelDomNode=$e(this.domNode,Ze("span.label"));const o=$e(this.domNode,Ze(".controls"));this._filterOnType=!!e.options.filterOnType,this.filterOnTypeDomNode=$e(o,Ze("input.filter")),this.filterOnTypeDomNode.type="checkbox",this.filterOnTypeDomNode.checked=this._filterOnType,this.filterOnTypeDomNode.tabIndex=-1,this.updateFilterOnTypeTitleAndIcon(),this.disposables.add(Xe(this.filterOnTypeDomNode,"input",()=>this.onDidChangeFilterOnType())),this.clearDomNode=$e(o,Ze("button.clear"+k.treeFilterClear.cssSelector)),this.clearDomNode.tabIndex=-1,this.clearDomNode.title=C("clear","Clear"),this.keyboardNavigationEventFilter=e.options.keyboardNavigationEventFilter,t.onDidSplice(this.onDidSpliceModel,this,this.disposables),this.updateOptions(e.options)}get enabled(){return this._enabled}get pattern(){return this._pattern}get filterOnType(){return this._filterOnType}updateOptions(e){e.simpleKeyboardNavigation?this.disable():this.enable(),typeof e.filterOnType<"u"&&(this._filterOnType=!!e.filterOnType,this.filterOnTypeDomNode.checked=this._filterOnType,this.updateFilterOnTypeTitleAndIcon()),typeof e.automaticKeyboardNavigation<"u"&&(this.automaticKeyboardNavigation=e.automaticKeyboardNavigation),this.tree.refilter(),this.render(),this.automaticKeyboardNavigation||this.onEventOrInput("")}enable(){if(this._enabled)return;const e=this.enabledDisposables.add(new si(this.view.getHTMLElement(),"keydown")),t=kt.chain(e.event).filter(r=>!ff(r.target)||r.target===this.filterOnTypeDomNode).filter(r=>r.key!=="Dead"&&!/^Media/.test(r.key)).map(r=>new ki(r)).filter(this.keyboardNavigationEventFilter||(()=>!0)).filter(()=>this.automaticKeyboardNavigation||this.triggered).filter(r=>this.keyboardNavigationDelegate.mightProducePrintableCharacter(r)&&!(r.keyCode===18||r.keyCode===16||r.keyCode===15||r.keyCode===17)||(this.pattern.length>0||this.triggered)&&(r.keyCode===9||r.keyCode===1)&&!r.altKey&&!r.ctrlKey&&!r.metaKey||r.keyCode===1&&(gn?r.altKey&&!r.metaKey:r.ctrlKey)&&!r.shiftKey).forEach(r=>{r.stopPropagation(),r.preventDefault()}).event,n=this.enabledDisposables.add(new si(this.clearDomNode,"click"));kt.chain(kt.any(t,n.event)).event(this.onEventOrInput,this,this.enabledDisposables),this.filter.pattern="",this.tree.refilter(),this.render(),this._enabled=!0,this.triggered=!1}disable(){this._enabled&&(this.domNode.remove(),this.enabledDisposables.clear(),this.tree.refilter(),this.render(),this._enabled=!1,this.triggered=!1)}onEventOrInput(e){typeof e=="string"?this.onInput(e):e instanceof MouseEvent||e.keyCode===9||e.keyCode===1&&(gn?e.altKey:e.ctrlKey)?this.onInput(""):e.keyCode===1?this.onInput(this.pattern.length===0?"":this.pattern.substr(0,this.pattern.length-1)):this.onInput(this.pattern+e.browserEvent.key)}onInput(e){const t=this.view.getHTMLElement();e&&!this.domNode.parentElement?t.append(this.domNode):!e&&this.domNode.parentElement&&(this.domNode.remove(),this.tree.domFocus()),this._pattern=e,this._onDidChangePattern.fire(e),this.filter.pattern=e,this.tree.refilter(),e&&this.tree.focusNext(0,!0,void 0,r=>!pc.isDefault(r.filterData));const n=this.tree.getFocus();if(n.length>0){const r=n[0];this.tree.getRelativeTop(r)===null&&this.tree.reveal(r,.5)}this.render(),e||(this.triggered=!1)}onDragStart(){const e=this.view.getHTMLElement(),{left:t}=ss(e),n=e.clientWidth,r=n/2,s=this.domNode.clientWidth,o=new Je;let a=this.positionClassName;const l=()=>{switch(a){case"nw":this.domNode.style.top="4px",this.domNode.style.left="4px";break;case"ne":this.domNode.style.top="4px",this.domNode.style.left=`${n-s-6}px`;break}},c=d=>{d.preventDefault();const h=d.clientX-t;d.dataTransfer&&(d.dataTransfer.dropEffect="none"),h{this.positionClassName=a,this.domNode.className=`monaco-list-type-filter ${this.positionClassName}`,this.domNode.style.top="",this.domNode.style.left="",Nn(o)};l(),this.domNode.classList.remove(a),this.domNode.classList.add("dragging"),o.add(fn(()=>this.domNode.classList.remove("dragging"))),o.add(Xe(document,"dragover",d=>c(d))),o.add(Xe(this.domNode,"dragend",()=>u())),kd.CurrentDragAndDropData=new aLe("vscode-ui"),o.add(fn(()=>kd.CurrentDragAndDropData=void 0))}onDidSpliceModel(){!this._enabled||this.pattern.length===0||(this.tree.refilter(),this.render())}onDidChangeFilterOnType(){this.tree.updateOptions({filterOnType:this.filterOnTypeDomNode.checked}),this.tree.refilter(),this.tree.domFocus(),this.render(),this.updateFilterOnTypeTitleAndIcon()}updateFilterOnTypeTitleAndIcon(){this.filterOnType?(this.filterOnTypeDomNode.classList.remove(...k.treeFilterOnTypeOff.classNamesArray),this.filterOnTypeDomNode.classList.add(...k.treeFilterOnTypeOn.classNamesArray),this.filterOnTypeDomNode.title=C("disable filter on type","Disable Filter on Type")):(this.filterOnTypeDomNode.classList.remove(...k.treeFilterOnTypeOn.classNamesArray),this.filterOnTypeDomNode.classList.add(...k.treeFilterOnTypeOff.classNamesArray),this.filterOnTypeDomNode.title=C("enable filter on type","Enable Filter on Type"))}render(){const e=this.filter.totalCount>0&&this.filter.matchCount===0;this.pattern&&this.tree.options.filterOnType&&e?(this.messageDomNode.textContent=C("empty","No elements found"),this._empty=!0):(this.messageDomNode.innerText="",this._empty=!1),this.domNode.classList.toggle("no-matches",e),this.domNode.title=C("found","Matched {0} out of {1} elements",this.filter.matchCount,this.filter.totalCount),this.labelDomNode.textContent=this.pattern.length>16?"…"+this.pattern.substr(this.pattern.length-16):this.pattern,this._onDidChangeEmptyState.fire(this._empty)}shouldAllowFocus(e){return!this.enabled||!this.pattern||this.filterOnType||this.filter.totalCount>0&&this.filter.matchCount<=1?!0:!pc.isDefault(e.filterData)}dispose(){this._enabled&&(this.domNode.remove(),this.enabledDisposables.dispose(),this._enabled=!1,this.triggered=!1),this._onDidChangePattern.dispose(),Nn(this.disposables)}}function UK(i){let e=lw.Unknown;return eU(i.browserEvent.target,"monaco-tl-twistie","monaco-tl-row")?e=lw.Twistie:eU(i.browserEvent.target,"monaco-tl-contents","monaco-tl-row")&&(e=lw.Element),{browserEvent:i.browserEvent,element:i.element?i.element.element:null,target:e}}function W4(i,e){e(i),i.children.forEach(t=>W4(t,e))}class o7{constructor(e,t){this.getFirstViewElementWithTrait=e,this.identityProvider=t,this.nodes=[],this._onDidChange=new be,this.onDidChange=this._onDidChange.event}get nodeSet(){return this._nodeSet||(this._nodeSet=this.createNodeSet()),this._nodeSet}set(e,t){!(t!=null&&t.__forceEvent)&&ra(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 r=this;this._onDidChange.fire({get elements(){return r.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 l=this.createNodeSet(),c=u=>l.delete(u);t.forEach(u=>W4(u,c)),this.set([...l.values()]);return}const n=new Set,r=l=>n.add(this.identityProvider.getId(l.element).toString());t.forEach(l=>W4(l,r));const s=new Map,o=l=>s.set(this.identityProvider.getId(l.element).toString(),l);e.forEach(l=>W4(l,o));const a=[];for(const l of this.nodes){const c=this.identityProvider.getId(l.element).toString();if(!n.has(c))a.push(l);else{const d=s.get(c);d&&a.push(d)}}if(this.nodes.length>0&&a.length===0){const l=this.getFirstViewElementWithTrait();l&&a.push(l)}this._set(a,!0)}createNodeSet(){const e=new Set;for(const t of this.nodes)e.add(t);return e}}class VIe extends VK{constructor(e,t){super(e),this.tree=t}onViewPointer(e){if(ff(e.browserEvent.target)||C1(e.browserEvent.target))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,r=n.classList.contains("monaco-tl-twistie")||n.classList.contains("monaco-icon-label")&&n.classList.contains("folder-icon")&&e.browserEvent.offsetX<16;let s=!1;if(typeof this.tree.expandOnlyOnTwistieClick=="function"?s=this.tree.expandOnlyOnTwistieClick(t.element):s=!!this.tree.expandOnlyOnTwistieClick,s&&!r&&e.browserEvent.detail!==2)return super.onViewPointer(e);if(!this.tree.expandOnDoubleClick&&e.browserEvent.detail===2)return super.onViewPointer(e);if(t.collapsible){const o=this.tree.model,a=o.getNodeLocation(t),l=e.browserEvent.altKey;if(this.tree.setFocus([a]),o.setCollapsed(a,void 0,l),s&&r)return}super.onViewPointer(e)}onDoubleClick(e){e.browserEvent.target.classList.contains("monaco-tl-twistie")||!this.tree.expandOnDoubleClick||super.onDoubleClick(e)}}class WIe extends yu{constructor(e,t,n,r,s,o,a,l){super(e,t,n,r,l),this.focusTrait=s,this.selectionTrait=o,this.anchorTrait=a}createMouseController(e){return new VIe(this,e.tree)}splice(e,t,n=[]){if(super.splice(e,t,n),n.length===0)return;const r=[],s=[];let o;n.forEach((a,l)=>{this.focusTrait.has(a)&&r.push(e+l),this.selectionTrait.has(a)&&s.push(e+l),this.anchorTrait.has(a)&&(o=e+l)}),r.length>0&&super.setFocus(vh([...super.getFocus(),...r])),s.length>0&&super.setSelection(vh([...super.getSelection(),...s])),typeof o=="number"&&super.setAnchor(o)}setFocus(e,t,n=!1){super.setFocus(e,t),n||this.focusTrait.set(e.map(r=>this.element(r)),t)}setSelection(e,t,n=!1){super.setSelection(e,t),n||this.selectionTrait.set(e.map(r=>this.element(r)),t)}setAnchor(e,t=!1){super.setAnchor(e),t||(typeof e>"u"?this.anchorTrait.set([]):this.anchorTrait.set([this.element(e)]))}}class jK{constructor(e,t,n,r,s={}){this._user=e,this._options=s,this.eventBufferer=new R8,this.disposables=new Je,this._onWillRefilter=new be,this.onWillRefilter=this._onWillRefilter.event,this._onDidUpdateOptions=new be;const o=new s7(n),a=new vz,l=new vz,c=new PIe(l.event);this.renderers=r.map(h=>new dw(h,()=>this.model,a.event,c,s));for(let h of this.renderers)this.disposables.add(h);let u;s.keyboardNavigationLabelProvider&&(u=new FIe(this,s.keyboardNavigationLabelProvider,s.filter),s=Object.assign(Object.assign({},s),{filter:u}),this.disposables.add(u)),this.focus=new o7(()=>this.view.getFocusedElements()[0],s.identityProvider),this.selection=new o7(()=>this.view.getSelectedElements()[0],s.identityProvider),this.anchor=new o7(()=>this.view.getAnchorElement(),s.identityProvider),this.view=new WIe(e,t,o,this.renderers,this.focus,this.selection,this.anchor,Object.assign(Object.assign({},MIe(()=>this.model,s)),{tree:this})),this.model=this.createModel(e,this.view,s),a.input=this.model.onDidChangeCollapseState;const d=kt.forEach(this.model.onDidSplice,h=>{this.eventBufferer.bufferEvents(()=>{this.focus.onDidModelSplice(h),this.selection.onDidModelSplice(h)})});if(d(()=>null,null,this.disposables),l.input=kt.chain(kt.any(d,this.focus.onDidChange,this.selection.onDidChange)).debounce(()=>null,0).map(()=>{const h=new Set;for(const f of this.focus.getNodes())h.add(f);for(const f of this.selection.getNodes())h.add(f);return[...h.values()]}).event,s.keyboardSupport!==!1){const h=kt.chain(this.view.onKeyDown).filter(f=>!ff(f.target)).map(f=>new ki(f));h.filter(f=>f.keyCode===15).on(this.onLeftArrow,this,this.disposables),h.filter(f=>f.keyCode===17).on(this.onRightArrow,this,this.disposables),h.filter(f=>f.keyCode===10).on(this.onSpace,this,this.disposables)}if(s.keyboardNavigationLabelProvider){const h=s.keyboardNavigationDelegate||MK;this.typeFilterController=new BIe(this,this.model,this.view,u,h),this.focusNavigationFilter=f=>this.typeFilterController.shouldAllowFocus(f),this.disposables.add(this.typeFilterController)}this.styleElement=Ka(this.view.getHTMLElement()),this.getHTMLElement().classList.toggle("always",this._options.renderIndentGuides===uw.Always)}get onDidChangeFocus(){return this.eventBufferer.wrapEvent(this.focus.onDidChange)}get onDidChangeSelection(){return this.eventBufferer.wrapEvent(this.selection.onDidChange)}get onMouseDblClick(){return kt.map(this.view.onMouseDblClick,UK)}get onPointer(){return kt.map(this.view.onPointer,UK)}get onDidFocus(){return this.view.onDidFocus}get onDidChangeModel(){return kt.signal(this.model.onDidSplice)}get onDidChangeCollapseState(){return this.model.onDidChangeCollapseState}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}updateOptions(e={}){this._options=Object.assign(Object.assign({},this._options),e);for(const t of this.renderers)t.updateOptions(e);this.view.updateOptions(Object.assign(Object.assign({},this._options),{enableKeyboardNavigation:this._options.simpleKeyboardNavigation})),this.typeFilterController&&this.typeFilterController.updateOptions(this._options),this._onDidUpdateOptions.fire(this._options),this.getHTMLElement().classList.toggle("always",this._options.renderIndentGuides===uw.Always)}get options(){return this._options}getHTMLElement(){return this.view.getHTMLElement()}get scrollTop(){return this.view.scrollTop}set scrollTop(e){this.view.scrollTop=e}domFocus(){this.view.domFocus()}layout(e,t){this.view.layout(e,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.treeIndentGuidesStroke.transparent(.4)}; }`),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)}collapse(e,t=!1){return this.model.setCollapsed(e,!0,t)}expand(e,t=!1){return this.model.setCollapsed(e,!1,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(s=>this.model.getNode(s));this.selection.set(n,t);const r=e.map(s=>this.model.getListIndex(s)).filter(s=>s>-1);this.view.setSelection(r,t,!0)}getSelection(){return this.selection.get()}setFocus(e,t){const n=e.map(s=>this.model.getNode(s));this.focus.set(n,t);const r=e.map(s=>this.model.getListIndex(s)).filter(s=>s>-1);this.view.setFocus(r,t,!0)}focusNext(e=1,t=!1,n,r=this.focusNavigationFilter){this.view.focusNext(e,t,n,r)}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)}getRelativeTop(e){const t=this.model.getListIndex(e);return t===-1?null:this.view.getRelativeTop(t)}onLeftArrow(e){e.preventDefault(),e.stopPropagation();const t=this.view.getFocusedElements();if(t.length===0)return;const n=t[0],r=this.model.getNodeLocation(n);if(!this.model.setCollapsed(r,!0)){const o=this.model.getParentNodeLocation(r);if(!o)return;const a=this.model.getListIndex(o);this.view.reveal(a),this.view.setFocus([a])}}onRightArrow(e){e.preventDefault(),e.stopPropagation();const t=this.view.getFocusedElements();if(t.length===0)return;const n=t[0],r=this.model.getNodeLocation(n);if(!this.model.setCollapsed(r,!1)){if(!n.children.some(l=>l.visible))return;const[o]=this.view.getFocus(),a=o+1;this.view.reveal(a),this.view.setFocus([a])}}onSpace(e){e.preventDefault(),e.stopPropagation();const t=this.view.getFocusedElements();if(t.length===0)return;const n=t[0],r=this.model.getNodeLocation(n),s=e.browserEvent.altKey;this.model.setCollapsed(r,void 0,s)}dispose(){Nn(this.disposables),this.view.dispose()}}class a7{constructor(e,t,n={}){this.user=e,this.rootRef=null,this.nodes=new Map,this.nodesByIdentity=new Map,this.model=new AIe(e,t,null,n),this.onDidSplice=this.model.onDidSplice,this.onDidChangeCollapseState=this.model.onDidChangeCollapseState,this.onDidChangeRenderNodeCount=this.model.onDidChangeRenderNodeCount,n.sorter&&(this.sorter={compare(r,s){return n.sorter.compare(r.element,s.element)}}),this.identityProvider=n.identityProvider}setChildren(e,t=Dn.empty(),n={}){const r=this.getElementLocation(e);this._setChildren(r,this.preserveCollapseState(t),n)}_setChildren(e,t=Dn.empty(),n){const r=new Set,s=new Set,o=l=>{var c;if(l.element===null)return;const u=l;if(r.add(u.element),this.nodes.set(u.element,u),this.identityProvider){const d=this.identityProvider.getId(u.element).toString();s.add(d),this.nodesByIdentity.set(d,u)}(c=n.onDidCreateNode)===null||c===void 0||c.call(n,u)},a=l=>{var c;if(l.element===null)return;const u=l;if(r.has(u.element)||this.nodes.delete(u.element),this.identityProvider){const d=this.identityProvider.getId(u.element).toString();s.has(d)||this.nodesByIdentity.delete(d)}(c=n.onDidDeleteNode)===null||c===void 0||c.call(n,u)};this.model.splice([...e,0],Number.MAX_VALUE,t,Object.assign(Object.assign({},n),{onDidCreateNode:o,onDidDeleteNode:a}))}preserveCollapseState(e=Dn.empty()){return this.sorter&&(e=[...e].sort(this.sorter.compare.bind(this.sorter))),Dn.map(e,t=>{let n=this.nodes.get(t.element);if(!n&&this.identityProvider){const o=this.identityProvider.getId(t.element).toString();n=this.nodesByIdentity.get(o)}if(!n)return Object.assign(Object.assign({},t),{children:this.preserveCollapseState(t.children)});const r=typeof t.collapsible=="boolean"?t.collapsible:n.collapsible,s=typeof t.collapsed<"u"?t.collapsed:n.collapsed;return Object.assign(Object.assign({},t),{collapsible:r,collapsed:s,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 r=this.getElementLocation(e);return this.model.setCollapsed(r,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 sl(this.user,`Tree element not found: ${e}`);return t}getNodeLocation(e){return e.element}getParentNodeLocation(e){if(e===null)throw new sl(this.user,"Invalid getParentNodeLocation call");const t=this.nodes.get(e);if(!t)throw new sl(this.user,`Tree element not found: ${e}`);const n=this.model.getNodeLocation(t),r=this.model.getParentNodeLocation(n);return this.model.getNode(r).element}getElementLocation(e){if(e===null)return[];const t=this.nodes.get(e);if(!t)throw new sl(this.user,`Tree element not found: ${e}`);return this.model.getNodeLocation(t)}}function H4(i){const e=[i.element],t=i.incompressible||!1;return{element:{elements:e,incompressible:t},children:Dn.map(Dn.from(i.children),H4),collapsible:i.collapsible,collapsed:i.collapsed}}function z4(i){const e=[i.element],t=i.incompressible||!1;let n,r;for(;[r,n]=Dn.consume(Dn.from(i.children),2),!(r.length!==1||r[0].incompressible);)i=r[0],e.push(i.element);return{element:{elements:e,incompressible:t},children:Dn.map(Dn.concat(r,n),z4),collapsible:i.collapsible,collapsed:i.collapsed}}function l7(i,e=0){let t;return el7(n,0)),e===0&&i.element.incompressible?{element:i.element.elements[e],children:t,incompressible:!0,collapsible:i.collapsible,collapsed:i.collapsed}:{element:i.element.elements[e],children:t,collapsible:i.collapsible,collapsed:i.collapsed}}function qK(i){return l7(i,0)}function GK(i,e,t){return i.element===e?Object.assign(Object.assign({},i),{children:t}):Object.assign(Object.assign({},i),{children:Dn.map(Dn.from(i.children),n=>GK(n,e,t))})}const HIe=i=>({getId(e){return e.elements.map(t=>i.getId(t).toString()).join("\0")}});class zIe{constructor(e,t,n={}){this.user=e,this.rootRef=null,this.nodes=new Map,this.model=new a7(e,t,n),this.enabled=typeof n.compressionEnabled>"u"?!0:n.compressionEnabled,this.identityProvider=n.identityProvider}get onDidSplice(){return this.model.onDidSplice}get onDidChangeCollapseState(){return this.model.onDidChangeCollapseState}get onDidChangeRenderNodeCount(){return this.model.onDidChangeRenderNodeCount}setChildren(e,t=Dn.empty(),n){const r=n.diffIdentityProvider&&HIe(n.diffIdentityProvider);if(e===null){const f=Dn.map(t,this.enabled?z4:H4);this._setChildren(null,f,{diffIdentityProvider:r,diffDepth:1/0});return}const s=this.nodes.get(e);if(!s)throw new Error("Unknown compressed tree node");const o=this.model.getNode(s),a=this.model.getParentNodeLocation(s),l=this.model.getNode(a),c=qK(o),u=GK(c,e,t),d=(this.enabled?z4:H4)(u),h=l.children.map(f=>f===o?d:f);this._setChildren(l.element,h,{diffIdentityProvider:r,diffDepth:o.depth-l.depth})}setCompressionEnabled(e){if(e===this.enabled)return;this.enabled=e;const n=this.model.getNode().children,r=Dn.map(n,qK),s=Dn.map(r,e?z4:H4);this._setChildren(null,s,{diffIdentityProvider:this.identityProvider,diffDepth:1/0})}_setChildren(e,t,n){const r=new Set,s=a=>{for(const l of a.element.elements)r.add(l),this.nodes.set(l,a.element)},o=a=>{for(const l of a.element.elements)r.has(l)||this.nodes.delete(l)};this.model.setChildren(e,t,Object.assign(Object.assign({},n),{onDidCreateNode:s,onDidDeleteNode:o}))}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 r=this.getCompressedNode(e);return this.model.setCollapsed(r,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 sl(this.user,`Tree element not found: ${e}`);return t}}const $Ie=i=>i[i.length-1];class c7{constructor(e,t){this.unwrapper=e,this.node=t}get element(){return this.node.element===null?null:this.unwrapper(this.node.element)}get children(){return this.node.children.map(e=>new c7(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}}function UIe(i,e){return{splice(t,n,r){e.splice(t,n,r.map(s=>i.map(s)))},updateElementHeight(t,n){e.updateElementHeight(t,n)}}}function jIe(i,e){return Object.assign(Object.assign({},e),{identityProvider:e.identityProvider&&{getId(t){return e.identityProvider.getId(i(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(i(t),n)}}})}class qIe{constructor(e,t,n={}){this.rootRef=null,this.elementMapper=n.elementMapper||$Ie;const r=s=>this.elementMapper(s.elements);this.nodeMapper=new t7(s=>new c7(r,s)),this.model=new zIe(e,UIe(this.nodeMapper,t),jIe(r,n))}get onDidSplice(){return kt.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 kt.map(this.model.onDidChangeCollapseState,({node:e,deep:t})=>({node:this.nodeMapper.map(e),deep:t}))}get onDidChangeRenderNodeCount(){return kt.map(this.model.onDidChangeRenderNodeCount,e=>this.nodeMapper.map(e))}setChildren(e,t=Dn.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 GIe=globalThis&&globalThis.__decorate||function(i,e,t,n){var r=arguments.length,s=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(s=(r<3?o(s):r>3?o(e,t,s):o(e,t))||s);return r>3&&s&&Object.defineProperty(e,t,s),s};class u7 extends jK{constructor(e,t,n,r,s={}){super(e,t,n,r,s),this.user=e}get onDidChangeCollapseState(){return this.model.onDidChangeCollapseState}setChildren(e,t=Dn.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 a7(e,t,n)}}class KK{constructor(e,t){this._compressedTreeNodeProvider=e,this.renderer=t,this.templateId=t.templateId,t.onDidChangeTwistieState&&(this.onDidChangeTwistieState=t.onDidChangeTwistieState)}get compressedTreeNodeProvider(){return this._compressedTreeNodeProvider()}renderTemplate(e){return{compressedTreeNode:void 0,data:this.renderer.renderTemplate(e)}}renderElement(e,t,n,r){const s=this.compressedTreeNodeProvider.getCompressedTreeNode(e.element);s.element.elements.length===1?(n.compressedTreeNode=void 0,this.renderer.renderElement(e,t,n.data,r)):(n.compressedTreeNode=s,this.renderer.renderCompressedElements(s,t,n.data,r))}disposeElement(e,t,n,r){n.compressedTreeNode?this.renderer.disposeCompressedElements&&this.renderer.disposeCompressedElements(n.compressedTreeNode,t,n.data,r):this.renderer.disposeElement&&this.renderer.disposeElement(e,t,n.data,r)}disposeTemplate(e){this.renderer.disposeTemplate(e.data)}renderTwistie(e,t){return this.renderer.renderTwistie?this.renderer.renderTwistie(e,t):!1}}GIe([kr],KK.prototype,"compressedTreeNodeProvider",null);function KIe(i,e){return e&&Object.assign(Object.assign({},e),{keyboardNavigationLabelProvider:e.keyboardNavigationLabelProvider&&{getKeyboardNavigationLabel(t){let n;try{n=i().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 YK extends u7{constructor(e,t,n,r,s={}){const o=()=>this,a=r.map(l=>new KK(o,l));super(e,t,n,a,KIe(o,s))}setChildren(e,t=Dn.empty(),n){this.model.setChildren(e,t,n)}createModel(e,t,n){return new qIe(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 gf=globalThis&&globalThis.__awaiter||function(i,e,t,n){function r(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(u){try{c(n.next(u))}catch(d){o(d)}}function l(u){try{c(n.throw(u))}catch(d){o(d)}}function c(u){u.done?s(u.value):r(u.value).then(a,l)}c((n=n.apply(i,e||[])).next())})};function d7(i){return Object.assign(Object.assign({},i),{children:[],refreshPromise:void 0,stale:!0,slow:!1,collapsedByDefault:void 0})}function h7(i,e){return e.parent?e.parent===i?!0:h7(i,e.parent):!1}function YIe(i,e){return i===e||h7(i,e)||h7(e,i)}class f7{constructor(e){this.node=e}get element(){return this.node.element.element}get children(){return this.node.children.map(e=>new f7(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}}class ZIe{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,r){this.renderer.renderElement(this.nodeMapper.map(e),t,n.templateData,r)}renderTwistie(e,t){return e.slow?(t.classList.add(...k.treeItemLoading.classNamesArray),!0):(t.classList.remove(...k.treeItemLoading.classNamesArray),!1)}disposeElement(e,t,n,r){this.renderer.disposeElement&&this.renderer.disposeElement(this.nodeMapper.map(e),t,n.templateData,r)}disposeTemplate(e){this.renderer.disposeTemplate(e.templateData)}dispose(){this.renderedNodes.clear()}}function ZK(i){return{browserEvent:i.browserEvent,elements:i.elements.map(e=>e.element)}}function XK(i){return{browserEvent:i.browserEvent,element:i.element&&i.element.element,target:i.target}}class XIe extends ow{constructor(e){super(e.elements.map(t=>t.element)),this.data=e}}function g7(i){return i instanceof ow?new XIe(i):i}class QIe{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){this.dnd.onDragStart&&this.dnd.onDragStart(g7(e),t)}onDragOver(e,t,n,r,s=!0){return this.dnd.onDragOver(g7(e),t&&t.element,n,r)}drop(e,t,n,r){this.dnd.drop(g7(e),t&&t.element,n,r)}onDragEnd(e){this.dnd.onDragEnd&&this.dnd.onDragEnd(e)}}function QK(i){return i&&Object.assign(Object.assign({},i),{collapseByDefault:!0,identityProvider:i.identityProvider&&{getId(e){return i.identityProvider.getId(e.element)}},dnd:i.dnd&&new QIe(i.dnd),multipleSelectionController:i.multipleSelectionController&&{isSelectionSingleChangeEvent(e){return i.multipleSelectionController.isSelectionSingleChangeEvent(Object.assign(Object.assign({},e),{element:e.element}))},isSelectionRangeChangeEvent(e){return i.multipleSelectionController.isSelectionRangeChangeEvent(Object.assign(Object.assign({},e),{element:e.element}))}},accessibilityProvider:i.accessibilityProvider&&Object.assign(Object.assign({},i.accessibilityProvider),{getPosInSet:void 0,getSetSize:void 0,getRole:i.accessibilityProvider.getRole?e=>i.accessibilityProvider.getRole(e.element):()=>"treeitem",isChecked:i.accessibilityProvider.isChecked?e=>{var t;return!!(!((t=i.accessibilityProvider)===null||t===void 0)&&t.isChecked(e.element))}:void 0,getAriaLabel(e){return i.accessibilityProvider.getAriaLabel(e.element)},getWidgetAriaLabel(){return i.accessibilityProvider.getWidgetAriaLabel()},getWidgetRole:i.accessibilityProvider.getWidgetRole?()=>i.accessibilityProvider.getWidgetRole():()=>"tree",getAriaLevel:i.accessibilityProvider.getAriaLevel&&(e=>i.accessibilityProvider.getAriaLevel(e.element)),getActiveDescendantId:i.accessibilityProvider.getActiveDescendantId&&(e=>i.accessibilityProvider.getActiveDescendantId(e.element))}),filter:i.filter&&{filter(e,t){return i.filter.filter(e.element,t)}},keyboardNavigationLabelProvider:i.keyboardNavigationLabelProvider&&Object.assign(Object.assign({},i.keyboardNavigationLabelProvider),{getKeyboardNavigationLabel(e){return i.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(e.element)}}),sorter:void 0,expandOnlyOnTwistieClick:typeof i.expandOnlyOnTwistieClick>"u"?void 0:typeof i.expandOnlyOnTwistieClick!="function"?i.expandOnlyOnTwistieClick:e=>i.expandOnlyOnTwistieClick(e.element),additionalScrollHeight:i.additionalScrollHeight})}function p7(i,e){e(i),i.children.forEach(t=>p7(t,e))}class JK{constructor(e,t,n,r,s,o={}){this.user=e,this.dataSource=s,this.nodes=new Map,this.subTreeRefreshPromises=new Map,this.refreshPromises=new Map,this._onDidRender=new be,this._onDidChangeNodeSlowState=new be,this.nodeMapper=new t7(a=>new f7(a)),this.disposables=new Je,this.identityProvider=o.identityProvider,this.autoExpandSingleChildren=typeof o.autoExpandSingleChildren>"u"?!1:o.autoExpandSingleChildren,this.sorter=o.sorter,this.collapseByDefault=o.collapseByDefault,this.tree=this.createTree(e,t,n,r,o),this.root=d7({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)}get onDidChangeFocus(){return kt.map(this.tree.onDidChangeFocus,ZK)}get onDidChangeSelection(){return kt.map(this.tree.onDidChangeSelection,ZK)}get onMouseDblClick(){return kt.map(this.tree.onMouseDblClick,XK)}get onPointer(){return kt.map(this.tree.onPointer,XK)}get onDidFocus(){return this.tree.onDidFocus}get onDidChangeModel(){return this.tree.onDidChangeModel}get onDidChangeCollapseState(){return this.tree.onDidChangeCollapseState}get onDidDispose(){return this.tree.onDidDispose}createTree(e,t,n,r,s){const o=new s7(n),a=r.map(c=>new ZIe(c,this.nodeMapper,this._onDidChangeNodeSlowState.event)),l=QK(s)||{};return new u7(e,t,o,a,l)}updateOptions(e={}){this.tree.updateOptions(e)}getHTMLElement(){return this.tree.getHTMLElement()}get scrollTop(){return this.tree.scrollTop}set scrollTop(e){this.tree.scrollTop=e}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 gf(this,void 0,void 0,function*(){this.refreshPromises.forEach(r=>r.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,r,s){return gf(this,void 0,void 0,function*(){if(typeof this.root.element>"u")throw new sl(this.user,"Tree input not set");this.root.refreshPromise&&(yield this.root.refreshPromise,yield kt.toPromise(this._onDidRender.event));const o=this.getDataNode(e);if(yield this.refreshAndRenderNode(o,t,r,s),n)try{this.tree.rerender(o)}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 gf(this,void 0,void 0,function*(){if(typeof this.root.element>"u")throw new sl(this.user,"Tree input not set");this.root.refreshPromise&&(yield this.root.refreshPromise,yield kt.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 kt.toPromise(this._onDidRender.event)),n!==this.root&&!n.refreshPromise&&!this.tree.isCollapsed(n)))return!1;const r=this.tree.expand(n===this.root?null:n,t);return n.refreshPromise&&(yield this.root.refreshPromise,yield kt.toPromise(this._onDidRender.event)),r})}setSelection(e,t){const n=e.map(r=>this.getDataNode(r));this.tree.setSelection(n,t)}getSelection(){return this.tree.getSelection().map(t=>t.element)}setFocus(e,t){const n=e.map(r=>this.getDataNode(r));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 sl(this.user,`Data tree node not found: ${e}`);return t}refreshAndRenderNode(e,t,n,r){return gf(this,void 0,void 0,function*(){yield this.refreshNode(e,t,n),this.render(e,n,r)})}refreshNode(e,t,n){return gf(this,void 0,void 0,function*(){let r;return this.subTreeRefreshPromises.forEach((s,o)=>{!r&&YIe(o,e)&&(r=s.then(()=>this.refreshNode(e,t,n)))}),r||this.doRefreshSubTree(e,t,n)})}doRefreshSubTree(e,t,n){return gf(this,void 0,void 0,function*(){let r;e.refreshPromise=new Promise(s=>r=s),this.subTreeRefreshPromises.set(e,e.refreshPromise),e.refreshPromise.finally(()=>{e.refreshPromise=void 0,this.subTreeRefreshPromises.delete(e)});try{const s=yield this.doRefreshNode(e,t,n);e.stale=!1,yield cI.settled(s.map(o=>this.doRefreshSubTree(o,t,n)))}finally{r()}})}doRefreshNode(e,t,n){return gf(this,void 0,void 0,function*(){e.hasChildren=!!this.dataSource.hasChildren(e.element);let r;if(!e.hasChildren)r=Promise.resolve(Dn.empty());else{const s=this.doGetChildren(e);if(dz(s))r=Promise.resolve(s);else{const o=Th(800);o.then(()=>{e.slow=!0,this._onDidChangeNodeSlowState.fire(e)},a=>null),r=s.finally(()=>o.cancel())}}try{const s=yield r;return this.setChildren(e,s,t,n)}catch(s){if(e!==this.root&&this.tree.hasElement(e)&&this.tree.collapse(e),jc(s))return[];throw s}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 dz(n)?this.processChildren(n):(t=Yr(()=>gf(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(Jt))}setChildren(e,t,n,r){const s=[...t];if(e.children.length===0&&s.length===0)return[];const o=new Map,a=new Map;for(const u of e.children)if(o.set(u.element,u),this.identityProvider){const d=this.tree.isCollapsed(u);a.set(u.id,{node:u,collapsed:d})}const l=[],c=s.map(u=>{const d=!!this.dataSource.hasChildren(u);if(!this.identityProvider){const p=d7({element:u,parent:e,hasChildren:d});return d&&this.collapseByDefault&&!this.collapseByDefault(u)&&(p.collapsedByDefault=!1,l.push(p)),p}const h=this.identityProvider.getId(u).toString(),f=a.get(h);if(f){const p=f.node;return o.delete(p.element),this.nodes.delete(p.element),this.nodes.set(u,p),p.element=u,p.hasChildren=d,n?f.collapsed?(p.children.forEach(m=>p7(m,_=>this.nodes.delete(_.element))),p.children.splice(0,p.children.length),p.stale=!0):l.push(p):d&&this.collapseByDefault&&!this.collapseByDefault(u)&&(p.collapsedByDefault=!1,l.push(p)),p}const g=d7({element:u,parent:e,id:h,hasChildren:d});return r&&r.viewState.focus&&r.viewState.focus.indexOf(h)>-1&&r.focus.push(g),r&&r.viewState.selection&&r.viewState.selection.indexOf(h)>-1&&r.selection.push(g),r&&r.viewState.expanded&&r.viewState.expanded.indexOf(h)>-1?l.push(g):d&&this.collapseByDefault&&!this.collapseByDefault(u)&&(g.collapsedByDefault=!1,l.push(g)),g});for(const u of o.values())p7(u,d=>this.nodes.delete(d.element));for(const u of c)this.nodes.set(u.element,u);return e.children.splice(0,e.children.length,...c),e!==this.root&&this.autoExpandSingleChildren&&c.length===1&&l.length===0&&(c[0].collapsedByDefault=!1,l.push(c[0])),l}render(e,t,n){const r=e.children.map(o=>this.asTreeElement(o,t)),s=n&&Object.assign(Object.assign({},n),{diffIdentityProvider:n.diffIdentityProvider&&{getId(o){return n.diffIdentityProvider.getId(o.element)}}});this.tree.setChildren(e===this.root?null:e,r,s),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?Dn.map(e.children,r=>this.asTreeElement(r,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()}}class m7{constructor(e){this.node=e}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 m7(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}}class JIe{constructor(e,t,n,r){this.renderer=e,this.nodeMapper=t,this.compressibleNodeMapperProvider=n,this.onDidChangeTwistieState=r,this.renderedNodes=new Map,this.disposables=[],this.templateId=e.templateId}renderTemplate(e){return{templateData:this.renderer.renderTemplate(e)}}renderElement(e,t,n,r){this.renderer.renderElement(this.nodeMapper.map(e),t,n.templateData,r)}renderCompressedElements(e,t,n,r){this.renderer.renderCompressedElements(this.compressibleNodeMapperProvider().map(e),t,n.templateData,r)}renderTwistie(e,t){return e.slow?(t.classList.add(...k.treeItemLoading.classNamesArray),!0):(t.classList.remove(...k.treeItemLoading.classNamesArray),!1)}disposeElement(e,t,n,r){this.renderer.disposeElement&&this.renderer.disposeElement(this.nodeMapper.map(e),t,n.templateData,r)}disposeCompressedElements(e,t,n,r){this.renderer.disposeCompressedElements&&this.renderer.disposeCompressedElements(this.compressibleNodeMapperProvider().map(e),t,n.templateData,r)}disposeTemplate(e){this.renderer.disposeTemplate(e.templateData)}dispose(){this.renderedNodes.clear(),this.disposables=Nn(this.disposables)}}function e6e(i){const e=i&&QK(i);return e&&Object.assign(Object.assign({},e),{keyboardNavigationLabelProvider:e.keyboardNavigationLabelProvider&&Object.assign(Object.assign({},e.keyboardNavigationLabelProvider),{getCompressedNodeKeyboardNavigationLabel(t){return i.keyboardNavigationLabelProvider.getCompressedNodeKeyboardNavigationLabel(t.map(n=>n.element))}})})}class t6e extends JK{constructor(e,t,n,r,s,o,a={}){super(e,t,n,s,o,a),this.compressionDelegate=r,this.compressibleNodeMapper=new t7(l=>new m7(l)),this.filter=a.filter}createTree(e,t,n,r,s){const o=new s7(n),a=r.map(c=>new JIe(c,this.nodeMapper,()=>this.compressibleNodeMapper,this._onDidChangeNodeSlowState.event)),l=e6e(s)||{};return new YK(e,t,o,a,l)}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(),r=h=>{const f=new Set;for(const g of h){const p=this.tree.getCompressedTreeNode(g===this.root?null:g);if(p.element)for(const m of p.element.elements)f.add(n(m.element))}return f},s=r(this.tree.getSelection()),o=r(this.tree.getFocus());super.render(e,t);const a=this.getSelection();let l=!1;const c=this.getFocus();let u=!1;const d=h=>{const f=h.element;if(f)for(let g=0;g{const n=this.filter.filter(t,1),r=n6e(n);if(r===2)throw new Error("Recursive tree visibility not supported in async data compressed trees");return r===1})),super.processChildren(e)}}function n6e(i){return typeof i=="boolean"?i?1:0:n7(i)?cw(i.visibility):cw(i)}class i6e extends jK{constructor(e,t,n,r,s,o={}){super(e,t,n,r,o),this.user=e,this.dataSource=s,this.identityProvider=o.identityProvider}createModel(e,t,n){return new a7(e,t,n)}}new mt("isMac",gn,C("isMac","Whether the operating system is macOS")),new mt("isLinux",ws,C("isLinux","Whether the operating system is Linux"));const $4=new mt("isWindows",Gr,C("isWindows","Whether the operating system is Windows"));new mt("isWeb",bh,C("isWeb","Whether the platform is a web browser")),new mt("isMacNative",gn&&!bh,C("isMacNative","Whether the operating system is macOS on a non-browser platform")),new mt("isIOS",tc,C("isIOS","Whether the operating system is iOS")),new mt("isDevelopment",!1,!0);const eY="inputFocus";new mt(eY,!1,C("inputFocus","Whether keyboard focus is inside an input box"));var Su=globalThis&&globalThis.__decorate||function(i,e,t,n){var r=arguments.length,s=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(s=(r<3?o(s):r>3?o(e,t,s):o(e,t))||s);return r>3&&s&&Object.defineProperty(e,t,s),s},vn=globalThis&&globalThis.__param||function(i,e){return function(t,n){e(t,n,i)}};const ol=Ln("listService");let _7=class{constructor(e){this._themeService=e,this.disposables=new Je,this.lists=[],this._lastFocusedWidget=void 0,this._hasCreatedStyleController=!1}get lastFocusedList(){return this._lastFocusedWidget}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;const r=new WK(Ka(),"");this.disposables.add(xp(r,this._themeService))}if(this.lists.some(r=>r.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),rd(e.onDidFocus(()=>this.setLastFocusedList(e)),fn(()=>this.lists.splice(this.lists.indexOf(n),1)),e.onDidDispose(()=>{this.lists=this.lists.filter(r=>r!==n),this._lastFocusedWidget===e&&this.setLastFocusedList(void 0)}))}dispose(){this.disposables.dispose()}};_7=Su([vn(0,Ei)],_7);const tY=new mt("listFocus",!0),U4=new mt("listSupportsMultiselect",!0),nY=ht.and(tY,ht.not(eY)),b7=new mt("listHasSelectionOrFocus",!1),v7=new mt("listDoubleSelection",!1),w7=new mt("listMultiSelection",!1),j4=new mt("listSelectionNavigation",!1),C7=new mt("treeElementCanCollapse",!1),r6e=new mt("treeElementHasParent",!1),y7=new mt("treeElementCanExpand",!1),s6e=new mt("treeElementHasChild",!1),iY="listAutomaticKeyboardNavigation";function q4(i,e){const t=i.createScoped(e.getHTMLElement());return tY.bindTo(t),t}const Rp="workbench.list.multiSelectModifier",S7="workbench.list.openMode",al="workbench.list.horizontalScrolling",G4="workbench.list.keyboardNavigation",k7="workbench.list.automaticKeyboardNavigation",hw="workbench.tree.indent",K4="workbench.tree.renderIndentGuides",vc="workbench.list.smoothScrolling",ku="workbench.list.mouseWheelScrollSensitivity",Eu="workbench.list.fastScrollSensitivity",Y4="workbench.tree.expandMode";function xu(i){return i.getValue(Rp)==="alt"}class o6e extends Ne{constructor(e){super(),this.configurationService=e,this.useAltAsMultipleSelectionModifier=xu(e),this.registerListeners()}registerListeners(){this._register(this.configurationService.onDidChangeConfiguration(e=>{e.affectsConfiguration(Rp)&&(this.useAltAsMultipleSelectionModifier=xu(this.configurationService))}))}isSelectionSingleChangeEvent(e){return this.useAltAsMultipleSelectionModifier?e.browserEvent.altKey:PK(e)}isSelectionRangeChangeEvent(e){return FK(e)}}function Z4(i,e,t){var n;const r=new Je;return[Object.assign(Object.assign({},i),{keyboardNavigationDelegate:{mightProducePrintableCharacter(o){return t.mightProducePrintableCharacter(o)}},smoothScrolling:Boolean(e.getValue(vc)),mouseWheelScrollSensitivity:e.getValue(ku),fastScrollSensitivity:e.getValue(Eu),multipleSelectionController:(n=i.multipleSelectionController)!==null&&n!==void 0?n:r.add(new o6e(e))}),r]}let E7=class extends yu{constructor(e,t,n,r,s,o,a,l,c,u){const d=typeof s.horizontalScrolling<"u"?s.horizontalScrolling:Boolean(c.getValue(al)),[h,f]=Z4(s,c,u);super(e,t,n,r,Object.assign(Object.assign(Object.assign({keyboardSupport:!1},mc(l.getColorTheme(),E4)),h),{horizontalScrolling:d})),this.disposables.add(f),this.contextKeyService=q4(o,this),this.themeService=l,this.listSupportsMultiSelect=U4.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(s.multipleSelectionSupport!==!1),j4.bindTo(this.contextKeyService).set(Boolean(s.selectionNavigation)),this.listHasSelectionOrFocus=b7.bindTo(this.contextKeyService),this.listDoubleSelection=v7.bindTo(this.contextKeyService),this.listMultiSelection=w7.bindTo(this.contextKeyService),this.horizontalScrolling=s.horizontalScrolling,this._useAltAsMultipleSelectionModifier=xu(c),this.disposables.add(this.contextKeyService),this.disposables.add(a.register(this)),s.overrideStyles&&this.updateStyles(s.overrideStyles),this.disposables.add(this.onDidChangeSelection(()=>{const p=this.getSelection(),m=this.getFocus();this.contextKeyService.bufferChangeEvents(()=>{this.listHasSelectionOrFocus.set(p.length>0||m.length>0),this.listMultiSelection.set(p.length>1),this.listDoubleSelection.set(p.length===2)})})),this.disposables.add(this.onDidChangeFocus(()=>{const p=this.getSelection(),m=this.getFocus();this.listHasSelectionOrFocus.set(p.length>0||m.length>0)})),this.disposables.add(c.onDidChangeConfiguration(p=>{p.affectsConfiguration(Rp)&&(this._useAltAsMultipleSelectionModifier=xu(c));let m={};if(p.affectsConfiguration(al)&&this.horizontalScrolling===void 0){const _=Boolean(c.getValue(al));m=Object.assign(Object.assign({},m),{horizontalScrolling:_})}if(p.affectsConfiguration(vc)){const _=Boolean(c.getValue(vc));m=Object.assign(Object.assign({},m),{smoothScrolling:_})}if(p.affectsConfiguration(ku)){const _=c.getValue(ku);m=Object.assign(Object.assign({},m),{mouseWheelScrollSensitivity:_})}if(p.affectsConfiguration(Eu)){const _=c.getValue(Eu);m=Object.assign(Object.assign({},m),{fastScrollSensitivity:_})}Object.keys(m).length>0&&this.updateOptions(m)})),this.navigator=new oY(this,Object.assign({configurationService:c},s)),this.disposables.add(this.navigator)}updateOptions(e){super.updateOptions(e),e.overrideStyles&&this.updateStyles(e.overrideStyles),e.multipleSelectionSupport!==void 0&&this.listSupportsMultiSelect.set(!!e.multipleSelectionSupport)}updateStyles(e){var t;(t=this._styler)===null||t===void 0||t.dispose(),this._styler=xp(this,this.themeService,e)}dispose(){var e;(e=this._styler)===null||e===void 0||e.dispose(),super.dispose()}};E7=Su([vn(5,Yt),vn(6,ol),vn(7,Ei),vn(8,ui),vn(9,qi)],E7);let rY=class extends xIe{constructor(e,t,n,r,s,o,a,l,c,u){const d=typeof s.horizontalScrolling<"u"?s.horizontalScrolling:Boolean(c.getValue(al)),[h,f]=Z4(s,c,u);super(e,t,n,r,Object.assign(Object.assign(Object.assign({keyboardSupport:!1},mc(l.getColorTheme(),E4)),h),{horizontalScrolling:d})),this.disposables=new Je,this.disposables.add(f),this.contextKeyService=q4(o,this),this.themeService=l,this.horizontalScrolling=s.horizontalScrolling,this.listSupportsMultiSelect=U4.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(s.multipleSelectionSupport!==!1),j4.bindTo(this.contextKeyService).set(Boolean(s.selectionNavigation)),this._useAltAsMultipleSelectionModifier=xu(c),this.disposables.add(this.contextKeyService),this.disposables.add(a.register(this)),s.overrideStyles&&this.updateStyles(s.overrideStyles),s.overrideStyles&&this.disposables.add(xp(this,l,s.overrideStyles)),this.disposables.add(c.onDidChangeConfiguration(p=>{p.affectsConfiguration(Rp)&&(this._useAltAsMultipleSelectionModifier=xu(c));let m={};if(p.affectsConfiguration(al)&&this.horizontalScrolling===void 0){const _=Boolean(c.getValue(al));m=Object.assign(Object.assign({},m),{horizontalScrolling:_})}if(p.affectsConfiguration(vc)){const _=Boolean(c.getValue(vc));m=Object.assign(Object.assign({},m),{smoothScrolling:_})}if(p.affectsConfiguration(ku)){const _=c.getValue(ku);m=Object.assign(Object.assign({},m),{mouseWheelScrollSensitivity:_})}if(p.affectsConfiguration(Eu)){const _=c.getValue(Eu);m=Object.assign(Object.assign({},m),{fastScrollSensitivity:_})}Object.keys(m).length>0&&this.updateOptions(m)})),this.navigator=new oY(this,Object.assign({configurationService:c},s)),this.disposables.add(this.navigator)}updateOptions(e){super.updateOptions(e),e.overrideStyles&&this.updateStyles(e.overrideStyles),e.multipleSelectionSupport!==void 0&&this.listSupportsMultiSelect.set(!!e.multipleSelectionSupport)}updateStyles(e){var t;(t=this._styler)===null||t===void 0||t.dispose(),this._styler=xp(this,this.themeService,e)}dispose(){var e;(e=this._styler)===null||e===void 0||e.dispose(),this.disposables.dispose(),super.dispose()}};rY=Su([vn(5,Yt),vn(6,ol),vn(7,Ei),vn(8,ui),vn(9,qi)],rY);let sY=class extends V4{constructor(e,t,n,r,s,o,a,l,c,u,d){const h=typeof o.horizontalScrolling<"u"?o.horizontalScrolling:Boolean(u.getValue(al)),[f,g]=Z4(o,u,d);super(e,t,n,r,s,Object.assign(Object.assign(Object.assign({keyboardSupport:!1},mc(c.getColorTheme(),E4)),f),{horizontalScrolling:h})),this.disposables.add(g),this.contextKeyService=q4(a,this),this.themeService=c,this.listSupportsMultiSelect=U4.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(o.multipleSelectionSupport!==!1),j4.bindTo(this.contextKeyService).set(Boolean(o.selectionNavigation)),this.listHasSelectionOrFocus=b7.bindTo(this.contextKeyService),this.listDoubleSelection=v7.bindTo(this.contextKeyService),this.listMultiSelection=w7.bindTo(this.contextKeyService),this.horizontalScrolling=o.horizontalScrolling,this._useAltAsMultipleSelectionModifier=xu(u),this.disposables.add(this.contextKeyService),this.disposables.add(l.register(this)),o.overrideStyles&&this.updateStyles(o.overrideStyles),this.disposables.add(this.onDidChangeSelection(()=>{const m=this.getSelection(),_=this.getFocus();this.contextKeyService.bufferChangeEvents(()=>{this.listHasSelectionOrFocus.set(m.length>0||_.length>0),this.listMultiSelection.set(m.length>1),this.listDoubleSelection.set(m.length===2)})})),this.disposables.add(this.onDidChangeFocus(()=>{const m=this.getSelection(),_=this.getFocus();this.listHasSelectionOrFocus.set(m.length>0||_.length>0)})),this.disposables.add(u.onDidChangeConfiguration(m=>{m.affectsConfiguration(Rp)&&(this._useAltAsMultipleSelectionModifier=xu(u));let _={};if(m.affectsConfiguration(al)&&this.horizontalScrolling===void 0){const b=Boolean(u.getValue(al));_=Object.assign(Object.assign({},_),{horizontalScrolling:b})}if(m.affectsConfiguration(vc)){const b=Boolean(u.getValue(vc));_=Object.assign(Object.assign({},_),{smoothScrolling:b})}if(m.affectsConfiguration(ku)){const b=u.getValue(ku);_=Object.assign(Object.assign({},_),{mouseWheelScrollSensitivity:b})}if(m.affectsConfiguration(Eu)){const b=u.getValue(Eu);_=Object.assign(Object.assign({},_),{fastScrollSensitivity:b})}Object.keys(_).length>0&&this.updateOptions(_)})),this.navigator=new a6e(this,Object.assign({configurationService:u},o)),this.disposables.add(this.navigator)}updateOptions(e){super.updateOptions(e),e.overrideStyles&&this.updateStyles(e.overrideStyles),e.multipleSelectionSupport!==void 0&&this.listSupportsMultiSelect.set(!!e.multipleSelectionSupport)}updateStyles(e){var t;(t=this._styler)===null||t===void 0||t.dispose(),this._styler=xp(this,this.themeService,e)}dispose(){var e;(e=this._styler)===null||e===void 0||e.dispose(),this.disposables.dispose(),super.dispose()}};sY=Su([vn(6,Yt),vn(7,ol),vn(8,Ei),vn(9,ui),vn(10,qi)],sY);class x7 extends Ne{constructor(e,t){var n;super(),this.widget=e,this._onDidOpen=this._register(new be),this.onDidOpen=this._onDidOpen.event,this._register(kt.filter(this.widget.onDidChangeSelection,r=>r.browserEvent instanceof KeyboardEvent)(r=>this.onSelectionFromKeyboard(r))),this._register(this.widget.onPointer(r=>this.onPointer(r.element,r.browserEvent))),this._register(this.widget.onMouseDblClick(r=>this.onMouseDblClick(r.element,r.browserEvent))),typeof(t==null?void 0:t.openOnSingleClick)!="boolean"&&(t!=null&&t.configurationService)?(this.openOnSingleClick=(t==null?void 0:t.configurationService.getValue(S7))!=="doubleClick",this._register(t==null?void 0:t.configurationService.onDidChangeConfiguration(()=>{this.openOnSingleClick=(t==null?void 0:t.configurationService.getValue(S7))!=="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,r=typeof t.pinned=="boolean"?t.pinned:!n,s=!1;this._open(this.getSelectedElement(),n,r,s,e.browserEvent)}onPointer(e,t){if(!this.openOnSingleClick||t.detail===2)return;const r=t.button===1,s=!0,o=r,a=t.ctrlKey||t.metaKey||t.altKey;this._open(e,s,o,a,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 s=!1,o=!0,a=t.ctrlKey||t.metaKey||t.altKey;this._open(e,s,o,a,t)}_open(e,t,n,r,s){e&&this._onDidOpen.fire({editorOptions:{preserveFocus:t,pinned:n,revealIfVisible:!0},sideBySide:r,element:e,browserEvent:s})}}class oY extends x7{constructor(e,t){super(e,t),this.widget=e}getSelectedElement(){return this.widget.getSelectedElements()[0]}}class a6e extends x7{constructor(e,t){super(e,t)}getSelectedElement(){return this.widget.getSelectedElements()[0]}}class l6e extends x7{constructor(e,t){super(e,t)}getSelectedElement(){var e;return(e=this.widget.getSelection()[0])!==null&&e!==void 0?e:void 0}}function c6e(i,e){let t=!1;return n=>{if(n.toKeybinding().isModifierKey())return!1;if(t)return t=!1,!1;const r=e.softDispatch(n,i);return r&&r.enterChord?(t=!0,!1):(t=!1,!0)}}let aY=class extends u7{constructor(e,t,n,r,s,o,a,l,c,u,d){const{options:h,getAutomaticKeyboardNavigation:f,disposable:g}=fw(t,s,o,c,u,d);super(e,t,n,r,h),this.disposables.add(g),this.internals=new Op(this,s,f,s.overrideStyles,o,a,l,c,d),this.disposables.add(this.internals)}updateOptions(e){super.updateOptions(e),this.internals.updateOptions(e)}};aY=Su([vn(5,Yt),vn(6,ol),vn(7,Ei),vn(8,ui),vn(9,qi),vn(10,zo)],aY);let lY=class extends YK{constructor(e,t,n,r,s,o,a,l,c,u,d){const{options:h,getAutomaticKeyboardNavigation:f,disposable:g}=fw(t,s,o,c,u,d);super(e,t,n,r,h),this.disposables.add(g),this.internals=new Op(this,s,f,s.overrideStyles,o,a,l,c,d),this.disposables.add(this.internals)}updateOptions(e={}){super.updateOptions(e),e.overrideStyles&&this.internals.updateStyleOverrides(e.overrideStyles),this.internals.updateOptions(e)}};lY=Su([vn(5,Yt),vn(6,ol),vn(7,Ei),vn(8,ui),vn(9,qi),vn(10,zo)],lY);let cY=class extends i6e{constructor(e,t,n,r,s,o,a,l,c,u,d,h){const{options:f,getAutomaticKeyboardNavigation:g,disposable:p}=fw(t,o,a,u,d,h);super(e,t,n,r,s,f),this.disposables.add(p),this.internals=new Op(this,o,g,o.overrideStyles,a,l,c,u,h),this.disposables.add(this.internals)}updateOptions(e={}){super.updateOptions(e),e.overrideStyles&&this.internals.updateStyleOverrides(e.overrideStyles),this.internals.updateOptions(e)}};cY=Su([vn(6,Yt),vn(7,ol),vn(8,Ei),vn(9,ui),vn(10,qi),vn(11,zo)],cY);let L7=class extends JK{constructor(e,t,n,r,s,o,a,l,c,u,d,h){const{options:f,getAutomaticKeyboardNavigation:g,disposable:p}=fw(t,o,a,u,d,h);super(e,t,n,r,s,f),this.disposables.add(p),this.internals=new Op(this,o,g,o.overrideStyles,a,l,c,u,h),this.disposables.add(this.internals)}get onDidOpen(){return this.internals.onDidOpen}updateOptions(e={}){super.updateOptions(e),e.overrideStyles&&this.internals.updateStyleOverrides(e.overrideStyles),this.internals.updateOptions(e)}};L7=Su([vn(6,Yt),vn(7,ol),vn(8,Ei),vn(9,ui),vn(10,qi),vn(11,zo)],L7);let uY=class extends t6e{constructor(e,t,n,r,s,o,a,l,c,u,d,h,f){const{options:g,getAutomaticKeyboardNavigation:p,disposable:m}=fw(t,a,l,d,h,f);super(e,t,n,r,s,o,g),this.disposables.add(m),this.internals=new Op(this,a,p,a.overrideStyles,l,c,u,d,f),this.disposables.add(this.internals)}updateOptions(e){super.updateOptions(e),this.internals.updateOptions(e)}};uY=Su([vn(7,Yt),vn(8,ol),vn(9,Ei),vn(10,ui),vn(11,qi),vn(12,zo)],uY);function fw(i,e,t,n,r,s){var o;const a=()=>{let g=Boolean(t.getContextKeyValue(iY));return g&&(g=Boolean(n.getValue(k7))),g},l=s.isScreenReaderOptimized(),c=e.simpleKeyboardNavigation||l?"simple":n.getValue(G4),u=e.horizontalScrolling!==void 0?e.horizontalScrolling:Boolean(n.getValue(al)),[d,h]=Z4(e,n,r),f=e.additionalScrollHeight;return{getAutomaticKeyboardNavigation:a,disposable:h,options:Object.assign(Object.assign({keyboardSupport:!1},d),{indent:typeof n.getValue(hw)=="number"?n.getValue(hw):void 0,renderIndentGuides:n.getValue(K4),smoothScrolling:Boolean(n.getValue(vc)),automaticKeyboardNavigation:a(),simpleKeyboardNavigation:c==="simple",filterOnType:c==="filter",horizontalScrolling:u,keyboardNavigationEventFilter:c6e(i,r),additionalScrollHeight:f,hideTwistiesOfChildlessElements:e.hideTwistiesOfChildlessElements,expandOnlyOnTwistieClick:(o=e.expandOnlyOnTwistieClick)!==null&&o!==void 0?o:n.getValue(Y4)==="doubleClick"})}}let Op=class{constructor(e,t,n,r,s,o,a,l,c){this.tree=e,this.themeService=a,this.disposables=[],this.contextKeyService=q4(s,e),this.listSupportsMultiSelect=U4.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(t.multipleSelectionSupport!==!1),j4.bindTo(this.contextKeyService).set(Boolean(t.selectionNavigation)),this.hasSelectionOrFocus=b7.bindTo(this.contextKeyService),this.hasDoubleSelection=v7.bindTo(this.contextKeyService),this.hasMultiSelection=w7.bindTo(this.contextKeyService),this.treeElementCanCollapse=C7.bindTo(this.contextKeyService),this.treeElementHasParent=r6e.bindTo(this.contextKeyService),this.treeElementCanExpand=y7.bindTo(this.contextKeyService),this.treeElementHasChild=s6e.bindTo(this.contextKeyService),this._useAltAsMultipleSelectionModifier=xu(l);const d=new Set;d.add(iY);const h=()=>{const p=c.isScreenReaderOptimized()?"simple":l.getValue(G4);e.updateOptions({simpleKeyboardNavigation:p==="simple",filterOnType:p==="filter"})};this.updateStyleOverrides(r);const f=()=>{const g=e.getFocus()[0];if(!g)return;const p=e.getNode(g);this.treeElementCanCollapse.set(p.collapsible&&!p.collapsed),this.treeElementHasParent.set(!!e.getParentElement(g)),this.treeElementCanExpand.set(p.collapsible&&p.collapsed),this.treeElementHasChild.set(!!e.getFirstElementChild(g))};this.disposables.push(this.contextKeyService,o.register(e),e.onDidChangeSelection(()=>{const g=e.getSelection(),p=e.getFocus();this.contextKeyService.bufferChangeEvents(()=>{this.hasSelectionOrFocus.set(g.length>0||p.length>0),this.hasMultiSelection.set(g.length>1),this.hasDoubleSelection.set(g.length===2)})}),e.onDidChangeFocus(()=>{const g=e.getSelection(),p=e.getFocus();this.hasSelectionOrFocus.set(g.length>0||p.length>0),f()}),e.onDidChangeCollapseState(f),e.onDidChangeModel(f),l.onDidChangeConfiguration(g=>{let p={};if(g.affectsConfiguration(Rp)&&(this._useAltAsMultipleSelectionModifier=xu(l)),g.affectsConfiguration(hw)){const m=l.getValue(hw);p=Object.assign(Object.assign({},p),{indent:m})}if(g.affectsConfiguration(K4)){const m=l.getValue(K4);p=Object.assign(Object.assign({},p),{renderIndentGuides:m})}if(g.affectsConfiguration(vc)){const m=Boolean(l.getValue(vc));p=Object.assign(Object.assign({},p),{smoothScrolling:m})}if(g.affectsConfiguration(G4)&&h(),g.affectsConfiguration(k7)&&(p=Object.assign(Object.assign({},p),{automaticKeyboardNavigation:n()})),g.affectsConfiguration(al)&&t.horizontalScrolling===void 0){const m=Boolean(l.getValue(al));p=Object.assign(Object.assign({},p),{horizontalScrolling:m})}if(g.affectsConfiguration(Y4)&&t.expandOnlyOnTwistieClick===void 0&&(p=Object.assign(Object.assign({},p),{expandOnlyOnTwistieClick:l.getValue(Y4)==="doubleClick"})),g.affectsConfiguration(ku)){const m=l.getValue(ku);p=Object.assign(Object.assign({},p),{mouseWheelScrollSensitivity:m})}if(g.affectsConfiguration(Eu)){const m=l.getValue(Eu);p=Object.assign(Object.assign({},p),{fastScrollSensitivity:m})}Object.keys(p).length>0&&e.updateOptions(p)}),this.contextKeyService.onDidChangeContext(g=>{g.affectsSome(d)&&e.updateOptions({automaticKeyboardNavigation:n()})}),c.onDidChangeScreenReaderOptimized(()=>h())),this.navigator=new l6e(e,Object.assign({configurationService:l},t)),this.disposables.push(this.navigator)}get onDidOpen(){return this.navigator.onDidOpen}updateOptions(e){e.multipleSelectionSupport!==void 0&&this.listSupportsMultiSelect.set(!!e.multipleSelectionSupport)}updateStyleOverrides(e){Nn(this.styler),this.styler=e?xp(this.tree,this.themeService,e):Ne.None}dispose(){this.disposables=Nn(this.disposables),Nn(this.styler),this.styler=void 0}};Op=Su([vn(4,Yt),vn(5,ol),vn(6,Ei),vn(7,ui),vn(8,zo)],Op),sr.as(pp.Configuration).registerConfiguration({id:"workbench",order:7,title:C("workbenchConfigurationTitle","Workbench"),type:"object",properties:{[Rp]:{type:"string",enum:["ctrlCmd","alt"],enumDescriptions:[C("multiSelectModifier.ctrlCmd","Maps to `Control` on Windows and Linux and to `Command` on macOS."),C("multiSelectModifier.alt","Maps to `Alt` on Windows and Linux and to `Option` on macOS.")],default:"ctrlCmd",description:C({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.")},[S7]:{type:"string",enum:["singleClick","doubleClick"],default:"singleClick",description:C({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.")},[al]:{type:"boolean",default:!1,description:C("horizontalScrolling setting","Controls whether lists and trees support horizontal scrolling in the workbench. Warning: turning on this setting has a performance implication.")},[hw]:{type:"number",default:8,minimum:4,maximum:40,description:C("tree indent setting","Controls tree indentation in pixels.")},[K4]:{type:"string",enum:["none","onHover","always"],default:"onHover",description:C("render tree indent guides","Controls whether the tree should render indent guides.")},[vc]:{type:"boolean",default:!1,description:C("list smoothScrolling setting","Controls whether lists and trees have smooth scrolling.")},[ku]:{type:"number",default:1,description:C("Mouse Wheel Scroll Sensitivity","A multiplier to be used on the `deltaX` and `deltaY` of mouse wheel scroll events.")},[Eu]:{type:"number",default:5,description:C("Fast Scroll Sensitivity","Scrolling speed multiplier when pressing `Alt`.")},[G4]:{type:"string",enum:["simple","highlight","filter"],enumDescriptions:[C("keyboardNavigationSettingKey.simple","Simple keyboard navigation focuses elements which match the keyboard input. Matching is done only on prefixes."),C("keyboardNavigationSettingKey.highlight","Highlight keyboard navigation highlights elements which match the keyboard input. Further up and down navigation will traverse only the highlighted elements."),C("keyboardNavigationSettingKey.filter","Filter keyboard navigation will filter out and hide all the elements which do not match the keyboard input.")],default:"highlight",description:C("keyboardNavigationSettingKey","Controls the keyboard navigation style for lists and trees in the workbench. Can be simple, highlight and filter.")},[k7]:{type:"boolean",default:!0,markdownDescription:C("automatic keyboard navigation setting","Controls whether keyboard navigation in lists and trees is automatically triggered simply by typing. If set to `false`, keyboard navigation is only triggered when executing the `list.toggleKeyboardNavigation` command, for which you can assign a keyboard shortcut.")},[Y4]:{type:"string",enum:["singleClick","doubleClick"],default:"singleClick",description:C("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.")}}});var T7;(function(i){i[i.PRESERVE=0]="PRESERVE",i[i.LAST=1]="LAST"})(T7||(T7={}));const Mp={Quickaccess:"workbench.contributions.quickaccess"};class u6e{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),fn(()=>{this.providers.splice(this.providers.indexOf(e),1),this.defaultProvider===e&&(this.defaultProvider=void 0)})}getQuickAccessProviders(){return Eg([this.defaultProvider,...this.providers])}getQuickAccessProvider(e){return e&&this.providers.find(n=>e.startsWith(n.prefix))||void 0||this.defaultProvider}}sr.add(Mp.Quickaccess,new u6e);const Ad=Ln("quickInputService");var d6e=globalThis&&globalThis.__decorate||function(i,e,t,n){var r=arguments.length,s=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(s=(r<3?o(s):r>3?o(e,t,s):o(e,t))||s);return r>3&&s&&Object.defineProperty(e,t,s),s},dY=globalThis&&globalThis.__param||function(i,e){return function(t,n){e(t,n,i)}};let I7=class extends Ne{constructor(e,t){super(),this.quickInputService=e,this.instantiationService=t,this.registry=sr.as(Mp.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 r;const[s,o]=this.getOrInstantiateProvider(e),a=this.visibleQuickAccess,l=a==null?void 0:a.descriptor;if(a&&o&&l===o){e!==o.prefix&&!(n!=null&&n.preserveValue)&&(a.picker.value=e),this.adjustValueSelection(a.picker,o,n);return}if(o&&!(n!=null&&n.preserveValue)){let f;if(a&&l&&l!==o){const g=a.value.substr(l.prefix.length);g&&(f=`${o.prefix}${g}`)}if(!f){const g=s==null?void 0:s.defaultFilterValue;g===T7.LAST?f=this.lastAcceptedPickerValues.get(o):typeof g=="string"&&(f=`${o.prefix}${g}`)}typeof f=="string"&&(e=f)}const c=new Je,u=c.add(this.quickInputService.createQuickPick());u.value=e,this.adjustValueSelection(u,o,n),u.placeholder=o==null?void 0:o.placeholder,u.quickNavigate=n==null?void 0:n.quickNavigateConfiguration,u.hideInput=!!u.quickNavigate&&!a,(typeof(n==null?void 0:n.itemActivation)=="number"||n!=null&&n.quickNavigateConfiguration)&&(u.itemActivation=(r=n==null?void 0:n.itemActivation)!==null&&r!==void 0?r:_c.SECOND),u.contextKey=o==null?void 0:o.contextKey,u.filterValue=f=>f.substring(o?o.prefix.length:0),o!=null&&o.placeholder&&(u.ariaLabel=o==null?void 0:o.placeholder);let d;t&&(d=new lI,c.add(id(u.onWillAccept)(f=>{f.veto(),u.hide()}))),c.add(this.registerPickerListeners(u,s,o,e));const h=c.add(new rs);if(s&&c.add(s.provide(u,h.token)),id(u.onDidHide)(()=>{u.selectedItems.length===0&&h.cancel(),c.dispose(),d==null||d.complete(u.selectedItems.slice(0))}),u.show(),t)return d==null?void 0:d.p}adjustValueSelection(e,t,n){var r;let s;n!=null&&n.preserveValue?s=[e.value.length,e.value.length]:s=[(r=t==null?void 0:t.prefix.length)!==null&&r!==void 0?r:0,e.value.length],e.valueSelection=s}registerPickerListeners(e,t,n,r){const s=new Je,o=this.visibleQuickAccess={picker:e,descriptor:n,value:r};return s.add(fn(()=>{o===this.visibleQuickAccess&&(this.visibleQuickAccess=void 0)})),s.add(e.onDidChangeValue(a=>{const[l]=this.getOrInstantiateProvider(a);l!==t?this.show(a,{preserveValue:!0}):o.value=a})),n&&s.add(e.onDidAccept(()=>{this.lastAcceptedPickerValues.set(n,e.value)})),s}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]}};I7=d6e([dY(0,Ad),dY(1,_n)],I7);var h6e=globalThis&&globalThis.__decorate||function(i,e,t,n){var r=arguments.length,s=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(s=(r<3?o(s):r>3?o(e,t,s):o(e,t))||s);return r>3&&s&&Object.defineProperty(e,t,s),s},gw=globalThis&&globalThis.__param||function(i,e){return function(t,n){e(t,n,i)}};let D7=class extends wSe{constructor(e,t,n,r,s){super(n),this.instantiationService=e,this.contextKeyService=t,this.accessibilityService=r,this.layoutService=s,this.contexts=new Map}get controller(){return this._controller||(this._controller=this._register(this.createController())),this._controller}get quickAccess(){return this._quickAccess||(this._quickAccess=this._register(this.instantiationService.createInstance(I7))),this._quickAccess}createController(e=this.layoutService,t){var n,r;const s={idPrefix:"quickInput_",container:e.container,ignoreFocusOut:()=>!1,isScreenReaderOptimized:()=>this.accessibilityService.isScreenReaderOptimized(),backKeybindingLabel:()=>{},setContextKey:a=>this.setContextKey(a),returnFocus:()=>e.focus(),createList:(a,l,c,u,d)=>this.instantiationService.createInstance(E7,a,l,c,u,d),styles:this.computeStyles()},o=this._register(new P4(Object.assign(Object.assign({},s),t)));return o.layout(e.dimension,(r=(n=e.offset)===null||n===void 0?void 0:n.top)!==null&&r!==void 0?r:0),this._register(e.onDidLayout(a=>{var l,c;return o.layout(a,(c=(l=e.offset)===null||l===void 0?void 0:l.top)!==null&&c!==void 0?c:0)})),this._register(o.onShow(()=>this.resetContextKeys())),this._register(o.onHide(()=>this.resetContextKeys())),o}setContextKey(e){let t;e&&(t=this.contexts.get(e),t||(t=new mt(e,!1).bindTo(this.contextKeyService),this.contexts.set(e,t))),!(t&&t.get())&&(this.resetContextKeys(),t&&t.set(!0))}resetContextKeys(){this.contexts.forEach(e=>{e.get()&&e.reset()})}pick(e,t={},n=mn.None){return this.controller.pick(e,t,n)}createQuickPick(){return this.controller.createQuickPick()}updateStyles(){this.controller.applyStyles(this.computeStyles())}computeStyles(){return{widget:Object.assign({},mc(this.theme,{quickInputBackground:BU,quickInputForeground:eke,quickInputTitleBackground:tke,contrastBorder:Ai,widgetShadow:Hh})),inputBox:mc(this.theme,{inputForeground:i6,inputBackground:n6,inputBorder:r6,inputValidationInfoBackground:LU,inputValidationInfoForeground:TU,inputValidationInfoBorder:IU,inputValidationWarningBackground:DU,inputValidationWarningForeground:NU,inputValidationWarningBorder:AU,inputValidationErrorBackground:RU,inputValidationErrorForeground:OU,inputValidationErrorBorder:MU}),countBadge:mc(this.theme,{badgeBackground:Yb,badgeForeground:Zb,badgeBorder:Ai}),button:mc(this.theme,{buttonForeground:jSe,buttonBackground:c6,buttonHoverBackground:qSe,buttonBorder:Ai}),progressBar:mc(this.theme,{progressBarBackground:GSe}),keybindingLabel:mc(this.theme,{keybindingLabelBackground:rke,keybindingLabelForeground:ske,keybindingLabelBorder:oke,keybindingLabelBottomBorder:ake,keybindingLabelShadow:Hh}),list:mc(this.theme,{listBackground:BU,listInactiveFocusForeground:qS,listInactiveSelectionIconForeground:GS,listInactiveFocusBackground:KS,listFocusOutline:Fs,listInactiveFocusOutline:Fs,pickerGroupBorder:ike,pickerGroupForeground:nke})}}};D7=h6e([gw(0,_n),gw(1,Yt),gw(2,Ei),gw(3,zo),gw(4,$v)],D7);var hY=globalThis&&globalThis.__decorate||function(i,e,t,n){var r=arguments.length,s=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(s=(r<3?o(s):r>3?o(e,t,s):o(e,t))||s);return r>3&&s&&Object.defineProperty(e,t,s),s},Pp=globalThis&&globalThis.__param||function(i,e){return function(t,n){e(t,n,i)}};let N7=class extends D7{constructor(e,t,n,r,s,o){super(t,n,r,s,new $D(e.getContainerDomNode(),o)),this.host=void 0;const a=S1.get(e);if(a){const l=a.widget;this.host={_serviceBrand:void 0,get hasContainer(){return!0},get container(){return l.getDomNode()},get dimension(){return e.getLayoutInfo()},get onDidLayout(){return e.onDidLayoutChange},focus:()=>e.focus()}}else this.host=void 0}createController(){return super.createController(this.host)}};N7=hY([Pp(1,_n),Pp(2,Yt),Pp(3,Ei),Pp(4,zo),Pp(5,Zn)],N7);let A7=class{constructor(e,t){this.instantiationService=e,this.codeEditorService=t,this.mapEditorToService=new Map}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(N7,e);this.mapEditorToService.set(e,t),id(e.onDidDispose)(()=>{n.dispose(),this.mapEditorToService.delete(e)})}return t}get quickAccess(){return this.activeService.quickAccess}pick(e,t={},n=mn.None){return this.activeService.pick(e,t,n)}createQuickPick(){return this.activeService.createQuickPick()}};A7=hY([Pp(0,_n),Pp(1,Zn)],A7);class S1{constructor(e){this.editor=e,this.widget=new X4(this.editor)}static get(e){return e.getContribution(S1.ID)}dispose(){this.widget.dispose()}}S1.ID="editor.controller.quickInput";class X4{constructor(e){this.codeEditor=e,this.domNode=document.createElement("div"),this.codeEditor.addOverlayWidget(this)}getId(){return X4.ID}getDomNode(){return this.domNode}getPosition(){return{preference:2}}dispose(){this.codeEditor.removeOverlayWidget(this)}}X4.ID="editor.contrib.quickInputWidget",Gn(S1.ID,S1);class f6e{constructor(e,t,n,r,s){this._parsedThemeRuleBrand=void 0,this.token=e,this.index=t,this.fontStyle=n,this.foreground=r,this.background=s}}function g6e(i){if(!i||!Array.isArray(i))return[];const e=[];let t=0;for(let n=0,r=i.length;n{const h=w6e(u.token,d.token);return h!==0?h:u.index-d.index});let t=0,n="000000",r="ffffff";for(;i.length>=1&&i[0].token==="";){const u=i.shift();u.fontStyle!==-1&&(t=u.fontStyle),u.foreground!==null&&(n=u.foreground),u.background!==null&&(r=u.background)}const s=new _6e;for(let u of e)s.getId(u);const o=s.getId(n),a=s.getId(r),l=new R7(t,o,a),c=new O7(l);for(let u=0,d=i.length;u"u"){const r=this._match(t),s=v6e(t);n=(r.metadata|s<<8)>>>0,this._cache.set(t,n)}return(n|e<<0)>>>0}}const b6e=/\b(comment|string|regex|regexp)\b/;function v6e(i){const e=i.match(b6e);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 w6e(i,e){return ie?1:0}class R7{constructor(e,t,n){this._themeTrieElementRuleBrand=void 0,this._fontStyle=e,this._foreground=t,this._background=n,this.metadata=(this._fontStyle<<10|this._foreground<<14|this._background<<23)>>>0}clone(){return new R7(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<<10|this._foreground<<14|this._background<<23)>>>0}}class O7{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,r;t===-1?(n=e,r=""):(n=e.substring(0,t),r=e.substring(t+1));const s=this._children.get(n);return typeof s<"u"?s.match(r):this._mainRule}insert(e,t,n,r){if(e===""){this._mainRule.acceptOverwrite(t,n,r);return}const s=e.indexOf(".");let o,a;s===-1?(o=e,a=""):(o=e.substring(0,s),a=e.substring(s+1));let l=this._children.get(o);typeof l>"u"&&(l=new O7(this._mainRule.clone()),this._children.set(o,l)),l.insert(a,t,n,r)}}function C6e(i){const e=[];for(let t=1,n=i.length;te.fire()),i==null||i.onDidProductIconThemeChange(()=>e.fire()),{onDidChange:e.event,getCSS(){const n=i?i.getProductIconTheme():new gY,r={},s=a=>{const l=n.getIcon(a);if(!l)return;const c=l.font;return c?(r[c.id]=c.definition,`.codicon-${a.id}:before { content: '${l.fontCharacter}'; font-family: ${lU(c.id)}; }`):`.codicon-${a.id}:before { content: '${l.fontCharacter}'; }`},o=[];for(let a of t.getIcons()){const l=s(a);l&&o.push(l)}for(let a in r){const l=r[a],c=l.weight?`font-weight: ${l.weight};`:"",u=l.style?`font-style: ${l.style};`:"",d=l.src.map(h=>`${$g(h.location)} format('${h.format}')`).join(", ");o.push(`@font-face { src: ${d}; font-family: ${lU(a)};${c}${u} font-display: block; }`)}return o.join(` +`)}}}class gY{getIcon(e){const t=Qq();let n=e.defaults;for(;hi.isThemeIcon(n);){const r=t.getIcon(n.id);if(!r)return;n=r.defaults}return n}}const Fp="vs",Q4="vs-dark",k1="hc-black",pY=sr.as(EU.ColorContribution),x6e=sr.as(fU.ThemingContribution);class mY{constructor(e,t){this.semanticHighlighting=!1,this.themeData=t;const n=t.base;e.length>0?(J4(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(let t in this.themeData.colors)e.set(t,Ie.fromHex(this.themeData.colors[t]));if(this.themeData.inherit){const t=M7(this.themeData.base);for(let n in t.colors)e.has(n)||e.set(n,Ie.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=pY.resolveDefaultColor(e,this),this.defaultColors[e]=t,t)}defines(e){return Object.prototype.hasOwnProperty.call(this.getColors(),e)}get type(){switch(this.base){case Fp:return kl.LIGHT;case k1:return kl.HIGH_CONTRAST;default:return kl.DARK}}get tokenTheme(){if(!this._tokenTheme){let e=[],t=[];if(this.themeData.inherit){const s=M7(this.themeData.base);e=s.rules,s.encodedTokensColors&&(t=s.encodedTokensColors)}const n=this.themeData.colors["editor.foreground"],r=this.themeData.colors["editor.background"];if(n||r){const s={token:""};n&&(s.foreground=n),r&&(s.background=r),e.push(s)}e=e.concat(this.themeData.rules),this.themeData.encodedTokensColors&&(t=this.themeData.encodedTokensColors),this._tokenTheme=fY.createFromRawTokenTheme(e,t)}return this._tokenTheme}getTokenStyleMetadata(e,t,n){const s=this.tokenTheme._match([e].concat(t).join(".")).metadata,o=Cs.getForeground(s),a=Cs.getFontStyle(s);return{foreground:o,italic:Boolean(a&1),bold:Boolean(a&2),underline:Boolean(a&4),strikethrough:Boolean(a&8)}}}function J4(i){return i===Fp||i===Q4||i===k1}function M7(i){switch(i){case Fp:return y6e;case Q4:return S6e;case k1:return k6e}}function P7(i){const e=M7(i);return new mY(i,e)}class L6e extends Ne{constructor(){super(),this._onColorThemeChange=this._register(new be),this.onDidColorThemeChange=this._onColorThemeChange.event,this._onProductIconThemeChange=this._register(new be),this.onDidProductIconThemeChange=this._onProductIconThemeChange.event,this._environment=Object.create(null),this._builtInProductIconTheme=new gY,this._autoDetectHighContrast=!0,this._knownThemes=new Map,this._knownThemes.set(Fp,P7(Fp)),this._knownThemes.set(Q4,P7(Q4)),this._knownThemes.set(k1,P7(k1));const e=E6e(this);this._codiconCSS=e.getCSS(),this._themeCSS="",this._allCSS=`${this._codiconCSS} +${this._themeCSS}`,this._globalStyleElement=null,this._styleElements=[],this._colorMapOverride=null,this.setTheme(Fp),e.onDidChange(()=>{this._codiconCSS=e.getCSS(),this._updateCSS()}),fSe("(forced-colors: active)",()=>{this._updateActualTheme()})}registerEditorContainer(e){return $b(e)?this._registerShadowDomContainer(e):this._registerRegularEditorContainer()}_registerRegularEditorContainer(){return this._globalStyleElement||(this._globalStyleElement=Ka(),this._globalStyleElement.className="monaco-colors",this._globalStyleElement.textContent=this._allCSS,this._styleElements.push(this._globalStyleElement)),Ne.None}_registerShadowDomContainer(e){const t=Ka(e);return t.className="monaco-colors",t.textContent=this._allCSS,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(Fp),this._desiredTheme=t,this._updateActualTheme()}_updateActualTheme(){const e=this._autoDetectHighContrast&&window.matchMedia("(forced-colors: active)").matches?this._knownThemes.get(k1):this._desiredTheme;this._theme!==e&&(this._theme=e,this._updateThemeOrColorMap())}setAutoDetectHighContrast(e){this._autoDetectHighContrast=e,this._updateActualTheme()}_updateThemeOrColorMap(){const e=[],t={},n={addRule:o=>{t[o]||(e.push(o),t[o]=!0)}};x6e.getThemingParticipants().forEach(o=>o(this._theme,n,this._environment));const r=[];for(const o of pY.getColors()){const a=this._theme.getColor(o.id,!0);a&&r.push(`${kU(o.id)}: ${a.toString()};`)}n.addRule(`.monaco-editor { ${r.join(` +`)} }`);const s=this._colorMapOverride||this._theme.tokenTheme.getColorMap();n.addRule(C6e(s)),this._themeCSS=e.join(` +`),this._updateCSS(),Oi.setColorMap(s),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 Ca=Ln("themeService");var T6e=globalThis&&globalThis.__decorate||function(i,e,t,n){var r=arguments.length,s=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(s=(r<3?o(s):r>3?o(e,t,s):o(e,t))||s);return r>3&&s&&Object.defineProperty(e,t,s),s},_Y=globalThis&&globalThis.__param||function(i,e){return function(t,n){e(t,n,i)}};let F7=class extends Ne{constructor(e,t){super(),this._contextKeyService=e,this._configurationService=t,this._accessibilitySupport=0,this._onDidChangeScreenReaderOptimized=new be,this._accessibilityModeEnabledContext=Gb.bindTo(this._contextKeyService);const n=()=>this._accessibilityModeEnabledContext.set(this.isScreenReaderOptimized());this._register(this._configurationService.onDidChangeConfiguration(r=>{r.affectsConfiguration("editor.accessibilitySupport")&&(n(),this._onDidChangeScreenReaderOptimized.fire())})),n(),this.onDidChangeScreenReaderOptimized(()=>n())}get onDidChangeScreenReaderOptimized(){return this._onDidChangeScreenReaderOptimized.event}isScreenReaderOptimized(){const e=this._configurationService.getValue("editor.accessibilitySupport");return e==="on"||e==="auto"&&this._accessibilitySupport===2}getAccessibilitySupport(){return this._accessibilitySupport}};F7=T6e([_Y(0,Yt),_Y(1,ui)],F7);var bY=globalThis&&globalThis.__decorate||function(i,e,t,n){var r=arguments.length,s=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(s=(r<3?o(s):r>3?o(e,t,s):o(e,t))||s);return r>3&&s&&Object.defineProperty(e,t,s),s},e3=globalThis&&globalThis.__param||function(i,e){return function(t,n){e(t,n,i)}};let B7=class{constructor(e){this._commandService=e}createMenu(e,t,n){return new V7(e,Object.assign({emitEventsForSubmenuChanges:!1,eventDebounceDelay:50},n),this._commandService,t,this)}};B7=bY([e3(0,rr)],B7);let V7=class j0{constructor(e,t,n,r,s){this._id=e,this._options=t,this._commandService=n,this._contextKeyService=r,this._menuService=s,this._disposables=new Je,this._menuGroups=[],this._contextKeys=new Set,this._build();const o=new ri(()=>{this._build(),this._onDidChange.fire(this)},t.eventDebounceDelay);this._disposables.add(o),this._disposables.add(pa.onDidChangeMenu(c=>{c.has(e)&&o.schedule()}));const a=this._disposables.add(new Je),l=()=>{const c=new ri(()=>this._onDidChange.fire(this),t.eventDebounceDelay);a.add(c),a.add(r.onDidChangeContext(u=>{u.affectsSome(this._contextKeys)&&c.schedule()}))};this._onDidChange=new be({onFirstListenerAdd:l,onLastListenerRemove:a.clear.bind(a)}),this.onDidChange=this._onDidChange.event}dispose(){this._disposables.dispose(),this._onDidChange.dispose()}_build(){this._menuGroups.length=0,this._contextKeys.clear();const e=pa.getMenuItems(this._id);let t;e.sort(j0._compareMenuItems);for(const n of e){const r=n.group||"";(!t||t[0]!==r)&&(t=[r,[]],this._menuGroups.push(t)),t[1].push(n),this._collectContextKeys(n)}}_collectContextKeys(e){if(j0._fillInKbExprKeys(e.when,this._contextKeys),O_(e)){if(e.command.precondition&&j0._fillInKbExprKeys(e.command.precondition,this._contextKeys),e.command.toggled){const t=e.command.toggled.condition||e.command.toggled;j0._fillInKbExprKeys(t,this._contextKeys)}}else this._options.emitEventsForSubmenuChanges&&pa.getMenuItems(e.submenu).forEach(this._collectContextKeys,this)}getActions(e){const t=[];for(let n of this._menuGroups){const[r,s]=n,o=[];for(const a of s)if(this._contextKeyService.contextMatchesRules(a.when)){const l=O_(a)?new Bh(a.command,a.alt,e,this._contextKeyService,this._commandService):new JI(a,this._menuService,this._contextKeyService,e);o.push(l)}o.length>0&&t.push([r,o])}return t}static _fillInKbExprKeys(e,t){if(e)for(let n of e.keys())t.add(n)}static _compareMenuItems(e,t){let n=e.group,r=t.group;if(n!==r){if(n){if(!r)return-1}else return 1;if(n==="navigation")return-1;if(r==="navigation")return 1;let a=n.localeCompare(r);if(a!==0)return a}let s=e.order||0,o=t.order||0;return so?1:j0._compareTitles(O_(e)?e.command.title:e.title,O_(t)?t.command.title:t.title)}static _compareTitles(e,t){const n=typeof e=="string"?e:e.original,r=typeof t=="string"?t:t.original;return n.localeCompare(r)}};V7=bY([e3(2,rr),e3(3,Yt),e3(4,Kg)],V7);var I6e=globalThis&&globalThis.__decorate||function(i,e,t,n){var r=arguments.length,s=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(s=(r<3?o(s):r>3?o(e,t,s):o(e,t))||s);return r>3&&s&&Object.defineProperty(e,t,s),s},vY=globalThis&&globalThis.__param||function(i,e){return function(t,n){e(t,n,i)}},pw=globalThis&&globalThis.__awaiter||function(i,e,t,n){function r(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(u){try{c(n.next(u))}catch(d){o(d)}}function l(u){try{c(n.throw(u))}catch(d){o(d)}}function c(u){u.done?s(u.value):r(u.value).then(a,l)}c((n=n.apply(i,e||[])).next())})};let W7=class extends Ne{constructor(e,t){super(),this.layoutService=e,this.logService=t,this.mapTextToType=new Map,this.findText="",(wl||zT)&&this.installWebKitWriteTextWorkaround()}installWebKitWriteTextWorkaround(){const e=()=>{const t=new lI;this.webKitPendingClipboardWritePromise&&!this.webKitPendingClipboardWritePromise.isSettled&&this.webKitPendingClipboardWritePromise.cancel(),this.webKitPendingClipboardWritePromise=t,navigator.clipboard.write([new ClipboardItem({"text/plain":t.p})]).catch(n=>pw(this,void 0,void 0,function*(){(!(n instanceof Error)||n.name!=="NotAllowedError"||!t.isRejected)&&this.logService.error(n)}))};this.layoutService.hasContainer&&(this._register(Xe(this.layoutService.container,"click",e)),this._register(Xe(this.layoutService.container,"keydown",e)))}writeText(e,t){return pw(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(s){console.error(s)}const n=document.activeElement,r=document.body.appendChild(Ze("textarea",{"aria-hidden":!0}));r.style.height="1px",r.style.width="1px",r.style.position="absolute",r.value=e,r.focus(),r.select(),document.execCommand("copy"),n instanceof HTMLElement&&n.focus(),document.body.removeChild(r)})}readText(e){return pw(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 pw(this,void 0,void 0,function*(){return this.findText})}writeFindText(e){return pw(this,void 0,void 0,function*(){this.findText=e})}};W7=I6e([vY(0,$v),vY(1,yl)],W7);var D6e=globalThis&&globalThis.__decorate||function(i,e,t,n){var r=arguments.length,s=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(s=(r<3?o(s):r>3?o(e,t,s):o(e,t))||s);return r>3&&s&&Object.defineProperty(e,t,s),s},N6e=globalThis&&globalThis.__param||function(i,e){return function(t,n){e(t,n,i)}};const mw="data-keybinding-context";let H7=class{constructor(e,t){this._id=e,this._parent=t,this._value=Object.create(null),this._value._contextId=e}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}};class E1 extends H7{constructor(){super(-1,null)}setValue(e,t){return!1}removeValue(e){return!1}getValue(e){}}E1.INSTANCE=new E1;class _w extends H7{constructor(e,t,n){super(e,null),this._configurationService=t,this._values=g1.forConfigKeys(),this._listener=this._configurationService.onDidChangeConfiguration(r=>{if(r.source===6){const s=Array.from(Dn.map(this._values,([o])=>o));this._values.clear(),n.fire(new CY(s))}else{const s=[];for(const o of r.affectedKeys){const a=`config.${o}`,l=this._values.findSuperstr(a);l!==void 0&&(s.push(...Dn.map(l,([c])=>c)),this._values.deleteSuperstr(a)),this._values.has(a)&&(s.push(a),this._values.delete(a))}n.fire(new CY(s))}})}dispose(){this._listener.dispose()}getValue(e){if(e.indexOf(_w._keyPrefix)!==0)return super.getValue(e);if(this._values.has(e))return this._values.get(e);const t=e.substr(_w._keyPrefix.length),n=this._configurationService.getValue(t);let r;switch(typeof n){case"number":case"boolean":case"string":r=n;break;default:Array.isArray(n)?r=JSON.stringify(n):r=n}return this._values.set(e,r),r}setValue(e,t){return super.setValue(e,t)}removeValue(e){return super.removeValue(e)}}_w._keyPrefix="config.";class A6e{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 wY{constructor(e){this.key=e}affectsSome(e){return e.has(this.key)}}class CY{constructor(e){this.keys=e}affectsSome(e){for(const t of this.keys)if(e.has(t))return!0;return!1}}class R6e{constructor(e){this.events=e}affectsSome(e){for(const t of this.events)if(t.affectsSome(e))return!0;return!1}}class yY{constructor(e){this._onDidChangeContext=new By({merge:t=>new R6e(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 A6e(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 O6e(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 wY(e))}removeContext(e){this._isDisposed||this.getContextValuesContainer(this._myContextId).removeValue(e)&&this._onDidChangeContext.fire(new wY(e))}getContext(e){return this._isDisposed?E1.INSTANCE:this.getContextValuesContainer(M6e(e))}}let z7=class extends yY{constructor(e){super(0),this._contexts=new Map,this._toDispose=new Je,this._lastContextId=0;const t=new _w(this._myContextId,e,this._onDidChangeContext);this._contexts.set(this._myContextId,t),this._toDispose.add(t)}dispose(){this._onDidChangeContext.dispose(),this._isDisposed=!0,this._toDispose.dispose()}getContextValuesContainer(e){return this._isDisposed?E1.INSTANCE:this._contexts.get(e)||E1.INSTANCE}createChildContext(e=this._myContextId){if(this._isDisposed)throw new Error("ContextKeyService has been disposed");let t=++this._lastContextId;return this._contexts.set(t,new H7(t,this.getContextValuesContainer(e))),t}disposeContext(e){this._isDisposed||this._contexts.delete(e)}};z7=D6e([N6e(0,ui)],z7);class O6e extends yY{constructor(e,t){if(super(e.createChildContext()),this._parentChangeListener=new qs,this._parent=e,this._updateParentChangeListener(),this._domNode=t,this._domNode.hasAttribute(mw)){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(mw,String(this._myContextId))}_updateParentChangeListener(){this._parentChangeListener.value=this._parent.onDidChangeContext(this._onDidChangeContext.fire,this._onDidChangeContext)}dispose(){this._isDisposed||(this._onDidChangeContext.dispose(),this._parent.disposeContext(this._myContextId),this._parentChangeListener.dispose(),this._domNode.removeAttribute(mw),this._isDisposed=!0)}getContextValuesContainer(e){return this._isDisposed?E1.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 M6e(i){for(;i;){if(i.hasAttribute(mw)){const e=i.getAttribute(mw);return e?parseInt(e,10):NaN}i=i.parentElement}return 0}An.registerCommand(_Se,function(i,e,t){i.get(Yt).createKey(String(e),t)}),An.registerCommand({id:"getContextKeyInfo",handler(){return[...mt.all()].sort((i,e)=>i.key.localeCompare(e.key))},description:{description:C("getContextKeyInfo","A command that returns information about context keys"),args:[]}}),An.registerCommand("_generateContextKeyInfo",function(){const i=[],e=new Set;for(let t of mt.all())e.has(t.key)||(e.add(t.key),i.push(t));i.sort((t,n)=>t.key.localeCompare(n.key)),console.log(JSON.stringify(i,void 0,2))});let P6e=class{constructor(e){this.incoming=new Map,this.outgoing=new Map,this.data=e}};class F6e{constructor(e){this._hashFn=e,this._nodes=new Map}roots(){const e=[];for(let t of this._nodes.values())t.outgoing.size===0&&e.push(t);return e}insertEdge(e,t){const n=this.lookupOrInsertNode(e),r=this.lookupOrInsertNode(t);n.outgoing.set(this._hashFn(t),r),r.incoming.set(this._hashFn(e),n)}removeNode(e){const t=this._hashFn(e);this._nodes.delete(t);for(let 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 P6e(e),this._nodes.set(t,n)),n}isEmpty(){return this._nodes.size===0}toString(){let e=[];for(let[t,n]of this._nodes)e.push(`${t}, (incoming)[${[...n.incoming.keys()].join(", ")}], (outgoing)[${[...n.outgoing.keys()].join(",")}]`);return e.join(` +`)}findCycleSlow(){for(let[e,t]of this._nodes){const n=new Set([e]),r=this._findCycle(t,n);if(r)return r}}_findCycle(e,t){for(let[n,r]of e.outgoing){if(t.has(n))return[...t,n].join(" -> ");t.add(n);const s=this._findCycle(r,t);if(s)return s;t.delete(n)}}}class SY extends Error{constructor(e){var t;super("cyclic dependency between services"),this.message=(t=e.findCycleSlow())!==null&&t!==void 0?t:`UNABLE to detect cycle, dumping graph: +${e.toString()}`}}class $7{constructor(e=new $k,t=!1,n){this._activeInstantiations=new Set,this._services=e,this._strict=t,this._parent=n,this._services.set(_n,this)}createChild(e){return new $7(e,this._strict,this)}invokeFunction(e,...t){let n=Tl.traceInvocation(e),r=!1;try{return e({get:o=>{if(r)throw zwe("service accessor is only valid during the invocation of its target method");const a=this._getOrCreateServiceInstance(o,n);if(!a)throw new Error(`[invokeFunction] unknown service '${o}'`);return a}},...t)}finally{r=!0,n.stop()}}createInstance(e,...t){let n,r;return e instanceof eu?(n=Tl.traceCreation(e.ctor),r=this._createInstance(e.ctor,e.staticArguments.concat(t),n)):(n=Tl.traceCreation(e),r=this._createInstance(e,t,n)),n.stop(),r}_createInstance(e,t=[],n){let r=oc.getServiceDependencies(e).sort((a,l)=>a.index-l.index),s=[];for(const a of r){let l=this._getOrCreateServiceInstance(a.id,n);l||this._throwIfStrict(`[createInstance] ${e.name} depends on UNKNOWN service ${a.id}.`,!1),s.push(l)}let o=r.length>0?r[0].index:t.length;if(t.length!==o){console.warn(`[createInstance] First service dependency of ${e.name} at position ${o+1} conflicts with ${t.length} static arguments`);let a=o-t.length;a>0?t=t.concat(new Array(a)):t=t.slice(0,o)}return new e(...t,...s)}_setServiceInstance(e,t){if(this._services.get(e)instanceof eu)this._services.set(e,t);else if(this._parent)this._parent._setServiceInstance(e,t);else throw new Error("illegalState - setting UNKNOWN service instance")}_getServiceInstanceOrDescriptor(e){let t=this._services.get(e);return!t&&this._parent?this._parent._getServiceInstanceOrDescriptor(e):t}_getOrCreateServiceInstance(e,t){let n=this._getServiceInstanceOrDescriptor(e);return n instanceof eu?this._safeCreateAndCacheServiceInstance(e,n,t.branch(e,!0)):(t.branch(e,!1),n)}_safeCreateAndCacheServiceInstance(e,t,n){if(this._activeInstantiations.has(e))throw new Error(`illegal state - RECURSIVELY instantiating service '${e}'`);this._activeInstantiations.add(e);try{return this._createAndCacheServiceInstance(e,t,n)}finally{this._activeInstantiations.delete(e)}}_createAndCacheServiceInstance(e,t,n){const r=new F6e(a=>a.id.toString());let s=0;const o=[{id:e,desc:t,_trace:n}];for(;o.length;){const a=o.pop();if(r.lookupOrInsertNode(a),s++>1e3)throw new SY(r);for(let l of oc.getServiceDependencies(a.desc.ctor)){let c=this._getServiceInstanceOrDescriptor(l.id);if(c||this._throwIfStrict(`[createInstance] ${e} depends on ${l.id} which is NOT registered.`,!0),c instanceof eu){const u={id:l.id,desc:c,_trace:a._trace.branch(l.id,!0)};r.insertEdge(a,u),o.push(u)}}}for(;;){const a=r.roots();if(a.length===0){if(!r.isEmpty())throw new SY(r);break}for(const{data:l}of a){if(this._getServiceInstanceOrDescriptor(l.id)instanceof eu){const u=this._createServiceInstanceWithOwner(l.id,l.desc.ctor,l.desc.staticArguments,l.desc.supportsDelayedInstantiation,l._trace);this._setServiceInstance(l.id,u)}r.removeNode(l)}}return this._getServiceInstanceOrDescriptor(e)}_createServiceInstanceWithOwner(e,t,n=[],r,s){if(this._services.get(e)instanceof eu)return this._createServiceInstance(t,n,r,s);if(this._parent)return this._parent._createServiceInstanceWithOwner(e,t,n,r,s);throw new Error(`illegalState - creating UNKNOWN service instance ${t.name}`)}_createServiceInstance(e,t=[],n,r){if(n){const s=new Ih(()=>this._createInstance(e,t,r));return new Proxy(Object.create(null),{get(o,a){if(a in o)return o[a];let l=s.value,c=l[a];return typeof c!="function"||(c=c.bind(l),o[a]=c),c},set(o,a,l){return s.value[a]=l,!0}})}else return this._createInstance(e,t,r)}_throwIfStrict(e,t){if(t&&console.warn(t),this._strict)throw new Error(e)}}class Tl{constructor(e,t){this.type=e,this.name=t,this._start=Date.now(),this._dep=[]}static traceInvocation(e){return Tl._None}static traceCreation(e){return Tl._None}branch(e,t){let n=new Tl(2,e.toString());return this._dep.push([e,t,n]),n}stop(){let e=Date.now()-this._start;Tl._totals+=e;let t=!1;function n(s,o){let a=[],l=new Array(s+1).join(" ");for(const[c,u,d]of o._dep)if(u&&d){t=!0,a.push(`${l}CREATES -> ${c}`);let h=n(s+1,d);h&&a.push(h)}else a.push(`${l}uses -> ${c}`);return a.join(` +`)}let r=[`${this.type===0?"CREATE":"CALL"} ${this.name}`,`${n(1,this)}`,`DONE, took ${e.toFixed(2)}ms (grand total ${Tl._totals.toFixed(2)}ms)`];(e>2||t)&&console.log(r.join(` +`))}}Tl._None=new class extends Tl{constructor(){super(-1,null)}stop(){}branch(){return this}},Tl._totals=0;class B6e{constructor(){this._byResource=new Xs,this._byOwner=new Map}set(e,t,n){let r=this._byResource.get(e);r||(r=new Map,this._byResource.set(e,r)),r.set(t,n);let s=this._byOwner.get(t);s||(s=new Xs,this._byOwner.set(t,s)),s.set(e,n)}get(e,t){let n=this._byResource.get(e);return n==null?void 0:n.get(t)}delete(e,t){let n=!1,r=!1,s=this._byResource.get(e);s&&(n=s.delete(t));let o=this._byOwner.get(t);if(o&&(r=o.delete(e)),n!==r)throw new Error("illegal state");return n&&r}values(e){var t,n,r,s;return typeof e=="string"?(n=(t=this._byOwner.get(e))===null||t===void 0?void 0:t.values())!==null&&n!==void 0?n:Dn.empty():Pt.isUri(e)?(s=(r=this._byResource.get(e))===null||r===void 0?void 0:r.values())!==null&&s!==void 0?s:Dn.empty():Dn.map(Dn.concat(...this._byOwner.values()),o=>o[1])}}class V6e{constructor(e){this.errors=0,this.infos=0,this.warnings=0,this.unknowns=0,this._data=new Xs,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 r=this._resourceStats(t);this._add(r),this._data.set(t,r)}}_resourceStats(e){const t={errors:0,warnings:0,infos:0,unknowns:0};if(e.scheme===sn.inMemory||e.scheme===sn.walkThrough||e.scheme===sn.walkThroughSnippet)return t;for(const{severity:n}of this._service.read({resource:e}))n===Vi.Error?t.errors+=1:n===Vi.Warning?t.warnings+=1:n===Vi.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 Bp{constructor(){this._onMarkerChanged=new Ywe({delay:0,merge:Bp._merge}),this.onMarkerChanged=this._onMarkerChanged.event,this._data=new B6e,this._stats=new V6e(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(sz(n))this._data.delete(t,e)&&this._onMarkerChanged.fire([t]);else{const r=[];for(const s of n){const o=Bp._toMarker(e,t,s);o&&r.push(o)}this._data.set(t,e,r),this._onMarkerChanged.fire([t])}}static _toMarker(e,t,n){let{code:r,severity:s,message:o,source:a,startLineNumber:l,startColumn:c,endLineNumber:u,endColumn:d,relatedInformation:h,tags:f}=n;if(o)return l=l>0?l:1,c=c>0?c:1,u=u>=l?u:l,d=d>0?d:c,{resource:t,owner:e,code:r,severity:s,message:o,source:a,startLineNumber:l,startColumn:c,endLineNumber:u,endColumn:d,relatedInformation:h,tags:f}}read(e=Object.create(null)){let{owner:t,resource:n,severities:r,take:s}=e;if((!s||s<0)&&(s=-1),t&&n){const o=this._data.get(n,t);if(o){const a=[];for(const l of o)if(Bp._accept(l,r)){const c=a.push(l);if(s>0&&c===s)break}return a}else return[]}else if(!t&&!n){const o=[];for(let a of this._data.values())for(let l of a)if(Bp._accept(l,r)){const c=o.push(l);if(s>0&&c===s)return o}return o}else{const o=this._data.values(n??t),a=[];for(const l of o)for(const c of l)if(Bp._accept(c,r)){const u=a.push(c);if(s>0&&u===s)return a}return a}}static _accept(e,t){return t===void 0||(t&e.severity)===e.severity}static _merge(e){const t=new Xs;for(let n of e)for(let r of n)t.set(r,!0);return Array.from(t.keys())}}var bw=globalThis&&globalThis.__awaiter||function(i,e,t,n){function r(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(u){try{c(n.next(u))}catch(d){o(d)}}function l(u){try{c(n.throw(u))}catch(d){o(d)}}function c(u){u.done?s(u.value):r(u.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},x1;(function(i){i[i.None=0]="None",i[i.Initialized=1]="Initialized",i[i.Closed=2]="Closed"})(x1||(x1={}));class vw extends Ne{constructor(e,t=Object.create(null)){super(),this.database=e,this.options=t,this._onDidChangeStorage=this._register(new be),this.onDidChangeStorage=this._onDidChangeStorage.event,this.state=x1.None,this.cache=new Map,this.flushDelayer=new k2e(vw.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;(t=e.changed)===null||t===void 0||t.forEach((r,s)=>this.accept(s,r)),(n=e.deleted)===null||n===void 0||n.forEach(r=>this.accept(r,void 0))}accept(e,t){if(this.state===x1.Closed)return;let n=!1;sa(t)?n=this.cache.delete(e):this.cache.get(e)!==t&&(this.cache.set(e,t),n=!0),n&&this._onDidChangeStorage.fire(e)}get(e,t){const n=this.cache.get(e);return sa(n)?t:n}getBoolean(e,t){const n=this.get(e);return sa(n)?t:n==="true"}getNumber(e,t){const n=this.get(e);return sa(n)?t:parseInt(n,10)}set(e,t){return bw(this,void 0,void 0,function*(){if(this.state===x1.Closed)return;if(sa(t))return this.delete(e);const n=String(t);if(this.cache.get(e)!==n)return this.cache.set(e,n),this.pendingInserts.set(e,n),this.pendingDeletes.delete(e),this._onDidChangeStorage.fire(e),this.doFlush()})}delete(e){return bw(this,void 0,void 0,function*(){if(!(this.state===x1.Closed||!this.cache.delete(e)))return this.pendingDeletes.has(e)||this.pendingDeletes.add(e),this.pendingInserts.delete(e),this._onDidChangeStorage.fire(e),this.doFlush()})}get hasPending(){return this.pendingInserts.size>0||this.pendingDeletes.size>0}flushPending(){return bw(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 bw(this,void 0,void 0,function*(){return this.flushDelayer.trigger(()=>this.flushPending(),e)})}dispose(){this.flushDelayer.dispose(),super.dispose()}}vw.DEFAULT_FLUSH_DELAY=100;class kY{constructor(){this.onDidChangeItemsExternal=kt.None,this.items=new Map}updateItems(e){return bw(this,void 0,void 0,function*(){e.insert&&e.insert.forEach((t,n)=>this.items.set(n,t)),e.delete&&e.delete.forEach(t=>this.items.delete(t))})}}const t3="__$__targetStorageMarker",Lu=Ln("storageService");var n3;(function(i){i[i.NONE=0]="NONE",i[i.SHUTDOWN=1]="SHUTDOWN"})(n3||(n3={}));class i3 extends Ne{constructor(e={flushInterval:i3.DEFAULT_FLUSH_INTERVAL}){super(),this.options=e,this._onDidChangeValue=this._register(new By),this._onDidChangeTarget=this._register(new By),this._onWillSaveState=this._register(new be),this.onWillSaveState=this._onWillSaveState.event,this._workspaceKeyTargets=void 0,this._globalKeyTargets=void 0}emitDidChangeValue(e,t){t===t3?(e===0?this._globalKeyTargets=void 0:e===1&&(this._workspaceKeyTargets=void 0),this._onDidChangeTarget.fire({scope:e})):this._onDidChangeValue.fire({scope:e,key:t,target:this.getKeyTargets(e)[t]})}get(e,t,n){var r;return(r=this.getStorage(t))===null||r===void 0?void 0:r.get(e,n)}getBoolean(e,t,n){var r;return(r=this.getStorage(t))===null||r===void 0?void 0:r.getBoolean(e,n)}getNumber(e,t,n){var r;return(r=this.getStorage(t))===null||r===void 0?void 0:r.getNumber(e,n)}store(e,t,n,r){if(sa(t)){this.remove(e,n);return}this.withPausedEmitters(()=>{var s;this.updateKeyTarget(e,n,r),(s=this.getStorage(n))===null||s===void 0||s.set(e,t)})}remove(e,t){this.withPausedEmitters(()=>{var n;this.updateKeyTarget(e,t,void 0),(n=this.getStorage(t))===null||n===void 0||n.delete(e)})}withPausedEmitters(e){this._onDidChangeValue.pause(),this._onDidChangeTarget.pause();try{e()}finally{this._onDidChangeValue.resume(),this._onDidChangeTarget.resume()}}updateKeyTarget(e,t,n){var r,s;const o=this.getKeyTargets(t);typeof n=="number"?o[e]!==n&&(o[e]=n,(r=this.getStorage(t))===null||r===void 0||r.set(t3,JSON.stringify(o))):typeof o[e]=="number"&&(delete o[e],(s=this.getStorage(t))===null||s===void 0||s.set(t3,JSON.stringify(o)))}get workspaceKeyTargets(){return this._workspaceKeyTargets||(this._workspaceKeyTargets=this.loadKeyTargets(1)),this._workspaceKeyTargets}get globalKeyTargets(){return this._globalKeyTargets||(this._globalKeyTargets=this.loadKeyTargets(0)),this._globalKeyTargets}getKeyTargets(e){return e===0?this.globalKeyTargets:this.workspaceKeyTargets}loadKeyTargets(e){const t=this.get(t3,e);if(t)try{return JSON.parse(t)}catch{}return Object.create(null)}}i3.DEFAULT_FLUSH_INTERVAL=60*1e3;class W6e extends i3{constructor(){super(),this.globalStorage=this._register(new vw(new kY)),this.workspaceStorage=this._register(new vw(new kY)),this._register(this.workspaceStorage.onDidChangeStorage(e=>this.emitDidChangeValue(1,e))),this._register(this.globalStorage.onDidChangeStorage(e=>this.emitDidChangeValue(0,e)))}getStorage(e){return e===0?this.globalStorage:this.workspaceStorage}}function EY(i,e,t,n,r){if(Array.isArray(i)){let s=0;for(const o of i){const a=EY(o,e,t,n,r);if(a===10)return a;a>s&&(s=a)}return s}else{if(typeof i=="string")return n?i==="*"?5:i===t?10:0:0;if(i){const{language:s,pattern:o,scheme:a,hasAccessToAllModels:l,notebookType:c}=i;if(!n&&!l)return 0;let u=0;if(a)if(a===e.scheme)u=10;else if(a==="*")u=5;else return 0;if(s)if(s===t)u=10;else if(s==="*")u=Math.max(u,5);else return 0;if(c)if(c===r)u=10;else if(c==="*")u=Math.max(u,5);else return 0;if(o){let d;if(typeof o=="string"?d=o:d=Object.assign(Object.assign({},o),{base:W8(o.base)}),d===e.fsPath||v8e(d,e.fsPath))u=10;else return 0}return u}else return 0}}function xY(i){return typeof i=="string"?!1:Array.isArray(i)?i.every(xY):!!i.exclusive}class Qi{constructor(e){this._notebookTypeResolver=e,this._clock=0,this._entries=[],this._onDidChange=new be,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),fn(()=>{if(n){const r=this._entries.indexOf(n);r>=0&&(this._entries.splice(r,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(let 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,r;return this._orderedForEach(e,s=>{n&&r===s._score?n.push(s.provider):(r=s._score,n=[s.provider],t.push(n))}),t}_orderedForEach(e,t){if(e){this._updateScores(e);for(const n of this._entries)n._score>0&&t(n)}}_updateScores(e){var t;const n=(t=this._notebookTypeResolver)===null||t===void 0?void 0:t.call(this,e.uri),r={uri:e.uri.toString(),language:e.getLanguageId(),notebookType:n};if(!(this._lastCandidate&&this._lastCandidate.language===r.language&&this._lastCandidate.uri===r.uri&&this._lastCandidate.notebookType===r.notebookType)){this._lastCandidate=r;for(let s of this._entries)if(s._score=EY(s.selector,e.uri,e.getLanguageId(),ZCe(e),n),xY(s.selector)&&s._score>0){for(let o of this._entries)o._score=0;s._score=1e3;break}this._entries.sort(Qi._compareByScoreAndTime)}}static _compareByScoreAndTime(e,t){return e._scoret._score?-1:e._timet._time?-1:0}}class H6e{constructor(){this.referenceProvider=new Qi(this._score.bind(this)),this.renameProvider=new Qi(this._score.bind(this)),this.codeActionProvider=new Qi(this._score.bind(this)),this.definitionProvider=new Qi(this._score.bind(this)),this.typeDefinitionProvider=new Qi(this._score.bind(this)),this.declarationProvider=new Qi(this._score.bind(this)),this.implementationProvider=new Qi(this._score.bind(this)),this.documentSymbolProvider=new Qi(this._score.bind(this)),this.inlayHintsProvider=new Qi(this._score.bind(this)),this.colorProvider=new Qi(this._score.bind(this)),this.codeLensProvider=new Qi(this._score.bind(this)),this.documentFormattingEditProvider=new Qi(this._score.bind(this)),this.documentRangeFormattingEditProvider=new Qi(this._score.bind(this)),this.onTypeFormattingEditProvider=new Qi(this._score.bind(this)),this.signatureHelpProvider=new Qi(this._score.bind(this)),this.hoverProvider=new Qi(this._score.bind(this)),this.documentHighlightProvider=new Qi(this._score.bind(this)),this.selectionRangeProvider=new Qi(this._score.bind(this)),this.foldingRangeProvider=new Qi(this._score.bind(this)),this.linkProvider=new Qi(this._score.bind(this)),this.inlineCompletionsProvider=new Qi(this._score.bind(this)),this.completionProvider=new Qi(this._score.bind(this)),this.linkedEditingRangeProvider=new Qi(this._score.bind(this)),this.documentRangeSemanticTokensProvider=new Qi(this._score.bind(this)),this.documentSemanticTokensProvider=new Qi(this._score.bind(this))}_score(e){var t;return(t=this._notebookTypeResolver)===null||t===void 0?void 0:t.call(this,e)}}On(yt,H6e,!0);var pf=globalThis&&globalThis.__decorate||function(i,e,t,n){var r=arguments.length,s=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(s=(r<3?o(s):r>3?o(e,t,s):o(e,t))||s);return r>3&&s&&Object.defineProperty(e,t,s),s},Bs=globalThis&&globalThis.__param||function(i,e){return function(t,n){e(t,n,i)}},LY=globalThis&&globalThis.__awaiter||function(i,e,t,n){function r(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(u){try{c(n.next(u))}catch(d){o(d)}}function l(u){try{c(n.throw(u))}catch(d){o(d)}}function c(u){u.done?s(u.value):r(u.value).then(a,l)}c((n=n.apply(i,e||[])).next())})};class z6e{constructor(e){this.disposed=!1,this.model=e,this._onWillDispose=new be}get textEditorModel(){return this.model}dispose(){this.disposed=!0,this._onWillDispose.fire()}}let U7=class{constructor(e){this.modelService=e}createModelReference(e){const t=this.modelService.getModel(e);return t?Promise.resolve(new qwe(new z6e(t))):Promise.reject(new Error("Model not found"))}};U7=pf([Bs(0,Pi)],U7);class r3{show(){return r3.NULL_PROGRESS_RUNNER}showWhile(e,t){return LY(this,void 0,void 0,function*(){yield e})}}r3.NULL_PROGRESS_RUNNER={done:()=>{},total:()=>{},worked:()=>{}};class $6e{confirm(e){return this.doConfirm(e).then(t=>({confirmed:t,checkboxChecked:!1}))}doConfirm(e){let t=e.message;return e.detail&&(t=t+` + +`+e.detail),Promise.resolve(window.confirm(t))}show(e,t,n,r){return Promise.resolve({choice:0})}}class s3{info(e){return this.notify({severity:Bi.Info,message:e})}warn(e){return this.notify({severity:Bi.Warning,message:e})}error(e){return this.notify({severity:Bi.Error,message:e})}notify(e){switch(e.severity){case Bi.Error:console.error(e.message);break;case Bi.Warning:console.warn(e.message);break;default:console.log(e.message);break}return s3.NO_OP}status(e,t){return Ne.None}}s3.NO_OP=new Bxe;let j7=class{constructor(e){this._onWillExecuteCommand=new be,this._onDidExecuteCommand=new be,this.onWillExecuteCommand=this._onWillExecuteCommand.event,this.onDidExecuteCommand=this._onDidExecuteCommand.event,this._instantiationService=e}executeCommand(e,...t){const n=An.getCommand(e);if(!n)return Promise.reject(new Error(`command '${e}' not found`));try{this._onWillExecuteCommand.fire({commandId:e,args:t});const r=this._instantiationService.invokeFunction.apply(this._instantiationService,[n.handler,...t]);return this._onDidExecuteCommand.fire({commandId:e,args:t}),Promise.resolve(r)}catch(r){return Promise.reject(r)}}};j7=pf([Bs(0,_n)],j7);let o3=class extends JLe{constructor(e,t,n,r,s,o){super(e,t,n,r,s),this._cachedResolver=null,this._dynamicKeybindings=[],this._domNodeListeners=[];const a=f=>{const g=new Je;g.add(Xe(f,Nt.KEY_DOWN,p=>{const m=new ki(p);this._dispatch(m,m.target)&&(m.preventDefault(),m.stopPropagation())})),g.add(Xe(f,Nt.KEY_UP,p=>{const m=new ki(p);this._singleModifierDispatch(m,m.target)&&m.preventDefault()})),this._domNodeListeners.push(new U6e(f,g))},l=f=>{for(let g=0;g{f.getOption(54)||a(f.getContainerDomNode())},u=f=>{f.getOption(54)||l(f.getContainerDomNode())};this._register(o.onCodeEditorAdd(c)),this._register(o.onCodeEditorRemove(u)),o.listCodeEditors().forEach(c);const d=f=>{a(f.getContainerDomNode())},h=f=>{l(f.getContainerDomNode())};this._register(o.onDiffEditorAdd(d)),this._register(o.onDiffEditorRemove(h)),o.listDiffEditors().forEach(d)}addDynamicKeybinding(e,t,n,r){const s=NI(t,Pa),o=new Je;return s&&(this._dynamicKeybindings.push({keybinding:s.parts,command:e,when:r,weight1:1e3,weight2:0,extensionId:null,isBuiltinExtension:!1}),o.add(fn(()=>{for(let a=0;athis._log(n))}return this._cachedResolver}_documentHasFocus(){return document.hasFocus()}_toNormalizedKeybindingItems(e,t){const n=[];let r=0;for(const s of e){const o=s.when||void 0,a=s.keybinding;if(!a)n[r++]=new TG(void 0,s.command,s.commandArgs,o,t,null,!1);else{const l=qv.resolveUserBinding(a,Pa);for(const c of l)n[r++]=new TG(c,s.command,s.commandArgs,o,t,null,!1)}}return n}resolveKeyboardEvent(e){const t=new zg(e.ctrlKey,e.shiftKey,e.altKey,e.metaKey,e.keyCode).toChord();return new qv(t,Pa)}};o3=pf([Bs(0,Yt),Bs(1,rr),Bs(2,ru),Bs(3,or),Bs(4,yl),Bs(5,Zn)],o3);class U6e extends Ne{constructor(e,t){super(),this.domNode=e,this._register(t)}}function TY(i){return i&&typeof i=="object"&&(!i.overrideIdentifier||typeof i.overrideIdentifier=="string")&&(!i.resource||i.resource instanceof Pt)}class IY{constructor(){this._onDidChangeConfiguration=new be,this.onDidChangeConfiguration=this._onDidChangeConfiguration.event,this._configuration=new o4(new ZLe,new il)}getValue(e,t){const n=typeof e=="string"?e:void 0,r=TY(e)?e:TY(t)?t:{};return this._configuration.getValue(n,r,void 0)}updateValues(e){const t={data:this._configuration.toData()},n=[];for(const r of e){const[s,o]=r;this.getValue(s)!==o&&(this._configuration.updateValue(s,o),n.push(s))}if(n.length>0){const r=new XLe({keys:n,overrides:[]},t,this._configuration);r.source=7,r.sourceConfig=null,this._onDidChangeConfiguration.fire(r)}return Promise.resolve()}updateValue(e,t,n,r){return this.updateValues([[e,t]])}inspect(e,t={}){return this._configuration.inspect(e,t,void 0)}}let q7=class{constructor(e){this.configurationService=e,this._onDidChangeConfiguration=new be,this.configurationService.onDidChangeConfiguration(t=>{this._onDidChangeConfiguration.fire({affectedKeys:t.affectedKeys,affectsConfiguration:(n,r)=>t.affectsConfiguration(r)})})}getValue(e,t,n){const s=(ye.isIPosition(t)?t:null)?typeof n=="string"?n:void 0:typeof t=="string"?t:void 0;return typeof s>"u"?this.configurationService.getValue():this.configurationService.getValue(s)}};q7=pf([Bs(0,ui)],q7);let G7=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:ws||gn?` +`:`\r +`}};G7=pf([Bs(0,ui)],G7);class j6e{publicLog(e,t){return Promise.resolve(void 0)}publicLog2(e,t){return this.publicLog(e,t)}}class a3{constructor(){const e=Pt.from({scheme:a3.SCHEME,authority:"model",path:"/"});this.workspace={id:"4064f6ec-cb38-4ad0-af64-ee6467e63c82",folders:[new s8e({uri:e,name:"",index:0})]}}getWorkspace(){return this.workspace}}a3.SCHEME="inmemory";function l3(i,e,t){if(!e||!(i instanceof IY))return;const n=[];Object.keys(e).forEach(r=>{KLe(r)&&n.push([`editor.${r}`,e[r]]),t&&YLe(r)&&n.push([`diffEditor.${r}`,e[r]])}),n.length>0&&i.updateValues(n)}let K7=class{constructor(e){this._modelService=e}hasPreviewHandler(){return!1}apply(e,t){return LY(this,void 0,void 0,function*(){const n=new Map;for(let o of e){if(!(o instanceof kG))throw new Error("bad edit - only text edits are supported");const a=this._modelService.getModel(o.resource);if(!a)throw new Error("bad edit - model not found");if(typeof o.versionId=="number"&&a.getVersionId()!==o.versionId)throw new Error("bad state - model changed in the meantime");let l=n.get(a);l||(l=[],n.set(a,l)),l.push(ji.replaceMove(H.lift(o.textEdit.range),o.textEdit.text))}let r=0,s=0;for(const[o,a]of n)o.pushStackElement(),o.pushEditOperations([],a,()=>[]),o.pushStackElement(),s+=1,r+=a.length;return{ariaSummary:Ha(e9.bulkEditServiceSummary,r,s)}})}};K7=pf([Bs(0,Pi)],K7);class q6e{getUriLabel(e,t){return e.scheme==="file"?e.fsPath:e.path}}let Y7=class extends t9{constructor(e,t){super(e),this._codeEditorService=t}showContextView(e,t,n){if(!t){const r=this._codeEditorService.getFocusedCodeEditor()||this._codeEditorService.getActiveCodeEditor();r&&(t=r.getContainerDomNode())}return super.showContextView(e,t,n)}};Y7=pf([Bs(0,$v),Bs(1,Zn)],Y7);class G6e{constructor(){this._neverEmitter=new be,this.onDidChangeTrust=this._neverEmitter.event}isWorkspaceTrusted(){return!0}}class K6e extends Zv{constructor(){super()}}class Y6e extends dye{constructor(){super(new uye)}}let Z7=class extends S9{constructor(e,t,n,r,s){super(e,t,n,r,s),this.configure({blockMouse:!1})}};Z7=pf([Bs(0,ru),Bs(1,or),Bs(2,Hv),Bs(3,qi),Bs(4,Ei)],Z7),On(ui,IY),On(wI,q7),On(D$,G7),On(IG,a3),On(Gv,q6e),On(ru,j6e),On(Uv,$6e),On(or,s3),On(Id,Bp),On(Mi,K6e),On(Ca,L6e),On(yl,Y6e),On(Pi,N4),On(KI,D9),On(Yt,z7),On(of,r3),On(Lu,W6e),On(tl,yI),On(GD,K7),On(NG,G6e),On(mo,U7),On(zo,F7),On(ol,_7),On(rr,j7),On(qi,o3),On(Ad,A7),On(Hv,Y7),On(rl,I9),On(yp,W7),On(sf,Z7),On(Kg,B7);var Xt;(function(i){const e=new $k;for(const[o,a]of s$())e.set(o,a);const t=new $7(e,!0);e.set(_n,t);function n(o){const a=e.get(o);if(!a)throw new Error("Missing service "+o);return a instanceof eu?t.invokeFunction(l=>l.get(o)):a}i.get=n;let r=!1;function s(o){if(r)return t;r=!0;for(const[a,l]of s$())e.get(a)||e.set(a,l);for(const a in o)if(o.hasOwnProperty(a)){const l=Ln(a);e.get(l)instanceof eu&&e.set(l,o[a])}return t}i.initialize=s})(Xt||(Xt={}));var X7=globalThis&&globalThis.__decorate||function(i,e,t,n){var r=arguments.length,s=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(s=(r<3?o(s):r>3?o(e,t,s):o(e,t))||s);return r>3&&s&&Object.defineProperty(e,t,s),s},xi=globalThis&&globalThis.__param||function(i,e){return function(t,n){e(t,n,i)}};let Z6e=0,DY=!1;function X6e(i){if(!i){if(DY)return;DY=!0}gSe(i||document.body)}let c3=class extends Bv{constructor(e,t,n,r,s,o,a,l,c,u,d,h){const f=Object.assign({},t);f.ariaLabel=f.ariaLabel||u4.editorViewAccessibleLabel,f.ariaLabel=f.ariaLabel+";"+u4.accessibilityHelpMessage,super(e,f,{},n,r,s,o,l,c,u,d,h),a instanceof o3?this._standaloneKeybindingService=a:this._standaloneKeybindingService=null,X6e(f.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 r="DYNAMIC_"+ ++Z6e,s=ht.deserialize(n);return this._standaloneKeybindingService.addDynamicKeybinding(r,e,t,s),r}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,r=ht.and(ht.equals("editorId",this.getId()),ht.deserialize(e.precondition)),s=e.keybindings,o=ht.and(r,ht.deserialize(e.keybindingContext)),a=e.contextMenuGroupId||null,l=e.contextMenuOrder||0,c=(f,...g)=>Promise.resolve(e.run(this,...g)),u=new Je,d=this.getId()+":"+t;if(u.add(An.registerCommand(d,c)),a){const f={command:{id:d,title:n},when:r,group:a,order:l};u.add(pa.appendMenuItem(de.EditorContext,f))}if(Array.isArray(s))for(const f of s)u.add(this._standaloneKeybindingService.addDynamicKeybinding(d,f,c,o));const h=new qj(d,n,n,r,c,this._contextKeyService);return this._actions[t]=h,u.add(fn(()=>{delete this._actions[t]})),u}_triggerCommand(e,t){if(this._codeEditorService instanceof Yk)try{this._codeEditorService.setActiveCodeEditor(this),super._triggerCommand(e,t)}finally{this._codeEditorService.setActiveCodeEditor(null)}else super._triggerCommand(e,t)}};c3=X7([xi(2,_n),xi(3,Zn),xi(4,rr),xi(5,Yt),xi(6,qi),xi(7,Ei),xi(8,or),xi(9,zo),xi(10,Ss),xi(11,yt)],c3);let Q7=class extends c3{constructor(e,t,n,r,s,o,a,l,c,u,d,h,f,g,p){const m=Object.assign({},t);l3(u,m,!1);const _=l.registerEditorContainer(e);typeof m.theme=="string"&&l.setTheme(m.theme),typeof m.autoDetectHighContrast<"u"&&l.setAutoDetectHighContrast(Boolean(m.autoDetectHighContrast));const b=m.model;delete m.model,super(e,m,n,r,s,o,a,l,c,d,g,p),this._configurationService=u,this._standaloneThemeService=l,this._register(_);let v;if(typeof b>"u"){const w=f.getLanguageIdByMimeType(m.language)||m.language||uu;v=NY(h,f,m.value||"",w,void 0),this._ownsModel=!0}else v=b,this._ownsModel=!1;if(this._attachModel(v),v){const w={oldModelUrl:null,newModelUrl:v.uri};this._onDidChangeModel.fire(w)}}dispose(){super.dispose()}updateOptions(e){l3(this._configurationService,e,!1),typeof e.theme=="string"&&this._standaloneThemeService.setTheme(e.theme),typeof e.autoDetectHighContrast<"u"&&this._standaloneThemeService.setAutoDetectHighContrast(Boolean(e.autoDetectHighContrast)),super.updateOptions(e)}_postDetachModelCleanup(e){super._postDetachModelCleanup(e),e&&this._ownsModel&&(e.dispose(),this._ownsModel=!1)}};Q7=X7([xi(2,_n),xi(3,Zn),xi(4,rr),xi(5,Yt),xi(6,qi),xi(7,Ca),xi(8,or),xi(9,ui),xi(10,zo),xi(11,Pi),xi(12,Mi),xi(13,Ss),xi(14,yt)],Q7);let J7=class extends af{constructor(e,t,n,r,s,o,a,l,c,u,d,h){const f=Object.assign({},t);l3(c,f,!0);const g=a.registerEditorContainer(e);typeof f.theme=="string"&&a.setTheme(f.theme),typeof f.autoDetectHighContrast<"u"&&a.setAutoDetectHighContrast(Boolean(f.autoDetectHighContrast)),super(e,f,{},h,s,r,n,o,a,l,u,d),this._configurationService=c,this._standaloneThemeService=a,this._register(g)}dispose(){super.dispose()}updateOptions(e){l3(this._configurationService,e,!0),typeof e.theme=="string"&&this._standaloneThemeService.setTheme(e.theme),typeof e.autoDetectHighContrast<"u"&&this._standaloneThemeService.setAutoDetectHighContrast(Boolean(e.autoDetectHighContrast)),super.updateOptions(e)}_createInnerEditor(e,t,n){return e.createInstance(c3,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)}};J7=X7([xi(2,_n),xi(3,Yt),xi(4,tl),xi(5,Zn),xi(6,Ca),xi(7,or),xi(8,ui),xi(9,sf),xi(10,of),xi(11,yp)],J7);function NY(i,e,t,n,r){if(t=t||"",!n){const s=t.indexOf(` +`);let o=t;return s!==-1&&(o=t.substring(0,s)),AY(i,t,e.createByFilepathOrFirstLine(r||null,o),r)}return AY(i,t,e.createById(n),r)}function AY(i,e,t,n){return i.createModel(e,t,n)}function Q6e(i,e,t){return Xt.initialize(t||{}).createInstance(Q7,i,e)}function J6e(i){return Xt.get(Zn).onCodeEditorAdd(t=>{i(t)})}function eDe(i,e,t){return Xt.initialize(t||{}).createInstance(J7,i,e)}function tDe(i,e){return new GCe(i,e)}function nDe(i,e,t){const n=Xt.get(Mi),r=n.getLanguageIdByMimeType(e)||e;return NY(Xt.get(Pi),n,i,r,t)}function iDe(i,e){const t=Xt.get(Mi);Xt.get(Pi).setMode(i,t.createById(e))}function rDe(i,e,t){i&&Xt.get(Id).changeOne(e,i.uri,t)}function sDe(i){return Xt.get(Id).read(i)}function oDe(i){return Xt.get(Id).onMarkerChanged(i)}function aDe(i){return Xt.get(Pi).getModel(i)}function lDe(){return Xt.get(Pi).getModels()}function cDe(i){return Xt.get(Pi).onModelAdded(i)}function uDe(i){return Xt.get(Pi).onModelRemoved(i)}function dDe(i){return Xt.get(Pi).onModelLanguageChanged(t=>{i({model:t.model,oldLanguage:t.oldLanguageId})})}function hDe(i){return mye(Xt.get(Pi),Xt.get(Ss),i)}function fDe(i,e){const t=Xt.get(Mi),n=Xt.get(Ca);return n.registerEditorContainer(i),DI.colorizeElement(n,t,i,e)}function gDe(i,e,t){const n=Xt.get(Mi);return Xt.get(Ca).registerEditorContainer(document.body),DI.colorize(n,i,e,t)}function pDe(i,e,t=4){return Xt.get(Ca).registerEditorContainer(document.body),DI.colorizeModelLine(i,e,t)}function mDe(i){const e=Oi.get(i);return e||{getInitialState:()=>__,tokenize:(t,n,r)=>d$(i,r)}}function _De(i,e){Oi.getOrCreate(e);const t=mDe(e),n=Kc(i),r=[];let s=t.getInitialState();for(let o=0,a=n.length;o=100){n=n-100;const r=t.split(".");if(r.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 mi(i,"a 'bracket' attribute must be either '@open' or '@close', in rule: "+e);if(t.next){if(typeof t.next!="string")throw mi(i,"the next state must be a string value in rule: "+e);{let r=t.next;if(!/^(@pop|@push|@popall)$/.test(r)&&(r[0]==="@"&&(r=r.substr(1)),r.indexOf("$")<0&&!Mye(i,Ah(i,r,"",[],""))))throw mi(i,"the next state '"+t.next+"' is not defined in rule: "+e);n.next=r}}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,i.usesEmbedded=!0),n}}else if(Array.isArray(t)){const n=[];for(let r=0,s=t.length;r0&&n[0]==="^",this.name=this.name+": "+n,this.regex=eN(e,"^(?:"+(this.matchOnlyAtLineStart?n.substr(1):n)+")")}setAction(e,t){this.action=tN(e,this.name,t)}}function MY(i,e){if(!e||typeof e!="object")throw new Error("Monarch: expecting a language definition object");const t={};t.languageId=i,t.includeLF=u3(e.includeLF,!1),t.noThrow=!1,t.maxStack=100,t.start=typeof e.start=="string"?e.start:null,t.ignoreCase=u3(e.ignoreCase,!1),t.unicode=u3(e.unicode,!1),t.tokenPostfix=RY(e.tokenPostfix,"."+t.languageId),t.defaultToken=RY(e.defaultToken,"source"),t.usesEmbedded=!1;const n=e;n.languageId=i,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 r(o,a,l){for(const c of l){let u=c.include;if(u){if(typeof u!="string")throw mi(t,"an 'include' attribute must be a string at: "+o);if(u[0]==="@"&&(u=u.substr(1)),!e.tokenizer[u])throw mi(t,"include target '"+u+"' is not defined at: "+o);r(o+"."+u,a,e.tokenizer[u])}else{const d=new LDe(o);if(Array.isArray(c)&&c.length>=1&&c.length<=3)if(d.setRegex(n,c[0]),c.length>=3)if(typeof c[1]=="string")d.setAction(n,{token:c[1],next:c[2]});else if(typeof c[1]=="object"){const h=c[1];h.next=c[2],d.setAction(n,h)}else throw mi(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: "+o);else d.setAction(n,c[1]);else{if(!c.regex)throw mi(t,"a rule must either be an array, or an object with a 'regex' or 'include' field at: "+o);c.name&&typeof c.name=="string"&&(d.name=c.name),c.matchOnlyAtStart&&(d.matchOnlyAtLineStart=u3(c.matchOnlyAtLineStart,!1)),d.setRegex(n,c.regex),d.setAction(n,c.action)}a.push(d)}}}if(!e.tokenizer||typeof e.tokenizer!="object")throw mi(t,"a language definition must define the 'tokenizer' attribute as an object");t.tokenizer=[];for(let o in e.tokenizer)if(e.tokenizer.hasOwnProperty(o)){t.start||(t.start=o);const a=e.tokenizer[o];t.tokenizer[o]=new Array,r("tokenizer."+o,t.tokenizer[o],a)}if(t.usesEmbedded=n.usesEmbedded,e.brackets){if(!Array.isArray(e.brackets))throw mi(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 s=[];for(let o of e.brackets){let a=o;if(a&&Array.isArray(a)&&a.length===3&&(a={token:a[2],open:a[0],close:a[1]}),a.open===a.close)throw mi(t,"open and close brackets in a 'brackets' attribute must be different: "+a.open+` + hint: use the 'bracket' attribute if matching on equal brackets is required.`);if(typeof a.open=="string"&&typeof a.token=="string"&&typeof a.close=="string")s.push({token:a.token+t.tokenPostfix,open:Nh(t,a.open),close:Nh(t,a.close)});else throw mi(t,"every element in the 'brackets' array must be a '{open,close,token}' object or array")}return t.brackets=s,t.noThrow=!0,t}var TDe=globalThis&&globalThis.__awaiter||function(i,e,t,n){function r(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(u){try{c(n.next(u))}catch(d){o(d)}}function l(u){try{c(n.throw(u))}catch(d){o(d)}}function c(u){u.done?s(u.value):r(u.value).then(a,l)}c((n=n.apply(i,e||[])).next())})};function IDe(i){s1.registerLanguage(i)}function DDe(){let i=[];return i=i.concat(s1.getLanguages()),i}function NDe(i){return Xt.get(Mi).languageIdCodec.encodeLanguageId(i)}function ADe(i,e){const n=Xt.get(Mi).onDidEncounterLanguage(r=>{r===i&&(n.dispose(),e())});return n}function RDe(i,e){if(!Xt.get(Mi).isRegisteredLanguageId(i))throw new Error(`Cannot set configuration for unknown language ${i}`);return gr.register(i,e,100)}class ODe{constructor(e,t){this._languageId=e,this._actual=t}getInitialState(){return this._actual.getInitialState()}tokenize(e,t,n){if(typeof this._actual.tokenize=="function")return ww.adaptTokenize(this._languageId,this._actual,e,n);throw new Error("Not supported!")}tokenizeEncoded(e,t,n){const r=this._actual.tokenizeEncoded(e,n);return new Uy(r.tokens,r.endState)}}class ww{constructor(e,t,n,r){this._languageId=e,this._actual=t,this._languageService=n,this._standaloneThemeService=r}getInitialState(){return this._actual.getInitialState()}static _toClassicTokens(e,t){const n=[];let r=0;for(let s=0,o=e.length;s0&&s[o-1]===h)continue;let f=d.startIndex;c===0?f=0:fTDe(this,void 0,void 0,function*(){const n=yield Promise.resolve(e.create());return n?MDe(n)?FY(i,n):new Hb(Xt.get(Mi),Xt.get(Ca),i,MY(i,n)):null})};return Oi.registerFactory(i,t)}function BDe(i,e){if(!Xt.get(Mi).isRegisteredLanguageId(i))throw new Error(`Cannot set tokens provider for unknown language ${i}`);return PY(e)?nN(i,{create:()=>e}):Oi.register(i,FY(i,e))}function VDe(i,e){const t=n=>new Hb(Xt.get(Mi),Xt.get(Ca),i,MY(i,n));return PY(e)?nN(i,{create:()=>e}):Oi.register(i,t(e))}function WDe(i,e){return Xt.get(yt).referenceProvider.register(i,e)}function HDe(i,e){return Xt.get(yt).renameProvider.register(i,e)}function zDe(i,e){return Xt.get(yt).signatureHelpProvider.register(i,e)}function $De(i,e){return Xt.get(yt).hoverProvider.register(i,{provideHover:(n,r,s)=>{const o=n.getWordAtPosition(r);return Promise.resolve(e.provideHover(n,r,s)).then(a=>{if(a)return!a.range&&o&&(a.range=new H(r.lineNumber,o.startColumn,r.lineNumber,o.endColumn)),a.range||(a.range=new H(r.lineNumber,r.column,r.lineNumber,r.column)),a})}})}function UDe(i,e){return Xt.get(yt).documentSymbolProvider.register(i,e)}function jDe(i,e){return Xt.get(yt).documentHighlightProvider.register(i,e)}function qDe(i,e){return Xt.get(yt).linkedEditingRangeProvider.register(i,e)}function GDe(i,e){return Xt.get(yt).definitionProvider.register(i,e)}function KDe(i,e){return Xt.get(yt).implementationProvider.register(i,e)}function YDe(i,e){return Xt.get(yt).typeDefinitionProvider.register(i,e)}function ZDe(i,e){return Xt.get(yt).codeLensProvider.register(i,e)}function XDe(i,e,t){return Xt.get(yt).codeActionProvider.register(i,{providedCodeActionKinds:t==null?void 0:t.providedCodeActionKinds,provideCodeActions:(r,s,o,a)=>{const c=Xt.get(Id).read({resource:r.uri}).filter(u=>H.areIntersectingOrTouching(u,s));return e.provideCodeActions(r,s,{markers:c,only:o.only},a)},resolveCodeAction:e.resolveCodeAction})}function QDe(i,e){return Xt.get(yt).documentFormattingEditProvider.register(i,e)}function JDe(i,e){return Xt.get(yt).documentRangeFormattingEditProvider.register(i,e)}function e9e(i,e){return Xt.get(yt).onTypeFormattingEditProvider.register(i,e)}function t9e(i,e){return Xt.get(yt).linkProvider.register(i,e)}function n9e(i,e){return Xt.get(yt).completionProvider.register(i,e)}function i9e(i,e){return Xt.get(yt).colorProvider.register(i,e)}function r9e(i,e){return Xt.get(yt).foldingRangeProvider.register(i,e)}function s9e(i,e){return Xt.get(yt).declarationProvider.register(i,e)}function o9e(i,e){return Xt.get(yt).selectionRangeProvider.register(i,e)}function a9e(i,e){return Xt.get(yt).documentSemanticTokensProvider.register(i,e)}function l9e(i,e){return Xt.get(yt).documentRangeSemanticTokensProvider.register(i,e)}function c9e(i,e){return Xt.get(yt).inlineCompletionsProvider.register(i,e)}function u9e(i,e){return Xt.get(yt).inlayHintsProvider.register(i,e)}function d9e(){return{register:IDe,getLanguages:DDe,onLanguage:ADe,getEncodedLanguageId:NDe,setLanguageConfiguration:RDe,setColorMap:FDe,registerTokensProviderFactory:nN,setTokensProvider:BDe,setMonarchTokensProvider:VDe,registerReferenceProvider:WDe,registerRenameProvider:HDe,registerCompletionItemProvider:n9e,registerSignatureHelpProvider:zDe,registerHoverProvider:$De,registerDocumentSymbolProvider:UDe,registerDocumentHighlightProvider:jDe,registerLinkedEditingRangeProvider:qDe,registerDefinitionProvider:GDe,registerImplementationProvider:KDe,registerTypeDefinitionProvider:YDe,registerCodeLensProvider:ZDe,registerCodeActionProvider:XDe,registerDocumentFormattingEditProvider:QDe,registerDocumentRangeFormattingEditProvider:JDe,registerOnTypeFormattingEditProvider:e9e,registerLinkProvider:t9e,registerColorProvider:i9e,registerFoldingRangeProvider:r9e,registerDeclarationProvider:s9e,registerSelectionRangeProvider:o9e,registerDocumentSemanticTokensProvider:a9e,registerDocumentRangeSemanticTokensProvider:l9e,registerInlineCompletionsProvider:c9e,registerInlayHintsProvider:u9e,DocumentHighlightKind:eT,CompletionItemKind:K8,CompletionItemTag:Y8,CompletionItemInsertTextRule:G8,SymbolKind:ST,SymbolTag:kT,IndentAction:sT,CompletionTriggerKind:Z8,SignatureHelpTriggerKind:yT,InlayHintKind:aT,InlineCompletionTriggerKind:lT,FoldingRangeKind:sc}}const iN=Ln("IEditorCancelService"),BY=new mt("cancellableOperation",!1,C("cancellableOperation","Whether the editor runs a cancellable operation, e.g. like 'Peek References'"));On(iN,class{constructor(){this._tokens=new WeakMap}add(i,e){let t=this._tokens.get(i);t||(t=i.invokeWithinContext(r=>{const s=BY.bindTo(r.get(Yt)),o=new la;return{key:s,tokens:o}}),this._tokens.set(i,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(i){const e=this._tokens.get(i);if(!e)return;const t=e.tokens.pop();t&&(t.cancel(),e.key.set(!e.tokens.isEmpty()))}},!0);class h9e extends rs{constructor(e,t){super(t),this.editor=e,this._unregister=e.invokeWithinContext(n=>n.get(iN).add(e,this))}dispose(){this._unregister(),super.dispose()}}st(new class extends as{constructor(){super({id:"editor.cancelOperation",kbOpts:{weight:100,primary:9},precondition:BY})}runEditorCommand(i,e){i.get(iN).cancel(e)}});let d3=class{constructor(e,t){if(this.flags=t,this.flags&1){const n=e.getModel();this.modelVersionId=n?Ha("{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 d3))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 d3(e,this.flags))}};class Cw extends h9e{constructor(e,t,n,r){super(e,r),this._listener=new Je,t&4&&this._listener.add(e.onDidChangeCursorPosition(s=>{(!n||!H.containsPosition(n,s.position))&&this.cancel()})),t&2&&this._listener.add(e.onDidChangeCursorSelection(s=>{(!n||!H.containsRange(n,s.selection))&&this.cancel()})),t&8&&this._listener.add(e.onDidScrollChange(s=>this.cancel())),t&1&&(this._listener.add(e.onDidChangeModel(s=>this.cancel())),this._listener.add(e.onDidChangeModelContent(s=>this.cancel())))}dispose(){this._listener.dispose(),super.dispose()}}class rN extends rs{constructor(e,t){super(t),this._listener=e.onDidChangeContent(()=>this.cancel())}dispose(){this._listener.dispose(),super.dispose()}}function Rd(i){return i&&typeof i.getEditorType=="function"?i.getEditorType()===xb.ICodeEditor:!1}function VY(i){return i&&typeof i.getEditorType=="function"?i.getEditorType()===xb.IDiffEditor:!1}function WY(i){return Rd(i)?i:VY(i)?i.getModifiedEditor():null}class L1{static _handleEolEdits(e,t){let n,r=[];for(let s of t)typeof s.eol=="number"&&(n=s.eol),s.range&&typeof s.text=="string"&&r.push(s);return typeof n=="number"&&e.hasModel()&&e.getModel().pushEOL(n),r}static _isFullModelReplaceEdit(e,t){if(!e.hasModel())return!1;const n=e.getModel(),r=n.validateRange(t.range);return n.getFullModelRange().equalsRange(r)}static execute(e,t,n){n&&e.pushUndoStop();const r=L1._handleEolEdits(e,t);r.length===1&&L1._isFullModelReplaceEdit(e,r[0])?e.executeEdits("formatEditsCommand",r.map(s=>ji.replace(H.lift(s.range),s.text))):e.executeEdits("formatEditsCommand",r.map(s=>ji.replaceMove(H.lift(s.range),s.text))),n&&e.pushUndoStop()}}class sN{constructor(e){this.value=e,this._lower=e.toLowerCase()}static toKey(e){return typeof e=="string"?e.toLowerCase():e._lower}}var wc=globalThis&&globalThis.__awaiter||function(i,e,t,n){function r(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(u){try{c(n.next(u))}catch(d){o(d)}}function l(u){try{c(n.throw(u))}catch(d){o(d)}}function c(u){u.done?s(u.value):r(u.value).then(a,l)}c((n=n.apply(i,e||[])).next())})};function oN(i){if(i=i.filter(r=>r.range),!i.length)return;let{range:e}=i[0];for(let r=1;r0&&H.areIntersectingOrTouching(l[c-1],g)?l[c-1]=H.fromPositions(l[c-1].getStartPosition(),g.getEndPosition()):c=l.push(g);const u=g=>wc(this,void 0,void 0,function*(){return(yield e.provideDocumentRangeFormattingEdits(o,g,o.getFormattingOptions(),a.token))||[]}),d=(g,p)=>{if(!g.length||!p.length)return!1;const m=g.reduce((_,b)=>H.plusRange(_,b.range),g[0].range);if(!p.some(_=>H.intersectRanges(m,_.range)))return!1;for(let _ of g)for(let b of p)if(H.intersectRanges(_.range,b.range))return!0;return!1},h=[],f=[];try{for(let g of l){if(a.token.isCancellationRequested)return!0;f.push(yield u(g))}for(let g=0;g({text:m.text,range:H.lift(m.range),forceMoveMarkers:!0})),m=>{for(const{range:_}of m)if(H.areIntersectingOrTouching(_,p))return[new ut(_.startLineNumber,_.startColumn,_.endLineNumber,_.endColumn)];return null})}return!0})}function g9e(i,e,t,n,r){return wc(this,void 0,void 0,function*(){const s=i.get(_n),o=i.get(yt),a=Rd(e)?e.getModel():e,l=HY(o.documentFormattingEditProvider,o.documentRangeFormattingEditProvider,a),c=yield Vp.select(l,a,t);c&&(n.report(c),yield s.invokeFunction(p9e,c,e,t,r))})}function p9e(i,e,t,n,r){return wc(this,void 0,void 0,function*(){const s=i.get(tl);let o,a;Rd(t)?(o=t.getModel(),a=new Cw(t,5,void 0,r)):(o=t,a=new rN(t,r));let l;try{const c=yield e.provideDocumentFormattingEdits(o,o.getFormattingOptions(),a.token);if(l=yield s.computeMoreMinimalEdits(o.uri,c),a.token.isCancellationRequested)return!0}finally{a.dispose()}if(!l||l.length===0)return!1;if(Rd(t))L1.execute(t,l,n!==2),n!==2&&(oN(l),t.revealPositionInCenterIfOutsideViewport(t.getPosition(),1));else{const[{range:c}]=l,u=new ut(c.startLineNumber,c.startColumn,c.endLineNumber,c.endColumn);o.pushEditOperations([u],l.map(d=>({text:d.text,range:H.lift(d.range),forceMoveMarkers:!0})),d=>{for(const{range:h}of d)if(H.areIntersectingOrTouching(h,u))return[new ut(h.startLineNumber,h.startColumn,h.endLineNumber,h.endColumn)];return null})}return!0})}function m9e(i,e,t,n,r,s){return wc(this,void 0,void 0,function*(){const o=e.documentRangeFormattingEditProvider.ordered(t);for(const a of o){let l=yield Promise.resolve(a.provideDocumentRangeFormattingEdits(t,n,r,s)).catch(Or);if(Mo(l))return yield i.computeMoreMinimalEdits(t.uri,l)}})}function _9e(i,e,t,n,r){return wc(this,void 0,void 0,function*(){const s=HY(e.documentFormattingEditProvider,e.documentRangeFormattingEditProvider,t);for(const o of s){let a=yield Promise.resolve(o.provideDocumentFormattingEdits(t,n,r)).catch(Or);if(Mo(a))return yield i.computeMoreMinimalEdits(t.uri,a)}})}function $Y(i,e,t,n,r,s,o){const a=e.onTypeFormattingEditProvider.ordered(t);return a.length===0||a[0].autoFormatTriggerCharacters.indexOf(r)<0?Promise.resolve(void 0):Promise.resolve(a[0].provideOnTypeFormattingEdits(t,n,r,s,o)).catch(Or).then(l=>i.computeMoreMinimalEdits(t.uri,l))}An.registerCommand("_executeFormatRangeProvider",function(i,...e){return wc(this,void 0,void 0,function*(){const[t,n,r]=e;ci(Pt.isUri(t)),ci(H.isIRange(n));const s=i.get(mo),o=i.get(tl),a=i.get(yt),l=yield s.createModelReference(t);try{return m9e(o,a,l.object.textEditorModel,H.lift(n),r,mn.None)}finally{l.dispose()}})}),An.registerCommand("_executeFormatDocumentProvider",function(i,...e){return wc(this,void 0,void 0,function*(){const[t,n]=e;ci(Pt.isUri(t));const r=i.get(mo),s=i.get(tl),o=i.get(yt),a=yield r.createModelReference(t);try{return _9e(s,o,a.object.textEditorModel,n,mn.None)}finally{a.dispose()}})}),An.registerCommand("_executeFormatOnTypeProvider",function(i,...e){return wc(this,void 0,void 0,function*(){const[t,n,r,s]=e;ci(Pt.isUri(t)),ci(ye.isIPosition(n)),ci(typeof r=="string");const o=i.get(mo),a=i.get(tl),l=i.get(yt),c=yield o.createModelReference(t);try{return $Y(a,l,c.object.textEditorModel,ye.lift(n),r,s,mn.None)}finally{c.dispose()}})});var aN;nc.wrappingIndent.defaultValue=0,nc.glyphMargin.defaultValue=!1,nc.autoIndent.defaultValue=3,nc.overviewRulerLanes.defaultValue=2,Vp.setFormatterSelector((i,e,t)=>Promise.resolve(i[0]));const Js=Nz();Js.editor=yDe(),Js.languages=d9e();const b9e=Js.CancellationTokenSource,v9e=Js.Emitter,h3=Js.KeyCode,f3=Js.KeyMod,w9e=Js.Position,C9e=Js.Range,y9e=Js.Selection,S9e=Js.SelectionDirection,k9e=Js.MarkerSeverity,E9e=Js.MarkerTag,UY=Js.Uri,x9e=Js.Token,yw=Js.editor,jY=Js.languages;(!((aN=Ki.MonacoEnvironment)===null||aN===void 0)&&aN.globalAPI||typeof define=="function"&&define.amd)&&(self.monaco=Js),typeof self.require<"u"&&typeof self.require.config=="function"&&self.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 eo=Object.freeze(Object.defineProperty({__proto__:null,CancellationTokenSource:b9e,Emitter:v9e,KeyCode:h3,KeyMod:f3,Position:w9e,Range:C9e,Selection:y9e,SelectionDirection:S9e,MarkerSeverity:k9e,MarkerTag:E9e,Uri:UY,Token:x9e,editor:yw,languages:jY},Symbol.toStringTag,{value:"Module"}));function L9e(i,e,t,n,r){return{model:i,value:e,language:t,automaticLayout:n,readOnly:!1,fixedOverflowWidgets:r,autoDetectHighContrast:!0,lineDecorationsWidth:15,lineNumbersMinChars:2,scrollbar:{alwaysConsumeMouseWheel:!1},folding:!1,scrollBeyondLastLine:!1,minimap:{enabled:!1},lightbulb:{enabled:!0},suggest:{showKeywords:!1},"bracketPairColorization.enabled":!0,matchBrackets:"always"}}function T9e(){return(Math.random()+1).toString(36).substring(2)}function I9e(i){switch(i){case"javascript":return"js";case"json":return"json";case"sql":return"sql";case"yaml":return"yaml";case"typescript":return"ts";case"python":return"py";case"go":return"go";case"bash":return"sh";default:return"unknown"}}const D9e={tabSize:2,insertSpaces:!0};/*!----------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Version: 0.33.0(4b1abad427e58dbedc1215d99a0902ffc885fcd4) + * Released under the MIT license + * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt + *-----------------------------------------------------------------------------*/var N9e=Object.defineProperty,A9e=Object.getOwnPropertyDescriptor,R9e=Object.getOwnPropertyNames,O9e=Object.prototype.hasOwnProperty,M9e=(i,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of R9e(e))!O9e.call(i,r)&&(t||r!=="default")&&N9e(i,r,{get:()=>e[r],enumerable:!(n=A9e(e,r))||n.enumerable});return i},Sw={};M9e(Sw,eo);var qY={},lN={},GY=class{constructor(i){Dt(this,"_languageId");Dt(this,"_loadingTriggered");Dt(this,"_lazyLoadPromise");Dt(this,"_lazyLoadPromiseResolve");Dt(this,"_lazyLoadPromiseReject");this._languageId=i,this._loadingTriggered=!1,this._lazyLoadPromise=new Promise((e,t)=>{this._lazyLoadPromiseResolve=e,this._lazyLoadPromiseReject=t})}static getOrCreate(i){return lN[i]||(lN[i]=new GY(i)),lN[i]}load(){return this._loadingTriggered||(this._loadingTriggered=!0,qY[this._languageId].loader().then(i=>this._lazyLoadPromiseResolve(i),i=>this._lazyLoadPromiseReject(i))),this._lazyLoadPromise}};function Tt(i){const e=i.id;qY[e]=i,Sw.languages.register(i);const t=GY.getOrCreate(e);Sw.languages.registerTokensProviderFactory(e,{create:async()=>(await t.load()).language}),Sw.languages.onLanguage(e,async()=>{const n=await t.load();Sw.languages.setLanguageConfiguration(e,n.conf)})}/*!----------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Version: 0.33.0(4b1abad427e58dbedc1215d99a0902ffc885fcd4) + * Released under the MIT license + * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt + *-----------------------------------------------------------------------------*/Tt({id:"abap",extensions:[".abap"],aliases:["abap","ABAP"],loader:()=>Promise.resolve().then(()=>bat)});/*!----------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Version: 0.33.0(4b1abad427e58dbedc1215d99a0902ffc885fcd4) + * Released under the MIT license + * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt + *-----------------------------------------------------------------------------*/Tt({id:"apex",extensions:[".cls"],aliases:["Apex","apex"],mimetypes:["text/x-apex-source","text/x-apex"],loader:()=>Promise.resolve().then(()=>Sat)});/*!----------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Version: 0.33.0(4b1abad427e58dbedc1215d99a0902ffc885fcd4) + * Released under the MIT license + * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt + *-----------------------------------------------------------------------------*/Tt({id:"azcli",extensions:[".azcli"],aliases:["Azure CLI","azcli"],loader:()=>Promise.resolve().then(()=>xat)});/*!----------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Version: 0.33.0(4b1abad427e58dbedc1215d99a0902ffc885fcd4) + * Released under the MIT license + * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt + *-----------------------------------------------------------------------------*/Tt({id:"bat",extensions:[".bat",".cmd"],aliases:["Batch","bat"],loader:()=>Promise.resolve().then(()=>Iat)});/*!----------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Version: 0.33.0(4b1abad427e58dbedc1215d99a0902ffc885fcd4) + * Released under the MIT license + * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt + *-----------------------------------------------------------------------------*/Tt({id:"bicep",extensions:[".bicep"],aliases:["Bicep"],loader:()=>Promise.resolve().then(()=>Wat)});/*!----------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Version: 0.33.0(4b1abad427e58dbedc1215d99a0902ffc885fcd4) + * Released under the MIT license + * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt + *-----------------------------------------------------------------------------*/Tt({id:"cameligo",extensions:[".mligo"],aliases:["Cameligo"],loader:()=>Promise.resolve().then(()=>$at)});/*!----------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Version: 0.33.0(4b1abad427e58dbedc1215d99a0902ffc885fcd4) + * Released under the MIT license + * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt + *-----------------------------------------------------------------------------*/Tt({id:"clojure",extensions:[".clj",".cljs",".cljc",".edn"],aliases:["clojure","Clojure"],loader:()=>Promise.resolve().then(()=>qat)});/*!----------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Version: 0.33.0(4b1abad427e58dbedc1215d99a0902ffc885fcd4) + * Released under the MIT license + * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt + *-----------------------------------------------------------------------------*/Tt({id:"coffeescript",extensions:[".coffee"],aliases:["CoffeeScript","coffeescript","coffee"],mimetypes:["text/x-coffeescript","text/coffeescript"],loader:()=>Promise.resolve().then(()=>Yat)});/*!----------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Version: 0.33.0(4b1abad427e58dbedc1215d99a0902ffc885fcd4) + * Released under the MIT license + * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt + *-----------------------------------------------------------------------------*/Tt({id:"c",extensions:[".c",".h"],aliases:["C","c"],loader:()=>Promise.resolve().then(()=>rae)}),Tt({id:"cpp",extensions:[".cpp",".cc",".cxx",".hpp",".hh",".hxx"],aliases:["C++","Cpp","cpp"],loader:()=>Promise.resolve().then(()=>rae)});/*!----------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Version: 0.33.0(4b1abad427e58dbedc1215d99a0902ffc885fcd4) + * Released under the MIT license + * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt + *-----------------------------------------------------------------------------*/Tt({id:"csharp",extensions:[".cs",".csx",".cake"],aliases:["C#","csharp"],loader:()=>Promise.resolve().then(()=>elt)});/*!----------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Version: 0.33.0(4b1abad427e58dbedc1215d99a0902ffc885fcd4) + * Released under the MIT license + * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt + *-----------------------------------------------------------------------------*/Tt({id:"csp",extensions:[],aliases:["CSP","csp"],loader:()=>Promise.resolve().then(()=>ilt)});/*!----------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Version: 0.33.0(4b1abad427e58dbedc1215d99a0902ffc885fcd4) + * Released under the MIT license + * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt + *-----------------------------------------------------------------------------*/Tt({id:"css",extensions:[".css"],aliases:["CSS","css"],mimetypes:["text/css"],loader:()=>Promise.resolve().then(()=>olt)});/*!----------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Version: 0.33.0(4b1abad427e58dbedc1215d99a0902ffc885fcd4) + * Released under the MIT license + * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt + *-----------------------------------------------------------------------------*/Tt({id:"dart",extensions:[".dart"],aliases:["Dart","dart"],mimetypes:["text/x-dart-source","text/x-dart"],loader:()=>Promise.resolve().then(()=>clt)});/*!----------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Version: 0.33.0(4b1abad427e58dbedc1215d99a0902ffc885fcd4) + * Released under the MIT license + * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt + *-----------------------------------------------------------------------------*/Tt({id:"dockerfile",extensions:[".dockerfile"],filenames:["Dockerfile"],aliases:["Dockerfile"],loader:()=>Promise.resolve().then(()=>hlt)});/*!----------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Version: 0.33.0(4b1abad427e58dbedc1215d99a0902ffc885fcd4) + * Released under the MIT license + * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt + *-----------------------------------------------------------------------------*/Tt({id:"ecl",extensions:[".ecl"],aliases:["ECL","Ecl","ecl"],loader:()=>Promise.resolve().then(()=>plt)});/*!----------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Version: 0.33.0(4b1abad427e58dbedc1215d99a0902ffc885fcd4) + * Released under the MIT license + * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt + *-----------------------------------------------------------------------------*/Tt({id:"elixir",extensions:[".ex",".exs"],aliases:["Elixir","elixir","ex"],loader:()=>Promise.resolve().then(()=>blt)});/*!----------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Version: 0.33.0(4b1abad427e58dbedc1215d99a0902ffc885fcd4) + * Released under the MIT license + * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt + *-----------------------------------------------------------------------------*/Tt({id:"flow9",extensions:[".flow"],aliases:["Flow9","Flow","flow9","flow"],loader:()=>Promise.resolve().then(()=>Clt)});/*!----------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Version: 0.33.0(4b1abad427e58dbedc1215d99a0902ffc885fcd4) + * Released under the MIT license + * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt + *-----------------------------------------------------------------------------*/Tt({id:"fsharp",extensions:[".fs",".fsi",".ml",".mli",".fsx",".fsscript"],aliases:["F#","FSharp","fsharp"],loader:()=>Promise.resolve().then(()=>klt)});/*!----------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Version: 0.33.0(4b1abad427e58dbedc1215d99a0902ffc885fcd4) + * Released under the MIT license + * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt + *-----------------------------------------------------------------------------*/Tt({id:"freemarker2",extensions:[".ftl",".ftlh",".ftlx"],aliases:["FreeMarker2","Apache FreeMarker2"],loader:()=>Promise.resolve().then(()=>Bm).then(i=>i.TagAutoInterpolationDollar)}),Tt({id:"freemarker2.tag-angle.interpolation-dollar",aliases:["FreeMarker2 (Angle/Dollar)","Apache FreeMarker2 (Angle/Dollar)"],loader:()=>Promise.resolve().then(()=>Bm).then(i=>i.TagAngleInterpolationDollar)}),Tt({id:"freemarker2.tag-bracket.interpolation-dollar",aliases:["FreeMarker2 (Bracket/Dollar)","Apache FreeMarker2 (Bracket/Dollar)"],loader:()=>Promise.resolve().then(()=>Bm).then(i=>i.TagBracketInterpolationDollar)}),Tt({id:"freemarker2.tag-angle.interpolation-bracket",aliases:["FreeMarker2 (Angle/Bracket)","Apache FreeMarker2 (Angle/Bracket)"],loader:()=>Promise.resolve().then(()=>Bm).then(i=>i.TagAngleInterpolationBracket)}),Tt({id:"freemarker2.tag-bracket.interpolation-bracket",aliases:["FreeMarker2 (Bracket/Bracket)","Apache FreeMarker2 (Bracket/Bracket)"],loader:()=>Promise.resolve().then(()=>Bm).then(i=>i.TagBracketInterpolationBracket)}),Tt({id:"freemarker2.tag-auto.interpolation-dollar",aliases:["FreeMarker2 (Auto/Dollar)","Apache FreeMarker2 (Auto/Dollar)"],loader:()=>Promise.resolve().then(()=>Bm).then(i=>i.TagAutoInterpolationDollar)}),Tt({id:"freemarker2.tag-auto.interpolation-bracket",aliases:["FreeMarker2 (Auto/Bracket)","Apache FreeMarker2 (Auto/Bracket)"],loader:()=>Promise.resolve().then(()=>Bm).then(i=>i.TagAutoInterpolationBracket)});/*!----------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Version: 0.33.0(4b1abad427e58dbedc1215d99a0902ffc885fcd4) + * Released under the MIT license + * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt + *-----------------------------------------------------------------------------*/Tt({id:"go",extensions:[".go"],aliases:["Go"],loader:()=>Promise.resolve().then(()=>Vlt)});/*!----------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Version: 0.33.0(4b1abad427e58dbedc1215d99a0902ffc885fcd4) + * Released under the MIT license + * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt + *-----------------------------------------------------------------------------*/Tt({id:"graphql",extensions:[".graphql",".gql"],aliases:["GraphQL","graphql","gql"],mimetypes:["application/graphql"],loader:()=>Promise.resolve().then(()=>zlt)});/*!----------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Version: 0.33.0(4b1abad427e58dbedc1215d99a0902ffc885fcd4) + * Released under the MIT license + * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt + *-----------------------------------------------------------------------------*/Tt({id:"handlebars",extensions:[".handlebars",".hbs"],aliases:["Handlebars","handlebars","hbs"],mimetypes:["text/x-handlebars-template"],loader:()=>Promise.resolve().then(()=>Zlt)});/*!----------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Version: 0.33.0(4b1abad427e58dbedc1215d99a0902ffc885fcd4) + * Released under the MIT license + * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt + *-----------------------------------------------------------------------------*/Tt({id:"hcl",extensions:[".tf",".tfvars",".hcl"],aliases:["Terraform","tf","HCL","hcl"],loader:()=>Promise.resolve().then(()=>Jlt)});/*!----------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Version: 0.33.0(4b1abad427e58dbedc1215d99a0902ffc885fcd4) + * Released under the MIT license + * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt + *-----------------------------------------------------------------------------*/Tt({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:()=>Promise.resolve().then(()=>act)});/*!----------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Version: 0.33.0(4b1abad427e58dbedc1215d99a0902ffc885fcd4) + * Released under the MIT license + * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt + *-----------------------------------------------------------------------------*/Tt({id:"ini",extensions:[".ini",".properties",".gitconfig"],filenames:["config",".gitattributes",".gitconfig",".editorconfig"],aliases:["Ini","ini"],loader:()=>Promise.resolve().then(()=>uct)});/*!----------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Version: 0.33.0(4b1abad427e58dbedc1215d99a0902ffc885fcd4) + * Released under the MIT license + * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt + *-----------------------------------------------------------------------------*/Tt({id:"java",extensions:[".java",".jav"],aliases:["Java","java"],mimetypes:["text/x-java-source","text/x-java"],loader:()=>Promise.resolve().then(()=>fct)});/*!----------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Version: 0.33.0(4b1abad427e58dbedc1215d99a0902ffc885fcd4) + * Released under the MIT license + * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt + *-----------------------------------------------------------------------------*/Tt({id:"javascript",extensions:[".js",".es6",".jsx",".mjs",".cjs"],firstLine:"^#!.*\\bnode",filenames:["jakefile"],aliases:["JavaScript","javascript","js"],mimetypes:["text/javascript"],loader:()=>Promise.resolve().then(()=>yct)});/*!----------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Version: 0.33.0(4b1abad427e58dbedc1215d99a0902ffc885fcd4) + * Released under the MIT license + * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt + *-----------------------------------------------------------------------------*/Tt({id:"julia",extensions:[".jl"],aliases:["julia","Julia"],loader:()=>Promise.resolve().then(()=>Ect)});/*!----------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Version: 0.33.0(4b1abad427e58dbedc1215d99a0902ffc885fcd4) + * Released under the MIT license + * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt + *-----------------------------------------------------------------------------*/Tt({id:"kotlin",extensions:[".kt"],aliases:["Kotlin","kotlin"],mimetypes:["text/x-kotlin-source","text/x-kotlin"],loader:()=>Promise.resolve().then(()=>Tct)});/*!----------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Version: 0.33.0(4b1abad427e58dbedc1215d99a0902ffc885fcd4) + * Released under the MIT license + * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt + *-----------------------------------------------------------------------------*/Tt({id:"less",extensions:[".less"],aliases:["Less","less"],mimetypes:["text/x-less","text/less"],loader:()=>Promise.resolve().then(()=>Nct)});/*!----------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Version: 0.33.0(4b1abad427e58dbedc1215d99a0902ffc885fcd4) + * Released under the MIT license + * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt + *-----------------------------------------------------------------------------*/Tt({id:"lexon",extensions:[".lex"],aliases:["Lexon"],loader:()=>Promise.resolve().then(()=>Oct)});/*!----------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Version: 0.33.0(4b1abad427e58dbedc1215d99a0902ffc885fcd4) + * Released under the MIT license + * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt + *-----------------------------------------------------------------------------*/Tt({id:"lua",extensions:[".lua"],aliases:["Lua","lua"],loader:()=>Promise.resolve().then(()=>Fct)});/*!----------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Version: 0.33.0(4b1abad427e58dbedc1215d99a0902ffc885fcd4) + * Released under the MIT license + * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt + *-----------------------------------------------------------------------------*/Tt({id:"liquid",extensions:[".liquid",".html.liquid"],aliases:["Liquid","liquid"],mimetypes:["application/liquid"],loader:()=>Promise.resolve().then(()=>jct)});/*!----------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Version: 0.33.0(4b1abad427e58dbedc1215d99a0902ffc885fcd4) + * Released under the MIT license + * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt + *-----------------------------------------------------------------------------*/Tt({id:"m3",extensions:[".m3",".i3",".mg",".ig"],aliases:["Modula-3","Modula3","modula3","m3"],loader:()=>Promise.resolve().then(()=>Kct)});/*!----------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Version: 0.33.0(4b1abad427e58dbedc1215d99a0902ffc885fcd4) + * Released under the MIT license + * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt + *-----------------------------------------------------------------------------*/Tt({id:"markdown",extensions:[".md",".markdown",".mdown",".mkdn",".mkd",".mdwn",".mdtxt",".mdtext"],aliases:["Markdown","markdown"],loader:()=>Promise.resolve().then(()=>Xct)});/*!----------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Version: 0.33.0(4b1abad427e58dbedc1215d99a0902ffc885fcd4) + * Released under the MIT license + * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt + *-----------------------------------------------------------------------------*/Tt({id:"mips",extensions:[".s"],aliases:["MIPS","MIPS-V"],mimetypes:["text/x-mips","text/mips","text/plaintext"],loader:()=>Promise.resolve().then(()=>eut)});/*!----------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Version: 0.33.0(4b1abad427e58dbedc1215d99a0902ffc885fcd4) + * Released under the MIT license + * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt + *-----------------------------------------------------------------------------*/Tt({id:"msdax",extensions:[".dax",".msdax"],aliases:["DAX","MSDAX"],loader:()=>Promise.resolve().then(()=>iut)});/*!----------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Version: 0.33.0(4b1abad427e58dbedc1215d99a0902ffc885fcd4) + * Released under the MIT license + * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt + *-----------------------------------------------------------------------------*/Tt({id:"mysql",extensions:[],aliases:["MySQL","mysql"],loader:()=>Promise.resolve().then(()=>out)});/*!----------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Version: 0.33.0(4b1abad427e58dbedc1215d99a0902ffc885fcd4) + * Released under the MIT license + * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt + *-----------------------------------------------------------------------------*/Tt({id:"objective-c",extensions:[".m"],aliases:["Objective-C"],loader:()=>Promise.resolve().then(()=>cut)});/*!----------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Version: 0.33.0(4b1abad427e58dbedc1215d99a0902ffc885fcd4) + * Released under the MIT license + * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt + *-----------------------------------------------------------------------------*/Tt({id:"pascal",extensions:[".pas",".p",".pp"],aliases:["Pascal","pas"],mimetypes:["text/x-pascal-source","text/x-pascal"],loader:()=>Promise.resolve().then(()=>hut)});/*!----------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Version: 0.33.0(4b1abad427e58dbedc1215d99a0902ffc885fcd4) + * Released under the MIT license + * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt + *-----------------------------------------------------------------------------*/Tt({id:"pascaligo",extensions:[".ligo"],aliases:["Pascaligo","ligo"],loader:()=>Promise.resolve().then(()=>put)});/*!----------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Version: 0.33.0(4b1abad427e58dbedc1215d99a0902ffc885fcd4) + * Released under the MIT license + * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt + *-----------------------------------------------------------------------------*/Tt({id:"perl",extensions:[".pl"],aliases:["Perl","pl"],loader:()=>Promise.resolve().then(()=>but)});/*!----------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Version: 0.33.0(4b1abad427e58dbedc1215d99a0902ffc885fcd4) + * Released under the MIT license + * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt + *-----------------------------------------------------------------------------*/Tt({id:"pgsql",extensions:[],aliases:["PostgreSQL","postgres","pg","postgre"],loader:()=>Promise.resolve().then(()=>Cut)});/*!----------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Version: 0.33.0(4b1abad427e58dbedc1215d99a0902ffc885fcd4) + * Released under the MIT license + * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt + *-----------------------------------------------------------------------------*/Tt({id:"php",extensions:[".php",".php4",".php5",".phtml",".ctp"],aliases:["PHP","php"],mimetypes:["application/x-php"],loader:()=>Promise.resolve().then(()=>kut)});/*!----------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Version: 0.33.0(4b1abad427e58dbedc1215d99a0902ffc885fcd4) + * Released under the MIT license + * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt + *-----------------------------------------------------------------------------*/Tt({id:"pla",extensions:[".pla"],loader:()=>Promise.resolve().then(()=>Lut)});/*!----------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Version: 0.33.0(4b1abad427e58dbedc1215d99a0902ffc885fcd4) + * Released under the MIT license + * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt + *-----------------------------------------------------------------------------*/Tt({id:"postiats",extensions:[".dats",".sats",".hats"],aliases:["ATS","ATS/Postiats"],loader:()=>Promise.resolve().then(()=>Dut)});/*!----------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Version: 0.33.0(4b1abad427e58dbedc1215d99a0902ffc885fcd4) + * Released under the MIT license + * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt + *-----------------------------------------------------------------------------*/Tt({id:"powerquery",extensions:[".pq",".pqm"],aliases:["PQ","M","Power Query","Power Query M"],loader:()=>Promise.resolve().then(()=>Rut)});/*!----------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Version: 0.33.0(4b1abad427e58dbedc1215d99a0902ffc885fcd4) + * Released under the MIT license + * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt + *-----------------------------------------------------------------------------*/Tt({id:"powershell",extensions:[".ps1",".psm1",".psd1"],aliases:["PowerShell","powershell","ps","ps1"],loader:()=>Promise.resolve().then(()=>Put)});/*!----------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Version: 0.33.0(4b1abad427e58dbedc1215d99a0902ffc885fcd4) + * Released under the MIT license + * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt + *-----------------------------------------------------------------------------*/Tt({id:"proto",extensions:[".proto"],aliases:["protobuf","Protocol Buffers"],loader:()=>Promise.resolve().then(()=>Wut)});/*!----------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Version: 0.33.0(4b1abad427e58dbedc1215d99a0902ffc885fcd4) + * Released under the MIT license + * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt + *-----------------------------------------------------------------------------*/Tt({id:"pug",extensions:[".jade",".pug"],aliases:["Pug","Jade","jade"],loader:()=>Promise.resolve().then(()=>$ut)});/*!----------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Version: 0.33.0(4b1abad427e58dbedc1215d99a0902ffc885fcd4) + * Released under the MIT license + * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt + *-----------------------------------------------------------------------------*/Tt({id:"python",extensions:[".py",".rpy",".pyw",".cpy",".gyp",".gypi"],aliases:["Python","py"],firstLine:"^#!/.*\\bpython[0-9.-]*\\b",loader:()=>Promise.resolve().then(()=>Xut)});/*!----------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Version: 0.33.0(4b1abad427e58dbedc1215d99a0902ffc885fcd4) + * Released under the MIT license + * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt + *-----------------------------------------------------------------------------*/Tt({id:"qsharp",extensions:[".qs"],aliases:["Q#","qsharp"],loader:()=>Promise.resolve().then(()=>edt)});/*!----------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Version: 0.33.0(4b1abad427e58dbedc1215d99a0902ffc885fcd4) + * Released under the MIT license + * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt + *-----------------------------------------------------------------------------*/Tt({id:"r",extensions:[".r",".rhistory",".rmd",".rprofile",".rt"],aliases:["R","r"],loader:()=>Promise.resolve().then(()=>idt)});/*!----------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Version: 0.33.0(4b1abad427e58dbedc1215d99a0902ffc885fcd4) + * Released under the MIT license + * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt + *-----------------------------------------------------------------------------*/Tt({id:"razor",extensions:[".cshtml"],aliases:["Razor","razor"],mimetypes:["text/x-cshtml"],loader:()=>Promise.resolve().then(()=>ddt)});/*!----------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Version: 0.33.0(4b1abad427e58dbedc1215d99a0902ffc885fcd4) + * Released under the MIT license + * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt + *-----------------------------------------------------------------------------*/Tt({id:"redis",extensions:[".redis"],aliases:["redis"],loader:()=>Promise.resolve().then(()=>gdt)});/*!----------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Version: 0.33.0(4b1abad427e58dbedc1215d99a0902ffc885fcd4) + * Released under the MIT license + * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt + *-----------------------------------------------------------------------------*/Tt({id:"redshift",extensions:[],aliases:["Redshift","redshift"],loader:()=>Promise.resolve().then(()=>_dt)});/*!----------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Version: 0.33.0(4b1abad427e58dbedc1215d99a0902ffc885fcd4) + * Released under the MIT license + * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt + *-----------------------------------------------------------------------------*/Tt({id:"restructuredtext",extensions:[".rst"],aliases:["reStructuredText","restructuredtext"],loader:()=>Promise.resolve().then(()=>wdt)});/*!----------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Version: 0.33.0(4b1abad427e58dbedc1215d99a0902ffc885fcd4) + * Released under the MIT license + * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt + *-----------------------------------------------------------------------------*/Tt({id:"ruby",extensions:[".rb",".rbx",".rjs",".gemspec",".pp"],filenames:["rakefile","Gemfile"],aliases:["Ruby","rb"],loader:()=>Promise.resolve().then(()=>Sdt)});/*!----------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Version: 0.33.0(4b1abad427e58dbedc1215d99a0902ffc885fcd4) + * Released under the MIT license + * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt + *-----------------------------------------------------------------------------*/Tt({id:"rust",extensions:[".rs",".rlib"],aliases:["Rust","rust"],loader:()=>Promise.resolve().then(()=>xdt)});/*!----------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Version: 0.33.0(4b1abad427e58dbedc1215d99a0902ffc885fcd4) + * Released under the MIT license + * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt + *-----------------------------------------------------------------------------*/Tt({id:"sb",extensions:[".sb"],aliases:["Small Basic","sb"],loader:()=>Promise.resolve().then(()=>Idt)});/*!----------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Version: 0.33.0(4b1abad427e58dbedc1215d99a0902ffc885fcd4) + * Released under the MIT license + * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt + *-----------------------------------------------------------------------------*/Tt({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:()=>Promise.resolve().then(()=>Adt)});/*!----------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Version: 0.33.0(4b1abad427e58dbedc1215d99a0902ffc885fcd4) + * Released under the MIT license + * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt + *-----------------------------------------------------------------------------*/Tt({id:"scheme",extensions:[".scm",".ss",".sch",".rkt"],aliases:["scheme","Scheme"],loader:()=>Promise.resolve().then(()=>Mdt)});/*!----------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Version: 0.33.0(4b1abad427e58dbedc1215d99a0902ffc885fcd4) + * Released under the MIT license + * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt + *-----------------------------------------------------------------------------*/Tt({id:"scss",extensions:[".scss"],aliases:["Sass","sass","scss"],mimetypes:["text/x-scss","text/scss"],loader:()=>Promise.resolve().then(()=>Bdt)});/*!----------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Version: 0.33.0(4b1abad427e58dbedc1215d99a0902ffc885fcd4) + * Released under the MIT license + * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt + *-----------------------------------------------------------------------------*/Tt({id:"shell",extensions:[".sh",".bash"],aliases:["Shell","sh"],loader:()=>Promise.resolve().then(()=>Hdt)});/*!----------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Version: 0.33.0(4b1abad427e58dbedc1215d99a0902ffc885fcd4) + * Released under the MIT license + * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt + *-----------------------------------------------------------------------------*/Tt({id:"sol",extensions:[".sol"],aliases:["sol","solidity","Solidity"],loader:()=>Promise.resolve().then(()=>Udt)});/*!----------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Version: 0.33.0(4b1abad427e58dbedc1215d99a0902ffc885fcd4) + * Released under the MIT license + * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt + *-----------------------------------------------------------------------------*/Tt({id:"aes",extensions:[".aes"],aliases:["aes","sophia","Sophia"],loader:()=>Promise.resolve().then(()=>Gdt)});/*!----------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Version: 0.33.0(4b1abad427e58dbedc1215d99a0902ffc885fcd4) + * Released under the MIT license + * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt + *-----------------------------------------------------------------------------*/Tt({id:"sparql",extensions:[".rq"],aliases:["sparql","SPARQL"],loader:()=>Promise.resolve().then(()=>Zdt)});/*!----------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Version: 0.33.0(4b1abad427e58dbedc1215d99a0902ffc885fcd4) + * Released under the MIT license + * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt + *-----------------------------------------------------------------------------*/Tt({id:"sql",extensions:[".sql"],aliases:["SQL"],loader:()=>Promise.resolve().then(()=>Jdt)});/*!----------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Version: 0.33.0(4b1abad427e58dbedc1215d99a0902ffc885fcd4) + * Released under the MIT license + * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt + *-----------------------------------------------------------------------------*/Tt({id:"st",extensions:[".st",".iecst",".iecplc",".lc3lib"],aliases:["StructuredText","scl","stl"],loader:()=>Promise.resolve().then(()=>nht)});/*!----------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Version: 0.33.0(4b1abad427e58dbedc1215d99a0902ffc885fcd4) + * Released under the MIT license + * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt + *-----------------------------------------------------------------------------*/Tt({id:"swift",aliases:["Swift","swift"],extensions:[".swift"],mimetypes:["text/swift"],loader:()=>Promise.resolve().then(()=>sht)});/*!----------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Version: 0.33.0(4b1abad427e58dbedc1215d99a0902ffc885fcd4) + * Released under the MIT license + * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt + *-----------------------------------------------------------------------------*/Tt({id:"systemverilog",extensions:[".sv",".svh"],aliases:["SV","sv","SystemVerilog","systemverilog"],loader:()=>Promise.resolve().then(()=>fae)}),Tt({id:"verilog",extensions:[".v",".vh"],aliases:["V","v","Verilog","verilog"],loader:()=>Promise.resolve().then(()=>fae)});/*!----------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Version: 0.33.0(4b1abad427e58dbedc1215d99a0902ffc885fcd4) + * Released under the MIT license + * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt + *-----------------------------------------------------------------------------*/Tt({id:"tcl",extensions:[".tcl"],aliases:["tcl","Tcl","tcltk","TclTk","tcl/tk","Tcl/Tk"],loader:()=>Promise.resolve().then(()=>uht)});/*!----------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Version: 0.33.0(4b1abad427e58dbedc1215d99a0902ffc885fcd4) + * Released under the MIT license + * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt + *-----------------------------------------------------------------------------*/Tt({id:"twig",extensions:[".twig"],aliases:["Twig","twig"],mimetypes:["text/x-twig"],loader:()=>Promise.resolve().then(()=>fht)});/*!----------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Version: 0.33.0(4b1abad427e58dbedc1215d99a0902ffc885fcd4) + * Released under the MIT license + * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt + *-----------------------------------------------------------------------------*/Tt({id:"typescript",extensions:[".ts",".tsx"],aliases:["TypeScript","ts","typescript"],mimetypes:["text/typescript"],loader:()=>Promise.resolve().then(()=>vct)});/*!----------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Version: 0.33.0(4b1abad427e58dbedc1215d99a0902ffc885fcd4) + * Released under the MIT license + * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt + *-----------------------------------------------------------------------------*/Tt({id:"vb",extensions:[".vb"],aliases:["Visual Basic","vb"],loader:()=>Promise.resolve().then(()=>mht)});/*!----------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Version: 0.33.0(4b1abad427e58dbedc1215d99a0902ffc885fcd4) + * Released under the MIT license + * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt + *-----------------------------------------------------------------------------*/Tt({id:"xml",extensions:[".xml",".dtd",".ascx",".csproj",".config",".wxi",".wxl",".wxs",".xaml",".svg",".svgz",".opf",".xsl"],firstLine:"(\\<\\?xml.*)|(\\Promise.resolve().then(()=>kht)});/*!----------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Version: 0.33.0(4b1abad427e58dbedc1215d99a0902ffc885fcd4) + * Released under the MIT license + * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt + *-----------------------------------------------------------------------------*/Tt({id:"yaml",extensions:[".yaml",".yml"],aliases:["YAML","yaml","YML","yml"],mimetypes:["application/x-yaml","text/x-yaml"],loader:()=>Promise.resolve().then(()=>Lht)});/*!----------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Version: 0.33.0(4b1abad427e58dbedc1215d99a0902ffc885fcd4) + * Released under the MIT license + * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt + *-----------------------------------------------------------------------------*/var P9e=Object.defineProperty,F9e=Object.getOwnPropertyDescriptor,B9e=Object.getOwnPropertyNames,V9e=Object.prototype.hasOwnProperty,W9e=(i,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of B9e(e))!V9e.call(i,r)&&(t||r!=="default")&&P9e(i,r,{get:()=>e[r],enumerable:!(n=F9e(e,r))||n.enumerable});return i},T1={};W9e(T1,eo);var cN=class{constructor(e,t,n){Dt(this,"_onDidChange",new T1.Emitter);Dt(this,"_options");Dt(this,"_modeConfiguration");Dt(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)}},uN={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}},dN={completionItems:!0,hovers:!0,documentSymbols:!0,definitions:!0,references:!0,documentHighlights:!0,rename:!0,colors:!0,foldingRanges:!0,diagnostics:!0,selectionRanges:!0},KY=new cN("css",uN,dN),YY=new cN("scss",uN,dN),ZY=new cN("less",uN,dN);T1.languages.css={cssDefaults:KY,lessDefaults:ZY,scssDefaults:YY};function hN(){return Promise.resolve().then(()=>Zht)}T1.languages.onLanguage("less",()=>{hN().then(i=>i.setupMode(ZY))}),T1.languages.onLanguage("scss",()=>{hN().then(i=>i.setupMode(YY))}),T1.languages.onLanguage("css",()=>{hN().then(i=>i.setupMode(KY))});/*!----------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Version: 0.33.0(4b1abad427e58dbedc1215d99a0902ffc885fcd4) + * Released under the MIT license + * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt + *-----------------------------------------------------------------------------*/var H9e=Object.defineProperty,z9e=Object.getOwnPropertyDescriptor,$9e=Object.getOwnPropertyNames,U9e=Object.prototype.hasOwnProperty,j9e=(i,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of $9e(e))!U9e.call(i,r)&&(t||r!=="default")&&H9e(i,r,{get:()=>e[r],enumerable:!(n=z9e(e,r))||n.enumerable});return i},g3={};j9e(g3,eo);var q9e=class{constructor(e,t,n){Dt(this,"_onDidChange",new g3.Emitter);Dt(this,"_options");Dt(this,"_modeConfiguration");Dt(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)}},G9e={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"},p3={format:G9e,suggest:{},data:{useDefaultDataProvider:!0}};function m3(i){return{completionItems:!0,hovers:!0,documentSymbols:!0,links:!0,documentHighlights:!0,rename:!0,colors:!0,foldingRanges:!0,selectionRanges:!0,diagnostics:i===kw,documentFormattingEdits:i===kw,documentRangeFormattingEdits:i===kw}}var kw="html",XY="handlebars",QY="razor",JY=_3(kw,p3,m3(kw)),K9e=JY.defaults,eZ=_3(XY,p3,m3(XY)),Y9e=eZ.defaults,tZ=_3(QY,p3,m3(QY)),Z9e=tZ.defaults;g3.languages.html={htmlDefaults:K9e,razorDefaults:Z9e,handlebarDefaults:Y9e,htmlLanguageService:JY,handlebarLanguageService:eZ,razorLanguageService:tZ,registerHTMLLanguageService:_3};function X9e(){return Promise.resolve().then(()=>Cft)}function _3(i,e=p3,t=m3(i)){const n=new q9e(i,e,t);let r;const s=g3.languages.onLanguage(i,async()=>{r=(await X9e()).setupMode(n)});return{defaults:n,dispose(){s.dispose(),r==null||r.dispose(),r=void 0}}}/*!----------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Version: 0.33.0(4b1abad427e58dbedc1215d99a0902ffc885fcd4) + * Released under the MIT license + * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt + *-----------------------------------------------------------------------------*/var Q9e=Object.defineProperty,J9e=Object.getOwnPropertyDescriptor,e7e=Object.getOwnPropertyNames,t7e=Object.prototype.hasOwnProperty,n7e=(i,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of e7e(e))!t7e.call(i,r)&&(t||r!=="default")&&Q9e(i,r,{get:()=>e[r],enumerable:!(n=J9e(e,r))||n.enumerable});return i},Ew={};n7e(Ew,eo);var i7e=class{constructor(e,t,n){Dt(this,"_onDidChange",new Ew.Emitter);Dt(this,"_diagnosticsOptions");Dt(this,"_modeConfiguration");Dt(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)}},r7e={validate:!0,allowComments:!0,schemas:[],enableSchemaRequest:!1,schemaRequest:"warning",schemaValidation:"warning",comments:"error",trailingCommas:"error"},s7e={documentFormattingEdits:!0,documentRangeFormattingEdits:!0,completionItems:!0,hovers:!0,documentSymbols:!0,tokens:!0,colors:!0,foldingRanges:!0,diagnostics:!0,selectionRanges:!0},nZ=new i7e("json",r7e,s7e);Ew.languages.json={jsonDefaults:nZ};function o7e(){return Promise.resolve().then(()=>agt)}Ew.languages.register({id:"json",extensions:[".json",".bowerrc",".jshintrc",".jscsrc",".eslintrc",".babelrc",".har"],aliases:["JSON","json"],mimetypes:["application/json"]}),Ew.languages.onLanguage("json",()=>{o7e().then(i=>i.setupMode(nZ))});/*!----------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Version: 0.33.0(4b1abad427e58dbedc1215d99a0902ffc885fcd4) + * Released under the MIT license + * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt + *-----------------------------------------------------------------------------*/var a7e=Object.defineProperty,l7e=Object.getOwnPropertyDescriptor,c7e=Object.getOwnPropertyNames,u7e=Object.prototype.hasOwnProperty,d7e=(i,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of c7e(e))!u7e.call(i,r)&&(t||r!=="default")&&a7e(i,r,{get:()=>e[r],enumerable:!(n=l7e(e,r))||n.enumerable});return i},h7e="4.5.5",I1={};d7e(I1,eo);var iZ=(i=>(i[i.None=0]="None",i[i.CommonJS=1]="CommonJS",i[i.AMD=2]="AMD",i[i.UMD=3]="UMD",i[i.System=4]="System",i[i.ES2015=5]="ES2015",i[i.ESNext=99]="ESNext",i))(iZ||{}),rZ=(i=>(i[i.None=0]="None",i[i.Preserve=1]="Preserve",i[i.React=2]="React",i[i.ReactNative=3]="ReactNative",i[i.ReactJSX=4]="ReactJSX",i[i.ReactJSXDev=5]="ReactJSXDev",i))(rZ||{}),sZ=(i=>(i[i.CarriageReturnLineFeed=0]="CarriageReturnLineFeed",i[i.LineFeed=1]="LineFeed",i))(sZ||{}),oZ=(i=>(i[i.ES3=0]="ES3",i[i.ES5=1]="ES5",i[i.ES2015=2]="ES2015",i[i.ES2016=3]="ES2016",i[i.ES2017=4]="ES2017",i[i.ES2018=5]="ES2018",i[i.ES2019=6]="ES2019",i[i.ES2020=7]="ES2020",i[i.ESNext=99]="ESNext",i[i.JSON=100]="JSON",i[i.Latest=99]="Latest",i))(oZ||{}),aZ=(i=>(i[i.Classic=1]="Classic",i[i.NodeJs=2]="NodeJs",i))(aZ||{}),lZ=class{constructor(i,e,t,n){Dt(this,"_onDidChange",new I1.Emitter);Dt(this,"_onDidExtraLibsChange",new I1.Emitter);Dt(this,"_extraLibs");Dt(this,"_removedExtraLibs");Dt(this,"_eagerModelSync");Dt(this,"_compilerOptions");Dt(this,"_diagnosticsOptions");Dt(this,"_workerOptions");Dt(this,"_onDidExtraLibsChangeTimeout");Dt(this,"_inlayHintsOptions");this._extraLibs=Object.create(null),this._removedExtraLibs=Object.create(null),this._eagerModelSync=!1,this.setCompilerOptions(i),this.setDiagnosticsOptions(e),this.setWorkerOptions(t),this.setInlayHintsOptions(n),this._onDidExtraLibsChangeTimeout=-1}get onDidChange(){return this._onDidChange.event}get onDidExtraLibsChange(){return this._onDidExtraLibsChange.event}get workerOptions(){return this._workerOptions}get inlayHintsOptions(){return this._inlayHintsOptions}getExtraLibs(){return this._extraLibs}addExtraLib(i,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===i)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:i,version:n},this._fireOnDidExtraLibsChangeSoon(),{dispose:()=>{let r=this._extraLibs[t];r&&r.version===n&&(delete this._extraLibs[t],this._removedExtraLibs[t]=n,this._fireOnDidExtraLibsChangeSoon())}}}setExtraLibs(i){for(const e in this._extraLibs)this._removedExtraLibs[e]=this._extraLibs[e].version;if(this._extraLibs=Object.create(null),i&&i.length>0)for(const e of i){const t=e.filePath||`ts:extralib-${Math.random().toString(36).substring(2,15)}`,n=e.content;let r=1;this._removedExtraLibs[t]&&(r=this._removedExtraLibs[t]+1),this._extraLibs[t]={content:n,version:r}}this._fireOnDidExtraLibsChangeSoon()}_fireOnDidExtraLibsChangeSoon(){this._onDidExtraLibsChangeTimeout===-1&&(this._onDidExtraLibsChangeTimeout=window.setTimeout(()=>{this._onDidExtraLibsChangeTimeout=-1,this._onDidExtraLibsChange.fire(void 0)},0))}getCompilerOptions(){return this._compilerOptions}setCompilerOptions(i){this._compilerOptions=i||Object.create(null),this._onDidChange.fire(void 0)}getDiagnosticsOptions(){return this._diagnosticsOptions}setDiagnosticsOptions(i){this._diagnosticsOptions=i||Object.create(null),this._onDidChange.fire(void 0)}setWorkerOptions(i){this._workerOptions=i||Object.create(null),this._onDidChange.fire(void 0)}setInlayHintsOptions(i){this._inlayHintsOptions=i||Object.create(null),this._onDidChange.fire(void 0)}setMaximumWorkerIdleTime(i){}setEagerModelSync(i){this._eagerModelSync=i}getEagerModelSync(){return this._eagerModelSync}},f7e=h7e,fN=new lZ({allowNonTsExtensions:!0,target:99},{noSemanticValidation:!1,noSyntaxValidation:!1,onlyVisible:!1},{},{}),cZ=new lZ({allowNonTsExtensions:!0,allowJs:!0,target:99},{noSemanticValidation:!0,noSyntaxValidation:!1,onlyVisible:!1},{},{}),g7e=()=>b3().then(i=>i.getTypeScriptWorker()),p7e=()=>b3().then(i=>i.getJavaScriptWorker());I1.languages.typescript={ModuleKind:iZ,JsxEmit:rZ,NewLineKind:sZ,ScriptTarget:oZ,ModuleResolutionKind:aZ,typescriptVersion:f7e,typescriptDefaults:fN,javascriptDefaults:cZ,getTypeScriptWorker:g7e,getJavaScriptWorker:p7e};function b3(){return Promise.resolve().then(()=>_gt)}I1.languages.onLanguage("typescript",()=>b3().then(i=>i.setupTypeScript(fN))),I1.languages.onLanguage("javascript",()=>b3().then(i=>i.setupJavaScript(cZ)));const Ppt="";var m7e=globalThis&&globalThis.__decorate||function(i,e,t,n){var r=arguments.length,s=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(s=(r<3?o(s):r>3?o(e,t,s):o(e,t))||s);return r>3&&s&&Object.defineProperty(e,t,s),s},_7e=globalThis&&globalThis.__param||function(i,e){return function(t,n){e(t,n,i)}},v3=globalThis&&globalThis.__awaiter||function(i,e,t,n){function r(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(u){try{c(n.next(u))}catch(d){o(d)}}function l(u){try{c(n.throw(u))}catch(d){o(d)}}function c(u){u.done?s(u.value):r(u.value).then(a,l)}c((n=n.apply(i,e||[])).next())})};const w3=new mt("selectionAnchorSet",!1);let Od=class rue{constructor(e,t){this.editor=e,this.selectionAnchorSetContextKey=w3.bindTo(t),this.modelChangeListener=e.onDidChangeModel(()=>this.selectionAnchorSetContextKey.reset())}static get(e){return e.getContribution(rue.ID)}setSelectionAnchor(){if(this.editor.hasModel()){const e=this.editor.getPosition(),t=this.decorationId?[this.decorationId]:[],n=this.editor.deltaDecorations(t,[{range:ut.fromPositions(e,e),options:{description:"selection-anchor",stickiness:1,hoverMessage:new va().appendText(C("selectionAnchor","Selection Anchor")),className:"selection-anchor"}}]);this.decorationId=n[0],this.selectionAnchorSetContextKey.set(!!this.decorationId),os(C("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(ut.fromPositions(e.getStartPosition(),t)),this.cancelSelectionAnchor()}}}cancelSelectionAnchor(){this.decorationId&&(this.editor.deltaDecorations([this.decorationId],[]),this.decorationId=void 0,this.selectionAnchorSetContextKey.set(!1))}dispose(){this.cancelSelectionAnchor(),this.modelChangeListener.dispose()}};Od.ID="editor.contrib.selectionAnchorController",Od=m7e([_7e(1,Yt)],Od);class b7e extends wt{constructor(){super({id:"editor.action.setSelectionAnchor",label:C("setSelectionAnchor","Set Selection Anchor"),alias:"Set Selection Anchor",precondition:void 0,kbOpts:{kbExpr:ie.editorTextFocus,primary:Mr(2089,2080),weight:100}})}run(e,t){var n;return v3(this,void 0,void 0,function*(){(n=Od.get(t))===null||n===void 0||n.setSelectionAnchor()})}}class v7e extends wt{constructor(){super({id:"editor.action.goToSelectionAnchor",label:C("goToSelectionAnchor","Go to Selection Anchor"),alias:"Go to Selection Anchor",precondition:w3})}run(e,t){var n;return v3(this,void 0,void 0,function*(){(n=Od.get(t))===null||n===void 0||n.goToSelectionAnchor()})}}class w7e extends wt{constructor(){super({id:"editor.action.selectFromAnchorToCursor",label:C("selectFromAnchorToCursor","Select from Anchor to Cursor"),alias:"Select from Anchor to Cursor",precondition:w3,kbOpts:{kbExpr:ie.editorTextFocus,primary:Mr(2089,2089),weight:100}})}run(e,t){var n;return v3(this,void 0,void 0,function*(){(n=Od.get(t))===null||n===void 0||n.selectFromAnchorToCursor()})}}class C7e extends wt{constructor(){super({id:"editor.action.cancelSelectionAnchor",label:C("cancelSelectionAnchor","Cancel Selection Anchor"),alias:"Cancel Selection Anchor",precondition:w3,kbOpts:{kbExpr:ie.editorTextFocus,primary:9,weight:100}})}run(e,t){var n;return v3(this,void 0,void 0,function*(){(n=Od.get(t))===null||n===void 0||n.cancelSelectionAnchor()})}}Gn(Od.ID,Od),ot(b7e),ot(v7e),ot(w7e),ot(C7e);const Fpt="",y7e=oe("editorOverviewRuler.bracketMatchForeground",{dark:"#A0A0A0",light:"#A0A0A0",hc:"#A0A0A0"},C("overviewRulerBracketMatchForeground","Overview ruler marker color for matching brackets."));class S7e extends wt{constructor(){super({id:"editor.action.jumpToBracket",label:C("smartSelect.jumpBracket","Go to Bracket"),alias:"Go to Bracket",precondition:void 0,kbOpts:{kbExpr:ie.editorTextFocus,primary:3160,weight:100}})}run(e,t){var n;(n=Cc.get(t))===null||n===void 0||n.jumpToBracket()}}class k7e extends wt{constructor(){super({id:"editor.action.selectToBracket",label:C("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 r;let s=!0;n&&n.selectBrackets===!1&&(s=!1),(r=Cc.get(t))===null||r===void 0||r.selectToBracket(s)}}class E7e{constructor(e,t,n){this.position=e,this.brackets=t,this.options=n}}class Cc extends Ne{constructor(e){super(),this._editor=e,this._lastBracketsData=[],this._lastVersionId=0,this._decorations=[],this._updateBracketsSoon=this._register(new ri(()=>this._updateBrackets(),50)),this._matchBrackets=this._editor.getOption(64),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._decorations=[],this._updateBracketsSoon.schedule()})),this._register(e.onDidChangeModelLanguageConfiguration(t=>{this._lastBracketsData=[],this._updateBracketsSoon.schedule()})),this._register(e.onDidChangeConfiguration(t=>{t.hasChanged(64)&&(this._matchBrackets=this._editor.getOption(64),this._decorations=this._editor.deltaDecorations(this._decorations,[]),this._lastBracketsData=[],this._lastVersionId=0,this._updateBracketsSoon.schedule())})),this._register(e.onDidBlurEditorWidget(()=>{this._updateBracketsSoon.schedule()})),this._register(e.onDidFocusEditorWidget(()=>{this._updateBracketsSoon.schedule()}))}static get(e){return e.getContribution(Cc.ID)}jumpToBracket(){if(!this._editor.hasModel())return;const e=this._editor.getModel(),t=this._editor.getSelections().map(n=>{const r=n.getStartPosition(),s=e.bracketPairs.matchBracket(r);let o=null;if(s)s[0].containsPosition(r)?o=s[1].getStartPosition():s[1].containsPosition(r)&&(o=s[0].getStartPosition());else{const a=e.bracketPairs.findEnclosingBrackets(r);if(a)o=a[0].getStartPosition();else{const l=e.bracketPairs.findNextBracket(r);l&&l.range&&(o=l.range.getStartPosition())}}return o?new ut(o.lineNumber,o.column,o.lineNumber,o.column):new ut(r.lineNumber,r.column,r.lineNumber,r.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(r=>{const s=r.getStartPosition();let o=t.bracketPairs.matchBracket(s);if(!o&&(o=t.bracketPairs.findEnclosingBrackets(s),!o)){const c=t.bracketPairs.findNextBracket(s);c&&c.range&&(o=t.bracketPairs.matchBracket(c.range.getStartPosition()))}let a=null,l=null;if(o){o.sort(H.compareRangesUsingStarts);const[c,u]=o;if(a=e?c.getStartPosition():c.getEndPosition(),l=e?u.getEndPosition():u.getStartPosition(),u.containsPosition(s)){const d=a;a=l,l=d}}a&&l&&n.push(new ut(a.lineNumber,a.column,l.lineNumber,l.column))}),n.length>0&&(this._editor.setSelections(n),this._editor.revealRange(n[0]))}_updateBrackets(){if(this._matchBrackets==="never")return;this._recomputeBrackets();let e=[],t=0;for(const n of this._lastBracketsData){let r=n.brackets;r&&(e[t++]={range:r[0],options:n.options},e[t++]={range:r[1],options:n.options})}this._decorations=this._editor.deltaDecorations(this._decorations,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 r=[];this._lastVersionId===n&&(r=this._lastBracketsData);let s=[],o=0;for(let d=0,h=e.length;d1&&s.sort(ye.compare);let a=[],l=0,c=0,u=r.length;for(let d=0,h=s.length;d{const t=i.getColor(K4e);t&&e.addRule(`.monaco-editor .bracket-match { background-color: ${t}; }`);const n=i.getColor(uj);n&&e.addRule(`.monaco-editor .bracket-match { border: 1px solid ${n}; }`)}),pa.appendMenuItem(de.MenubarGoMenu,{group:"5_infile_nav",command:{id:"editor.action.jumpToBracket",title:C({key:"miGoToBracket",comment:["&& denotes a mnemonic"]},"Go to &&Bracket")},order:2});class x7e{constructor(e,t){this._selection=e,this._isMovingLeft=t}getEditOperations(e,t){if(this._selection.startLineNumber!==this._selection.endLineNumber||this._selection.isEmpty())return;const n=this._selection.startLineNumber,r=this._selection.startColumn,s=this._selection.endColumn;if(!(this._isMovingLeft&&r===1)&&!(!this._isMovingLeft&&s===e.getLineMaxColumn(n)))if(this._isMovingLeft){const o=new H(n,r-1,n,r),a=e.getValueInRange(o);t.addEditOperation(o,null),t.addEditOperation(new H(n,s,n,s),a)}else{const o=new H(n,s,n,s+1),a=e.getValueInRange(o);t.addEditOperation(o,null),t.addEditOperation(new H(n,r,n,r),a)}}computeCursorState(e,t){return this._isMovingLeft?new ut(this._selection.startLineNumber,this._selection.startColumn-1,this._selection.endLineNumber,this._selection.endColumn-1):new ut(this._selection.startLineNumber,this._selection.startColumn+1,this._selection.endLineNumber,this._selection.endColumn+1)}}class uZ extends wt{constructor(e,t){super(t),this.left=e}run(e,t){if(!t.hasModel())return;const n=[],r=t.getSelections();for(const s of r)n.push(new x7e(s,this.left));t.pushUndoStop(),t.executeCommands(this.id,n),t.pushUndoStop()}}class L7e extends uZ{constructor(){super(!0,{id:"editor.action.moveCarretLeftAction",label:C("caret.moveLeft","Move Selected Text Left"),alias:"Move Selected Text Left",precondition:ie.writable})}}class T7e extends uZ{constructor(){super(!1,{id:"editor.action.moveCarretRightAction",label:C("caret.moveRight","Move Selected Text Right"),alias:"Move Selected Text Right",precondition:ie.writable})}}ot(L7e),ot(T7e);class I7e extends wt{constructor(){super({id:"editor.action.transposeLetters",label:C("transposeLetters.label","Transpose Letters"),alias:"Transpose Letters",precondition:ie.writable,kbOpts:{kbExpr:ie.textInputFocus,primary:0,mac:{primary:306},weight:100}})}run(e,t){if(!t.hasModel())return;let n=t.getModel(),r=[],s=t.getSelections();for(let o of s){if(!o.isEmpty())continue;let a=o.startLineNumber,l=o.startColumn,c=n.getLineMaxColumn(a);if(a===1&&(l===1||l===2&&c===2))continue;let u=l===c?o.getPosition():Vn.rightPosition(n,o.getPosition().lineNumber,o.getPosition().column),d=Vn.leftPosition(n,u),h=Vn.leftPosition(n,d),f=n.getValueInRange(H.fromPositions(h,d)),g=n.getValueInRange(H.fromPositions(d,u)),p=H.fromPositions(h,u);r.push(new ls(p,g+f))}r.length>0&&(t.pushUndoStop(),t.executeCommands(this.id,r),t.pushUndoStop())}}ot(I7e);var D7e=globalThis&&globalThis.__awaiter||function(i,e,t,n){function r(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(u){try{c(n.next(u))}catch(d){o(d)}}function l(u){try{c(n.throw(u))}catch(d){o(d)}}function c(u){u.done?s(u.value):r(u.value).then(a,l)}c((n=n.apply(i,e||[])).next())})};const Wp="9_cutcopypaste",N7e=ec||document.queryCommandSupported("cut"),dZ=ec||document.queryCommandSupported("copy"),A7e=typeof navigator.clipboard>"u"||ua?document.queryCommandSupported("paste"):!0;function gN(i){return i.register(),i}const R7e=N7e?gN(new M_({id:"editor.action.clipboardCutAction",precondition:void 0,kbOpts:ec?{primary:2102,win:{primary:2102,secondary:[1044]},weight:100}:void 0,menuOpts:[{menuId:de.MenubarEditMenu,group:"2_ccp",title:C({key:"miCut",comment:["&& denotes a mnemonic"]},"Cu&&t"),order:1},{menuId:de.EditorContext,group:Wp,title:C("actions.clipboard.cutLabel","Cut"),when:ie.writable,order:1},{menuId:de.CommandPalette,group:"",title:C("actions.clipboard.cutLabel","Cut"),order:1},{menuId:de.SimpleEditorContext,group:Wp,title:C("actions.clipboard.cutLabel","Cut"),when:ie.writable,order:1}]})):void 0,O7e=dZ?gN(new M_({id:"editor.action.clipboardCopyAction",precondition:void 0,kbOpts:ec?{primary:2081,win:{primary:2081,secondary:[2067]},weight:100}:void 0,menuOpts:[{menuId:de.MenubarEditMenu,group:"2_ccp",title:C({key:"miCopy",comment:["&& denotes a mnemonic"]},"&&Copy"),order:2},{menuId:de.EditorContext,group:Wp,title:C("actions.clipboard.copyLabel","Copy"),order:2},{menuId:de.CommandPalette,group:"",title:C("actions.clipboard.copyLabel","Copy"),order:1},{menuId:de.SimpleEditorContext,group:Wp,title:C("actions.clipboard.copyLabel","Copy"),order:2}]})):void 0;pa.appendMenuItem(de.MenubarEditMenu,{submenu:de.MenubarCopy,title:{value:C("copy as","Copy As"),original:"Copy As"},group:"2_ccp",order:3}),pa.appendMenuItem(de.EditorContext,{submenu:de.EditorContextCopy,title:{value:C("copy as","Copy As"),original:"Copy As"},group:Wp,order:3});const pN=A7e?gN(new M_({id:"editor.action.clipboardPasteAction",precondition:void 0,kbOpts:ec?{primary:2100,win:{primary:2100,secondary:[1043]},linux:{primary:2100,secondary:[1043]},weight:100}:void 0,menuOpts:[{menuId:de.MenubarEditMenu,group:"2_ccp",title:C({key:"miPaste",comment:["&& denotes a mnemonic"]},"&&Paste"),order:4},{menuId:de.EditorContext,group:Wp,title:C("actions.clipboard.pasteLabel","Paste"),when:ie.writable,order:4},{menuId:de.CommandPalette,group:"",title:C("actions.clipboard.pasteLabel","Paste"),order:1},{menuId:de.SimpleEditorContext,group:Wp,title:C("actions.clipboard.pasteLabel","Paste"),when:ie.writable,order:4}]})):void 0;class M7e extends wt{constructor(){super({id:"editor.action.clipboardCopyWithSyntaxHighlightingAction",label:C("actions.clipboard.copyWithSyntaxHighlightingLabel","Copy With Syntax Highlighting"),alias:"Copy With Syntax Highlighting",precondition:void 0,kbOpts:{kbExpr:ie.textInputFocus,primary:0,weight:100}})}run(e,t){!t.hasModel()||!t.getOption(32)&&t.getSelection().isEmpty()||(L6.forceCopyWithSyntaxHighlighting=!0,t.focus(),document.execCommand("copy"),L6.forceCopyWithSyntaxHighlighting=!1)}}function hZ(i,e){i&&(i.addImplementation(1e4,"code-editor",(t,n)=>{const r=t.get(Zn).getFocusedCodeEditor();if(r&&r.hasTextFocus()){const s=r.getOption(32),o=r.getSelection();return o&&o.isEmpty()&&!s||document.execCommand(e),!0}return!1}),i.addImplementation(0,"generic-dom",(t,n)=>(document.execCommand(e),!0)))}hZ(R7e,"cut"),hZ(O7e,"copy"),pN&&(pN.addImplementation(1e4,"code-editor",(i,e)=>{const t=i.get(Zn),n=i.get(yp),r=t.getFocusedCodeEditor();return r&&r.hasTextFocus()?!document.execCommand("paste")&&bh?(()=>D7e(void 0,void 0,void 0,function*(){const o=yield n.readText();if(o!==""){const a=sv.INSTANCE.get(o);let l=!1,c=null,u=null;a&&(l=r.getOption(32)&&!!a.isFromEmptySelection,c=typeof a.multicursorText<"u"?a.multicursorText:null,u=a.mode),r.trigger("keyboard","paste",{text:o,pasteOnNewLine:l,multicursorText:c,mode:u})}}))():!0:!1}),pN.addImplementation(0,"generic-dom",(i,e)=>(document.execCommand("paste"),!0))),dZ&&ot(M7e);let Tn=class{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+Tn.sep)}intersects(e){return this.contains(e)||e.contains(this)}append(e){return new Tn(this.value+Tn.sep+e)}};Tn.sep=".",Tn.None=new Tn("@@none@@"),Tn.Empty=new Tn(""),Tn.QuickFix=new Tn("quickfix"),Tn.Refactor=new Tn("refactor"),Tn.Source=new Tn("source"),Tn.SourceOrganizeImports=Tn.Source.append("organizeImports"),Tn.SourceFixAll=Tn.Source.append("fixAll");function P7e(i,e){return!(i.include&&!i.include.intersects(e)||i.excludes&&i.excludes.some(t=>fZ(e,t,i.include))||!i.includeSourceActions&&Tn.Source.contains(e))}function F7e(i,e){const t=e.kind?new Tn(e.kind):void 0;return!(i.include&&(!t||!i.include.contains(t))||i.excludes&&t&&i.excludes.some(n=>fZ(t,n,i.include))||!i.includeSourceActions&&t&&Tn.Source.contains(t)||i.onlyIncludePreferredActions&&!e.isPreferred)}function fZ(i,e,t){return!(!e.contains(i)||t&&e.contains(t))}class Tu{constructor(e,t,n){this.kind=e,this.apply=t,this.preferred=n}static fromUser(e,t){return!e||typeof e!="object"?new Tu(t.kind,t.apply,!1):new Tu(Tu.getKindFromUser(e,t.kind),Tu.getApplyFromUser(e,t.apply),Tu.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 Tn(e.kind):t}static getPreferredUser(e){return typeof e.preferred=="boolean"?e.preferred:!1}}var mN=globalThis&&globalThis.__awaiter||function(i,e,t,n){function r(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(u){try{c(n.next(u))}catch(d){o(d)}}function l(u){try{c(n.throw(u))}catch(d){o(d)}}function c(u){u.done?s(u.value):r(u.value).then(a,l)}c((n=n.apply(i,e||[])).next())})};const gZ="editor.action.codeAction",pZ="editor.action.refactor",mZ="editor.action.sourceAction",_N="editor.action.organizeImports",bN="editor.action.fixAll";class _Z{constructor(e,t){this.action=e,this.provider=t}resolve(e){var t;return mN(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(r){Or(r)}n&&(this.action.edit=n.edit)}return this})}}class vN extends Ne{constructor(e,t,n){super(),this.documentation=t,this._register(n),this.allActions=[...e].sort(vN.codeActionsComparator),this.validActions=this.allActions.filter(({action:r})=>!r.disabled)}static codeActionsComparator({action:e},{action:t}){return e.isPreferred&&!t.isPreferred?-1:!e.isPreferred&&t.isPreferred?1:Mo(e.diagnostics)?Mo(t.diagnostics)?e.diagnostics[0].message.localeCompare(t.diagnostics[0].message):-1:Mo(t.diagnostics)?1:0}get hasAutoFix(){return this.validActions.some(({action:e})=>!!e.kind&&Tn.QuickFix.contains(new Tn(e.kind))&&!!e.isPreferred)}}const bZ={actions:[],documentation:void 0};function wN(i,e,t,n,r,s){var o;const a=n.filter||{},l={only:(o=a.include)===null||o===void 0?void 0:o.value,trigger:n.type},c=new rN(e,s),u=B7e(i,e,a),d=new Je,h=u.map(g=>mN(this,void 0,void 0,function*(){try{r.report(g);const p=yield g.provideCodeActions(e,t,l,c.token);if(p&&d.add(p),c.token.isCancellationRequested)return bZ;const m=((p==null?void 0:p.actions)||[]).filter(b=>b&&F7e(a,b)),_=V7e(g,m,a.include);return{actions:m.map(b=>new _Z(b,g)),documentation:_}}catch(p){if(jc(p))throw p;return Or(p),bZ}})),f=i.onDidChange(()=>{const g=i.all(e);ra(g,u)||c.cancel()});return Promise.all(h).then(g=>{const p=S8(g.map(_=>_.actions)),m=Eg(g.map(_=>_.documentation));return new vN(p,m,d)}).finally(()=>{f.dispose(),c.dispose()})}function B7e(i,e,t){return i.all(e).filter(n=>n.providedCodeActionKinds?n.providedCodeActionKinds.some(r=>P7e(t,new Tn(r))):!0)}function V7e(i,e,t){if(!i.documentation)return;const n=i.documentation.map(r=>({kind:new Tn(r.kind),command:r.command}));if(t){let r;for(const s of n)s.kind.contains(t)&&(r?r.kind.contains(s.kind)&&(r=s):r=s);if(r)return r==null?void 0:r.command}for(const r of e)if(r.kind){for(const s of n)if(s.kind.contains(new Tn(r.kind)))return s.command}}An.registerCommand("_executeCodeActionProvider",function(i,e,t,n,r){return mN(this,void 0,void 0,function*(){if(!(e instanceof Pt))throw ic();const{codeActionProvider:s}=i.get(yt),o=i.get(Pi).getModel(e);if(!o)throw ic();const a=ut.isISelection(t)?ut.liftSelection(t):H.isIRange(t)?o.validateRange(t):void 0;if(!a)throw ic();const l=typeof n=="string"?new Tn(n):void 0,c=yield wN(s,o,a,{type:1,filter:{includeSourceActions:!0,include:l}},Sp.None,mn.None),u=[],d=Math.min(c.validActions.length,typeof r=="number"?r:0);for(let h=0;hh.action)}finally{setTimeout(()=>c.dispose(),100)}})});const Bpt="";var W7e=globalThis&&globalThis.__decorate||function(i,e,t,n){var r=arguments.length,s=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(s=(r<3?o(s):r>3?o(e,t,s):o(e,t))||s);return r>3&&s&&Object.defineProperty(e,t,s),s},H7e=globalThis&&globalThis.__param||function(i,e){return function(t,n){e(t,n,i)}};let ya=class IF{constructor(e,t){this._messageWidget=new qs,this._messageListeners=new Je,this._editor=e,this._visible=IF.MESSAGE_VISIBLE.bindTo(t),this._editorListener=this._editor.onDidAttemptReadOnlyEdit(()=>this._onDidAttemptReadOnlyEdit())}static get(e){return e.getContribution(IF.ID)}dispose(){this._editorListener.dispose(),this._messageListeners.dispose(),this._messageWidget.dispose(),this._visible.reset()}showMessage(e,t){os(e),this._visible.set(!0),this._messageWidget.clear(),this._messageListeners.clear(),this._messageWidget.value=new vZ(this._editor,t,e),this._messageListeners.add(this._editor.onDidBlurEditorText(()=>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(new Wo(()=>this.closeMessage(),3e3));let n;this._messageListeners.add(this._editor.onMouseMove(r=>{r.target.position&&(n?n.containsPosition(r.target.position)||this.closeMessage():n=new H(t.lineNumber-3,1,r.target.position.lineNumber+3,1))}))}closeMessage(){this._visible.reset(),this._messageListeners.clear(),this._messageWidget.value&&this._messageListeners.add(vZ.fadeOut(this._messageWidget.value))}_onDidAttemptReadOnlyEdit(){this._editor.hasModel()&&this.showMessage(C("editor.readonly","Cannot edit in read-only editor"),this._editor.getPosition())}};ya.ID="editor.contrib.messageController",ya.MESSAGE_VISIBLE=new mt("messageVisible",!1,C("messageVisible","Whether the editor is currently showing an inline message")),ya=W7e([H7e(1,Yt)],ya);const z7e=as.bindToContribution(ya.get);st(new z7e({id:"leaveEditorMessage",precondition:ya.MESSAGE_VISIBLE,handler:i=>i.closeMessage(),kbOpts:{weight:100+30,primary:9}}));let vZ=class{constructor(e,{lineNumber:t,column:n},r){this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this._editor=e,this._editor.revealLinesInCenterIfOutsideViewport(t,t,0),this._position={lineNumber:t,column:n-1},this._domNode=document.createElement("div"),this._domNode.classList.add("monaco-editor-overlaymessage");const s=document.createElement("div");s.classList.add("anchor","top"),this._domNode.appendChild(s);const o=document.createElement("div");o.classList.add("message"),o.textContent=r,this._domNode.appendChild(o);const a=document.createElement("div");a.classList.add("anchor","below"),this._domNode.appendChild(a),this._editor.addContentWidget(this),this._domNode.classList.add("fadeIn")}static fadeOut(e){let t;const n=()=>{e.dispose(),clearTimeout(t),e.getDomNode().removeEventListener("animationend",n)};return t=setTimeout(n,110),e.getDomNode().addEventListener("animationend",n),e.getDomNode().classList.add("fadeOut"),{dispose:n}}dispose(){this._editor.removeContentWidget(this)}getId(){return"messageoverlay"}getDomNode(){return this._domNode}getPosition(){return{position:this._position,preference:[1,2]}}afterRender(e){this._domNode.classList.toggle("below",e===2)}};Gn(ya.ID,ya);var $7e=globalThis&&globalThis.__decorate||function(i,e,t,n){var r=arguments.length,s=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(s=(r<3?o(s):r>3?o(e,t,s):o(e,t))||s);return r>3&&s&&Object.defineProperty(e,t,s),s},CN=globalThis&&globalThis.__param||function(i,e){return function(t,n){e(t,n,i)}},U7e=globalThis&&globalThis.__awaiter||function(i,e,t,n){function r(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(u){try{c(n.next(u))}catch(d){o(d)}}function l(u){try{c(n.throw(u))}catch(d){o(d)}}function c(u){u.done?s(u.value):r(u.value).then(a,l)}c((n=n.apply(i,e||[])).next())})};class wZ extends Ho{constructor(e,t){super(e.command?e.command.id:e.title,j7e(e.title),void 0,!e.disabled,t),this.action=e}}function j7e(i){return i.replace(/\r\n|\r|\n/g," ")}let yN=class extends Ne{constructor(e,t,n,r,s){super(),this._editor=e,this._delegate=t,this._contextMenuService=n,this._languageFeaturesService=s,this._visible=!1,this._showingActions=this._register(new qs),this._keybindingResolver=new C3({getKeybindings:()=>r.getKeybindings()})}get isVisible(){return this._visible}show(e,t,n,r){return U7e(this,void 0,void 0,function*(){const s=r.includeDisabledActions?t.allActions:t.validActions;if(!s.length){this._visible=!1;return}if(!this._editor.getDomNode())throw this._visible=!1,D8();this._visible=!0,this._showingActions.value=t;const o=this.getMenuActions(e,s,t.documentation),a=ye.isIPosition(n)?this._toCoords(n):n||{x:0,y:0},l=this._keybindingResolver.getResolver(),c=this._editor.getOption(115);this._contextMenuService.showContextMenu({domForShadowRoot:c?this._editor.getDomNode():void 0,getAnchor:()=>a,getActions:()=>o,onHide:()=>{this._visible=!1,this._editor.focus()},autoSelectFirstItem:!0,getKeyBinding:u=>u instanceof wZ?l(u.action):void 0})})}getMenuActions(e,t,n){var r,s;const o=u=>new wZ(u.action,()=>this._delegate.onSelectCodeAction(u)),a=t.map(o),l=[...n],c=this._editor.getModel();if(c&&a.length)for(const u of this._languageFeaturesService.codeActionProvider.all(c))u._getAdditionalMenuItems&&l.push(...u._getAdditionalMenuItems({trigger:e.type,only:(s=(r=e.filter)===null||r===void 0?void 0:r.include)===null||s===void 0?void 0:s.value},t.map(d=>d.action)));return l.length&&a.push(new Ya,...l.map(u=>o(new _Z({title:u.title,command:u},void 0)))),a}_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=ss(this._editor.getDomNode()),r=n.left+t.left,s=n.top+t.top+t.height;return{x:r,y:s}}};yN=$7e([CN(2,sf),CN(3,qi),CN(4,yt)],yN);class C3{constructor(e){this._keybindingProvider=e}getResolver(){const e=new d_(()=>this._keybindingProvider.getKeybindings().filter(t=>C3.codeActionCommands.indexOf(t.command)>=0).filter(t=>t.resolvedKeybinding).map(t=>{let n=t.commandArgs;return t.command===_N?n={kind:Tn.SourceOrganizeImports.value}:t.command===bN&&(n={kind:Tn.SourceFixAll.value}),Object.assign({resolvedKeybinding:t.resolvedKeybinding},Tu.fromUser(n,{kind:Tn.None,apply:"never"}))}));return t=>{if(t.kind){const n=this.bestKeybindingForCodeAction(t,e.getValue());return n==null?void 0:n.resolvedKeybinding}}}bestKeybindingForCodeAction(e,t){if(!e.kind)return;const n=new Tn(e.kind);return t.filter(r=>r.kind.contains(n)).filter(r=>r.preferred?e.isPreferred:!0).reduceRight((r,s)=>r?r.kind.contains(s.kind)?s:r:s,void 0)}}C3.codeActionCommands=[pZ,gZ,mZ,_N,bN];const Vpt="";var q7e=globalThis&&globalThis.__decorate||function(i,e,t,n){var r=arguments.length,s=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(s=(r<3?o(s):r>3?o(e,t,s):o(e,t))||s);return r>3&&s&&Object.defineProperty(e,t,s),s},G7e=globalThis&&globalThis.__param||function(i,e){return function(t,n){e(t,n,i)}},xw;(function(i){i.Hidden={type:0};class e{constructor(n,r,s,o){this.actions=n,this.trigger=r,this.editorPosition=s,this.widgetPosition=o,this.type=1}}i.Showing=e})(xw||(xw={}));let y3=class sue extends Ne{constructor(e,t,n,r){super(),this._editor=e,this._quickFixActionId=t,this._preferredFixActionId=n,this._keybindingService=r,this._onClick=this._register(new be),this.onClick=this._onClick.event,this._state=xw.Hidden,this._domNode=document.createElement("div"),this._domNode.className=k.lightBulb.classNames,this._editor.addContentWidget(this),this._register(this._editor.onDidChangeModelContent(s=>{const o=this._editor.getModel();(this.state.type!==1||!o||this.state.editorPosition.lineNumber>=o.getLineCount())&&this.hide()})),ei.ignoreTarget(this._domNode),this._register(Qye(this._domNode,s=>{if(this.state.type!==1)return;this._editor.focus(),s.preventDefault();const{top:o,height:a}=ss(this._domNode),l=this._editor.getOption(59);let c=Math.floor(l/3);this.state.widgetPosition.position!==null&&this.state.widgetPosition.position.lineNumber{if((s.buttons&1)!==1)return;this.hide();const o=new Zg;o.startMonitoring(s.target,s.buttons,P_,()=>{},()=>{o.dispose()})})),this._register(this._editor.onDidChangeConfiguration(s=>{s.hasChanged(57)&&!this._editor.getOption(57).enabled&&this.hide()})),this._updateLightBulbTitleAndIcon(),this._register(this._keybindingService.onDidUpdateKeybindings(this._updateLightBulbTitleAndIcon,this))}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 r=this._editor.getOptions();if(!r.get(57).enabled)return this.hide();const s=this._editor.getModel();if(!s)return this.hide();const{lineNumber:o,column:a}=s.validatePosition(n),l=s.getOptions().tabSize,c=r.get(44),u=s.getLineContent(o),d=gk(u,l),h=c.spaceWidth*d>22,f=p=>p>2&&this._editor.getTopForLineNumber(p)===this._editor.getTopForLineNumber(p-1);let g=o;if(!h){if(o>1&&!f(o-1))g-=1;else if(!f(o+1))g+=1;else if(a*c.spaceWidth<22)return this.hide()}this.state=new xw.Showing(e,t,n,{position:{lineNumber:g,column:1},preference:sue._posPref}),this._editor.layoutContentWidget(this)}hide(){this.state=xw.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(...k.lightBulb.classNamesArray),this._domNode.classList.add(...k.lightbulbAutofix.classNamesArray);const t=this._keybindingService.lookupKeybinding(this._preferredFixActionId);if(t){this.title=C("preferredcodeActionWithKb","Show Code Actions. Preferred Quick Fix Available ({0})",t.getLabel());return}}this._domNode.classList.remove(...k.lightbulbAutofix.classNamesArray),this._domNode.classList.add(...k.lightBulb.classNamesArray);const e=this._keybindingService.lookupKeybinding(this._quickFixActionId);e?this.title=C("codeActionWithKb","Show Code Actions ({0})",e.getLabel()):this.title=C("codeAction","Show Code Actions")}set title(e){this._domNode.title=e}};y3._posPref=[0],y3=q7e([G7e(3,qi)],y3),_i((i,e)=>{var t;const n=(t=i.getColor(_o))===null||t===void 0?void 0:t.transparent(.7),r=i.getColor(wke);r&&e.addRule(` + .monaco-editor .contentWidgets ${k.lightBulb.cssSelector} { + color: ${r}; + background-color: ${n}; + }`);const s=i.getColor(Cke);s&&e.addRule(` + .monaco-editor .contentWidgets ${k.lightbulbAutofix.cssSelector} { + color: ${s}; + background-color: ${n}; + }`)});var K7e=globalThis&&globalThis.__decorate||function(i,e,t,n){var r=arguments.length,s=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(s=(r<3?o(s):r>3?o(e,t,s):o(e,t))||s);return r>3&&s&&Object.defineProperty(e,t,s),s},Y7e=globalThis&&globalThis.__param||function(i,e){return function(t,n){e(t,n,i)}},SN=globalThis&&globalThis.__awaiter||function(i,e,t,n){function r(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(u){try{c(n.next(u))}catch(d){o(d)}}function l(u){try{c(n.throw(u))}catch(d){o(d)}}function c(u){u.done?s(u.value):r(u.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},Z7e=globalThis&&globalThis.__classPrivateFieldSet||function(i,e,t,n,r){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?i!==e||!r:!e.has(i))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?r.call(i,t):r?r.value=t:e.set(i,t),t},X7e=globalThis&&globalThis.__classPrivateFieldGet||function(i,e,t,n){if(t==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?i!==e||!n:!e.has(i))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t==="m"?n:t==="a"?n.call(i):n?n.value:e.get(i)},S3;let kN=class extends Ne{constructor(e,t,n,r,s){super(),this._editor=e,this.delegate=r,this._activeCodeActions=this._register(new qs),S3.set(this,!1),this._codeActionWidget=new d_(()=>this._register(s.createInstance(yN,this._editor,{onSelectCodeAction:o=>SN(this,void 0,void 0,function*(){this.delegate.applyCodeAction(o,!0)})}))),this._lightBulbWidget=new d_(()=>{const o=this._register(s.createInstance(y3,this._editor,t,n));return this._register(o.onClick(a=>this.showCodeActionList(a.trigger,a.actions,a,{includeDisabledActions:!1}))),o})}dispose(){Z7e(this,S3,!0,"f"),super.dispose()}update(e){var t,n,r,s,o;return SN(this,void 0,void 0,function*(){if(e.type!==1){(t=this._lightBulbWidget.rawValue)===null||t===void 0||t.hide();return}let a;try{a=yield e.actions}catch(l){Jt(l);return}if(!X7e(this,S3,"f"))if(this._lightBulbWidget.getValue().update(a,e.trigger,e.position),e.trigger.type===1){if(!((n=e.trigger.filter)===null||n===void 0)&&n.include){const c=this.tryGetValidActionToApply(e.trigger,a);if(c){try{this._lightBulbWidget.getValue().hide(),yield this.delegate.applyCodeAction(c,!1)}finally{a.dispose()}return}if(e.trigger.context){const u=this.getInvalidActionThatWouldHaveBeenApplied(e.trigger,a);if(u&&u.action.disabled){(r=ya.get(this._editor))===null||r===void 0||r.showMessage(u.action.disabled,e.trigger.context.position),a.dispose();return}}}const l=!!(!((s=e.trigger.filter)===null||s===void 0)&&s.include);if(e.trigger.context&&(!a.allActions.length||!l&&!a.validActions.length)){(o=ya.get(this._editor))===null||o===void 0||o.showMessage(e.trigger.context.notAvailableMessage,e.trigger.context.position),this._activeCodeActions.value=a,a.dispose();return}this._activeCodeActions.value=a,this._codeActionWidget.getValue().show(e.trigger,a,e.position,{includeDisabledActions:l})}else this._codeActionWidget.getValue().isVisible?a.dispose():this._activeCodeActions.value=a})}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,r){return SN(this,void 0,void 0,function*(){this._codeActionWidget.getValue().show(e,t,n,r)})}};S3=new WeakMap,kN=K7e([Y7e(4,_n)],kN);var EN=globalThis&&globalThis.__classPrivateFieldGet||function(i,e,t,n){if(t==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?i!==e||!n:!e.has(i))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t==="m"?n:t==="a"?n.call(i):n?n.value:e.get(i)},Q7e=globalThis&&globalThis.__classPrivateFieldSet||function(i,e,t,n,r){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?i!==e||!r:!e.has(i))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?r.call(i,t):r?r.value=t:e.set(i,t),t},D1;const CZ=new mt("supportedCodeAction","");class J7e extends Ne{constructor(e,t,n,r=250){super(),this._editor=e,this._markerService=t,this._signalChange=n,this._delay=r,this._autoTriggerTimer=this._register(new Wo),this._register(this._markerService.onMarkerChanged(s=>this._onMarkerChanges(s))),this._register(this._editor.onDidChangeCursorPosition(()=>this._onCursorChange()))}trigger(e){const t=this._getRangeOfSelectionUnlessWhitespaceEnclosed(e);return this._createEventAndSignalChange(e,t)}_onMarkerChanges(e){const t=this._editor.getModel();t&&e.some(n=>gq(n,t.uri))&&this._autoTriggerTimer.cancelAndSet(()=>{this.trigger({type:2})},this._delay)}_onCursorChange(){this._autoTriggerTimer.cancelAndSet(()=>{this.trigger({type:2})},this._delay)}_getRangeOfMarker(e){const t=this._editor.getModel();if(t)for(const n of this._markerService.read({resource:t.uri})){const r=t.validateRange(n);if(H.intersectRanges(r,e))return H.lift(r)}}_getRangeOfSelectionUnlessWhitespaceEnclosed(e){if(!this._editor.hasModel())return;const t=this._editor.getModel(),n=this._editor.getSelection();if(n.isEmpty()&&e.type===2){const{lineNumber:r,column:s}=n.getPosition(),o=t.getLineContent(r);if(o.length===0)return;if(s===1){if(/\s/.test(o[0]))return}else if(s===t.getLineMaxColumn(r)){if(/\s/.test(o[o.length-1]))return}else if(/\s/.test(o[s-2])&&/\s/.test(o[s-1]))return}return n}_createEventAndSignalChange(e,t){const n=this._editor.getModel();if(!t||!n){this._signalChange(void 0);return}const r=this._getRangeOfMarker(t),s=r?r.getStartPosition():t.getStartPosition(),o={trigger:e,selection:t,position:s};return this._signalChange(o),o}}var Hp;(function(i){i.Empty={type:0};class e{constructor(n,r,s,o){this.trigger=n,this.rangeOrSelection=r,this.position=s,this._cancellablePromise=o,this.type=1,this.actions=o.catch(a=>{if(jc(a))return eNe;throw a})}cancel(){this._cancellablePromise.cancel()}}i.Triggered=e})(Hp||(Hp={}));const eNe={allActions:[],validActions:[],dispose:()=>{},documentation:[],hasAutoFix:!1};class tNe extends Ne{constructor(e,t,n,r,s){super(),this._editor=e,this._registry=t,this._markerService=n,this._progressService=s,this._codeActionOracle=this._register(new qs),this._state=Hp.Empty,this._onDidChangeState=this._register(new be),this.onDidChangeState=this._onDidChangeState.event,D1.set(this,!1),this._supportedCodeActions=CZ.bindTo(r),this._register(this._editor.onDidChangeModel(()=>this._update())),this._register(this._editor.onDidChangeModelLanguage(()=>this._update())),this._register(this._registry.onDidChange(()=>this._update())),this._update()}dispose(){EN(this,D1,"f")||(Q7e(this,D1,!0,"f"),super.dispose(),this.setState(Hp.Empty,!0))}_update(){if(EN(this,D1,"f"))return;this._codeActionOracle.value=void 0,this.setState(Hp.Empty);const e=this._editor.getModel();if(e&&this._registry.has(e)&&!this._editor.getOption(81)){const t=[];for(const n of this._registry.all(e))Array.isArray(n.providedCodeActionKinds)&&t.push(...n.providedCodeActionKinds);this._supportedCodeActions.set(t.join(" ")),this._codeActionOracle.value=new J7e(this._editor,this._markerService,n=>{var r;if(!n){this.setState(Hp.Empty);return}const s=Yr(o=>wN(this._registry,e,n.selection,n.trigger,Sp.None,o));n.trigger.type===1&&((r=this._progressService)===null||r===void 0||r.showWhile(s,250)),this.setState(new Hp.Triggered(n.trigger,n.selection,n.position,s))},void 0),this._codeActionOracle.value.trigger({type:2})}else this._supportedCodeActions.reset()}trigger(e){this._codeActionOracle.value&&this._codeActionOracle.value.trigger(e)}setState(e,t){e!==this._state&&(this._state.type===1&&this._state.cancel(),this._state=e,!t&&!EN(this,D1,"f")&&this._onDidChangeState.fire(e))}}D1=new WeakMap;var nNe=globalThis&&globalThis.__decorate||function(i,e,t,n){var r=arguments.length,s=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(s=(r<3?o(s):r>3?o(e,t,s):o(e,t))||s);return r>3&&s&&Object.defineProperty(e,t,s),s},Lw=globalThis&&globalThis.__param||function(i,e){return function(t,n){e(t,n,i)}},yZ=globalThis&&globalThis.__awaiter||function(i,e,t,n){function r(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(u){try{c(n.next(u))}catch(d){o(d)}}function l(u){try{c(n.throw(u))}catch(d){o(d)}}function c(u){u.done?s(u.value):r(u.value).then(a,l)}c((n=n.apply(i,e||[])).next())})};function Tw(i){return ht.regex(CZ.keys()[0],new RegExp("(\\s|^)"+za(i.value)+"\\b"))}const xN={type:"object",defaultSnippets:[{body:{kind:""}}],properties:{kind:{type:"string",description:C("args.schema.kind","Kind of the code action to run.")},apply:{type:"string",description:C("args.schema.apply","Controls when the returned actions are applied."),default:"ifSingle",enum:["first","ifSingle","never"],enumDescriptions:[C("args.schema.apply.first","Always apply the first returned code action."),C("args.schema.apply.ifSingle","Apply the first returned code action if it is the only one."),C("args.schema.apply.never","Do not apply the returned code actions.")]},preferred:{type:"boolean",default:!1,description:C("args.schema.preferred","Controls if only preferred code actions should be returned.")}}};let zp=class oue extends Ne{constructor(e,t,n,r,s,o){super(),this._instantiationService=s,this._editor=e,this._model=this._register(new tNe(this._editor,o.codeActionProvider,t,n,r)),this._register(this._model.onDidChangeState(a=>this.update(a))),this._ui=new d_(()=>this._register(new kN(e,N1.Id,Iw.Id,{applyCodeAction:(a,l)=>yZ(this,void 0,void 0,function*(){try{yield this._applyCodeAction(a)}finally{l&&this._trigger({type:2,filter:{}})}})},this._instantiationService)))}static get(e){return e.getContribution(oue.ID)}update(e){this._ui.getValue().update(e)}showCodeActions(e,t,n){return this._ui.getValue().showCodeActionList(e,t,n,{includeDisabledActions:!1})}manualTriggerAtCurrentPosition(e,t,n){var r;if(!this._editor.hasModel())return;(r=ya.get(this._editor))===null||r===void 0||r.closeMessage();const s=this._editor.getPosition();this._trigger({type:1,filter:t,autoApply:n,context:{notAvailableMessage:e,position:s}})}_trigger(e){return this._model.trigger(e)}_applyCodeAction(e){return this._instantiationService.invokeFunction(iNe,e,this._editor)}};zp.ID="editor.contrib.quickFixController",zp=nNe([Lw(1,Id),Lw(2,Yt),Lw(3,of),Lw(4,_n),Lw(5,yt)],zp);function iNe(i,e,t){return yZ(this,void 0,void 0,function*(){const n=i.get(GD),r=i.get(rr),s=i.get(ru),o=i.get(or);if(s.publicLog2("codeAction.applyCodeAction",{codeActionTitle:e.action.title,codeActionKind:e.action.kind,codeActionIsPreferred:!!e.action.isPreferred}),yield e.resolve(mn.None),e.action.edit&&(yield n.apply(i4.convert(e.action.edit),{editor:t,label:e.action.title})),e.action.command)try{yield r.executeCommand(e.action.command.id,...e.action.command.arguments||[])}catch(a){const l=rNe(a);o.error(typeof l=="string"?l:C("applyCodeActionFailed","An unknown error occurred while applying the code action"))}})}function rNe(i){return typeof i=="string"?i:i instanceof Error&&typeof i.message=="string"?i.message:void 0}function $p(i,e,t,n){if(i.hasModel()){const r=zp.get(i);r&&r.manualTriggerAtCurrentPosition(e,t,n)}}class N1 extends wt{constructor(){super({id:N1.Id,label:C("quickfix.trigger.label","Quick Fix..."),alias:"Quick Fix...",precondition:ht.and(ie.writable,ie.hasCodeActionsProvider),kbOpts:{kbExpr:ie.editorTextFocus,primary:2132,weight:100}})}run(e,t){return $p(t,C("editor.action.quickFix.noneMessage","No code actions available"),void 0,void 0)}}N1.Id="editor.action.quickFix";class sNe extends as{constructor(){super({id:gZ,precondition:ht.and(ie.writable,ie.hasCodeActionsProvider),description:{description:"Trigger a code action",args:[{name:"args",schema:xN}]}})}runEditorCommand(e,t,n){const r=Tu.fromUser(n,{kind:Tn.Empty,apply:"ifSingle"});return $p(t,typeof(n==null?void 0:n.kind)=="string"?r.preferred?C("editor.action.codeAction.noneMessage.preferred.kind","No preferred code actions for '{0}' available",n.kind):C("editor.action.codeAction.noneMessage.kind","No code actions for '{0}' available",n.kind):r.preferred?C("editor.action.codeAction.noneMessage.preferred","No preferred code actions available"):C("editor.action.codeAction.noneMessage","No code actions available"),{include:r.kind,includeSourceActions:!0,onlyIncludePreferredActions:r.preferred},r.apply)}}class oNe extends wt{constructor(){super({id:pZ,label:C("refactor.label","Refactor..."),alias:"Refactor...",precondition:ht.and(ie.writable,ie.hasCodeActionsProvider),kbOpts:{kbExpr:ie.editorTextFocus,primary:3120,mac:{primary:1328},weight:100},contextMenuOpts:{group:"1_modification",order:2,when:ht.and(ie.writable,Tw(Tn.Refactor))},description:{description:"Refactor...",args:[{name:"args",schema:xN}]}})}run(e,t,n){const r=Tu.fromUser(n,{kind:Tn.Refactor,apply:"never"});return $p(t,typeof(n==null?void 0:n.kind)=="string"?r.preferred?C("editor.action.refactor.noneMessage.preferred.kind","No preferred refactorings for '{0}' available",n.kind):C("editor.action.refactor.noneMessage.kind","No refactorings for '{0}' available",n.kind):r.preferred?C("editor.action.refactor.noneMessage.preferred","No preferred refactorings available"):C("editor.action.refactor.noneMessage","No refactorings available"),{include:Tn.Refactor.contains(r.kind)?r.kind:Tn.None,onlyIncludePreferredActions:r.preferred},r.apply)}}class aNe extends wt{constructor(){super({id:mZ,label:C("source.label","Source Action..."),alias:"Source Action...",precondition:ht.and(ie.writable,ie.hasCodeActionsProvider),contextMenuOpts:{group:"1_modification",order:2.1,when:ht.and(ie.writable,Tw(Tn.Source))},description:{description:"Source Action...",args:[{name:"args",schema:xN}]}})}run(e,t,n){const r=Tu.fromUser(n,{kind:Tn.Source,apply:"never"});return $p(t,typeof(n==null?void 0:n.kind)=="string"?r.preferred?C("editor.action.source.noneMessage.preferred.kind","No preferred source actions for '{0}' available",n.kind):C("editor.action.source.noneMessage.kind","No source actions for '{0}' available",n.kind):r.preferred?C("editor.action.source.noneMessage.preferred","No preferred source actions available"):C("editor.action.source.noneMessage","No source actions available"),{include:Tn.Source.contains(r.kind)?r.kind:Tn.None,includeSourceActions:!0,onlyIncludePreferredActions:r.preferred},r.apply)}}class lNe extends wt{constructor(){super({id:_N,label:C("organizeImports.label","Organize Imports"),alias:"Organize Imports",precondition:ht.and(ie.writable,Tw(Tn.SourceOrganizeImports)),kbOpts:{kbExpr:ie.editorTextFocus,primary:1581,weight:100}})}run(e,t){return $p(t,C("editor.action.organize.noneMessage","No organize imports action available"),{include:Tn.SourceOrganizeImports,includeSourceActions:!0},"ifSingle")}}class cNe extends wt{constructor(){super({id:bN,label:C("fixAll.label","Fix All"),alias:"Fix All",precondition:ht.and(ie.writable,Tw(Tn.SourceFixAll))})}run(e,t){return $p(t,C("fixAll.noneMessage","No fix all action available"),{include:Tn.SourceFixAll,includeSourceActions:!0},"ifSingle")}}class Iw extends wt{constructor(){super({id:Iw.Id,label:C("autoFix.label","Auto Fix..."),alias:"Auto Fix...",precondition:ht.and(ie.writable,Tw(Tn.QuickFix)),kbOpts:{kbExpr:ie.editorTextFocus,primary:1620,mac:{primary:2644},weight:100}})}run(e,t){return $p(t,C("editor.action.autoFix.noneMessage","No auto fixes available"),{include:Tn.QuickFix,onlyIncludePreferredActions:!0},"ifSingle")}}Iw.Id="editor.action.autoFix",Gn(zp.ID,zp),ot(N1),ot(oNe),ot(aNe),ot(lNe),ot(Iw),ot(cNe),st(new sNe);var SZ=globalThis&&globalThis.__awaiter||function(i,e,t,n){function r(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(u){try{c(n.next(u))}catch(d){o(d)}}function l(u){try{c(n.throw(u))}catch(d){o(d)}}function c(u){u.done?s(u.value):r(u.value).then(a,l)}c((n=n.apply(i,e||[])).next())})};class LN{constructor(){this.lenses=[],this._disposables=new Je}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 kZ(i,e,t){return SZ(this,void 0,void 0,function*(){const n=i.ordered(e),r=new Map,s=new LN,o=n.map((a,l)=>SZ(this,void 0,void 0,function*(){r.set(a,l);try{const c=yield Promise.resolve(a.provideCodeLenses(e,t));c&&s.add(c,a)}catch(c){Or(c)}}));return yield Promise.all(o),s.lenses=s.lenses.sort((a,l)=>a.symbol.range.startLineNumberl.symbol.range.startLineNumber?1:r.get(a.provider)r.get(l.provider)?1:a.symbol.range.startColumnl.symbol.range.startColumn?1:0),s})}An.registerCommand("_executeCodeLensProvider",function(i,...e){let[t,n]=e;ci(Pt.isUri(t)),ci(typeof n=="number"||!n);const{codeLensProvider:r}=i.get(yt),s=i.get(Pi).getModel(t);if(!s)throw ic();const o=[],a=new Je;return kZ(r,s,mn.None).then(l=>{a.add(l);let c=[];for(const u of l.lenses)n==null||Boolean(u.symbol.command)?o.push(u.symbol):n-- >0&&u.provider.resolveCodeLens&&c.push(Promise.resolve(u.provider.resolveCodeLens(s,u.symbol,mn.None)).then(d=>o.push(d||u.symbol)));return Promise.all(c)}).then(()=>o).finally(()=>{setTimeout(()=>a.dispose(),100)})});var uNe=globalThis&&globalThis.__decorate||function(i,e,t,n){var r=arguments.length,s=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(s=(r<3?o(s):r>3?o(e,t,s):o(e,t))||s);return r>3&&s&&Object.defineProperty(e,t,s),s},dNe=globalThis&&globalThis.__param||function(i,e){return function(t,n){e(t,n,i)}};const EZ=Ln("ICodeLensCache");class xZ{constructor(e,t){this.lineCount=e,this.data=t}}let TN=class{constructor(e){this._fakeProvider=new class{provideCodeLenses(){throw new Error("not supported")}},this._cache=new lf(20,.75);const t="codelens/cache";Ab(()=>e.remove(t,1));const n="codelens/cache2",r=e.get(n,1,"{}");this._deserialize(r),id(e.onWillSaveState)(s=>{s.reason===n3.SHUTDOWN&&e.store(n,this._serialize(),1,1)})}put(e,t){const n=t.lenses.map(o=>{var a;return{range:o.symbol.range,command:o.symbol.command&&{id:"",title:(a=o.symbol.command)===null||a===void 0?void 0:a.title}}}),r=new LN;r.add({lenses:n,dispose:()=>{}},this._fakeProvider);const s=new xZ(e.getLineCount(),r);this._cache.set(e.uri.toString(),s)}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 r=new Set;for(const s of n.data.lenses)r.add(s.symbol.range.startLineNumber);e[t]={lineCount:n.lineCount,lines:[...r.values()]}}return JSON.stringify(e)}_deserialize(e){try{const t=JSON.parse(e);for(const n in t){const r=t[n],s=[];for(const a of r.lines)s.push({range:new H(a,1,a,11)});const o=new LN;o.add({lenses:s,dispose(){}},this._fakeProvider),this._cache.set(n,new xZ(r.lineCount,o))}}catch{}}};TN=uNe([dNe(0,Lu)],TN),On(EZ,TN);const Wpt="";class hNe{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 k3{constructor(e,t,n){this.allowEditorOverflow=!1,this.suppressMouseDown=!0,this._commands=new Map,this._isEmpty=!0,this._editor=e,this._id=`codelens.widget-${k3._idPool++}`,this.updatePosition(n),this._domNode=document.createElement("span"),this._domNode.className=`codelens-decoration ${t}`}withCommands(e,t){this._commands.clear();let n=[],r=!1;for(let s=0;s{u.symbol.command&&c.push(u.symbol),r.addDecoration({range:u.symbol.range,options:cn.EMPTY},h=>this._decorationIds[d]=h),l?l=H.plusRange(l,u.symbol.range):l=H.lift(u.symbol.range)}),this._viewZone=new hNe(l.startLineNumber-1,o,a),this._viewZoneId=s.addZone(this._viewZone),c.length>0&&(this._createContentWidgetIfNecessary(),this._contentWidget.withCommands(c,!1))}_createContentWidgetIfNecessary(){this._contentWidget?this._editor.layoutContentWidget(this._contentWidget):(this._contentWidget=new k3(this._editor,this._className,this._viewZone.afterLineNumber+1),this._editor.addContentWidget(this._contentWidget))}dispose(e,t){this._decorationIds.forEach(e.removeDecoration,e),this._decorationIds=[],t&&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),r=this._data[t].symbol;return!!(n&&H.isEmpty(r.range)===n.isEmpty())})}updateCodeLensSymbols(e,t){this._decorationIds.forEach(t.removeDecoration,t),this._decorationIds=[],this._data=e,this._data.forEach((n,r)=>{t.addDecoration({range:n.symbol.range,options:cn.EMPTY},s=>this._decorationIds[r]=s)})}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;a--)(o=i[a])&&(s=(r<3?o(s):r>3?o(e,t,s):o(e,t))||s);return r>3&&s&&Object.defineProperty(e,t,s),s},Dw=globalThis&&globalThis.__param||function(i,e){return function(t,n){e(t,n,i)}},gNe=globalThis&&globalThis.__awaiter||function(i,e,t,n){function r(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(u){try{c(n.next(u))}catch(d){o(d)}}function l(u){try{c(n.throw(u))}catch(d){o(d)}}function c(u){u.done?s(u.value):r(u.value).then(a,l)}c((n=n.apply(i,e||[])).next())})};let A1=class{constructor(e,t,n,r,s,o){this._editor=e,this._languageFeaturesService=t,this._commandService=r,this._notificationService=s,this._codeLensCache=o,this._disposables=new Je,this._localToDispose=new Je,this._lenses=[],this._oldCodeLensModels=new Je,this._provideCodeLensDebounce=n.for(t.codeLensProvider,"CodeLensProvide",{min:250}),this._resolveCodeLensesDebounce=n.for(t.codeLensProvider,"CodeLensResolve",{min:250,salt:"resolve"}),this._resolveCodeLensesScheduler=new ri(()=>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(a=>{(a.hasChanged(44)||a.hasChanged(16)||a.hasChanged(15))&&this._updateLensStyle(),a.hasChanged(14)&&this._onModelChange()})),this._disposables.add(t.codeLensProvider.onDidChange(this._onModelChange,this)),this._onModelChange(),this._styleClassName="_"+v$(this._editor.getId()).toString(16),this._styleElement=Ka($b(this._editor.getContainerDomNode())?this._editor.getContainerDomNode():void 0),this._updateLensStyle()}dispose(){var e;this._localDispose(),this._disposables.dispose(),this._oldCodeLensModels.dispose(),(e=this._currentCodeLensModel)===null||e===void 0||e.dispose(),this._styleElement.remove()}_getLayoutInfo(){let e=this._editor.getOption(16),t;return!e||e<5?(e=this._editor.getOption(46)*.9|0,t=this._editor.getOption(59)):t=e*Math.max(1.3,this._editor.getOption(59)/this._editor.getOption(46))|0,{codeLensHeight:t,fontSize:e}}_updateLensStyle(){const{codeLensHeight:e,fontSize:t}=this._getLayoutInfo(),n=this._editor.getOption(15),r=this._editor.getOption(44),s=`--codelens-font-family${this._styleClassName}`,o=`--codelens-font-features${this._styleClassName}`;let a=` + .monaco-editor .codelens-decoration.${this._styleClassName} { line-height: ${e}px; font-size: ${t}px; padding-right: ${Math.round(t*.5)}px; font-feature-settings: var(${o}) } + .monaco-editor .codelens-decoration.${this._styleClassName} span.codicon { line-height: ${e}px; font-size: ${t}px; } + `;n&&(a+=`.monaco-editor .codelens-decoration.${this._styleClassName} { font-family: var(${s}), ${Ms.fontFamily}}`),this._styleElement.textContent=a,this._editor.getContainerDomNode().style.setProperty(s,n??"inherit"),this._editor.getContainerDomNode().style.setProperty(o,r.fontFeatureSettings),this._editor.changeViewZones(l=>{for(let c of this._lenses)c.updateHeight(e,l)})}_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(14))return;const t=this._codeLensCache.get(e);if(t&&this._renderCodeLensSymbols(t),!this._languageFeaturesService.codeLensProvider.has(e)){t&&this._localToDispose.add(Mg(()=>{const r=this._codeLensCache.get(e);t===r&&(this._codeLensCache.delete(e),this._onModelChange())},30*1e3));return}for(const r of this._languageFeaturesService.codeLensProvider.all(e))if(typeof r.onDidChange=="function"){let s=r.onDidChange(()=>n.schedule());this._localToDispose.add(s)}const n=new ri(()=>{var r;const s=Date.now();(r=this._getCodeLensModelPromise)===null||r===void 0||r.cancel(),this._getCodeLensModelPromise=Yr(o=>kZ(this._languageFeaturesService.codeLensProvider,e,o)),this._getCodeLensModelPromise.then(o=>{this._currentCodeLensModel&&this._oldCodeLensModels.add(this._currentCodeLensModel),this._currentCodeLensModel=o,this._codeLensCache.put(e,o);const a=this._provideCodeLensDebounce.update(e,Date.now()-s);n.delay=a,this._renderCodeLensSymbols(o),this._resolveCodeLensesInViewportSoon()},Jt)},this._provideCodeLensDebounce.get(e));this._localToDispose.add(n),this._localToDispose.add(fn(()=>this._resolveCodeLensesScheduler.cancel())),this._localToDispose.add(this._editor.onDidChangeModelContent(()=>{this._editor.changeDecorations(r=>{this._editor.changeViewZones(s=>{let o=[],a=-1;this._lenses.forEach(c=>{!c.isValid()||a===c.getLineNumber()?o.push(c):(c.update(s),a=c.getLineNumber())});let l=new IN;o.forEach(c=>{c.dispose(l,s),this._lenses.splice(this._lenses.indexOf(c),1)}),l.commit(r)})}),n.schedule()})),this._localToDispose.add(this._editor.onDidFocusEditorWidget(()=>{n.schedule()})),this._localToDispose.add(this._editor.onDidScrollChange(r=>{r.scrollTopChanged&&this._lenses.length>0&&this._resolveCodeLensesInViewportSoon()})),this._localToDispose.add(this._editor.onDidLayoutChange(()=>{this._resolveCodeLensesInViewportSoon()})),this._localToDispose.add(fn(()=>{if(this._editor.getModel()){const r=rf.capture(this._editor);this._editor.changeDecorations(s=>{this._editor.changeViewZones(o=>{this._disposeAllLenses(s,o)})}),r.restore(this._editor)}else this._disposeAllLenses(void 0,void 0)})),this._localToDispose.add(this._editor.onMouseDown(r=>{if(r.target.type!==9)return;let s=r.target.element;if((s==null?void 0:s.tagName)==="SPAN"&&(s=s.parentElement),(s==null?void 0:s.tagName)==="A")for(const o of this._lenses){let a=o.getCommand(s);if(a){this._commandService.executeCommand(a.id,...a.arguments||[]).catch(l=>this._notificationService.error(l));break}}})),n.schedule()}_disposeAllLenses(e,t){const n=new IN;for(const r of this._lenses)r.dispose(n,t);e&&n.commit(e),this._lenses.length=0}_renderCodeLensSymbols(e){if(!this._editor.hasModel())return;let t=this._editor.getModel().getLineCount(),n=[],r;for(let a of e.lenses){let l=a.symbol.range.startLineNumber;l<1||l>t||(r&&r[r.length-1].symbol.range.startLineNumber===l?r.push(a):(r=[a],n.push(r)))}const s=rf.capture(this._editor),o=this._getLayoutInfo();this._editor.changeDecorations(a=>{this._editor.changeViewZones(l=>{const c=new IN;let u=0,d=0;for(;dthis._resolveCodeLensesInViewportSoon())),u++,d++)}for(;uthis._resolveCodeLensesInViewportSoon())),d++;c.commit(a)})}),s.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=[],r=[];if(this._lenses.forEach(a=>{const l=a.computeIfNecessary(t);l&&(n.push(l),r.push(a))}),n.length===0)return;const s=Date.now(),o=Yr(a=>{const l=n.map((c,u)=>{const d=new Array(c.length),h=c.map((f,g)=>!f.symbol.command&&typeof f.provider.resolveCodeLens=="function"?Promise.resolve(f.provider.resolveCodeLens(t,f.symbol,a)).then(p=>{d[g]=p},Or):(d[g]=f.symbol,Promise.resolve(void 0)));return Promise.all(h).then(()=>{!a.isCancellationRequested&&!r[u].isDisposed()&&r[u].updateCommands(d)})});return Promise.all(l)});this._resolveCodeLensesPromise=o,this._resolveCodeLensesPromise.then(()=>{const a=this._resolveCodeLensesDebounce.update(t,Date.now()-s);this._resolveCodeLensesScheduler.delay=a,this._currentCodeLensModel&&this._codeLensCache.put(t,this._currentCodeLensModel),this._oldCodeLensModels.clear(),o===this._resolveCodeLensesPromise&&(this._resolveCodeLensesPromise=void 0)},a=>{Jt(a),o===this._resolveCodeLensesPromise&&(this._resolveCodeLensesPromise=void 0)})}getModel(){return this._currentCodeLensModel}};A1.ID="css.editor.codeLens",A1=fNe([Dw(1,yt),Dw(2,nl),Dw(3,rr),Dw(4,or),Dw(5,EZ)],A1),Gn(A1.ID,A1),ot(class extends wt{constructor(){super({id:"codelens.showLensesInCurrentLine",precondition:ie.hasCodeLensProvider,label:C("showLensOnLine","Show CodeLens Commands For Current Line"),alias:"Show CodeLens Commands For Current Line"})}run(e,t){return gNe(this,void 0,void 0,function*(){if(!t.hasModel())return;const n=e.get(Ad),r=e.get(rr),s=e.get(or),o=t.getSelection().positionLineNumber,a=t.getContribution(A1.ID);if(!a)return;const l=a.getModel();if(!l)return;const c=[];for(const d of l.lenses)d.symbol.command&&d.symbol.range.startLineNumber===o&&c.push({label:d.symbol.command.title,command:d.symbol.command});if(c.length===0)return;const u=yield n.pick(c,{canPickMany:!1});if(u){if(l.isDisposed)return yield r.executeCommand(this.id);try{yield r.executeCommand(u.command.id,...u.command.arguments||[])}catch(d){s.error(d)}}})}});function pNe(i,e,t){const n=[],s=i.ordered(e).reverse().map(o=>Promise.resolve(o.provideDocumentColors(e,t)).then(a=>{if(Array.isArray(a))for(let l of a)n.push({colorInfo:l,provider:o})}));return Promise.all(s).then(()=>n)}function TZ(i,e,t,n){return Promise.resolve(t.provideColorPresentations(i,e,n))}An.registerCommand("_executeDocumentColorProvider",function(i,...e){const[t]=e;if(!(t instanceof Pt))throw ic();const{colorProvider:n}=i.get(yt),r=i.get(Pi).getModel(t);if(!r)throw ic();const s=[],a=n.ordered(r).reverse().map(l=>Promise.resolve(l.provideDocumentColors(r,mn.None)).then(c=>{if(Array.isArray(c))for(let u of c)s.push({range:u.range,color:[u.color.red,u.color.green,u.color.blue,u.color.alpha]})}));return Promise.all(a).then(()=>s)}),An.registerCommand("_executeColorPresentationProvider",function(i,...e){const[t,n]=e,{uri:r,range:s}=n;if(!(r instanceof Pt)||!Array.isArray(t)||t.length!==4||!H.isIRange(s))throw ic();const[o,a,l,c]=t,{colorProvider:u}=i.get(yt),d=i.get(Pi).getModel(r);if(!d)throw ic();const h={range:s,color:{red:o,green:a,blue:l,alpha:c}},f=[],p=u.ordered(d).reverse().map(m=>Promise.resolve(m.provideColorPresentations(d,h,mn.None)).then(_=>{Array.isArray(_)&&f.push(..._)}));return Promise.all(p).then(()=>f)});var mNe=globalThis&&globalThis.__decorate||function(i,e,t,n){var r=arguments.length,s=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(s=(r<3?o(s):r>3?o(e,t,s):o(e,t))||s);return r>3&&s&&Object.defineProperty(e,t,s),s},DN=globalThis&&globalThis.__param||function(i,e){return function(t,n){e(t,n,i)}},_Ne=globalThis&&globalThis.__awaiter||function(i,e,t,n){function r(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(u){try{c(n.next(u))}catch(d){o(d)}}function l(u){try{c(n.throw(u))}catch(d){o(d)}}function c(u){u.done?s(u.value):r(u.value).then(a,l)}c((n=n.apply(i,e||[])).next())})};const IZ=Object.create({}),bNe=500;let Up=class aue extends Ne{constructor(e,t,n,r){super(),this._editor=e,this._configurationService=t,this._languageFeaturesService=n,this._localToDispose=this._register(new Je),this._decorationsIds=[],this._colorDatas=new Map,this._colorDecoratorIds=new Set,this._ruleFactory=new nv(this._editor),this._colorDecorationClassRefs=this._register(new Je),this._debounceInformation=r.for(n.colorProvider,"Document Colors",{min:aue.RECOMPUTE_TIME}),this._register(e.onDidChangeModel(()=>{this._isEnabled=this.isEnabled(),this.onModelChanged()})),this._register(e.onDidChangeModelLanguage(()=>this.onModelChanged())),this._register(n.colorProvider.onDidChange(()=>this.onModelChanged())),this._register(e.onDidChangeConfiguration(()=>{let s=this._isEnabled;this._isEnabled=this.isEnabled(),s!==this._isEnabled&&(this._isEnabled?this.onModelChanged():this.removeAllDecorations())})),this._timeoutTimer=null,this._computePromise=null,this._isEnabled=this.isEnabled(),this.onModelChanged()}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 r=n.colorDecorators;if(r&&r.enable!==void 0&&!r.enable)return r.enable}return this._editor.getOption(17)}static get(e){return e.getContribution(this.ID)}dispose(){this.stop(),this.removeAllDecorations(),super.dispose()}onModelChanged(){if(this.stop(),!this._isEnabled)return;const e=this._editor.getModel();!e||!this._languageFeaturesService.colorProvider.has(e)||(this._localToDispose.add(this._editor.onDidChangeModelContent(()=>{this._timeoutTimer||(this._timeoutTimer=new Wo,this._timeoutTimer.cancelAndSet(()=>{this._timeoutTimer=null,this.beginCompute()},this._debounceInformation.get(e)))})),this.beginCompute())}beginCompute(){this._computePromise=Yr(e=>_Ne(this,void 0,void 0,function*(){const t=this._editor.getModel();if(!t)return Promise.resolve([]);const n=new go(!1),r=yield pNe(this._languageFeaturesService.colorProvider,t,e);return this._debounceInformation.update(t,n.elapsed()),r})),this._computePromise.then(e=>{this.updateDecorations(e),this.updateColorDecorators(e),this._computePromise=null},Jt)}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:cn.EMPTY}));this._decorationsIds=this._editor.deltaDecorations(this._decorationsIds,t),this._colorDatas=new Map,this._decorationsIds.forEach((n,r)=>this._colorDatas.set(n,e[r]))}updateColorDecorators(e){this._colorDecorationClassRefs.clear();let t=[];for(let n=0;nthis._colorDatas.has(r.id));return n.length===0?null:this._colorDatas.get(n[0].id)}isColorDecorationId(e){return this._colorDecoratorIds.has(e)}};Up.ID="editor.contrib.colorDetector",Up.RECOMPUTE_TIME=1e3,Up=mNe([DN(1,ui),DN(2,yt),DN(3,nl)],Up),Gn(Up.ID,Up);class vNe{constructor(e,t,n){this.presentationIndex=n,this._onColorFlushed=new be,this.onColorFlushed=this._onColorFlushed.event,this._onDidChangeColor=new be,this.onDidChangeColor=this._onDidChangeColor.event,this._onDidChangePresentation=new be,this.onDidChangePresentation=this._onDidChangePresentation.event,this.originalColor=e,this._color=e,this._colorPresentations=t}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)}selectNextColorPresentation(){this.presentationIndex=(this.presentationIndex+1)%this.colorPresentations.length,this.flushColor(),this._onDidChangePresentation.fire(this.presentation)}guessColorPresentation(e,t){for(let n=0;n{this.backgroundColor=o.getColor(Jg)||Ie.white})),this._register(Xe(this.pickedColorNode,Nt.CLICK,()=>this.model.selectNextColorPresentation())),this._register(Xe(s,Nt.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=Ie.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)}onDidChangeColor(e){this.pickedColorNode.style.backgroundColor=Ie.Format.CSS.format(e)||"",this.pickedColorNode.classList.toggle("light",e.rgba.a<.5?this.backgroundColor.isLighter():e.isLighter()),this.onDidChangePresentation()}onDidChangePresentation(){this.pickedColorNode.textContent=this.model.presentation?this.model.presentation.label:"",this.pickedColorNode.prepend(yc(".codicon.codicon-color-mode"))}}class CNe extends Ne{constructor(e,t,n){super(),this.model=t,this.pixelRatio=n,this.domNode=yc(".colorpicker-body"),$e(e,this.domNode),this.saturationBox=new yNe(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 SNe(this.domNode,this.model),this._register(this.opacityStrip),this._register(this.opacityStrip.onDidChange(this.onDidOpacityChange,this)),this._register(this.opacityStrip.onColorFlushed(this.flushColor,this)),this.hueStrip=new kNe(this.domNode,this.model),this._register(this.hueStrip),this._register(this.hueStrip.onDidChange(this.onDidHueChange,this)),this._register(this.hueStrip.onColorFlushed(this.flushColor,this))}flushColor(){this.model.flushColor()}onDidSaturationValueChange({s:e,v:t}){const n=this.model.color.hsva;this.model.color=new Ie(new ou(n.h,e,t,n.a))}onDidOpacityChange(e){const t=this.model.color.hsva;this.model.color=new Ie(new ou(t.h,t.s,t.v,e))}onDidHueChange(e){const t=this.model.color.hsva,n=(1-e)*360;this.model.color=new Ie(new ou(n===360?0:n,t.s,t.v,t.a))}layout(){this.saturationBox.layout(),this.opacityStrip.layout(),this.hueStrip.layout()}}class yNe extends Ne{constructor(e,t,n){super(),this.model=t,this.pixelRatio=n,this._onDidChange=new be,this.onDidChange=this._onDidChange.event,this._onColorFlushed=new be,this.onColorFlushed=this._onColorFlushed.event,this.domNode=yc(".saturation-wrap"),$e(e,this.domNode),this.canvas=document.createElement("canvas"),this.canvas.className="saturation-box",$e(this.domNode,this.canvas),this.selection=yc(".saturation-selection"),$e(this.domNode,this.selection),this.layout(),this._register(PI(this.domNode,r=>this.onMouseDown(r))),this._register(this.model.onDidChangeColor(this.onDidChangeColor,this)),this.monitor=null}onMouseDown(e){this.monitor=this._register(new Zg);const t=ss(this.domNode);e.target!==this.selection&&this.onDidChangePosition(e.offsetX,e.offsetY),this.monitor.startMonitoring(e.target,e.buttons,P_,r=>this.onDidChangePosition(r.posx-t.left,r.posy-t.top),()=>null);const n=Z$(document,()=>{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)),r=Math.max(0,Math.min(1,1-t/this.height));this.paintSelection(n,r),this._onDidChange.fire({s:n,v:r})}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 Ie(new ou(e.h,1,1,1)),n=this.canvas.getContext("2d"),r=n.createLinearGradient(0,0,this.canvas.width,0);r.addColorStop(0,"rgba(255, 255, 255, 1)"),r.addColorStop(.5,"rgba(255, 255, 255, 0.5)"),r.addColorStop(1,"rgba(255, 255, 255, 0)");const s=n.createLinearGradient(0,0,0,this.canvas.height);s.addColorStop(0,"rgba(0, 0, 0, 0)"),s.addColorStop(1,"rgba(0, 0, 0, 1)"),n.rect(0,0,this.canvas.width,this.canvas.height),n.fillStyle=Ie.Format.CSS.format(t),n.fill(),n.fillStyle=r,n.fill(),n.fillStyle=s,n.fill()}paintSelection(e,t){this.selection.style.left=`${e*this.width}px`,this.selection.style.top=`${this.height-t*this.height}px`}onDidChangeColor(){this.monitor&&this.monitor.isMonitoring()||this.paint()}}class DZ extends Ne{constructor(e,t){super(),this.model=t,this._onDidChange=new be,this.onDidChange=this._onDidChange.event,this._onColorFlushed=new be,this.onColorFlushed=this._onColorFlushed.event,this.domNode=$e(e,yc(".strip")),this.overlay=$e(this.domNode,yc(".overlay")),this.slider=$e(this.domNode,yc(".slider")),this.slider.style.top="0px",this._register(PI(this.domNode,n=>this.onMouseDown(n))),this.layout()}layout(){this.height=this.domNode.offsetHeight-this.slider.offsetHeight;const e=this.getValue(this.model.color);this.updateSliderPosition(e)}onMouseDown(e){const t=this._register(new Zg),n=ss(this.domNode);this.domNode.classList.add("grabbing"),e.target!==this.slider&&this.onDidChangeTop(e.offsetY),t.startMonitoring(e.target,e.buttons,P_,s=>this.onDidChangeTop(s.posy-n.top),()=>null);const r=Z$(document,()=>{this._onColorFlushed.fire(),r.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 SNe extends DZ{constructor(e,t){super(e,t),this.domNode.classList.add("opacity-strip"),this._register(t.onDidChangeColor(this.onDidChangeColor,this)),this.onDidChangeColor(this.model.color)}onDidChangeColor(e){const{r:t,g:n,b:r}=e.rgba,s=new Ie(new kn(t,n,r,1)),o=new Ie(new kn(t,n,r,0));this.overlay.style.background=`linear-gradient(to bottom, ${s} 0%, ${o} 100%)`}getValue(e){return e.hsva.a}}class kNe extends DZ{constructor(e,t){super(e,t),this.domNode.classList.add("hue-strip")}getValue(e){return 1-e.hsva.h/360}}class ENe extends Ll{constructor(e,t,n,r){super(),this.model=t,this.pixelRatio=n,this._register(g_.onDidChange(()=>this.layout()));const s=yc(".colorpicker-widget");e.appendChild(s);const o=new wNe(s,this.model,r);this.body=new CNe(s,this.model,this.pixelRatio),this._register(o),this._register(this.body)}layout(){this.body.layout()}}var xNe=globalThis&&globalThis.__decorate||function(i,e,t,n){var r=arguments.length,s=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(s=(r<3?o(s):r>3?o(e,t,s):o(e,t))||s);return r>3&&s&&Object.defineProperty(e,t,s),s},LNe=globalThis&&globalThis.__param||function(i,e){return function(t,n){e(t,n,i)}},NZ=globalThis&&globalThis.__awaiter||function(i,e,t,n){function r(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(u){try{c(n.next(u))}catch(d){o(d)}}function l(u){try{c(n.throw(u))}catch(d){o(d)}}function c(u){u.done?s(u.value):r(u.value).then(a,l)}c((n=n.apply(i,e||[])).next())})};class TNe{constructor(e,t,n,r){this.owner=e,this.range=t,this.model=n,this.provider=r,this.forceShowAtRange=!0}isValidForHoverAnchor(e){return e.type===1&&this.range.startColumn<=e.range.startColumn&&this.range.endColumn>=e.range.endColumn}}let NN=class{constructor(e,t){this._editor=e,this._themeService=t,this.hoverOrdinal=1}computeSync(e,t){return[]}computeAsync(e,t,n){return ir.fromPromise(this._computeAsync(e,t,n))}_computeAsync(e,t,n){return NZ(this,void 0,void 0,function*(){if(!this._editor.hasModel())return[];const r=Up.get(this._editor);if(!r)return[];for(const s of t){if(!r.isColorDecorationId(s.id))continue;const o=r.getColorData(s.range.getStartPosition());if(o)return[yield this._createColorHover(this._editor.getModel(),o.colorInfo,o.provider)]}return[]})}_createColorHover(e,t,n){return NZ(this,void 0,void 0,function*(){const r=e.getValueInRange(t.range),{red:s,green:o,blue:a,alpha:l}=t.color,c=new kn(Math.round(s*255),Math.round(o*255),Math.round(a*255),l),u=new Ie(c),d=yield TZ(e,t,n,mn.None),h=new vNe(u,[],0);return h.colorPresentations=d||[],h.guessColorPresentation(u,r),new TNe(this,H.lift(t.range),h,n)})}renderHoverParts(e,t){if(t.length===0||!this._editor.hasModel())return Ne.None;const n=new Je,r=t[0],s=this._editor.getModel(),o=r.model,a=n.add(new ENe(e.fragment,o,this._editor.getOption(129),this._themeService));e.setColorPicker(a);let l=new H(r.range.startLineNumber,r.range.startColumn,r.range.endLineNumber,r.range.endColumn);const c=()=>{let d,h;if(o.presentation.textEdit){d=[o.presentation.textEdit],h=new H(o.presentation.textEdit.range.startLineNumber,o.presentation.textEdit.range.startColumn,o.presentation.textEdit.range.endLineNumber,o.presentation.textEdit.range.endColumn);const f=this._editor.getModel()._setTrackedRange(null,h,3);this._editor.pushUndoStop(),this._editor.executeEdits("colorpicker",d),h=this._editor.getModel()._getTrackedRange(f)||h}else d=[{range:l,text:o.presentation.label,forceMoveMarkers:!1}],h=l.setEndPosition(l.endLineNumber,l.startColumn+o.presentation.label.length),this._editor.pushUndoStop(),this._editor.executeEdits("colorpicker",d);o.presentation.additionalTextEdits&&(d=[...o.presentation.additionalTextEdits],this._editor.executeEdits("colorpicker",d),e.hide()),this._editor.pushUndoStop(),l=h},u=d=>TZ(s,{range:l,color:{red:d.rgba.r/255,green:d.rgba.g/255,blue:d.rgba.b/255,alpha:d.rgba.a}},r.provider,mn.None).then(h=>{o.colorPresentations=h||[]});return n.add(o.onColorFlushed(d=>{u(d).then(c)})),n.add(o.onDidChangeColor(u)),n}};NN=xNe([LNe(1,Ei)],NN);const zpt="";function AN(i,e){return!!i[e]}class RN{constructor(e,t){this.target=e.target,this.hasTriggerModifier=AN(e.event,t.triggerModifier),this.hasSideBySideModifier=AN(e.event,t.triggerSideBySideModifier),this.isNoneOrSingleMouseDown=e.event.detail<=1}}class AZ{constructor(e,t){this.keyCodeIsTriggerKey=e.keyCode===t.triggerKey,this.keyCodeIsSideBySideKey=e.keyCode===t.triggerSideBySideKey,this.hasTriggerModifier=AN(e,t.triggerModifier)}}class E3{constructor(e,t,n,r){this.triggerKey=e,this.triggerModifier=t,this.triggerSideBySideKey=n,this.triggerSideBySideModifier=r}equals(e){return this.triggerKey===e.triggerKey&&this.triggerModifier===e.triggerModifier&&this.triggerSideBySideKey===e.triggerSideBySideKey&&this.triggerSideBySideModifier===e.triggerSideBySideModifier}}function RZ(i){return i==="altKey"?gn?new E3(57,"metaKey",6,"altKey"):new E3(5,"ctrlKey",6,"altKey"):gn?new E3(6,"altKey",57,"metaKey"):new E3(6,"altKey",5,"ctrlKey")}class ON extends Ne{constructor(e){super(),this._onMouseMoveOrRelevantKeyDown=this._register(new be),this.onMouseMoveOrRelevantKeyDown=this._onMouseMoveOrRelevantKeyDown.event,this._onExecute=this._register(new be),this.onExecute=this._onExecute.event,this._onCancel=this._register(new be),this.onCancel=this._onCancel.event,this._editor=e,this._opts=RZ(this._editor.getOption(70)),this._lastMouseMoveEvent=null,this._hasTriggerKeyOnMouseDown=!1,this._lineNumberOnMouseDown=0,this._register(this._editor.onDidChangeConfiguration(t=>{if(t.hasChanged(70)){const n=RZ(this._editor.getOption(70));if(this._opts.equals(n))return;this._opts=n,this._lastMouseMoveEvent=null,this._hasTriggerKeyOnMouseDown=!1,this._lineNumberOnMouseDown=0,this._onCancel.fire()}})),this._register(this._editor.onMouseMove(t=>this._onEditorMouseMove(new RN(t,this._opts)))),this._register(this._editor.onMouseDown(t=>this._onEditorMouseDown(new RN(t,this._opts)))),this._register(this._editor.onMouseUp(t=>this._onEditorMouseUp(new RN(t,this._opts)))),this._register(this._editor.onKeyDown(t=>this._onEditorKeyDown(new AZ(t,this._opts)))),this._register(this._editor.onKeyUp(t=>this._onEditorKeyUp(new AZ(t,this._opts)))),this._register(this._editor.onMouseDrag(()=>this._resetHandler())),this._register(this._editor.onDidChangeCursorSelection(t=>this._onDidChangeCursorSelection(t))),this._register(this._editor.onDidChangeModel(t=>this._resetHandler())),this._register(this._editor.onDidChangeModelContent(()=>this._resetHandler())),this._register(this._editor.onDidScrollChange(t=>{(t.scrollTopChanged||t.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=e.target.position?e.target.position.lineNumber:0}_onEditorMouseUp(e){const t=e.target.position?e.target.position.lineNumber:0;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()}}const $pt="";var INe=globalThis&&globalThis.__decorate||function(i,e,t,n){var r=arguments.length,s=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(s=(r<3?o(s):r>3?o(e,t,s):o(e,t))||s);return r>3&&s&&Object.defineProperty(e,t,s),s},Md=globalThis&&globalThis.__param||function(i,e){return function(t,n){e(t,n,i)}};let jp=class extends Bv{constructor(e,t,n,r,s,o,a,l,c,u,d,h){super(e,Object.assign(Object.assign({},n.getRawOptions()),{overflowWidgetsDomNode:n.getOverflowWidgetsDomNode()}),{},r,s,o,a,l,c,u,d,h),this._parentEditor=n,this._overwriteOptions=t,super.updateOptions(this._overwriteOptions),this._register(n.onDidChangeConfiguration(f=>this._onParentConfigurationChanged(f)))}getParentEditor(){return this._parentEditor}_onParentConfigurationChanged(e){super.updateOptions(this._parentEditor.getRawOptions()),super.updateOptions(this._overwriteOptions)}updateOptions(e){Hc(this._overwriteOptions,e,!0),super.updateOptions(this._overwriteOptions)}};jp=INe([Md(3,_n),Md(4,Zn),Md(5,rr),Md(6,Yt),Md(7,Ei),Md(8,or),Md(9,zo),Md(10,Ss),Md(11,yt)],jp);const Upt="",OZ=new Ie(new kn(0,122,204)),DNe={showArrow:!0,showFrame:!0,className:"",frameColor:OZ,arrowColor:OZ,keepEditorSelection:!1},NNe="vs.editor.contrib.zoneWidget";class ANe{constructor(e,t,n,r,s,o){this.id="",this.domNode=e,this.afterLineNumber=t,this.afterColumn=n,this.heightInLines=r,this._onDomNodeTop=s,this._onComputedHeight=o}onDomNodeTop(e){this._onDomNodeTop(e)}onComputedHeight(e){this._onComputedHeight(e)}}class RNe{constructor(e,t){this._id=e,this._domNode=t}getId(){return this._id}getDomNode(){return this._domNode}getPosition(){return null}}class x3{constructor(e){this._editor=e,this._ruleName=x3._IdGenerator.nextId(),this._decorations=[],this._color=null,this._height=-1}dispose(){this.hide(),iU(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(){iU(this._ruleName),jI(`.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=this._editor.deltaDecorations(this._decorations,[{range:H.fromPositions(e),options:{description:"zone-widget-arrow",className:this._ruleName,stickiness:1}}])}hide(){this._editor.deltaDecorations(this._decorations,[])}}x3._IdGenerator=new H9(".arrow-decoration-");class ONe{constructor(e,t={}){this._arrow=null,this._overlayWidget=null,this._resizeSash=null,this._positionMarkerId=[],this._viewZone=null,this._disposables=new Je,this.container=null,this._isShowing=!1,this.editor=e,this.options=nd(t),Hc(this.options,DNe,!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 r=this._getWidth(n);this.domNode.style.width=r+"px",this.domNode.style.left=this._getLeft(n)+"px",this._onWidth(r)}))}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.editor.deltaDecorations(this._positionMarkerId,[]),this._positionMarkerId=[],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 x3(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){let e=this.options.frameColor.toString();this.container.style.borderTopColor=e,this.container.style.borderBottomColor=e}if(this._arrow&&this.options.arrowColor){let 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){if(this.domNode.style.height=`${e}px`,this.container){let t=e-this._decoratingElementsHeight();this.container.style.height=`${t}px`;const n=this.editor.getLayoutInfo();this._doLayout(t,this._getWidth(n))}this._resizeSash&&this._resizeSash.layout()}get position(){const[e]=this._positionMarkerId;if(!e)return;const t=this.editor.getModel();if(!t)return;const n=t.getDecorationRange(e);if(n)return n.getStartPosition()}show(e,t){const n=H.isIRange(e)?H.lift(e):H.fromPositions(e);this._isShowing=!0,this._showImpl(n,t),this._isShowing=!1,this._positionMarkerId=this.editor.deltaDecorations(this._positionMarkerId,[{range:n,options:cn.EMPTY}])}hide(){this._viewZone&&(this.editor.changeViewZones(e=>{this._viewZone&&e.removeZone(this._viewZone.id)}),this._viewZone=null),this._overlayWidget&&(this.editor.removeOverlayWidget(this._overlayWidget),this._overlayWidget=null),this._arrow&&this._arrow.hide()}_decoratingElementsHeight(){let e=this.editor.getOption(59),t=0;if(this.options.showArrow){let n=Math.round(e/3);t+=2*n}if(this.options.showFrame){let n=Math.round(e/9);t+=2*n}return t}_showImpl(e,t){const n=e.getStartPosition(),r=this.editor.getLayoutInfo(),s=this._getWidth(r);this.domNode.style.width=`${s}px`,this.domNode.style.left=this._getLeft(r)+"px";const o=document.createElement("div");o.style.overflow="hidden";const a=this.editor.getOption(59),l=Math.max(12,this.editor.getLayoutInfo().height/a*.8);t=Math.min(t,l);let c=0,u=0;if(this._arrow&&this.options.showArrow&&(c=Math.round(a/3),this._arrow.height=c,this._arrow.show(n)),this.options.showFrame&&(u=Math.round(a/9)),this.editor.changeViewZones(f=>{this._viewZone&&f.removeZone(this._viewZone.id),this._overlayWidget&&(this.editor.removeOverlayWidget(this._overlayWidget),this._overlayWidget=null),this.domNode.style.top="-1000px",this._viewZone=new ANe(o,n.lineNumber,n.column,t,g=>this._onViewZoneTop(g),g=>this._onViewZoneHeight(g)),this._viewZone.id=f.addZone(this._viewZone),this._overlayWidget=new RNe(NNe+this._viewZone.id,this.domNode),this.editor.addOverlayWidget(this._overlayWidget)}),this.container&&this.options.showFrame){const f=this.options.frameWidth?this.options.frameWidth:u;this.container.style.borderTopWidth=f+"px",this.container.style.borderBottomWidth=f+"px"}let d=t*a-this._decoratingElementsHeight();this.container&&(this.container.style.top=c+"px",this.container.style.height=d+"px",this.container.style.overflow="hidden"),this._doLayout(d,s),this.options.keepEditorSelection||this.editor.setSelection(e);const h=this.editor.getModel();if(h){const f=e.endLineNumber+1;f<=h.getLineCount()?this.revealLine(f,!1):this.revealLine(h.getLineCount(),!0)}}revealLine(e,t){t?this.editor.revealLineInCenter(e,0):this.editor.revealLine(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 Ls(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){let n=(t.currentY-e.startY)/this.editor.getOption(59),r=n<0?Math.ceil(n):Math.floor(n),s=e.heightInLines+r;s>5&&s<35&&this._relayout(s)}}))}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}}const jpt="";class MNe extends N_{constructor(e,t){super(),this._onDidChangeVisibility=this._register(new be),this.onDidChangeVisibility=this._onDidChangeVisibility.event,this._element=$e(e,Ze(".monaco-dropdown")),this._label=$e(this._element,Ze(".dropdown-label"));let n=t.labelRenderer;n||(n=s=>(s.textContent=t.label||"",null));for(const s of[Nt.CLICK,Nt.MOUSE_DOWN,bi.Tap])this._register(Xe(this.element,s,o=>Xn.stop(o,!0)));for(const s of[Nt.MOUSE_DOWN,bi.Tap])this._register(Xe(this._label,s,o=>{o instanceof MouseEvent&&o.detail>1||(this.visible?this.hide():this.show())}));this._register(Xe(this._label,Nt.KEY_UP,s=>{const o=new ki(s);(o.equals(3)||o.equals(10))&&(Xn.stop(s,!0),this.visible?this.hide():this.show())}));const r=n(this._label);r&&this._register(r),this._register(ei.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 PNe extends MNe{constructor(e,t){super(e,t),this._actions=[],this._contextMenuProvider=t.contextMenuProvider,this.actions=t.actions||[],this.actionProvider=t.actionProvider,this.menuClassName=t.menuClassName||"",this.menuAsChild=!!t.menuAsChild}set menuOptions(e){this._menuOptions=e}get menuOptions(){return this._menuOptions}get actions(){return this.actionProvider?this.actionProvider.getActions():this._actions}set actions(e){this._actions=e}show(){super.show(),this.element.classList.add("active"),this._contextMenuProvider.showContextMenu({getAnchor:()=>this.element,getActions:()=>this.actions,getActionsContext:()=>this.menuOptions?this.menuOptions.context:null,getActionViewItem:e=>this.menuOptions&&this.menuOptions.actionViewItemProvider?this.menuOptions.actionViewItemProvider(e):void 0,getKeyBinding:e=>this.menuOptions&&this.menuOptions.getKeyBinding?this.menuOptions.getKeyBinding(e):void 0,getMenuClassName:()=>this.menuClassName,onHide:()=>this.onHide(),actionRunner:this.menuOptions?this.menuOptions.actionRunner:void 0,anchorAlignment:this.menuOptions?this.menuOptions.anchorAlignment:0,domForShadowRoot:this.menuAsChild?this.element:void 0})}hide(){super.hide()}onHide(){this.hide(),this.element.classList.remove("active")}}class MZ extends _u{constructor(e,t,n,r=Object.create(null)){super(null,e,r),this.actionItem=null,this._onDidChangeVisibility=this._register(new be),this.menuActionsOrProvider=t,this.contextMenuProvider=n,this.options=r,this.options.actionRunner&&(this.actionRunner=this.options.actionRunner)}render(e){this.actionItem=e;const t=s=>{this.element=$e(s,Ze("a.action-label"));let o=[];return typeof this.options.classNames=="string"?o=this.options.classNames.split(/\s+/g).filter(a=>!!a):this.options.classNames&&(o=this.options.classNames),o.find(a=>a==="icon")||o.push("codicon"),this.element.classList.add(...o),this.element.setAttribute("role","button"),this.element.setAttribute("aria-haspopup","true"),this.element.setAttribute("aria-expanded","false"),this.element.title=this._action.label||"",null},n=Array.isArray(this.menuActionsOrProvider),r={contextMenuProvider:this.contextMenuProvider,labelRenderer:t,menuAsChild:this.options.menuAsChild,actions:n?this.menuActionsOrProvider:void 0,actionProvider:n?void 0:this.menuActionsOrProvider};if(this.dropdownMenu=this._register(new PNe(e,r)),this._register(this.dropdownMenu.onDidChangeVisibility(s=>{var o;(o=this.element)===null||o===void 0||o.setAttribute("aria-expanded",`${s}`),this._onDidChangeVisibility.fire(s)})),this.dropdownMenu.menuOptions={actionViewItemProvider:this.options.actionViewItemProvider,actionRunner:this.actionRunner,getKeyBinding:this.options.keybindingProvider,context:this._context},this.options.anchorAlignmentProvider){const s=this;this.dropdownMenu.menuOptions=Object.assign(Object.assign({},this.dropdownMenu.menuOptions),{get anchorAlignment(){return s.options.anchorAlignmentProvider()}})}this.updateEnabled()}setActionContext(e){super.setActionContext(e),this.dropdownMenu&&(this.dropdownMenu.menuOptions?this.dropdownMenu.menuOptions.context=e:this.dropdownMenu.menuOptions={context:e})}updateEnabled(){var e,t;const n=!this.getAction().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)}}const qpt="";var MN=globalThis&&globalThis.__decorate||function(i,e,t,n){var r=arguments.length,s=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(s=(r<3?o(s):r>3?o(e,t,s):o(e,t))||s);return r>3&&s&&Object.defineProperty(e,t,s),s},Iu=globalThis&&globalThis.__param||function(i,e){return function(t,n){e(t,n,i)}},PZ=globalThis&&globalThis.__awaiter||function(i,e,t,n){function r(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(u){try{c(n.next(u))}catch(d){o(d)}}function l(u){try{c(n.throw(u))}catch(d){o(d)}}function c(u){u.done?s(u.value):r(u.value).then(a,l)}c((n=n.apply(i,e||[])).next())})};function FNe(i,e,t,n,r,s,o){const a=i.getActions(e);return VNe(a,t,!1,typeof n=="string"?c=>c===n:n,r,s,o),BNe(a)}function BNe(i){const e=new Je;for(const[,t]of i)for(const n of t)e.add(n);return e}function VNe(i,e,t,n=a=>a==="navigation",r=Number.MAX_SAFE_INTEGER,s=()=>!1,o=!1){let a,l;Array.isArray(e)?(a=e,l=e):(a=e.primary,l=e.secondary);const c=new Set;for(const[u,d]of i){let h;n(u)?(h=a,h.length>0&&o&&h.push(new Ya)):(h=l,h.length>0&&h.push(new Ya));for(let f of d){t&&(f=f instanceof Bh&&f.alt?f.alt:f);const g=h.push(f);f instanceof xS&&c.add({group:u,action:f,index:g-1})}}for(const{group:u,action:d,index:h}of c){const f=n(u)?a:l,g=d.actions;(g.length<=1||f.length+g.length-2<=r)&&s(d,u,f.length)&&f.splice(h,1,...g)}if(a!==l&&a.length>r){const u=a.splice(r,a.length-r);l.unshift(...u,new Ya)}}let R1=class extends Vv{constructor(e,t,n,r,s){super(void 0,e,{icon:!!(e.class||e.item.icon),label:!e.class&&!e.item.icon,draggable:t==null?void 0:t.draggable}),this._keybindingService=n,this._notificationService=r,this._contextKeyService=s,this._wantsAltCommand=!1,this._itemClassDispose=this._register(new qs),this._altKey=Ug.getInstance()}get _menuItemAction(){return this._action}get _commandAction(){return this._wantsAltCommand&&this._menuItemAction.alt||this._menuItemAction}onClick(e){return PZ(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){super.render(e),e.classList.add("menu-entry"),this._updateItemClass(this._menuItemAction.item);let t=!1,n=this._altKey.keyStatus.altKey||(Gr||ws)&&this._altKey.keyStatus.shiftKey;const r=()=>{const s=t&&n;s!==this._wantsAltCommand&&(this._wantsAltCommand=s,this.updateLabel(),this.updateTooltip(),this.updateClass())};this._menuItemAction.alt&&this._register(this._altKey.event(s=>{n=s.altKey||(Gr||ws)&&s.shiftKey,r()})),this._register(Xe(e,"mouseleave",s=>{t=!1,r()})),this._register(Xe(e,"mouseenter",s=>{t=!0,r()}))}updateLabel(){this.options.label&&this.label&&(this.label.textContent=this._commandAction.label)}updateTooltip(){if(this.label){const e=this._keybindingService.lookupKeybinding(this._commandAction.id,this._contextKeyService),t=e&&e.getLabel(),n=this._commandAction.tooltip||this._commandAction.label;let r=t?C("titleAndKb","{0} ({1})",n,t):n;if(!this._wantsAltCommand&&this._menuItemAction.alt){const s=this._menuItemAction.alt.tooltip||this._menuItemAction.alt.label,o=this._keybindingService.lookupKeybinding(this._menuItemAction.alt.id,this._contextKeyService),a=o&&o.getLabel(),l=a?C("titleAndKb","{0} ({1})",s,a):s;r+=` +[${YD.modifierLabels[Pa].altKey}] ${l}`}this.label.title=r}}updateClass(){this.options.icon&&(this._commandAction!==this._menuItemAction?this._menuItemAction.alt&&this._updateItemClass(this._menuItemAction.alt.item):this._menuItemAction.alt&&this._updateItemClass(this._menuItemAction.item))}_updateItemClass(e){var t;this._itemClassDispose.value=void 0;const{element:n,label:r}=this;if(!n||!r)return;const s=this._commandAction.checked&&(!((t=e.toggled)===null||t===void 0)&&t.icon)?e.toggled.icon:e.icon;if(s)if(hi.isThemeIcon(s)){const o=hi.asClassNameArray(s);r.classList.add(...o),this._itemClassDispose.value=fn(()=>{r.classList.remove(...o)})}else s.light&&r.style.setProperty("--menu-entry-icon-light",$g(s.light)),s.dark&&r.style.setProperty("--menu-entry-icon-dark",$g(s.dark)),r.classList.add("icon"),this._itemClassDispose.value=fn(()=>{r.classList.remove("icon"),r.style.removeProperty("--menu-entry-icon-light"),r.style.removeProperty("--menu-entry-icon-dark")})}};R1=MN([Iu(2,qi),Iu(3,or),Iu(4,Yt)],R1);let PN=class extends MZ{constructor(e,t,n){var r,s;const o=Object.assign({},t??Object.create(null),{menuAsChild:(r=t==null?void 0:t.menuAsChild)!==null&&r!==void 0?r:!1,classNames:(s=t==null?void 0:t.classNames)!==null&&s!==void 0?s:hi.isThemeIcon(e.item.icon)?hi.asClassName(e.item.icon):void 0});super(e,{getActions:()=>e.actions},n,o)}render(e){if(super.render(e),this.element){e.classList.add("menu-entry");const{icon:t}=this._action.item;t&&!hi.isThemeIcon(t)&&(this.element.classList.add("icon"),t.light&&this.element.style.setProperty("--menu-entry-icon-light",$g(t.light)),t.dark&&this.element.style.setProperty("--menu-entry-icon-dark",$g(t.dark)))}}};PN=MN([Iu(2,sf)],PN);let FN=class extends _u{constructor(e,t,n,r,s,o,a,l){var c,u,d;super(null,e),this._keybindingService=n,this._notificationService=r,this._contextMenuService=s,this._menuService=o,this._instaService=a,this._storageService=l,this._container=null,this._storageKey=`${e.item.submenu._debugName}_lastActionId`;let h,f=l.get(this._storageKey,1);f&&(h=e.actions.find(p=>f===p.id)),h||(h=e.actions[0]),this._defaultAction=this._instaService.createInstance(R1,h,void 0);const g=Object.assign({},t??Object.create(null),{menuAsChild:(c=t==null?void 0:t.menuAsChild)!==null&&c!==void 0?c:!0,classNames:(u=t==null?void 0:t.classNames)!==null&&u!==void 0?u:["codicon","codicon-chevron-down"],actionRunner:(d=t==null?void 0:t.actionRunner)!==null&&d!==void 0?d:new N_});this._dropdown=new MZ(e,e.actions,this._contextMenuService,g),this._dropdown.actionRunner.onDidRun(p=>{p.action instanceof Bh&&this.update(p.action)})}update(e){this._storageService.store(this._storageKey,e.id,1,0),this._defaultAction.dispose(),this._defaultAction=this._instaService.createInstance(R1,e,void 0),this._defaultAction.actionRunner=new class extends N_{runAction(t,n){return PZ(this,void 0,void 0,function*(){yield t.run(void 0)})}},this._container&&this._defaultAction.render(cSe(this._container,Ze(".action-container")))}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=Ze(".action-container");this._defaultAction.render($e(this._container,t)),this._register(Xe(t,Nt.KEY_DOWN,r=>{const s=new ki(r);s.equals(17)&&(this._defaultAction.element.tabIndex=-1,this._dropdown.focus(),s.stopPropagation())}));const n=Ze(".dropdown-action-container");this._dropdown.render($e(this._container,n)),this._register(Xe(n,Nt.KEY_DOWN,r=>{var s;const o=new ki(r);o.equals(15)&&(this._defaultAction.element.tabIndex=0,this._dropdown.setFocusable(!1),(s=this._defaultAction.element)===null||s===void 0||s.focus(),o.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()}};FN=MN([Iu(2,qi),Iu(3,or),Iu(4,sf),Iu(5,Kg),Iu(6,_n),Iu(7,Lu)],FN);function WNe(i,e,t){return e instanceof Bh?i.createInstance(R1,e,void 0):e instanceof JI?e.item.rememberDefaultAction?i.createInstance(FN,e,t):i.createInstance(PN,e,t):void 0}var FZ=globalThis&&globalThis.__decorate||function(i,e,t,n){var r=arguments.length,s=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(s=(r<3?o(s):r>3?o(e,t,s):o(e,t))||s);return r>3&&s&&Object.defineProperty(e,t,s),s},BZ=globalThis&&globalThis.__param||function(i,e){return function(t,n){e(t,n,i)}};const VZ=Ln("IPeekViewService");On(VZ,class{constructor(){this._widgets=new Map}addExclusiveWidget(i,e){const t=this._widgets.get(i);t&&(t.listener.dispose(),t.widget.dispose());const n=()=>{const r=this._widgets.get(i);r&&r.widget===e&&(r.listener.dispose(),this._widgets.delete(i))};this._widgets.set(i,{widget:e,listener:e.onDidClose(n)})}});var Co;(function(i){i.inPeekEditor=new mt("inReferenceSearchEditor",!0,C("inReferenceSearchEditor","Whether the current code editor is embedded inside peek")),i.notInPeekEditor=i.inPeekEditor.toNegated()})(Co||(Co={}));let Nw=class{constructor(e,t){e instanceof jp&&Co.inPeekEditor.bindTo(t)}dispose(){}};Nw.ID="editor.contrib.referenceController",Nw=FZ([BZ(1,Yt)],Nw),Gn(Nw.ID,Nw);function HNe(i){let e=i.get(Zn).getFocusedCodeEditor();return e instanceof jp?e.getParentEditor():e}const zNe={headerBackgroundColor:Ie.white,primaryHeadingColor:Ie.fromHex("#333333"),secondaryHeadingColor:Ie.fromHex("#6c6c6cb3")};let L3=class extends ONe{constructor(e,t,n){super(e,t),this.instantiationService=n,this._onDidClose=new be,this.onDidClose=this._onDidClose.event,Hc(this.options,zNe,!1)}dispose(){this.disposed||(this.disposed=!0,super.dispose(),this._onDidClose.fire(this))}style(e){let 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();let 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=Ze(".head"),this._bodyElement=Ze(".body"),this._fillHead(this._headElement),this._fillBody(this._bodyElement),e.appendChild(this._headElement),e.appendChild(this._bodyElement)}_fillHead(e,t){const n=Ze(".peekview-title");this.options.supportOnTitleClick&&(n.classList.add("clickable"),Zr(n,"click",o=>this._onTitleClick(o))),$e(this._headElement,n),this._fillTitleIcon(n),this._primaryHeading=Ze("span.filename"),this._secondaryHeading=Ze("span.dirname"),this._metaHeading=Ze("span.meta"),$e(n,this._primaryHeading,this._secondaryHeading,this._metaHeading);const r=Ze(".peekview-actions");$e(this._headElement,r);const s=this._getActionBarOptions();this._actionbarWidget=new bu(r,s),this._disposables.add(this._actionbarWidget),t||this._actionbarWidget.push(new Ho("peekview.close",C("label.close","Close"),k.close.classNames,!0,()=>(this.dispose(),Promise.resolve())),{label:!1,icon:!0})}_fillTitleIcon(e){}_getActionBarOptions(){return{actionViewItemProvider:WNe.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:Dr(this._secondaryHeading))}setMetaTitle(e){this._metaHeading&&(e?(this._metaHeading.innerText=e,fa(this._metaHeading)):po(this._metaHeading))}_doLayout(e,t){if(!this._isShowing&&e<0){this.dispose();return}const n=Math.ceil(this.editor.getOption(59)*1.2),r=Math.round(e-(n+2));this._doLayoutHead(n,t),this._doLayoutBody(r,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`)}};L3=FZ([BZ(2,_n)],L3);const $Ne=oe("peekViewTitle.background",{dark:Wt(ma,.1),light:Wt(ma,.1),hc:null},C("peekViewTitleBackground","Background color of the peek view title area.")),WZ=oe("peekViewTitleLabel.foreground",{dark:Ie.white,light:Ie.black,hc:Ie.white},C("peekViewTitleForeground","Color of the peek view title.")),HZ=oe("peekViewTitleDescription.foreground",{dark:"#ccccccb3",light:"#616161",hc:"#FFFFFF99"},C("peekViewTitleInfoForeground","Color of the peek view title info.")),UNe=oe("peekView.border",{dark:ma,light:ma,hc:Ai},C("peekViewBorder","Color of the peek view borders and arrow.")),jNe=oe("peekViewResult.background",{dark:"#252526",light:"#F3F3F3",hc:Ie.black},C("peekViewResultsBackground","Background color of the peek view result list."));oe("peekViewResult.lineForeground",{dark:"#bbbbbb",light:"#646465",hc:Ie.white},C("peekViewResultsMatchForeground","Foreground color for line nodes in the peek view result list.")),oe("peekViewResult.fileForeground",{dark:Ie.white,light:"#1E1E1E",hc:Ie.white},C("peekViewResultsFileForeground","Foreground color for file nodes in the peek view result list.")),oe("peekViewResult.selectionBackground",{dark:"#3399ff33",light:"#3399ff33",hc:null},C("peekViewResultsSelectionBackground","Background color of the selected entry in the peek view result list.")),oe("peekViewResult.selectionForeground",{dark:Ie.white,light:"#6C6C6C",hc:Ie.white},C("peekViewResultsSelectionForeground","Foreground color of the selected entry in the peek view result list."));const BN=oe("peekViewEditor.background",{dark:"#001F33",light:"#F2F8FC",hc:Ie.black},C("peekViewEditorBackground","Background color of the peek view editor."));oe("peekViewEditorGutter.background",{dark:BN,light:BN,hc:BN},C("peekViewEditorGutterBackground","Background color of the gutter in the peek view editor.")),oe("peekViewResult.matchHighlightBackground",{dark:"#ea5c004d",light:"#ea5c004d",hc:null},C("peekViewResultsMatchHighlight","Match highlight color in the peek view result list.")),oe("peekViewEditor.matchHighlightBackground",{dark:"#ff8f0099",light:"#f5d802de",hc:null},C("peekViewEditorMatchHighlight","Match highlight color in the peek view editor.")),oe("peekViewEditor.matchHighlightBorder",{dark:null,light:null,hc:Fs},C("peekViewEditorMatchHighlightBorder","Match highlight border in the peek view editor."));var qNe=globalThis&&globalThis.__awaiter||function(i,e,t,n){function r(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(u){try{c(n.next(u))}catch(d){o(d)}}function l(u){try{c(n.throw(u))}catch(d){o(d)}}function c(u){u.done?s(u.value):r(u.value).then(a,l)}c((n=n.apply(i,e||[])).next())})};class mf{constructor(e,t,n,r){this.isProviderFirst=e,this.parent=t,this.link=n,this._rangeCallback=r,this.id=yK.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?C({key:"aria.oneReference.preview",comment:["Placeholders are: 0: filename, 1:line number, 2: column number, 3: preview snippet of source code"]},"symbol in {0} on line {1} at column {2}, {3}",el(this.uri),this.range.startLineNumber,this.range.startColumn,t.value):C("aria.oneReference","symbol in {0} on line {1} at column {2}",el(this.uri),this.range.startLineNumber,this.range.startColumn)}}class GNe{constructor(e){this._modelReference=e}dispose(){this._modelReference.dispose()}preview(e,t=8){const n=this._modelReference.object.textEditorModel;if(!n)return;const{startLineNumber:r,startColumn:s,endLineNumber:o,endColumn:a}=e,l=n.getWordUntilPosition({lineNumber:r,column:s-t}),c=new H(r,l.startColumn,r,s),u=new H(o,a,o,1073741824),d=n.getValueInRange(c).replace(/^\s+/,""),h=n.getValueInRange(e),f=n.getValueInRange(u).replace(/\s+$/,"");return{value:d+h+f,highlight:{start:d.length,end:d.length+h.length}}}}class Aw{constructor(e,t){this.parent=e,this.uri=t,this.children=[],this._previews=new Xs}dispose(){Nn(this._previews.values()),this._previews.clear()}getPreview(e){return this._previews.get(e.uri)}get ariaMessage(){const e=this.children.length;return e===1?C("aria.fileReferences.1","1 symbol in {0}, full path {1}",el(this.uri),this.uri.fsPath):C("aria.fileReferences.N","{0} symbols in {1}, full path {2}",e,el(this.uri),this.uri.fsPath)}resolve(e){return qNe(this,void 0,void 0,function*(){if(this._previews.size!==0)return this;for(let t of this.children)if(!this._previews.has(t.uri))try{const n=yield e.createModelReference(t.uri);this._previews.set(t.uri,new GNe(n))}catch(n){Jt(n)}return this})}}class qo{constructor(e,t){this.groups=[],this.references=[],this._onDidChangeReferenceRange=new be,this.onDidChangeReferenceRange=this._onDidChangeReferenceRange.event,this._links=e,this._title=t;const[n]=e;e.sort(qo._compareReferences);let r;for(let s of e)if((!r||!vi.isEqual(r.uri,s.uri,!0))&&(r=new Aw(this,s.uri),this.groups.push(r)),r.children.length===0||qo._compareReferences(s,r.children[r.children.length-1])!==0){const o=new mf(n===s,r,s,a=>this._onDidChangeReferenceRange.fire(a));this.references.push(o),r.children.push(o)}}dispose(){Nn(this.groups),this._onDidChangeReferenceRange.dispose(),this.groups.length=0}clone(){return new qo(this._links,this._title)}get title(){return this._title}get isEmpty(){return this.groups.length===0}get ariaMessage(){return this.isEmpty?C("aria.result.0","No results found"):this.references.length===1?C("aria.result.1","Found 1 symbol in {0}",this.references[0].uri.fsPath):this.groups.length===1?C("aria.result.n1","Found {0} symbols in {1}",this.references.length,this.groups[0].uri.fsPath):C("aria.result.nm","Found {0} symbols in {1} files",this.references.length,this.groups.length)}nextOrPreviousReference(e,t){let{parent:n}=e,r=n.children.indexOf(e),s=n.children.length,o=n.parent.groups.length;return o===1||t&&r+10?(t?r=(r+1)%s:r=(r+s-1)%s,n.children[r]):(r=n.parent.groups.indexOf(n),t?(r=(r+1)%o,n.parent.groups[r].children[0]):(r=(r+o-1)%o,n.parent.groups[r].children[n.parent.groups[r].children.length-1]))}nearestReference(e,t){const n=this.references.map((r,s)=>({idx:s,prefixLen:f_(r.uri.toString(),e.toString()),offsetDist:Math.abs(r.range.startLineNumber-t.lineNumber)*100+Math.abs(r.range.startColumn-t.column)})).sort((r,s)=>r.prefixLen>s.prefixLen?-1:r.prefixLens.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()&&H.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 vi.compare(e.uri,t.uri)||H.compareRangesUsingStarts(e.range,t.range)}}const Gpt="";function zZ(i){if(!i)return;typeof i=="string"&&(i=Pt.file(i));const e=el(i)||(i.scheme===sn.file?i.fsPath:i.path);return Gr&&W5e(e)?VN(e):e}function VN(i,e){return fq(i,e)?i.charAt(0).toUpperCase()+i.slice(1):i}var T3=globalThis&&globalThis.__decorate||function(i,e,t,n){var r=arguments.length,s=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(s=(r<3?o(s):r>3?o(e,t,s):o(e,t))||s);return r>3&&s&&Object.defineProperty(e,t,s),s},Rw=globalThis&&globalThis.__param||function(i,e){return function(t,n){e(t,n,i)}};let WN=class{constructor(e){this._resolverService=e}hasChildren(e){return e instanceof qo||e instanceof Aw}getChildren(e){if(e instanceof qo)return e.groups;if(e instanceof Aw)return e.resolve(this._resolverService).then(t=>t.children);throw new Error("bad tree")}};WN=T3([Rw(0,mo)],WN);class KNe{getHeight(){return 23}getTemplateId(e){return e instanceof Aw?Ow.id:Mw.id}}let HN=class{constructor(e){this._keybindingService=e}getKeyboardNavigationLabel(e){var t;if(e instanceof mf){const n=(t=e.parent.getPreview(e))===null||t===void 0?void 0:t.preview(e.range);if(n)return n.value}return el(e.uri)}};HN=T3([Rw(0,qi)],HN);class YNe{getId(e){return e instanceof mf?e.id:e.uri}}let zN=class extends Ne{constructor(e,t,n){super(),this._uriLabel=t;const r=document.createElement("div");r.classList.add("reference-file"),this.file=this._register(new R4(r,{supportHighlights:!0})),this.badge=new B9($e(r,Ze(".count"))),this._register(eTe(this.badge,n)),e.appendChild(r)}set(e,t){let n=Pk(e.uri);this.file.setLabel(zZ(e.uri),this._uriLabel.getUriLabel(n,{relative:!0}),{title:this._uriLabel.getUriLabel(e.uri),matches:t});const r=e.children.length;this.badge.setCount(r),r>1?this.badge.setTitleFormat(C("referencesCount","{0} references",r)):this.badge.setTitleFormat(C("referenceCount","{0} reference",r))}};zN=T3([Rw(1,Gv),Rw(2,Ei)],zN);let Ow=class lue{constructor(e){this._instantiationService=e,this.templateId=lue.id}renderTemplate(e){return this._instantiationService.createInstance(zN,e)}renderElement(e,t,n){n.set(e.element,b4(e.filterData))}disposeTemplate(e){e.dispose()}};Ow.id="FileReferencesRenderer",Ow=T3([Rw(0,_n)],Ow);class ZNe{constructor(e){this.label=new Ip(e)}set(e,t){var n;const r=(n=e.parent.getPreview(e))===null||n===void 0?void 0:n.preview(e.range);if(!r||!r.value)this.label.set(`${el(e.uri)}:${e.range.startLineNumber+1}:${e.range.startColumn+1}`);else{const{value:s,highlight:o}=r;t&&!pc.isDefault(t)?(this.label.element.classList.toggle("referenceMatch",!1),this.label.set(s,b4(t))):(this.label.element.classList.toggle("referenceMatch",!0),this.label.set(s,[o]))}}}class Mw{constructor(){this.templateId=Mw.id}renderTemplate(e){return new ZNe(e)}renderElement(e,t,n){n.set(e.element,e.filterData)}disposeTemplate(){}}Mw.id="OneReferenceRenderer";class XNe{getWidgetAriaLabel(){return C("treeAriaLabel","References")}getAriaLabel(e){return e.ariaMessage}}var QNe=globalThis&&globalThis.__decorate||function(i,e,t,n){var r=arguments.length,s=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(s=(r<3?o(s):r>3?o(e,t,s):o(e,t))||s);return r>3&&s&&Object.defineProperty(e,t,s),s},Pd=globalThis&&globalThis.__param||function(i,e){return function(t,n){e(t,n,i)}},$Z=globalThis&&globalThis.__awaiter||function(i,e,t,n){function r(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(u){try{c(n.next(u))}catch(d){o(d)}}function l(u){try{c(n.throw(u))}catch(d){o(d)}}function c(u){u.done?s(u.value):r(u.value).then(a,l)}c((n=n.apply(i,e||[])).next())})};class I3{constructor(e,t){this._editor=e,this._model=t,this._decorations=new Map,this._decorationIgnoreSet=new Set,this._callOnDispose=new Je,this._callOnModelChange=new Je,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(let 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 s=0,o=e.children.length;s{s.equals(9)&&(this._keybindingService.dispatchEvent(s,s.target),s.stopPropagation())},!0)),this._tree=this._instantiationService.createInstance(eAe,"ReferencesWidget",this._treeContainer,new KNe,[this._instantiationService.createInstance(Ow),this._instantiationService.createInstance(Mw)],this._instantiationService.createInstance(WN),n),this._splitView.addView({onDidChange:kt.None,element:this._previewContainer,minimumSize:200,maximumSize:Number.MAX_VALUE,layout:s=>{this._preview.layout({height:this._dim.height,width:s})}},B4.Distribute),this._splitView.addView({onDidChange:kt.None,element:this._treeContainer,minimumSize:100,maximumSize:Number.MAX_VALUE,layout:s=>{this._treeContainer.style.height=`${this._dim.height}px`,this._treeContainer.style.width=`${s}px`,this._tree.layout(this._dim.height,s)}},B4.Distribute),this._disposables.add(this._splitView.onDidSashChange(()=>{this._dim.width&&(this.layoutData.ratio=this._splitView.getViewSize(0)/this._dim.width)},void 0));let r=(s,o)=>{s instanceof mf&&(o==="show"&&this._revealReference(s,!1),this._onDidSelectReference.fire({element:s,kind:o,source:"tree"}))};this._tree.onDidOpen(s=>{s.sideBySide?r(s.element,"side"):s.editorOptions.pinned?r(s.element,"goto"):r(s.element,"show")}),po(this._treeContainer)}_onWidth(e){this._dim&&this._doLayoutBody(this._dim.height,e)}_doLayoutBody(e,t){super._doLayoutBody(e,t),this._dim=new di(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=C("noResults","No results"),fa(this._messageContainer),Promise.resolve(void 0)):(po(this._messageContainer),this._decorationsManager=new I3(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 r=this._getFocusedReference();r&&this._onDidSelectReference.fire({element:{uri:r.uri,range:n.range},kind:t.ctrlKey||t.metaKey||t.altKey?"side":"open",source:"editor"})})),this.container.classList.add("results-loaded"),fa(this._treeContainer),fa(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 mf)return e;if(e instanceof Aw&&e.children.length>0)return e.children[0]}revealReference(e){return $Z(this,void 0,void 0,function*(){yield this._revealReference(e,!1),this._onDidSelectReference.fire({element:e,kind:"goto",source:"tree"})})}_revealReference(e,t){return $Z(this,void 0,void 0,function*(){if(this._revealedReference===e)return;this._revealedReference=e,e.uri.scheme!==sn.inMemory?this.setTitle(H5e(e.uri),this._uriLabel.getUriLabel(Pk(e.uri))):this.setTitle(C("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 r=yield n;if(!this._model){r.dispose();return}Nn(this._previewModelReference);const s=r.object;if(s){const o=this._preview.getModel()===s.textEditorModel?0:1,a=H.lift(e.range).collapseToStart();this._previewModelReference=r,this._preview.setModel(s.textEditorModel),this._preview.setSelection(a),this._preview.revealRangeInCenter(a,o)}else this._preview.setModel(this._previewNotAvailableMessage),r.dispose()})}};$N=QNe([Pd(3,Ei),Pd(4,mo),Pd(5,_n),Pd(6,VZ),Pd(7,Gv),Pd(8,Vk),Pd(9,qi),Pd(10,Mi),Pd(11,Ss)],$N);var tAe=globalThis&&globalThis.__decorate||function(i,e,t,n){var r=arguments.length,s=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(s=(r<3?o(s):r>3?o(e,t,s):o(e,t))||s);return r>3&&s&&Object.defineProperty(e,t,s),s},O1=globalThis&&globalThis.__param||function(i,e){return function(t,n){e(t,n,i)}},UZ=globalThis&&globalThis.__awaiter||function(i,e,t,n){function r(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(u){try{c(n.next(u))}catch(d){o(d)}}function l(u){try{c(n.throw(u))}catch(d){o(d)}}function c(u){u.done?s(u.value):r(u.value).then(a,l)}c((n=n.apply(i,e||[])).next())})};const qp=new mt("referenceSearchVisible",!1,C("referenceSearchVisible","Whether reference peek is visible, like 'Peek References' or 'Peek Definition'"));let _f=class DF{constructor(e,t,n,r,s,o,a,l){this._defaultTreeKeyboardSupport=e,this._editor=t,this._editorService=r,this._notificationService=s,this._instantiationService=o,this._storageService=a,this._configurationService=l,this._disposables=new Je,this._requestIdPool=0,this._ignoreModelChangeEvent=!1,this._referenceSearchVisible=qp.bindTo(n)}static get(e){return e.getContribution(DF.ID)}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 r;if(this._widget&&(r=this._widget.position),this.closeWidget(),r&&e.containsPosition(r))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 s="peekViewLayout",o=JNe.fromJSON(this._storageService.get(s,0,"{}"));this._widget=this._instantiationService.createInstance($N,this._editor,this._defaultTreeKeyboardSupport,o),this._widget.setTitle(C("labelLoading","Loading...")),this._widget.show(e),this._disposables.add(this._widget.onDidClose(()=>{t.cancel(),this._widget&&(this._storageService.store(s,JSON.stringify(this._widget.layoutData),0,1),this._widget=void 0),this.closeWidget()})),this._disposables.add(this._widget.onDidSelectReference(l=>{let{element:c,kind:u}=l;if(c)switch(u){case"open":(l.source!=="editor"||!this._configurationService.getValue("editor.stablePeek"))&&this.openReference(c,!1,!1);break;case"side":this.openReference(c,!0,!1);break;case"goto":n?this._gotoReference(c):this.openReference(c,!1,!0);break}}));const a=++this._requestIdPool;t.then(l=>{var c;if(a!==this._requestIdPool||!this._widget){l.dispose();return}return(c=this._model)===null||c===void 0||c.dispose(),this._model=l,this._widget.setModel(this._model).then(()=>{if(this._widget&&this._model&&this._editor.hasModel()){this._model.isEmpty?this._widget.setMetaTitle(""):this._widget.setMetaTitle(C("metaTitle.N","{0} ({1})",this._model.title,this._model.references.length));let u=this._editor.getModel().uri,d=new ye(e.startLineNumber,e.startColumn),h=this._model.nearestReference(u,d);if(h)return this._widget.setSelection(h).then(()=>{this._widget&&this._editor.getOption(77)==="editor"&&this._widget.focusOnPreviewEditor()})}})},l=>{this._notificationService.error(l)})}changeFocusBetweenPreviewAndReferences(){this._widget&&(this._widget.isPreviewEditorFocused()?this._widget.focusOnReferenceTree():this._widget.focusOnPreviewEditor())}goToNextOrPreviousReference(e){return UZ(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 r=this._model.nextOrPreviousReference(n,e),s=this._editor.hasTextFocus(),o=this._widget.isPreviewEditorFocused();yield this._widget.setSelection(r),yield this._gotoReference(r),s?this._editor.focus():this._widget&&o&&this._widget.focusOnPreviewEditor()})}revealReference(e){return UZ(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){this._widget&&this._widget.hide(),this._ignoreModelChangeEvent=!0;const t=H.lift(e.range).collapseToStart();return this._editorService.openCodeEditor({resource:e.uri,options:{selection:t,selectionSource:"code.jump"}},this._editor).then(n=>{var r;if(this._ignoreModelChangeEvent=!1,!n||!this._widget){this.closeWidget();return}if(this._editor===n)this._widget.show(t),this._widget.focusOnReferenceTree();else{const s=DF.get(n),o=this._model.clone();this.closeWidget(),n.focus(),s==null||s.toggleWidget(t,Yr(a=>Promise.resolve(o)),(r=this._peekMode)!==null&&r!==void 0?r:!1)}},n=>{this._ignoreModelChangeEvent=!1,Jt(n)})}openReference(e,t,n){t||this.closeWidget();const{uri:r,range:s}=e;this._editorService.openCodeEditor({resource:r,options:{selection:s,selectionSource:"code.jump",pinned:n}},this._editor,t)}};_f.ID="editor.contrib.referencesController",_f=tAe([O1(2,Yt),O1(3,Zn),O1(4,or),O1(5,_n),O1(6,Lu),O1(7,ui)],_f);function Gp(i,e){const t=HNe(i);if(!t)return;const n=_f.get(t);n&&e(n)}Ys.registerCommandAndKeybindingRule({id:"togglePeekWidgetFocus",weight:100,primary:Mr(2089,60),when:ht.or(qp,Co.inPeekEditor),handler(i){Gp(i,e=>{e.changeFocusBetweenPreviewAndReferences()})}}),Ys.registerCommandAndKeybindingRule({id:"goToNextReference",weight:100-10,primary:62,secondary:[70],when:ht.or(qp,Co.inPeekEditor),handler(i){Gp(i,e=>{e.goToNextOrPreviousReference(!0)})}}),Ys.registerCommandAndKeybindingRule({id:"goToPreviousReference",weight:100-10,primary:1086,secondary:[1094],when:ht.or(qp,Co.inPeekEditor),handler(i){Gp(i,e=>{e.goToNextOrPreviousReference(!1)})}}),An.registerCommandAlias("goToNextReferenceFromEmbeddedEditor","goToNextReference"),An.registerCommandAlias("goToPreviousReferenceFromEmbeddedEditor","goToPreviousReference"),An.registerCommandAlias("closeReferenceSearchEditor","closeReferenceSearch"),An.registerCommand("closeReferenceSearch",i=>Gp(i,e=>e.closeWidget())),Ys.registerKeybindingRule({id:"closeReferenceSearch",weight:100-101,primary:9,secondary:[1033],when:ht.and(Co.inPeekEditor,ht.not("config.editor.stablePeek"))}),Ys.registerKeybindingRule({id:"closeReferenceSearch",weight:200+50,primary:9,secondary:[1033],when:ht.and(qp,ht.not("config.editor.stablePeek"))}),Ys.registerCommandAndKeybindingRule({id:"revealReference",weight:200,primary:3,mac:{primary:3,secondary:[2066]},when:ht.and(qp,nY,C7.negate(),y7.negate()),handler(i){var e;const n=(e=i.get(ol).lastFocusedList)===null||e===void 0?void 0:e.getFocus();Array.isArray(n)&&n[0]instanceof mf&&Gp(i,r=>r.revealReference(n[0]))}}),Ys.registerCommandAndKeybindingRule({id:"openReferenceToSide",weight:100,primary:2051,mac:{primary:259},when:ht.and(qp,nY,C7.negate(),y7.negate()),handler(i){var e;const n=(e=i.get(ol).lastFocusedList)===null||e===void 0?void 0:e.getFocus();Array.isArray(n)&&n[0]instanceof mf&&Gp(i,r=>r.openReference(n[0],!0,!0))}}),An.registerCommand("openReference",i=>{var e;const n=(e=i.get(ol).lastFocusedList)===null||e===void 0?void 0:e.getFocus();Array.isArray(n)&&n[0]instanceof mf&&Gp(i,r=>r.openReference(n[0],!1,!0))});var jZ=globalThis&&globalThis.__decorate||function(i,e,t,n){var r=arguments.length,s=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(s=(r<3?o(s):r>3?o(e,t,s):o(e,t))||s);return r>3&&s&&Object.defineProperty(e,t,s),s},Pw=globalThis&&globalThis.__param||function(i,e){return function(t,n){e(t,n,i)}};const UN=new mt("hasSymbols",!1,C("hasSymbols","Whether there are symbol locations that can be navigated via keyboard-only.")),D3=Ln("ISymbolNavigationService");let jN=class{constructor(e,t,n,r){this._editorService=t,this._notificationService=n,this._keybindingService=r,this._currentModel=void 0,this._currentIdx=-1,this._ignoreEditorChange=!1,this._ctxHasSymbols=UN.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 qN(this._editorService),r=n.onDidChange(s=>{if(this._ignoreEditorChange)return;const o=this._editorService.getActiveCodeEditor();if(!o)return;const a=o.getModel(),l=o.getPosition();if(!a||!l)return;let c=!1,u=!1;for(const d of t.references)if(gq(d.uri,a.uri))c=!0,u=u||H.containsPosition(d.range,l);else if(c)break;(!c||!u)&&this.reset()});this._currentState=rd(n,r)}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:H.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?C("location.kb","Symbol {0} of {1}, {2} for next",this._currentIdx+1,this._currentModel.references.length,t.getLabel()):C("location","Symbol {0} of {1}",this._currentIdx+1,this._currentModel.references.length);this._currentMessage=this._notificationService.status(n)}};jN=jZ([Pw(0,Yt),Pw(1,Zn),Pw(2,or),Pw(3,qi)],jN),On(D3,jN,!0),st(new class extends as{constructor(){super({id:"editor.gotoNextSymbolFromResult",precondition:UN,kbOpts:{weight:100,primary:70}})}runEditorCommand(i,e){return i.get(D3).revealNext(e)}}),Ys.registerCommandAndKeybindingRule({id:"editor.gotoNextSymbolFromResult.cancel",weight:100,when:UN,primary:9,handler(i){i.get(D3).reset()}});let qN=class{constructor(e){this._listener=new Map,this._disposables=new Je,this._onDidChange=new be,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(),Nn(this._listener.values())}_onDidAddEditor(e){this._listener.set(e,rd(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)}};qN=jZ([Pw(0,Zn)],qN);var qZ=globalThis&&globalThis.__awaiter||function(i,e,t,n){function r(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(u){try{c(n.next(u))}catch(d){o(d)}}function l(u){try{c(n.throw(u))}catch(d){o(d)}}function c(u){u.done?s(u.value):r(u.value).then(a,l)}c((n=n.apply(i,e||[])).next())})};function Fw(i,e,t,n){const s=t.ordered(i).map(o=>Promise.resolve(n(o,i,e)).then(void 0,a=>{Or(a)}));return Promise.all(s).then(o=>{const a=[];for(let l of o)Array.isArray(l)?a.push(...l):l&&a.push(l);return a})}function GN(i,e,t,n){return Fw(e,t,i,(r,s,o)=>r.provideDefinition(s,o,n))}function GZ(i,e,t,n){return Fw(e,t,i,(r,s,o)=>r.provideDeclaration(s,o,n))}function KZ(i,e,t,n){return Fw(e,t,i,(r,s,o)=>r.provideImplementation(s,o,n))}function YZ(i,e,t,n){return Fw(e,t,i,(r,s,o)=>r.provideTypeDefinition(s,o,n))}function N3(i,e,t,n,r){return Fw(e,t,i,(s,o,a)=>qZ(this,void 0,void 0,function*(){const l=yield s.provideReferences(o,a,{includeDeclaration:!0},r);if(!n||!l||l.length!==2)return l;const c=yield s.provideReferences(o,a,{includeDeclaration:!1},r);return c&&c.length===1?c:l}))}function Bw(i){return qZ(this,void 0,void 0,function*(){const e=yield i(),t=new qo(e,""),n=t.references.map(r=>r.link);return t.dispose(),n})}su("_executeDefinitionProvider",(i,e,t)=>{const n=i.get(yt),r=GN(n.definitionProvider,e,t,mn.None);return Bw(()=>r)}),su("_executeTypeDefinitionProvider",(i,e,t)=>{const n=i.get(yt),r=YZ(n.typeDefinitionProvider,e,t,mn.None);return Bw(()=>r)}),su("_executeDeclarationProvider",(i,e,t)=>{const n=i.get(yt),r=GZ(n.declarationProvider,e,t,mn.None);return Bw(()=>r)}),su("_executeReferenceProvider",(i,e,t)=>{const n=i.get(yt),r=N3(n.referenceProvider,e,t,!1,mn.None);return Bw(()=>r)}),su("_executeImplementationProvider",(i,e,t)=>{const n=i.get(yt),r=KZ(n.implementationProvider,e,t,mn.None);return Bw(()=>r)});var Il=globalThis&&globalThis.__awaiter||function(i,e,t,n){function r(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(u){try{c(n.next(u))}catch(d){o(d)}}function l(u){try{c(n.throw(u))}catch(d){o(d)}}function c(u){u.done?s(u.value):r(u.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},KN,YN,ZN,XN,QN,JN,eA,tA;pa.appendMenuItem(de.EditorContext,{submenu:de.EditorContextPeek,title:C("peek.submenu","Peek"),group:"navigation",order:100});const ZZ=new Set;function Sc(i){const e=new i;return vU(e),ZZ.add(e.id),e}class Vw{constructor(e,t){this.model=e,this.position=t}static is(e){return!e||typeof e!="object"?!1:!!(e instanceof Vw||ye.isIPosition(e.position)&&e.model)}}class Kp extends wt{constructor(e,t){super(t),this.configuration=e}run(e,t,n){if(!t.hasModel())return Promise.resolve(void 0);const r=e.get(or),s=e.get(Zn),o=e.get(of),a=e.get(D3),l=e.get(yt),c=t.getModel(),u=t.getPosition(),d=Vw.is(n)?n:new Vw(c,u),h=new Cw(t,5),f=aI(this._getLocationModel(l,d.model,d.position,h.token),h.token).then(g=>Il(this,void 0,void 0,function*(){var p;if(!g||h.token.isCancellationRequested)return;os(g.ariaMessage);let m;if(g.referenceAt(c.uri,u)){const b=this._getAlternativeCommand(t);b!==this.id&&ZZ.has(b)&&(m=t.getAction(b))}const _=g.references.length;if(_===0){if(!this.configuration.muteMessage){const b=c.getWordAtPosition(u);(p=ya.get(t))===null||p===void 0||p.showMessage(this._getNoResultFoundMessage(b),u)}}else if(_===1&&m)m.run();else return this._onResult(s,a,t,g)}),g=>{r.error(g)}).finally(()=>{h.dispose()});return o.showWhile(f,250),f}_onResult(e,t,n,r){return Il(this,void 0,void 0,function*(){const s=this._getGoToPreference(n);if(!(n instanceof jp)&&(this.configuration.openInPeek||s==="peek"&&r.references.length>1))this._openInPeek(n,r);else{const o=r.firstReference(),a=r.references.length>1&&s==="gotoAndPeek",l=yield this._openReference(n,e,o,this.configuration.openToSide,!a);a&&l?this._openInPeek(l,r):r.dispose(),s==="goto"&&t.put(o)}})}_openReference(e,t,n,r,s){return Il(this,void 0,void 0,function*(){let o;if(_Ce(n)&&(o=n.targetSelectionRange),o||(o=n.range),!o)return;const a=yield t.openCodeEditor({resource:n.uri,options:{selection:H.collapseToStart(o),selectionRevealType:3,selectionSource:"code.jump"}},e,r);if(a){if(s){const l=a.getModel(),c=a.deltaDecorations([],[{range:o,options:{description:"symbol-navigate-action-highlight",className:"symbolHighlight"}}]);setTimeout(()=>{a.getModel()===l&&a.deltaDecorations(c,[])},350)}return a}})}_openInPeek(e,t){const n=_f.get(e);n&&e.hasModel()?n.toggleWidget(e.getSelection(),Yr(r=>Promise.resolve(t)),this.configuration.openInPeek):t.dispose()}}class Ww extends Kp{_getLocationModel(e,t,n,r){return Il(this,void 0,void 0,function*(){return new qo(yield GN(e.definitionProvider,t,n,r),C("def.title","Definitions"))})}_getNoResultFoundMessage(e){return e&&e.word?C("noResultWord","No definition found for '{0}'",e.word):C("generic.noResults","No definition found")}_getAlternativeCommand(e){return e.getOption(51).alternativeDefinitionCommand}_getGoToPreference(e){return e.getOption(51).multipleDefinitions}}const XZ=bh&&!$T?2118:70;Sc((KN=class NF extends Ww{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:NF.id,label:C("actions.goToDecl.label","Go to Definition"),alias:"Go to Definition",precondition:ht.and(ie.hasDefinitionProvider,ie.isInWalkThroughSnippet.toNegated()),kbOpts:{kbExpr:ie.editorTextFocus,primary:XZ,weight:100},contextMenuOpts:{group:"navigation",order:1.1}}),An.registerCommandAlias("editor.action.goToDeclaration",NF.id)}},KN.id="editor.action.revealDefinition",KN)),Sc((YN=class AF extends Ww{constructor(){super({openToSide:!0,openInPeek:!1,muteMessage:!1},{id:AF.id,label:C("actions.goToDeclToSide.label","Open Definition to the Side"),alias:"Open Definition to the Side",precondition:ht.and(ie.hasDefinitionProvider,ie.isInWalkThroughSnippet.toNegated()),kbOpts:{kbExpr:ie.editorTextFocus,primary:Mr(2089,XZ),weight:100}}),An.registerCommandAlias("editor.action.openDeclarationToTheSide",AF.id)}},YN.id="editor.action.revealDefinitionAside",YN)),Sc((ZN=class RF extends Ww{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:RF.id,label:C("actions.previewDecl.label","Peek Definition"),alias:"Peek Definition",precondition:ht.and(ie.hasDefinitionProvider,Co.notInPeekEditor,ie.isInWalkThroughSnippet.toNegated()),kbOpts:{kbExpr:ie.editorTextFocus,primary:582,linux:{primary:3140},weight:100},contextMenuOpts:{menuId:de.EditorContextPeek,group:"peek",order:2}}),An.registerCommandAlias("editor.action.previewDeclaration",RF.id)}},ZN.id="editor.action.peekDefinition",ZN));class QZ extends Kp{_getLocationModel(e,t,n,r){return Il(this,void 0,void 0,function*(){return new qo(yield GZ(e.declarationProvider,t,n,r),C("decl.title","Declarations"))})}_getNoResultFoundMessage(e){return e&&e.word?C("decl.noResultWord","No declaration found for '{0}'",e.word):C("decl.generic.noResults","No declaration found")}_getAlternativeCommand(e){return e.getOption(51).alternativeDeclarationCommand}_getGoToPreference(e){return e.getOption(51).multipleDeclarations}}Sc((XN=class cue extends QZ{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:cue.id,label:C("actions.goToDeclaration.label","Go to Declaration"),alias:"Go to Declaration",precondition:ht.and(ie.hasDeclarationProvider,ie.isInWalkThroughSnippet.toNegated()),contextMenuOpts:{group:"navigation",order:1.3}})}_getNoResultFoundMessage(e){return e&&e.word?C("decl.noResultWord","No declaration found for '{0}'",e.word):C("decl.generic.noResults","No declaration found")}},XN.id="editor.action.revealDeclaration",XN)),Sc(class extends QZ{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:"editor.action.peekDeclaration",label:C("actions.peekDecl.label","Peek Declaration"),alias:"Peek Declaration",precondition:ht.and(ie.hasDeclarationProvider,Co.notInPeekEditor,ie.isInWalkThroughSnippet.toNegated()),contextMenuOpts:{menuId:de.EditorContextPeek,group:"peek",order:3}})}});class JZ extends Kp{_getLocationModel(e,t,n,r){return Il(this,void 0,void 0,function*(){return new qo(yield YZ(e.typeDefinitionProvider,t,n,r),C("typedef.title","Type Definitions"))})}_getNoResultFoundMessage(e){return e&&e.word?C("goToTypeDefinition.noResultWord","No type definition found for '{0}'",e.word):C("goToTypeDefinition.generic.noResults","No type definition found")}_getAlternativeCommand(e){return e.getOption(51).alternativeTypeDefinitionCommand}_getGoToPreference(e){return e.getOption(51).multipleTypeDefinitions}}Sc((QN=class uue extends JZ{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:uue.ID,label:C("actions.goToTypeDefinition.label","Go to Type Definition"),alias:"Go to Type Definition",precondition:ht.and(ie.hasTypeDefinitionProvider,ie.isInWalkThroughSnippet.toNegated()),kbOpts:{kbExpr:ie.editorTextFocus,primary:0,weight:100},contextMenuOpts:{group:"navigation",order:1.4}})}},QN.ID="editor.action.goToTypeDefinition",QN)),Sc((JN=class due extends JZ{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:due.ID,label:C("actions.peekTypeDefinition.label","Peek Type Definition"),alias:"Peek Type Definition",precondition:ht.and(ie.hasTypeDefinitionProvider,Co.notInPeekEditor,ie.isInWalkThroughSnippet.toNegated()),contextMenuOpts:{menuId:de.EditorContextPeek,group:"peek",order:4}})}},JN.ID="editor.action.peekTypeDefinition",JN));class eX extends Kp{_getLocationModel(e,t,n,r){return Il(this,void 0,void 0,function*(){return new qo(yield KZ(e.implementationProvider,t,n,r),C("impl.title","Implementations"))})}_getNoResultFoundMessage(e){return e&&e.word?C("goToImplementation.noResultWord","No implementation found for '{0}'",e.word):C("goToImplementation.generic.noResults","No implementation found")}_getAlternativeCommand(e){return e.getOption(51).alternativeImplementationCommand}_getGoToPreference(e){return e.getOption(51).multipleImplementations}}Sc((eA=class hue extends eX{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:hue.ID,label:C("actions.goToImplementation.label","Go to Implementations"),alias:"Go to Implementations",precondition:ht.and(ie.hasImplementationProvider,ie.isInWalkThroughSnippet.toNegated()),kbOpts:{kbExpr:ie.editorTextFocus,primary:2118,weight:100},contextMenuOpts:{group:"navigation",order:1.45}})}},eA.ID="editor.action.goToImplementation",eA)),Sc((tA=class fue extends eX{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:fue.ID,label:C("actions.peekImplementation.label","Peek Implementations"),alias:"Peek Implementations",precondition:ht.and(ie.hasImplementationProvider,Co.notInPeekEditor,ie.isInWalkThroughSnippet.toNegated()),kbOpts:{kbExpr:ie.editorTextFocus,primary:3142,weight:100},contextMenuOpts:{menuId:de.EditorContextPeek,group:"peek",order:5}})}},tA.ID="editor.action.peekImplementation",tA));class tX extends Kp{_getNoResultFoundMessage(e){return e?C("references.no","No references found for '{0}'",e.word):C("references.noGeneric","No references found")}_getAlternativeCommand(e){return e.getOption(51).alternativeReferenceCommand}_getGoToPreference(e){return e.getOption(51).multipleReferences}}Sc(class extends tX{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:"editor.action.goToReferences",label:C("goToReferences.label","Go to References"),alias:"Go to References",precondition:ht.and(ie.hasReferenceProvider,Co.notInPeekEditor,ie.isInWalkThroughSnippet.toNegated()),kbOpts:{kbExpr:ie.editorTextFocus,primary:1094,weight:100},contextMenuOpts:{group:"navigation",order:1.45}})}_getLocationModel(e,t,n,r){return Il(this,void 0,void 0,function*(){return new qo(yield N3(e.referenceProvider,t,n,!0,r),C("ref.title","References"))})}}),Sc(class extends tX{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:"editor.action.referenceSearch.trigger",label:C("references.action.label","Peek References"),alias:"Peek References",precondition:ht.and(ie.hasReferenceProvider,Co.notInPeekEditor,ie.isInWalkThroughSnippet.toNegated()),contextMenuOpts:{menuId:de.EditorContextPeek,group:"peek",order:6}})}_getLocationModel(e,t,n,r){return Il(this,void 0,void 0,function*(){return new qo(yield N3(e.referenceProvider,t,n,!1,r),C("ref.title","References"))})}});class nAe extends Kp{constructor(e,t,n){super(e,{id:"editor.action.goToLocation",label:C("label.generic","Go to Any Symbol"),alias:"Go to Any Symbol",precondition:ht.and(Co.notInPeekEditor,ie.isInWalkThroughSnippet.toNegated())}),this._references=t,this._gotoMultipleBehaviour=n}_getLocationModel(e,t,n,r){return Il(this,void 0,void 0,function*(){return new qo(this._references,C("generic.title","Locations"))})}_getNoResultFoundMessage(e){return e&&C("generic.noResult","No results for '{0}'",e.word)||""}_getGoToPreference(e){var t;return(t=this._gotoMultipleBehaviour)!==null&&t!==void 0?t:e.getOption(51).multipleReferences}_getAlternativeCommand(){return""}}An.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:Pt},{name:"position",description:"The position at which to start",constraint:ye.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:(i,e,t,n,r,s,o)=>Il(void 0,void 0,void 0,function*(){ci(Pt.isUri(e)),ci(ye.isIPosition(t)),ci(Array.isArray(n)),ci(typeof r>"u"||typeof r=="string"),ci(typeof o>"u"||typeof o=="boolean");const a=i.get(Zn),l=yield a.openCodeEditor({resource:e},a.getFocusedCodeEditor());if(Rd(l))return l.setPosition(t),l.revealPositionInCenterIfOutsideViewport(t,0),l.invokeWithinContext(c=>{const u=new class extends nAe{_getNoResultFoundMessage(d){return s||super._getNoResultFoundMessage(d)}}({muteMessage:!Boolean(s),openInPeek:Boolean(o),openToSide:!1},n,r);c.get(_n).invokeFunction(u.run.bind(u),l)})})}),An.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:Pt},{name:"position",description:"The position at which to start",constraint:ye.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:(i,e,t,n,r)=>Il(void 0,void 0,void 0,function*(){i.get(rr).executeCommand("editor.action.goToLocations",e,t,n,r,void 0,!0)})}),An.registerCommand({id:"editor.action.findReferences",handler:(i,e,t)=>{ci(Pt.isUri(e)),ci(ye.isIPosition(t));const n=i.get(yt),r=i.get(Zn);return r.openCodeEditor({resource:e},r.getFocusedCodeEditor()).then(s=>{if(!Rd(s)||!s.hasModel())return;const o=_f.get(s);if(!o)return;const a=Yr(c=>N3(n.referenceProvider,s.getModel(),ye.lift(t),!1,c).then(u=>new qo(u,C("ref.title","References")))),l=new H(t.lineNumber,t.column,t.lineNumber,t.column);return Promise.resolve(o.toggleWidget(l,a,!1))})}}),An.registerCommandAlias("editor.action.showReferences","editor.action.peekLocations"),pa.appendMenuItems([{id:de.MenubarGoMenu,item:{command:{id:"editor.action.revealDefinition",title:C({key:"miGotoDefinition",comment:["&& denotes a mnemonic"]},"Go to &&Definition")},group:"4_symbol_nav",order:2}},{id:de.MenubarGoMenu,item:{command:{id:"editor.action.revealDeclaration",title:C({key:"miGotoDeclaration",comment:["&& denotes a mnemonic"]},"Go to &&Declaration")},group:"4_symbol_nav",order:3}},{id:de.MenubarGoMenu,item:{command:{id:"editor.action.goToTypeDefinition",title:C({key:"miGotoTypeDefinition",comment:["&& denotes a mnemonic"]},"Go to &&Type Definition")},group:"4_symbol_nav",order:3}},{id:de.MenubarGoMenu,item:{command:{id:"editor.action.goToImplementation",title:C({key:"miGotoImplementation",comment:["&& denotes a mnemonic"]},"Go to &&Implementations")},group:"4_symbol_nav",order:4}},{id:de.MenubarGoMenu,item:{command:{id:"editor.action.goToReferences",title:C({key:"miGotoReference",comment:["&& denotes a mnemonic"]},"Go to &&References")},group:"4_symbol_nav",order:5}}]);var iAe=globalThis&&globalThis.__decorate||function(i,e,t,n){var r=arguments.length,s=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(s=(r<3?o(s):r>3?o(e,t,s):o(e,t))||s);return r>3&&s&&Object.defineProperty(e,t,s),s},nA=globalThis&&globalThis.__param||function(i,e){return function(t,n){e(t,n,i)}};let Yp=class V2{constructor(e,t,n,r){this.textModelResolverService=t,this.languageService=n,this.languageFeaturesService=r,this.toUnhook=new Je,this.toUnhookForKeyboard=new Je,this.linkDecorations=[],this.currentWordAtPosition=null,this.previousPromise=null,this.editor=e;let s=new ON(e);this.toUnhook.add(s),this.toUnhook.add(s.onMouseMoveOrRelevantKeyDown(([o,a])=>{this.startFindDefinitionFromMouse(o,Fo(a))})),this.toUnhook.add(s.onExecute(o=>{this.isEnabled(o)&&this.gotoDefinition(o.target.position,o.hasSideBySideModifier).then(()=>{this.removeLinkDecorations()},a=>{this.removeLinkDecorations(),Jt(a)})})),this.toUnhook.add(s.onCancel(()=>{this.removeLinkDecorations(),this.currentWordAtPosition=null}))}static get(e){return e.getContribution(V2.ID)}startFindDefinitionFromCursor(e){return this.startFindDefinition(e).then(()=>{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;this.toUnhookForKeyboard.clear();const n=e?(t=this.editor.getModel())===null||t===void 0?void 0:t.getWordAtPosition(e):null;if(!n)return this.currentWordAtPosition=null,this.removeLinkDecorations(),Promise.resolve(0);if(this.currentWordAtPosition&&this.currentWordAtPosition.startColumn===n.startColumn&&this.currentWordAtPosition.endColumn===n.endColumn&&this.currentWordAtPosition.word===n.word)return Promise.resolve(0);this.currentWordAtPosition=n;let r=new d3(this.editor,15);return this.previousPromise&&(this.previousPromise.cancel(),this.previousPromise=null),this.previousPromise=Yr(s=>this.findDefinition(e,s)),this.previousPromise.then(s=>{if(!s||!s.length||!r.validate(this.editor)){this.removeLinkDecorations();return}if(s.length>1)this.addDecoration(new H(e.lineNumber,n.startColumn,e.lineNumber,n.endColumn),new va().appendText(C("multipleResults","Click to show {0} definitions.",s.length)));else{let o=s[0];if(!o.uri)return;this.textModelResolverService.createModelReference(o.uri).then(a=>{if(!a.object||!a.object.textEditorModel){a.dispose();return}const{object:{textEditorModel:l}}=a,{startLineNumber:c}=o.range;if(c<1||c>l.getLineCount()){a.dispose();return}const u=this.getPreviewValue(l,c,o);let d;o.originSelectionRange?d=H.lift(o.originSelectionRange):d=new H(e.lineNumber,n.startColumn,e.lineNumber,n.endColumn);const h=this.languageService.guessLanguageIdByFilepathOrFirstLine(l.uri);this.addDecoration(d,new va().appendCodeblock(h||"",u)),a.dispose()})}}).then(void 0,Jt)}getPreviewValue(e,t,n){let r=n.targetSelectionRange?n.range:this.getPreviewRangeBasedOnBrackets(e,t);return r.endLineNumber-r.startLineNumber>=V2.MAX_SOURCE_PREVIEW_LINES&&(r=this.getPreviewRangeBasedOnIndentation(e,t)),this.stripIndentationFromPreviewRange(e,t,r)}stripIndentationFromPreviewRange(e,t,n){let s=e.getLineFirstNonWhitespaceColumn(t);for(let a=t+1;an)return new H(t,1,n+1,1);o=e.bracketPairs.findNextBracket(new ye(l,c))}return new H(t,1,n+1,1)}addDecoration(e,t){const n={range:e,options:{description:"goto-definition-link",inlineClassName:"goto-definition-link",hoverMessage:t}};this.linkDecorations=this.editor.deltaDecorations(this.linkDecorations,[n])}removeLinkDecorations(){this.linkDecorations.length>0&&(this.linkDecorations=this.editor.deltaDecorations(this.linkDecorations,[]))}isEnabled(e,t){return this.editor.hasModel()&&e.isNoneOrSingleMouseDown&&e.target.type===6&&(e.hasTriggerModifier||(t?t.keyCodeIsTriggerKey:!1))&&this.languageFeaturesService.definitionProvider.has(this.editor.getModel())}findDefinition(e,t){const n=this.editor.getModel();return n?GN(this.languageFeaturesService.definitionProvider,n,e,t):Promise.resolve(null)}gotoDefinition(e,t){return this.editor.setPosition(e),this.editor.invokeWithinContext(n=>{const r=!t&&this.editor.getOption(78)&&!this.isInPeekEditor(n);return new Ww({openToSide:t,openInPeek:r,muteMessage:!0},{alias:"",label:"",id:"",precondition:void 0}).run(n,this.editor)})}isInPeekEditor(e){const t=e.get(Yt);return Co.inPeekEditor.getValue(t)}dispose(){this.toUnhook.dispose()}};Yp.ID="editor.contrib.gotodefinitionatposition",Yp.MAX_SOURCE_PREVIEW_LINES=8,Yp=iAe([nA(1,mo),nA(2,Mi),nA(3,yt)],Yp),Gn(Yp.ID,Yp),_i((i,e)=>{const t=i.getColor(p6);t&&e.addRule(`.monaco-editor .goto-definition-link { color: ${t} !important; }`)});const Kpt="",A3=Ze;class nX 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 dv(this.contentsDomNode,{consumeMouseWheelIfScrollbarIsNeeded:!0})),this.containerDomNode.appendChild(this.scrollbar.getDomNode())}onContentsChanged(){this.scrollbar.scanDomNode()}}class iA extends Ne{constructor(e,t,n){super(),this.actionContainer=$e(e,A3("div.action-container")),this.actionContainer.setAttribute("tabindex","0"),this.action=$e(this.actionContainer,A3("a.action")),this.action.setAttribute("role","button"),t.iconClass&&$e(this.action,A3(`span.icon.${t.iconClass}`));const r=$e(this.action,A3("span"));r.textContent=n?`${t.label} (${n})`:t.label,this._register(Xe(this.actionContainer,Nt.CLICK,s=>{s.stopPropagation(),s.preventDefault(),t.run(this.actionContainer)})),this._register(Xe(this.actionContainer,Nt.KEY_UP,s=>{new ki(s).equals(3)&&(s.stopPropagation(),s.preventDefault(),t.run(this.actionContainer))})),this.setEnabled(!0)}static render(e,t,n){return new iA(e,t,n)}setEnabled(e){e?(this.actionContainer.classList.remove("disabled"),this.actionContainer.removeAttribute("aria-disabled")):(this.actionContainer.classList.add("disabled"),this.actionContainer.setAttribute("aria-disabled","true"))}}var rAe=globalThis&&globalThis.__awaiter||function(i,e,t,n){function r(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(u){try{c(n.next(u))}catch(d){o(d)}}function l(u){try{c(n.throw(u))}catch(d){o(d)}}function c(u){u.done?s(u.value):r(u.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},sAe=globalThis&&globalThis.__asyncValues||function(i){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=i[Symbol.asyncIterator],t;return e?e.call(i):(i=typeof __values=="function"?__values(i):i[Symbol.iterator](),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(s){t[s]=i[s]&&function(o){return new Promise(function(a,l){o=i[s](o),r(a,l,o.done,o.value)})}}function r(s,o,a,l){Promise.resolve(l).then(function(c){s({value:c,done:a})},o)}};class oAe{constructor(e,t,n){this.value=e,this.isComplete=t,this.hasLoadingMessage=n}}class iX extends Ne{constructor(e,t){super(),this._editor=e,this._computer=t,this._onResult=this._register(new be),this.onResult=this._onResult.event,this._firstWaitScheduler=this._register(new ri(()=>this._triggerAsyncComputation(),0)),this._secondWaitScheduler=this._register(new ri(()=>this._triggerSyncComputation(),0)),this._loadingMessageScheduler=this._register(new ri(()=>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(53).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=x2e(e=>this._computer.computeAsync(e)),rAe(this,void 0,void 0,function*(){var e,t;try{try{for(var n=sAe(this._asyncIterable),r;r=yield n.next(),!r.done;){const s=r.value;s&&(this._result.push(s),this._fireResult())}}catch(s){e={error:s}}finally{try{r&&!r.done&&(t=n.return)&&(yield t.call(n))}finally{if(e)throw e.error}}this._asyncIterableDone=!0,(this._state===3||this._state===4)&&this._setState(0)}catch(s){Jt(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 oAe(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 rA{constructor(e,t){this.priority=e,this.range=t,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 R3{constructor(e,t,n){this.priority=e,this.owner=t,this.range=n,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 Zp=new class{constructor(){this._participants=[]}register(e){this._participants.push(e)}getAll(){return this._participants}};class Dl{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};let e=this.pos,t=0,n=this.value.charCodeAt(e),r;if(r=Dl._table[n],typeof r=="number")return this.pos+=1,{type:r,pos:e,len:1};if(Dl.isDigitCharacter(n)){r=8;do t+=1,n=this.value.charCodeAt(e+t);while(Dl.isDigitCharacter(n));return this.pos+=t,{type:r,pos:e,len:t}}if(Dl.isVariableCharacter(n)){r=9;do n=this.value.charCodeAt(e+ ++t);while(Dl.isVariableCharacter(n)||Dl.isDigitCharacter(n));return this.pos+=t,{type:r,pos:e,len:t}}r=10;do t+=1,n=this.value.charCodeAt(e+t);while(!isNaN(n)&&typeof Dl._table[n]>"u"&&!Dl.isDigitCharacter(n)&&!Dl.isVariableCharacter(n));return this.pos+=t,{type:r,pos:e,len:t}}}Dl._table={[36]:0,[58]:1,[44]:2,[123]:3,[125]:4,[92]:5,[47]:6,[124]:7,[43]:11,[45]:12,[63]:13};class M1{constructor(){this._children=[]}appendChild(e){return e instanceof Go&&this._children[this._children.length-1]instanceof Go?this._children[this._children.length-1].value+=e.value:(e.parent=this,this._children.push(e)),this}replace(e,t){const{parent:n}=e,r=n.children.indexOf(e),s=n.children.slice(0);s.splice(r,1,...t),n._children=s,function o(a,l){for(const c of a)c.parent=l,o(c.children,c)}(t,n)}get children(){return this._children}get snippet(){let e=this;for(;;){if(!e)return;if(e instanceof O3)return e;e=e.parent}}toString(){return this.children.reduce((e,t)=>e+t.toString(),"")}len(){return 0}}class Go extends M1{constructor(e){super(),this.value=e}toString(){return this.value}len(){return this.value.length}clone(){return new Go(this.value)}}class rX extends M1{}let kc=class extends rX{constructor(e){super(),this.index=e}static compareByIndex(e,t){return e.index===t.index?0:e.isFinalTabstop?1:t.isFinalTabstop||e.indext.index?1:0}get isFinalTabstop(){return this.index===0}get choice(){return this._children.length===1&&this._children[0]instanceof Hw?this._children[0]:void 0}clone(){let e=new kc(this.index);return this.transform&&(e.transform=this.transform.clone()),e._children=this.children.map(t=>t.clone()),e}};class Hw extends M1{constructor(){super(...arguments),this.options=[]}appendChild(e){return e instanceof Go&&(e.parent=this,this.options.push(e)),this}toString(){return this.options[0].value}len(){return this.options[0].len()}clone(){let e=new Hw;return this.options.forEach(e.appendChild,e),e}}class sA extends M1{constructor(){super(...arguments),this.regexp=new RegExp("")}resolve(e){const t=this;let n=!1,r=e.replace(this.regexp,function(){return n=!0,t._replace(Array.prototype.slice.call(arguments,0,-2))});return!n&&this._children.some(s=>s instanceof Ec&&Boolean(s.elseValue))&&(r=this._replace([])),r}_replace(e){let t="";for(const n of this._children)if(n instanceof Ec){let r=e[n.index]||"";r=n.resolve(r),t+=r}else t+=n.toString();return t}toString(){return""}clone(){let e=new sA;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 Ec extends M1{constructor(e,t,n,r){super(),this.index=e,this.shorthandName=t,this.ifValue=n,this.elseValue=r}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):"":Boolean(e)&&typeof this.ifValue=="string"?this.ifValue:!Boolean(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).toLowerCase()).join(""):e}_toCamelCase(e){const t=e.match(/[a-z0-9]+/gi);return t?t.map((n,r)=>r===0?n.toLowerCase():n.charAt(0).toUpperCase()+n.substr(1).toLowerCase()).join(""):e}clone(){return new Ec(this.index,this.shorthandName,this.ifValue,this.elseValue)}}class zw extends rX{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 Go(t)],!0):!1}clone(){const e=new zw(this.name);return this.transform&&(e.transform=this.transform.clone()),e._children=this.children.map(t=>t.clone()),e}}function sX(i,e){const t=[...i];for(;t.length>0;){const n=t.shift();if(!e(n))break;t.unshift(...n.children)}}class O3 extends M1{get placeholderInfo(){if(!this._placeholders){let e=[],t;this.walk(function(n){return n instanceof kc&&(e.push(n),t=!t||t.indexr===e?(n=!0,!1):(t+=r.len(),!0)),n?t:-1}fullLen(e){let t=0;return sX([e],n=>(t+=n.len(),!0)),t}enclosingPlaceholders(e){let t=[],{parent:n}=e;for(;n;)n instanceof kc&&t.push(n),n=n.parent;return t}resolveVariables(e){return this.walk(t=>(t instanceof zw&&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(){let e=new O3;return this._children=this.children.map(t=>t.clone()),e}walk(e){sX(this.children,e)}}class M3{constructor(){this._scanner=new Dl,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){this._scanner.text(e),this._token=this._scanner.next();const r=new O3;for(;this._parse(r););const s=new Map,o=[];let a=0;r.walk(l=>(l instanceof kc&&(a+=1,l.isFinalTabstop?s.set(0,void 0):!s.has(l.index)&&l.children.length>0?s.set(l.index,l.children):o.push(l)),!0));for(const l of o){const c=s.get(l.index);if(c){const u=new kc(l.index);u.transform=l.transform;for(const d of c)u.appendChild(d.clone());r.replace(l,[u])}}return n||(n=a>0&&t),!s.has(0)&&n&&r.appendChild(new kc(0)),r}_accept(e,t){if(e===void 0||this._token.type===e){let 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 r=this._scanner.next();if(r.type!==0&&r.type!==4&&r.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 Go(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 kc(Number(t)):new zw(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 s=new kc(Number(t));if(this._accept(1))for(;;){if(this._accept(4))return e.appendChild(s),!0;if(!this._parse(s))return e.appendChild(new Go("${"+t+":")),s.children.forEach(e.appendChild,e),!0}else if(s.index>0&&this._accept(7)){const o=new Hw;for(;;){if(this._parseChoiceElement(o)){if(this._accept(2))continue;if(this._accept(7)&&(s.appendChild(o),this._accept(4)))return e.appendChild(s),!0}return this._backTo(n),!1}}else return this._accept(6)?this._parseTransform(s)?(e.appendChild(s),!0):(this._backTo(n),!1):this._accept(4)?(e.appendChild(s),!0):this._backTo(n)}_parseChoiceElement(e){const t=this._token,n=[];for(;!(this._token.type===2||this._token.type===7);){let r;if((r=this._accept(5,!0))?r=this._accept(2,!0)||this._accept(7,!0)||this._accept(5,!0)||r:r=this._accept(void 0,!0),!r)return this._backTo(t),!1;n.push(r)}return n.length===0?(this._backTo(t),!1):(e.appendChild(new Go(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 s=new zw(t);if(this._accept(1))for(;;){if(this._accept(4))return e.appendChild(s),!0;if(!this._parse(s))return e.appendChild(new Go("${"+t+":")),s.children.forEach(e.appendChild,e),!0}else return this._accept(6)?this._parseTransform(s)?(e.appendChild(s),!0):(this._backTo(n),!1):this._accept(4)?(e.appendChild(s),!0):this._backTo(n)}_parseTransform(e){let t=new sA,n="",r="";for(;!this._accept(6);){let s;if(s=this._accept(5,!0)){s=this._accept(6,!0)||s,n+=s;continue}if(this._token.type!==14){n+=this._accept(void 0,!0);continue}return!1}for(;!this._accept(6);){let s;if(s=this._accept(5,!0)){s=this._accept(5,!0)||this._accept(6,!0)||s,t.appendChild(new Go(s));continue}if(!(this._parseFormatString(t)||this._parseAnything(t)))return!1}for(;!this._accept(4);){if(this._token.type!==14){r+=this._accept(void 0,!0);continue}return!1}try{t.regexp=new RegExp(n,r)}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);let r=this._accept(8,!0);if(r)if(n){if(this._accept(4))return e.appendChild(new Ec(Number(r))),!0;if(!this._accept(1))return this._backTo(t),!1}else return e.appendChild(new Ec(Number(r))),!0;else return this._backTo(t),!1;if(this._accept(6)){let s=this._accept(9,!0);return!s||!this._accept(4)?(this._backTo(t),!1):(e.appendChild(new Ec(Number(r),s)),!0)}else if(this._accept(11)){let s=this._until(4);if(s)return e.appendChild(new Ec(Number(r),void 0,s,void 0)),!0}else if(this._accept(12)){let s=this._until(4);if(s)return e.appendChild(new Ec(Number(r),void 0,void 0,s)),!0}else if(this._accept(13)){let s=this._until(1);if(s){let o=this._until(4);if(o)return e.appendChild(new Ec(Number(r),void 0,s,o)),!0}}else{let s=this._until(4);if(s)return e.appendChild(new Ec(Number(r),void 0,void 0,s)),!0}return this._backTo(t),!1}_parseAnything(e){return this._token.type!==14?(e.appendChild(new Go(this._scanner.tokenText(this._token))),this._accept(void 0),!0):!1}}const Ypt="",aAe={inputActiveOptionBorder:Ie.fromHex("#007ACC00"),inputActiveOptionForeground:Ie.fromHex("#FFFFFF"),inputActiveOptionBackground:Ie.fromHex("#0E639C50")};class $w extends Ll{constructor(e){super(),this._onChange=this._register(new be),this.onChange=this._onChange.event,this._onKeyDown=this._register(new be),this.onKeyDown=this._onKeyDown.event,this._opts=Object.assign(Object.assign({},aAe),e),this._checked=this._opts.isChecked;const t=["monaco-custom-checkbox"];this._opts.icon&&t.push(...Gs.asClassNameArray(this._opts.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.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();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}style(e){e.inputActiveOptionBorder&&(this._opts.inputActiveOptionBorder=e.inputActiveOptionBorder),e.inputActiveOptionForeground&&(this._opts.inputActiveOptionForeground=e.inputActiveOptionForeground),e.inputActiveOptionBackground&&(this._opts.inputActiveOptionBackground=e.inputActiveOptionBackground),this.applyStyles()}applyStyles(){this.domNode&&(this.domNode.style.borderColor=this._checked&&this._opts.inputActiveOptionBorder?this._opts.inputActiveOptionBorder.toString():"",this.domNode.style.color=this._checked&&this._opts.inputActiveOptionForeground?this._opts.inputActiveOptionForeground.toString():"inherit",this.domNode.style.backgroundColor=this._checked&&this._opts.inputActiveOptionBackground?this._opts.inputActiveOptionBackground.toString():"")}enable(){this.domNode.setAttribute("aria-disabled",String(!1))}disable(){this.domNode.setAttribute("aria-disabled",String(!0))}}const lAe=C("caseDescription","Match Case"),cAe=C("wordsDescription","Match Whole Word"),uAe=C("regexDescription","Use Regular Expression");class oX extends $w{constructor(e){super({icon:k.caseSensitive,title:lAe+e.appendTitle,isChecked:e.isChecked,inputActiveOptionBorder:e.inputActiveOptionBorder,inputActiveOptionForeground:e.inputActiveOptionForeground,inputActiveOptionBackground:e.inputActiveOptionBackground})}}class aX extends $w{constructor(e){super({icon:k.wholeWord,title:cAe+e.appendTitle,isChecked:e.isChecked,inputActiveOptionBorder:e.inputActiveOptionBorder,inputActiveOptionForeground:e.inputActiveOptionForeground,inputActiveOptionBackground:e.inputActiveOptionBackground})}}class lX extends $w{constructor(e){super({icon:k.regex,title:uAe+e.appendTitle,isChecked:e.isChecked,inputActiveOptionBorder:e.inputActiveOptionBorder,inputActiveOptionForeground:e.inputActiveOptionForeground,inputActiveOptionBackground:e.inputActiveOptionBackground})}}const Zpt="",dAe=C("defaultLabel","input");class hAe extends Ll{constructor(e,t,n,r){super(),this._showOptionButtons=n,this.fixFocusOnOptionClickEnabled=!0,this.imeSessionInProgress=!1,this._onDidOptionChange=this._register(new be),this.onDidOptionChange=this._onDidOptionChange.event,this._onKeyDown=this._register(new be),this.onKeyDown=this._onKeyDown.event,this._onMouseDown=this._register(new be),this.onMouseDown=this._onMouseDown.event,this._onInput=this._register(new be),this._onKeyUp=this._register(new be),this._onCaseSensitiveKeyDown=this._register(new be),this.onCaseSensitiveKeyDown=this._onCaseSensitiveKeyDown.event,this._onRegexKeyDown=this._register(new be),this.onRegexKeyDown=this._onRegexKeyDown.event,this._lastHighlightFindOptions=0,this.contextViewProvider=t,this.placeholder=r.placeholder||"",this.validation=r.validation,this.label=r.label||dAe,this.inputActiveOptionBorder=r.inputActiveOptionBorder,this.inputActiveOptionForeground=r.inputActiveOptionForeground,this.inputActiveOptionBackground=r.inputActiveOptionBackground,this.inputBackground=r.inputBackground,this.inputForeground=r.inputForeground,this.inputBorder=r.inputBorder,this.inputValidationInfoBorder=r.inputValidationInfoBorder,this.inputValidationInfoBackground=r.inputValidationInfoBackground,this.inputValidationInfoForeground=r.inputValidationInfoForeground,this.inputValidationWarningBorder=r.inputValidationWarningBorder,this.inputValidationWarningBackground=r.inputValidationWarningBackground,this.inputValidationWarningForeground=r.inputValidationWarningForeground,this.inputValidationErrorBorder=r.inputValidationErrorBorder,this.inputValidationErrorBackground=r.inputValidationErrorBackground,this.inputValidationErrorForeground=r.inputValidationErrorForeground;const s=r.appendCaseSensitiveLabel||"",o=r.appendWholeWordsLabel||"",a=r.appendRegexLabel||"",l=r.history||[],c=!!r.flexibleHeight,u=!!r.flexibleWidth,d=r.flexibleMaxHeight;this.domNode=document.createElement("div"),this.domNode.classList.add("monaco-findInput"),this.inputBox=this._register(new xK(this.domNode,this.contextViewProvider,{placeholder:this.placeholder||"",ariaLabel:this.label||"",validationOptions:{validation:this.validation},inputBackground:this.inputBackground,inputForeground:this.inputForeground,inputBorder:this.inputBorder,inputValidationInfoBackground:this.inputValidationInfoBackground,inputValidationInfoForeground:this.inputValidationInfoForeground,inputValidationInfoBorder:this.inputValidationInfoBorder,inputValidationWarningBackground:this.inputValidationWarningBackground,inputValidationWarningForeground:this.inputValidationWarningForeground,inputValidationWarningBorder:this.inputValidationWarningBorder,inputValidationErrorBackground:this.inputValidationErrorBackground,inputValidationErrorForeground:this.inputValidationErrorForeground,inputValidationErrorBorder:this.inputValidationErrorBorder,history:l,showHistoryHint:r.showHistoryHint,flexibleHeight:c,flexibleWidth:u,flexibleMaxHeight:d})),this.regex=this._register(new lX({appendTitle:a,isChecked:!1,inputActiveOptionBorder:this.inputActiveOptionBorder,inputActiveOptionForeground:this.inputActiveOptionForeground,inputActiveOptionBackground:this.inputActiveOptionBackground})),this._register(this.regex.onChange(f=>{this._onDidOptionChange.fire(f),!f&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()})),this._register(this.regex.onKeyDown(f=>{this._onRegexKeyDown.fire(f)})),this.wholeWords=this._register(new aX({appendTitle:o,isChecked:!1,inputActiveOptionBorder:this.inputActiveOptionBorder,inputActiveOptionForeground:this.inputActiveOptionForeground,inputActiveOptionBackground:this.inputActiveOptionBackground})),this._register(this.wholeWords.onChange(f=>{this._onDidOptionChange.fire(f),!f&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()})),this.caseSensitive=this._register(new oX({appendTitle:s,isChecked:!1,inputActiveOptionBorder:this.inputActiveOptionBorder,inputActiveOptionForeground:this.inputActiveOptionForeground,inputActiveOptionBackground:this.inputActiveOptionBackground})),this._register(this.caseSensitive.onChange(f=>{this._onDidOptionChange.fire(f),!f&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()})),this._register(this.caseSensitive.onKeyDown(f=>{this._onCaseSensitiveKeyDown.fire(f)})),this._showOptionButtons&&(this.inputBox.paddingRight=this.caseSensitive.width()+this.wholeWords.width()+this.regex.width());let h=[this.caseSensitive.domNode,this.wholeWords.domNode,this.regex.domNode];this.onkeydown(this.domNode,f=>{if(f.equals(15)||f.equals(17)||f.equals(9)){let g=h.indexOf(document.activeElement);if(g>=0){let p=-1;f.equals(17)?p=(g+1)%h.length:f.equals(15)&&(g===0?p=h.length-1:p=g-1),f.equals(9)?(h[g].blur(),this.inputBox.focus()):p>=0&&h[p].focus(),Xn.stop(f,!0)}}}),this.controls=document.createElement("div"),this.controls.className="controls",this.controls.style.display=this._showOptionButtons?"block":"none",this.controls.appendChild(this.caseSensitive.domNode),this.controls.appendChild(this.wholeWords.domNode),this.controls.appendChild(this.regex.domNode),this.domNode.appendChild(this.controls),e&&e.appendChild(this.domNode),this._register(Xe(this.inputBox.inputElement,"compositionstart",f=>{this.imeSessionInProgress=!0})),this._register(Xe(this.inputBox.inputElement,"compositionend",f=>{this.imeSessionInProgress=!1,this._onInput.fire()})),this.onkeydown(this.inputBox.inputElement,f=>this._onKeyDown.fire(f)),this.onkeyup(this.inputBox.inputElement,f=>this._onKeyUp.fire(f)),this.oninput(this.inputBox.inputElement,f=>this._onInput.fire()),this.onmousedown(this.inputBox.inputElement,f=>this._onMouseDown.fire(f))}enable(){this.domNode.classList.remove("disabled"),this.inputBox.enable(),this.regex.enable(),this.wholeWords.enable(),this.caseSensitive.enable()}disable(){this.domNode.classList.add("disabled"),this.inputBox.disable(),this.regex.disable(),this.wholeWords.disable(),this.caseSensitive.disable()}setFocusInputOnOptionClick(e){this.fixFocusOnOptionClickEnabled=e}setEnabled(e){e?this.enable():this.disable()}getValue(){return this.inputBox.value}setValue(e){this.inputBox.value!==e&&(this.inputBox.value=e)}style(e){this.inputActiveOptionBorder=e.inputActiveOptionBorder,this.inputActiveOptionForeground=e.inputActiveOptionForeground,this.inputActiveOptionBackground=e.inputActiveOptionBackground,this.inputBackground=e.inputBackground,this.inputForeground=e.inputForeground,this.inputBorder=e.inputBorder,this.inputValidationInfoBackground=e.inputValidationInfoBackground,this.inputValidationInfoForeground=e.inputValidationInfoForeground,this.inputValidationInfoBorder=e.inputValidationInfoBorder,this.inputValidationWarningBackground=e.inputValidationWarningBackground,this.inputValidationWarningForeground=e.inputValidationWarningForeground,this.inputValidationWarningBorder=e.inputValidationWarningBorder,this.inputValidationErrorBackground=e.inputValidationErrorBackground,this.inputValidationErrorForeground=e.inputValidationErrorForeground,this.inputValidationErrorBorder=e.inputValidationErrorBorder,this.applyStyles()}applyStyles(){if(this.domNode){const e={inputActiveOptionBorder:this.inputActiveOptionBorder,inputActiveOptionForeground:this.inputActiveOptionForeground,inputActiveOptionBackground:this.inputActiveOptionBackground};this.regex.style(e),this.wholeWords.style(e),this.caseSensitive.style(e);const t={inputBackground:this.inputBackground,inputForeground:this.inputForeground,inputBorder:this.inputBorder,inputValidationInfoBackground:this.inputValidationInfoBackground,inputValidationInfoForeground:this.inputValidationInfoForeground,inputValidationInfoBorder:this.inputValidationInfoBorder,inputValidationWarningBackground:this.inputValidationWarningBackground,inputValidationWarningForeground:this.inputValidationWarningForeground,inputValidationWarningBorder:this.inputValidationWarningBorder,inputValidationErrorBackground:this.inputValidationErrorBackground,inputValidationErrorForeground:this.inputValidationErrorForeground,inputValidationErrorBorder:this.inputValidationErrorBorder};this.inputBox.style(t)}}select(){this.inputBox.select()}focus(){this.inputBox.focus()}getCaseSensitive(){return this.caseSensitive.checked}setCaseSensitive(e){this.caseSensitive.checked=e}getWholeWords(){return this.wholeWords.checked}setWholeWords(e){this.wholeWords.checked=e}getRegex(){return this.regex.checked}setRegex(e){this.regex.checked=e,this.validate()}focusOnCaseSensitive(){this.caseSensitive.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()}clearMessage(){this.inputBox.hideMessage()}}const fAe=C("defaultLabel","input"),gAe=C("label.preserveCaseCheckbox","Preserve Case");class pAe extends $w{constructor(e){super({icon:k.preserveCase,title:gAe+e.appendTitle,isChecked:e.isChecked,inputActiveOptionBorder:e.inputActiveOptionBorder,inputActiveOptionForeground:e.inputActiveOptionForeground,inputActiveOptionBackground:e.inputActiveOptionBackground})}}class mAe extends Ll{constructor(e,t,n,r){super(),this._showOptionButtons=n,this.fixFocusOnOptionClickEnabled=!0,this.cachedOptionsWidth=0,this._onDidOptionChange=this._register(new be),this.onDidOptionChange=this._onDidOptionChange.event,this._onKeyDown=this._register(new be),this.onKeyDown=this._onKeyDown.event,this._onMouseDown=this._register(new be),this._onInput=this._register(new be),this._onKeyUp=this._register(new be),this._onPreserveCaseKeyDown=this._register(new be),this.onPreserveCaseKeyDown=this._onPreserveCaseKeyDown.event,this.contextViewProvider=t,this.placeholder=r.placeholder||"",this.validation=r.validation,this.label=r.label||fAe,this.inputActiveOptionBorder=r.inputActiveOptionBorder,this.inputActiveOptionForeground=r.inputActiveOptionForeground,this.inputActiveOptionBackground=r.inputActiveOptionBackground,this.inputBackground=r.inputBackground,this.inputForeground=r.inputForeground,this.inputBorder=r.inputBorder,this.inputValidationInfoBorder=r.inputValidationInfoBorder,this.inputValidationInfoBackground=r.inputValidationInfoBackground,this.inputValidationInfoForeground=r.inputValidationInfoForeground,this.inputValidationWarningBorder=r.inputValidationWarningBorder,this.inputValidationWarningBackground=r.inputValidationWarningBackground,this.inputValidationWarningForeground=r.inputValidationWarningForeground,this.inputValidationErrorBorder=r.inputValidationErrorBorder,this.inputValidationErrorBackground=r.inputValidationErrorBackground,this.inputValidationErrorForeground=r.inputValidationErrorForeground;const s=r.appendPreserveCaseLabel||"",o=r.history||[],a=!!r.flexibleHeight,l=!!r.flexibleWidth,c=r.flexibleMaxHeight;this.domNode=document.createElement("div"),this.domNode.classList.add("monaco-findInput"),this.inputBox=this._register(new xK(this.domNode,this.contextViewProvider,{ariaLabel:this.label||"",placeholder:this.placeholder||"",validationOptions:{validation:this.validation},inputBackground:this.inputBackground,inputForeground:this.inputForeground,inputBorder:this.inputBorder,inputValidationInfoBackground:this.inputValidationInfoBackground,inputValidationInfoForeground:this.inputValidationInfoForeground,inputValidationInfoBorder:this.inputValidationInfoBorder,inputValidationWarningBackground:this.inputValidationWarningBackground,inputValidationWarningForeground:this.inputValidationWarningForeground,inputValidationWarningBorder:this.inputValidationWarningBorder,inputValidationErrorBackground:this.inputValidationErrorBackground,inputValidationErrorForeground:this.inputValidationErrorForeground,inputValidationErrorBorder:this.inputValidationErrorBorder,history:o,showHistoryHint:r.showHistoryHint,flexibleHeight:a,flexibleWidth:l,flexibleMaxHeight:c})),this.preserveCase=this._register(new pAe({appendTitle:s,isChecked:!1,inputActiveOptionBorder:this.inputActiveOptionBorder,inputActiveOptionForeground:this.inputActiveOptionForeground,inputActiveOptionBackground:this.inputActiveOptionBackground})),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;let u=[this.preserveCase.domNode];this.onkeydown(this.domNode,h=>{if(h.equals(15)||h.equals(17)||h.equals(9)){let f=u.indexOf(document.activeElement);if(f>=0){let g=-1;h.equals(17)?g=(f+1)%u.length:h.equals(15)&&(f===0?g=u.length-1:g=f-1),h.equals(9)?(u[f].blur(),this.inputBox.focus()):g>=0&&u[g].focus(),Xn.stop(h,!0)}}});let d=document.createElement("div");d.className="controls",d.style.display=this._showOptionButtons?"block":"none",d.appendChild(this.preserveCase.domNode),this.domNode.appendChild(d),e&&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()}style(e){this.inputActiveOptionBorder=e.inputActiveOptionBorder,this.inputActiveOptionForeground=e.inputActiveOptionForeground,this.inputActiveOptionBackground=e.inputActiveOptionBackground,this.inputBackground=e.inputBackground,this.inputForeground=e.inputForeground,this.inputBorder=e.inputBorder,this.inputValidationInfoBackground=e.inputValidationInfoBackground,this.inputValidationInfoForeground=e.inputValidationInfoForeground,this.inputValidationInfoBorder=e.inputValidationInfoBorder,this.inputValidationWarningBackground=e.inputValidationWarningBackground,this.inputValidationWarningForeground=e.inputValidationWarningForeground,this.inputValidationWarningBorder=e.inputValidationWarningBorder,this.inputValidationErrorBackground=e.inputValidationErrorBackground,this.inputValidationErrorForeground=e.inputValidationErrorForeground,this.inputValidationErrorBorder=e.inputValidationErrorBorder,this.applyStyles()}applyStyles(){if(this.domNode){const e={inputActiveOptionBorder:this.inputActiveOptionBorder,inputActiveOptionForeground:this.inputActiveOptionForeground,inputActiveOptionBackground:this.inputActiveOptionBackground};this.preserveCase.style(e);const t={inputBackground:this.inputBackground,inputForeground:this.inputForeground,inputBorder:this.inputBorder,inputValidationInfoBackground:this.inputValidationInfoBackground,inputValidationInfoForeground:this.inputValidationInfoForeground,inputValidationInfoBorder:this.inputValidationInfoBorder,inputValidationWarningBackground:this.inputValidationWarningBackground,inputValidationWarningForeground:this.inputValidationWarningForeground,inputValidationWarningBorder:this.inputValidationWarningBorder,inputValidationErrorBackground:this.inputValidationErrorBackground,inputValidationErrorForeground:this.inputValidationErrorForeground,inputValidationErrorBorder:this.inputValidationErrorBorder};this.inputBox.style(t)}}select(){this.inputBox.select()}focus(){this.inputBox.focus()}getPreserveCase(){return this.preserveCase.checked}setPreserveCase(e){this.preserveCase.checked=e}focusOnPreserve(){this.preserveCase.focus()}validate(){this.inputBox&&this.inputBox.validate()}set width(e){this.inputBox.paddingRight=this.cachedOptionsWidth,this.inputBox.width=e,this.domNode.style.width=e+"px"}dispose(){super.dispose()}}var cX=globalThis&&globalThis.__decorate||function(i,e,t,n){var r=arguments.length,s=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(s=(r<3?o(s):r>3?o(e,t,s):o(e,t))||s);return r>3&&s&&Object.defineProperty(e,t,s),s},uX=globalThis&&globalThis.__param||function(i,e){return function(t,n){e(t,n,i)}};const oA=new mt("suggestWidgetVisible",!1,C("suggestWidgetVisible","Whether suggestion are visible")),Uw="historyNavigationWidget",dX="historyNavigationForwardsEnabled",hX="historyNavigationBackwardsEnabled";function _Ae(i,e,t){new mt(t,e).bindTo(i)}function bAe(i,e){return i.createScoped(e.target)}function fX(i,e){return i.getContext(document.activeElement).getValue(e)}function gX(i,e){const t=bAe(i,e);_Ae(t,e,Uw);const n=new mt(dX,!0).bindTo(t),r=new mt(hX,!0).bindTo(t);return{scopedContextKeyService:t,historyNavigationForwardsEnablement:n,historyNavigationBackwardsEnablement:r}}let aA=class extends hAe{constructor(e,t,n,r,s=!1){super(e,t,s,n),this._register(gX(r,{target:this.inputBox.element,historyNavigator:this.inputBox}).scopedContextKeyService)}};aA=cX([uX(3,Yt)],aA);let lA=class extends mAe{constructor(e,t,n,r,s=!1){super(e,t,s,n),this._register(gX(r,{target:this.inputBox.element,historyNavigator:this.inputBox}).scopedContextKeyService)}};lA=cX([uX(3,Yt)],lA),Ys.registerCommandAndKeybindingRule({id:"history.showPrevious",weight:200,when:ht.and(ht.has(Uw),ht.equals(hX,!0),oA.isEqualTo(!1)),primary:16,secondary:[528],handler:i=>{const e=fX(i.get(Yt),Uw);e&&e.historyNavigator.showPreviousValue()}}),Ys.registerCommandAndKeybindingRule({id:"history.showNext",weight:200,when:ht.and(ht.has(Uw),ht.equals(dX,!0),oA.isEqualTo(!1)),primary:18,secondary:[530],handler:i=>{const e=fX(i.get(Yt),Uw);e&&e.historyNavigator.showNextValue()}});var jw=globalThis&&globalThis.__awaiter||function(i,e,t,n){function r(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(u){try{c(n.next(u))}catch(d){o(d)}}function l(u){try{c(n.throw(u))}catch(d){o(d)}}function c(u){u.done?s(u.value):r(u.value).then(a,l)}c((n=n.apply(i,e||[])).next())})};const In={Visible:oA,DetailsVisible:new mt("suggestWidgetDetailsVisible",!1,C("suggestWidgetDetailsVisible","Whether suggestion details are visible")),MultipleSuggestions:new mt("suggestWidgetMultipleSuggestions",!1,C("suggestWidgetMultipleSuggestions","Whether there are multiple suggestions to pick from")),MakesTextEdit:new mt("suggestionMakesTextEdit",!0,C("suggestionMakesTextEdit","Whether inserting the current suggestion yields in a change or has everything already been typed")),AcceptSuggestionsOnEnter:new mt("acceptSuggestionOnEnter",!0,C("acceptSuggestionOnEnter","Whether suggestions are inserted when pressing Enter")),HasInsertAndReplaceRange:new mt("suggestionHasInsertAndReplaceRange",!1,C("suggestionHasInsertAndReplaceRange","Whether the current suggestion has insert and replace behaviour")),InsertMode:new mt("suggestionInsertMode",void 0,{type:"string",description:C("suggestionInsertMode","Whether the default behaviour is to insert or replace")}),CanResolve:new mt("suggestionCanResolve",!1,C("suggestionCanResolve","Whether the current suggestion supports to resolve further details"))},bf=new de("suggestWidgetStatusBar");let vAe=class{constructor(e,t,n,r){this.position=e,this.completion=t,this.container=n,this.provider=r,this.isInvalid=!1,this.score=pc.Default,this.distance=0,this.textLabel=typeof t.label=="string"?t.label:t.label.label,this.labelLow=this.textLabel.toLowerCase(),this.isInvalid=!this.textLabel,this.sortTextLow=t.sortText&&t.sortText.toLowerCase(),this.filterTextLow=t.filterText&&t.filterText.toLowerCase(),H.isIRange(t.range)?(this.editStart=new ye(t.range.startLineNumber,t.range.startColumn),this.editInsertEnd=new ye(t.range.endLineNumber,t.range.endColumn),this.editReplaceEnd=new ye(t.range.endLineNumber,t.range.endColumn),this.isInvalid=this.isInvalid||H.spansMultipleLines(t.range)||t.range.startLineNumber!==e.lineNumber):(this.editStart=new ye(t.range.insert.startLineNumber,t.range.insert.startColumn),this.editInsertEnd=new ye(t.range.insert.endLineNumber,t.range.insert.endColumn),this.editReplaceEnd=new ye(t.range.replace.endLineNumber,t.range.replace.endColumn),this.isInvalid=this.isInvalid||H.spansMultipleLines(t.range.insert)||H.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 r.resolveCompletionItem!="function"&&(this._resolveCache=Promise.resolve(),this._isResolved=!0)}get isResolved(){return!!this._isResolved}resolve(e){return jw(this,void 0,void 0,function*(){if(!this._resolveCache){const t=e.onCancellationRequested(()=>{this._resolveCache=void 0,this._isResolved=!1});this._resolveCache=Promise.resolve(this.provider.resolveCompletionItem(this.completion,e)).then(n=>{Object.assign(this.completion,n),this._isResolved=!0,t.dispose()},n=>{jc(n)&&(this._resolveCache=void 0,this._isResolved=!1)})}return this._resolveCache})}};class P3{constructor(e=2,t=new Set,n=new Set,r=!0){this.snippetSortOrder=e,this.kindFilter=t,this.providerFilter=n,this.showDeprecated=r}}P3.default=new P3;let wAe;function CAe(){return wAe}class yAe{constructor(e,t,n,r){this.items=e,this.needsClipboard=t,this.durations=n,this.disposable=r}}function pX(i,e,t,n=P3.default,r={triggerKind:0},s=mn.None){return jw(this,void 0,void 0,function*(){const o=new go(!0);t=t.clone();const a=e.getWordAtPosition(t),l=a?new H(t.lineNumber,a.startColumn,t.lineNumber,a.endColumn):H.fromPositions(t),c={replace:l,insert:l.setEndPosition(t.lineNumber,t.column)},u=[],d=new Je,h=[];let f=!1;const g=(m,_,b)=>{var v,w,E;let I=!1;if(!_)return I;for(let x of _.suggestions)if(!n.kindFilter.has(x.kind)){if(!n.showDeprecated&&(!((v=x==null?void 0:x.tags)===null||v===void 0)&&v.includes(1)))continue;x.range||(x.range=c),x.sortText||(x.sortText=typeof x.label=="string"?x.label:x.label.label),!f&&x.insertTextRules&&x.insertTextRules&4&&(f=M3.guessNeedsClipboard(x.insertText)),u.push(new vAe(t,x,_,m)),I=!0}return N8(_)&&d.add(_),h.push({providerName:(w=m._debugDisplayName)!==null&&w!==void 0?w:"unknown_provider",elapsedProvider:(E=_.duration)!==null&&E!==void 0?E:-1,elapsedOverall:b.elapsed()}),I},p=(()=>jw(this,void 0,void 0,function*(){}))();for(let m of i.orderedGroups(e)){let _=!1;if(yield Promise.all(m.map(b=>jw(this,void 0,void 0,function*(){if(!(n.providerFilter.size>0&&!n.providerFilter.has(b)))try{const v=new go(!0),w=yield b.provideCompletionItems(e,t,r,s);_=g(b,w,v)||_}catch(v){Or(v)}}))),_||s.isCancellationRequested)break}return yield p,s.isCancellationRequested?(d.dispose(),Promise.reject(D8())):new yAe(u.sort(mX(n.snippetSortOrder)),f,{entries:h,elapsed:o.elapsed()},d)})}function cA(i,e){if(i.sortTextLow&&e.sortTextLow){if(i.sortTextLowe.sortTextLow)return 1}return i.completion.labele.completion.label?1:i.completion.kind-e.completion.kind}function SAe(i,e){if(i.completion.kind!==e.completion.kind){if(i.completion.kind===27)return-1;if(e.completion.kind===27)return 1}return cA(i,e)}function kAe(i,e){if(i.completion.kind!==e.completion.kind){if(i.completion.kind===27)return 1;if(e.completion.kind===27)return-1}return cA(i,e)}const F3=new Map;F3.set(0,SAe),F3.set(2,kAe),F3.set(1,cA);function mX(i){return F3.get(i)}An.registerCommand("_executeCompletionItemProvider",(i,...e)=>jw(void 0,void 0,void 0,function*(){const[t,n,r,s]=e;ci(Pt.isUri(t)),ci(ye.isIPosition(n)),ci(typeof r=="string"||!r),ci(typeof s=="number"||!s);const{completionProvider:o}=i.get(yt),a=yield i.get(mo).createModelReference(t);try{const l={incomplete:!1,suggestions:[]},c=[],u=yield pX(o,a.object.textEditorModel,ye.lift(n),void 0,{triggerCharacter:r,triggerKind:r?1:0});for(const d of u.items)c.length<(s??0)&&c.push(d.resolve(mn.None)),l.incomplete=l.incomplete||d.container.incomplete,l.suggestions.push(d.completion);try{return yield Promise.all(c),l}finally{setTimeout(()=>u.disposable.dispose(),100)}}finally{a.dispose()}}));let B3,uA=[];function EAe(i,e,t){const{completionProvider:n}=i.get(yt);B3||(B3=new class{provideCompletionItems(){let s={suggestions:uA.slice(0)};return uA.length=0,s}},n.register("*",B3)),setTimeout(()=>{var r;uA.push(...t),(r=e.getContribution("editor.contrib.suggestController"))===null||r===void 0||r.triggerSuggest(new Set().add(B3))},0)}var dA=globalThis&&globalThis.__decorate||function(i,e,t,n){var r=arguments.length,s=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(s=(r<3?o(s):r>3?o(e,t,s):o(e,t))||s);return r>3&&s&&Object.defineProperty(e,t,s),s},V3=globalThis&&globalThis.__param||function(i,e){return function(t,n){e(t,n,i)}};const _X=Ze;let W3=class gue extends Ne{constructor(e,t,n){super(),this._editor=e,this._instantiationService=t,this._keybindingService=n,this._widget=this._register(this._instantiationService.createInstance(Xp,this._editor)),this._decorationsChangerListener=this._register(new xAe(this._editor)),this._messages=[],this._messagesAreComplete=!1,this._participants=[];for(const r of Zp.getAll())this._participants.push(this._instantiationService.createInstance(r,this._editor));this._participants.sort((r,s)=>r.hoverOrdinal-s.hoverOrdinal),this._computer=new H3(this._editor,this._participants),this._hoverOperation=this._register(new iX(this._editor,this._computer)),this._register(this._hoverOperation.onResult(r=>{this._withResult(r.value,r.isComplete,r.hasLoadingMessage)})),this._register(this._decorationsChangerListener.onDidChangeModelDecorations(()=>this._onModelDecorationsChanged())),this._register(Zr(this._widget.getDomNode(),"keydown",r=>{r.equals(9)&&this.hide()})),this._register(Oi.onDidChange(()=>{this._widget.position&&this._computer.anchor&&this._messages.length>0&&(this._widget.clear(),this._renderMessages(this._computer.anchor,this._messages))}))}_onModelDecorationsChanged(){this._widget.position&&(this._hoverOperation.cancel(),this._widget.isColorPickerVisible||this._hoverOperation.start(0))}maybeShowAt(e){const t=[];for(const r of this._participants)if(r.suggestHoverAnchor){const s=r.suggestHoverAnchor(e);s&&t.push(s)}const n=e.target;if(n.type===6&&t.push(new rA(0,n.range)),n.type===7){const r=this._editor.getOption(44).typicalHalfwidthCharacterWidth/2;!n.detail.isAfterLines&&typeof n.detail.horizontalDistanceToText=="number"&&n.detail.horizontalDistanceToTexts.priority-r.priority),this._startShowingAt(t[0],0,!1),!0)}startShowingAtRange(e,t,n){this._startShowingAt(new rA(0,e),t,n)}_startShowingAt(e,t,n){if(!(this._computer.anchor&&this._computer.anchor.equals(e))){if(this._hoverOperation.cancel(),this._widget.position)if(!this._computer.anchor||!e.canAdoptVisibleHover(this._computer.anchor,this._widget.position))this.hide();else{const r=this._messages.filter(s=>s.isValidForHoverAnchor(e));if(r.length===0)this.hide();else{if(r.length===this._messages.length&&this._messagesAreComplete)return;this._renderMessages(e,r)}}this._computer.anchor=e,this._computer.shouldFocus=n,this._hoverOperation.start(t)}}hide(){this._computer.anchor=null,this._hoverOperation.cancel(),this._widget.hide()}isColorPickerVisible(){return this._widget.isColorPickerVisible}_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,t,n){this._messages=n?this._addLoadingMessage(e):e,this._messagesAreComplete=t,this._computer.anchor&&this._messages.length>0?this._renderMessages(this._computer.anchor,this._messages):t&&this.hide()}_renderMessages(e,t){let n=1073741824,r=t[0].range,s=null;for(const d of t)n=Math.min(n,d.range.startColumn),r=H.plusRange(r,d.range),d.forceShowAtRange&&(s=d.range);const o=new Je,a=o.add(new hA(this._keybindingService)),l=document.createDocumentFragment();let c=null;const u={fragment:l,statusBar:a,setColorPicker:d=>c=d,onContentsChanged:()=>this._widget.onContentsChanged(),hide:()=>this.hide()};for(const d of this._participants){const h=t.filter(f=>f.owner===d);h.length>0&&o.add(d.renderHoverParts(u,h))}if(a.hasContent&&l.appendChild(a.hoverElement),l.hasChildNodes()){if(r){const d=this._decorationsChangerListener.deltaDecorations([],[{range:r,options:gue._DECORATION_OPTIONS}]);o.add(fn(()=>{this._decorationsChangerListener.deltaDecorations(d,[])}))}this._widget.showAt(l,new LAe(c,s?s.getStartPosition():new ye(e.range.startLineNumber,n),s||r,this._editor.getOption(53).above,this._computer.shouldFocus,o))}else o.dispose()}};W3._DECORATION_OPTIONS=cn.register({description:"content-hover-highlight",className:"hoverHighlight"}),W3=dA([V3(1,_n),V3(2,qi)],W3);class xAe extends Ne{constructor(e){super(),this._editor=e,this._onDidChangeModelDecorations=this._register(new be),this.onDidChangeModelDecorations=this._onDidChangeModelDecorations.event,this._isChangingDecorations=!1,this._register(this._editor.onDidChangeModelDecorations(t=>{this._isChangingDecorations||this._onDidChangeModelDecorations.fire(t)}))}deltaDecorations(e,t){try{return this._isChangingDecorations=!0,this._editor.deltaDecorations(e,t)}finally{this._isChangingDecorations=!1}}}class LAe{constructor(e,t,n,r,s,o){this.colorPicker=e,this.showAtPosition=t,this.showAtRange=n,this.preferAbove=r,this.stoleFocus=s,this.disposables=o}}let Xp=class pue extends Ne{constructor(e,t){super(),this._editor=e,this._contextKeyService=t,this.allowEditorOverflow=!0,this._hoverVisibleKey=ie.hoverVisible.bindTo(this._contextKeyService),this._hover=this._register(new nX),this._visibleData=null,this._register(this._editor.onDidLayoutChange(()=>this._layout())),this._register(this._editor.onDidChangeConfiguration(n=>{n.hasChanged(44)&&this._updateFont()})),this._setVisibleData(null),this._layout(),this._editor.addContentWidget(this)}get position(){var e,t;return(t=(e=this._visibleData)===null||e===void 0?void 0:e.showAtPosition)!==null&&t!==void 0?t:null}get isColorPickerVisible(){var e;return Boolean((e=this._visibleData)===null||e===void 0?void 0:e.colorPicker)}dispose(){this._editor.removeContentWidget(this),this._visibleData&&this._visibleData.disposables.dispose(),super.dispose()}getId(){return pue.ID}getDomNode(){return this._hover.containerDomNode}getPosition(){if(!this._visibleData)return null;let e=this._visibleData.preferAbove;return!e&&this._contextKeyService.getContextKeyValue(In.Visible.key)&&(e=!0),{position:this._visibleData.showAtPosition,range:this._visibleData.showAtRange,preference:e?[1,2]:[2,1]}}_setVisibleData(e){this._visibleData&&this._visibleData.disposables.dispose(),this._visibleData=e,this._hoverVisibleKey.set(!!this._visibleData),this._hover.containerDomNode.classList.toggle("hidden",!this._visibleData)}_layout(){const e=Math.max(this._editor.getLayoutInfo().height/4,250),{fontSize:t,lineHeight:n}=this._editor.getOption(44);this._hover.contentsDomNode.style.fontSize=`${t}px`,this._hover.contentsDomNode.style.lineHeight=`${n/t}`,this._hover.contentsDomNode.style.maxHeight=`${e}px`,this._hover.contentsDomNode.style.maxWidth=`${Math.max(this._editor.getLayoutInfo().width*.66,500)}px`}_updateFont(){Array.prototype.slice.call(this._hover.contentsDomNode.getElementsByClassName("code")).forEach(t=>this._editor.applyFontInfo(t))}showAt(e,t){this._setVisibleData(t),this._hover.contentsDomNode.textContent="",this._hover.contentsDomNode.appendChild(e),this._hover.contentsDomNode.style.paddingBottom="",this._updateFont(),this._editor.layoutContentWidget(this),this.onContentsChanged(),this._editor.render(),this._editor.layoutContentWidget(this),this.onContentsChanged(),t.stoleFocus&&this._hover.containerDomNode.focus(),t.colorPicker&&t.colorPicker.layout()}hide(){if(this._visibleData){const e=this._visibleData.stoleFocus;this._setVisibleData(null),this._editor.layoutContentWidget(this),e&&this._editor.focus()}}onContentsChanged(){this._hover.onContentsChanged();const e=this._hover.scrollbar.getScrollDimensions();if(e.scrollWidth>e.width){const n=`${this._hover.scrollbar.options.horizontalScrollbarSize}px`;this._hover.contentsDomNode.style.paddingBottom!==n&&(this._hover.contentsDomNode.style.paddingBottom=n,this._editor.layoutContentWidget(this),this._hover.onContentsChanged())}}clear(){this._hover.contentsDomNode.textContent=""}};Xp.ID="editor.contrib.contentHoverWidget",Xp=dA([V3(1,Yt)],Xp);let hA=class extends Ne{constructor(e){super(),this._keybindingService=e,this._hasContent=!1,this.hoverElement=_X("div.hover-row.status-bar"),this.actionsElement=$e(this.hoverElement,_X("div.actions"))}get hasContent(){return this._hasContent}addAction(e){const t=this._keybindingService.lookupKeybinding(e.commandId),n=t?t.getLabel():null;return this._hasContent=!0,this._register(iA.render(this.actionsElement,e,n))}append(e){const t=$e(this.actionsElement,e);return this._hasContent=!0,t}};hA=dA([V3(0,qi)],hA);class H3{constructor(e,t){this._editor=e,this._participants=t,this._anchor=null,this._shouldFocus=!1}get anchor(){return this._anchor}set anchor(e){this._anchor=e}get shouldFocus(){return this._shouldFocus}set shouldFocus(e){this._shouldFocus=e}static _getLineDecorations(e,t){if(t.type!==1)return[];const n=e.getModel(),r=t.range.startLineNumber,s=n.getLineMaxColumn(r);return e.getLineDecorations(r).filter(o=>{if(o.options.isWholeLine)return!0;const a=o.range.startLineNumber===r?o.range.startColumn:1,l=o.range.endLineNumber===r?o.range.endColumn:s;if(o.options.showIfCollapsed){if(a>t.range.startColumn+1||t.range.endColumn-1>l)return!1}else if(a>t.range.startColumn||t.range.endColumn>l)return!1;return!0})}computeAsync(e){const t=this._anchor;if(!this._editor.hasModel()||!t)return ir.EMPTY;const n=H3._getLineDecorations(this._editor,t);return ir.merge(this._participants.map(r=>r.computeAsync?r.computeAsync(t,n,e):ir.EMPTY))}computeSync(){if(!this._editor.hasModel()||!this._anchor)return[];const e=H3._getLineDecorations(this._editor,this._anchor);let t=[];for(const n of this._participants)t=t.concat(n.computeSync(this._anchor,e));return Eg(t)}}/*! @license DOMPurify 2.3.1 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/2.3.1/LICENSE */function TAe(i){if(Array.isArray(i)){for(var e=0,t=Array(i.length);e1?t-1:0),r=1;r/gm),zAe=Fd(/^data-[\-\w.\u00B7-\uFFFF]/),$Ae=Fd(/^aria-[\-\w]+$/),UAe=Fd(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),jAe=Fd(/^(?:\w+script|data):/i),qAe=Fd(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Gw=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i};function Du(i){if(Array.isArray(i)){for(var e=0,t=Array(i.length);e"u"?null:window},KAe=function(e,t){if((typeof e>"u"?"undefined":Gw(e))!=="object"||typeof e.createPolicy!="function")return null;var n=null,r="data-tt-policy-suffix";t.currentScript&&t.currentScript.hasAttribute(r)&&(n=t.currentScript.getAttribute(r));var s="dompurify"+(n?"#"+n:"");try{return e.createPolicy(s,{createHTML:function(a){return a}})}catch{return console.warn("TrustedTypes policy "+s+" could not be created."),null}};function LX(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:GAe(),e=function(ze){return LX(ze)};if(e.version="2.3.1",e.removed=[],!i||!i.document||i.document.nodeType!==9)return e.isSupported=!1,e;var t=i.document,n=i.document,r=i.DocumentFragment,s=i.HTMLTemplateElement,o=i.Node,a=i.Element,l=i.NodeFilter,c=i.NamedNodeMap,u=c===void 0?i.NamedNodeMap||i.MozNamedAttrMap:c,d=i.Text,h=i.Comment,f=i.DOMParser,g=i.trustedTypes,p=a.prototype,m=$3(p,"cloneNode"),_=$3(p,"nextSibling"),b=$3(p,"childNodes"),v=$3(p,"parentNode");if(typeof s=="function"){var w=n.createElement("template");w.content&&w.content.ownerDocument&&(n=w.content.ownerDocument)}var E=KAe(g,t),I=E&>?E.createHTML(""):"",x=n,T=x.implementation,L=x.createNodeIterator,O=x.createDocumentFragment,N=x.getElementsByTagName,P=t.importNode,$={};try{$=Jp(n).documentMode?n.documentMode:{}}catch{}var ne={};e.isSupported=typeof v=="function"&&T&&typeof T.createHTMLDocument<"u"&&$!==9;var z=WAe,K=HAe,ce=zAe,re=$Ae,B=jAe,Ae=qAe,we=UAe,ke=null,ue=ti({},[].concat(Du(SX),Du(gA),Du(pA),Du(mA),Du(kX))),De=null,Ge=ti({},[].concat(Du(EX),Du(_A),Du(xX),Du(U3))),lt=null,Et=null,xt=!0,at=!0,Rt=!1,bt=!1,un=!1,Lt=!1,Zt=!1,ln=!1,rn=!1,Ct=!0,gt=!1,Re=!0,G=!0,ge=!1,pe={},q=null,ee=ti({},["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"]),te=null,j=ti({},["audio","video","img","source","image","track"]),Y=null,Oe=ti({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),dt="http://www.w3.org/1998/Math/MathML",Ke="http://www.w3.org/2000/svg",Ot="http://www.w3.org/1999/xhtml",ft=Ot,yn=!1,hn=null,It=n.createElement("form"),Bn=function(ze){hn&&hn===ze||((!ze||(typeof ze>"u"?"undefined":Gw(ze))!=="object")&&(ze={}),ze=Jp(ze),ke="ALLOWED_TAGS"in ze?ti({},ze.ALLOWED_TAGS):ue,De="ALLOWED_ATTR"in ze?ti({},ze.ALLOWED_ATTR):Ge,Y="ADD_URI_SAFE_ATTR"in ze?ti(Jp(Oe),ze.ADD_URI_SAFE_ATTR):Oe,te="ADD_DATA_URI_TAGS"in ze?ti(Jp(j),ze.ADD_DATA_URI_TAGS):j,q="FORBID_CONTENTS"in ze?ti({},ze.FORBID_CONTENTS):ee,lt="FORBID_TAGS"in ze?ti({},ze.FORBID_TAGS):{},Et="FORBID_ATTR"in ze?ti({},ze.FORBID_ATTR):{},pe="USE_PROFILES"in ze?ze.USE_PROFILES:!1,xt=ze.ALLOW_ARIA_ATTR!==!1,at=ze.ALLOW_DATA_ATTR!==!1,Rt=ze.ALLOW_UNKNOWN_PROTOCOLS||!1,bt=ze.SAFE_FOR_TEMPLATES||!1,un=ze.WHOLE_DOCUMENT||!1,ln=ze.RETURN_DOM||!1,rn=ze.RETURN_DOM_FRAGMENT||!1,Ct=ze.RETURN_DOM_IMPORT!==!1,gt=ze.RETURN_TRUSTED_TYPE||!1,Zt=ze.FORCE_BODY||!1,Re=ze.SANITIZE_DOM!==!1,G=ze.KEEP_CONTENT!==!1,ge=ze.IN_PLACE||!1,we=ze.ALLOWED_URI_REGEXP||we,ft=ze.NAMESPACE||Ot,bt&&(at=!1),rn&&(ln=!0),pe&&(ke=ti({},[].concat(Du(kX))),De=[],pe.html===!0&&(ti(ke,SX),ti(De,EX)),pe.svg===!0&&(ti(ke,gA),ti(De,_A),ti(De,U3)),pe.svgFilters===!0&&(ti(ke,pA),ti(De,_A),ti(De,U3)),pe.mathMl===!0&&(ti(ke,mA),ti(De,xX),ti(De,U3))),ze.ADD_TAGS&&(ke===ue&&(ke=Jp(ke)),ti(ke,ze.ADD_TAGS)),ze.ADD_ATTR&&(De===Ge&&(De=Jp(De)),ti(De,ze.ADD_ATTR)),ze.ADD_URI_SAFE_ATTR&&ti(Y,ze.ADD_URI_SAFE_ATTR),ze.FORBID_CONTENTS&&(q===ee&&(q=Jp(q)),ti(q,ze.FORBID_CONTENTS)),G&&(ke["#text"]=!0),un&&ti(ke,["html","head","body"]),ke.table&&(ti(ke,["tbody"]),delete lt.tbody),Ko&&Ko(ze),hn=ze)},Sn=ti({},["mi","mo","mn","ms","mtext"]),Ti=ti({},["foreignobject","desc","title","annotation-xml"]),Hn=ti({},gA);ti(Hn,pA),ti(Hn,BAe);var Ii=ti({},mA);ti(Ii,VAe);var yi=function(ze){var St=v(ze);(!St||!St.tagName)&&(St={namespaceURI:Ot,tagName:"template"});var Kt=Qp(ze.tagName),pi=Qp(St.tagName);if(ze.namespaceURI===Ke)return St.namespaceURI===Ot?Kt==="svg":St.namespaceURI===dt?Kt==="svg"&&(pi==="annotation-xml"||Sn[pi]):Boolean(Hn[Kt]);if(ze.namespaceURI===dt)return St.namespaceURI===Ot?Kt==="math":St.namespaceURI===Ke?Kt==="math"&&Ti[pi]:Boolean(Ii[Kt]);if(ze.namespaceURI===Ot){if(St.namespaceURI===Ke&&!Ti[pi]||St.namespaceURI===dt&&!Sn[pi])return!1;var ni=ti({},["title","style","font","a","script"]);return!Ii[Kt]&&(ni[Kt]||!Hn[Kt])}return!1},Qn=function(ze){qw(e.removed,{element:ze});try{ze.parentNode.removeChild(ze)}catch{try{ze.outerHTML=I}catch{ze.remove()}}},lr=function(ze,St){try{qw(e.removed,{attribute:St.getAttributeNode(ze),from:St})}catch{qw(e.removed,{attribute:null,from:St})}if(St.removeAttribute(ze),ze==="is"&&!De[ze])if(ln||rn)try{Qn(St)}catch{}else try{St.setAttribute(ze,"")}catch{}},Di=function(ze){var St=void 0,Kt=void 0;if(Zt)ze=""+ze;else{var pi=CX(ze,/^[\r\n\t ]+/);Kt=pi&&pi[0]}var ni=E?E.createHTML(ze):ze;if(ft===Ot)try{St=new f().parseFromString(ni,"text/html")}catch{}if(!St||!St.documentElement){St=T.createDocument(ft,"template",null);try{St.documentElement.innerHTML=yn?"":ni}catch{}}var yr=St.body||St.documentElement;return ze&&Kt&&yr.insertBefore(n.createTextNode(Kt),yr.childNodes[0]||null),ft===Ot?N.call(St,un?"html":"body")[0]:un?St.documentElement:yr},Ni=function(ze){return L.call(ze.ownerDocument||ze,ze,l.SHOW_ELEMENT|l.SHOW_COMMENT|l.SHOW_TEXT,null,!1)},Io=function(ze){return ze instanceof d||ze instanceof h?!1:typeof ze.nodeName!="string"||typeof ze.textContent!="string"||typeof ze.removeChild!="function"||!(ze.attributes instanceof u)||typeof ze.removeAttribute!="function"||typeof ze.setAttribute!="function"||typeof ze.namespaceURI!="string"||typeof ze.insertBefore!="function"},Cr=function(ze){return(typeof o>"u"?"undefined":Gw(o))==="object"?ze instanceof o:ze&&(typeof ze>"u"?"undefined":Gw(ze))==="object"&&typeof ze.nodeType=="number"&&typeof ze.nodeName=="string"},$r=function(ze,St,Kt){ne[ze]&&OAe(ne[ze],function(pi){pi.call(e,St,Kt,hn)})},ao=function(ze){var St=void 0;if($r("beforeSanitizeElements",ze,null),Io(ze)||CX(ze.nodeName,/[\u0080-\uFFFF]/))return Qn(ze),!0;var Kt=Qp(ze.nodeName);if($r("uponSanitizeElement",ze,{tagName:Kt,allowedTags:ke}),!Cr(ze.firstElementChild)&&(!Cr(ze.content)||!Cr(ze.content.firstElementChild))&&Bd(/<[/\w]/g,ze.innerHTML)&&Bd(/<[/\w]/g,ze.textContent)||Kt==="select"&&Bd(/