@opensumi/cli-engine 3.8.1-next-1741074512.0 → 3.8.1-next-1741080291.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/browser/browser.js +7 -7
- package/lib/hosted/ext.process.js +1 -1
- package/package.json +10 -10
package/lib/browser/browser.js
CHANGED
|
@@ -29996,7 +29996,7 @@ and limitations under the License.
|
|
|
29996
29996
|
`)[0];let c,b=g.match(QUERY_WORD_REGEX)[0];switch(u){case 2:c=new RangeError(`Bad node name '${b}'`);break;case 3:c=new RangeError(`Bad field name '${b}'`);break;case 4:c=new RangeError(`Bad capture name @${b}`);break;case 5:c=new TypeError(`Bad pattern structure at offset ${E}: '${g}'...`),b="";break;default:c=new SyntaxError(`Bad syntax at offset ${E}: '${g}'...`),b=""}throw c.index=E,c.length=b.length,C._free(n),c}const o=C._ts_query_string_count(r),l=C._ts_query_capture_count(r),p=C._ts_query_pattern_count(r),v=new Array(l),m=new Array(o);for(let u=0;u<l;u++){const d=C._ts_query_capture_name_for_id(r,u,TRANSFER_BUFFER),E=getValue(TRANSFER_BUFFER,"i32");v[u]=UTF8ToString(d,E)}for(let u=0;u<o;u++){const d=C._ts_query_string_value_for_id(r,u,TRANSFER_BUFFER),E=getValue(TRANSFER_BUFFER,"i32");m[u]=UTF8ToString(d,E)}const _=new Array(p),s=new Array(p),f=new Array(p),a=new Array(p),h=new Array(p);for(let u=0;u<p;u++){const d=C._ts_query_predicates_for_pattern(r,u,TRANSFER_BUFFER),E=getValue(TRANSFER_BUFFER,"i32");a[u]=[],h[u]=[];const g=[];let c=d;for(let b=0;b<E;b++){const y=getValue(c,"i32");c+=SIZE_OF_INT;const S=getValue(c,"i32");if(c+=SIZE_OF_INT,y===PREDICATE_STEP_TYPE_CAPTURE)g.push({type:"capture",name:v[S]});else if(y===PREDICATE_STEP_TYPE_STRING)g.push({type:"string",value:m[S]});else if(g.length>0){if(g[0].type!=="string")throw new Error("Predicates must begin with a literal value");const A=g[0].value;let w,T=!0,D=!0;switch(A){case"any-not-eq?":case"not-eq?":T=!1;case"any-eq?":case"eq?":if(g.length!==3)throw new Error(`Wrong number of arguments to \`#${A}\` predicate. Expected 2, got ${g.length-1}`);if(g[1].type!=="capture")throw new Error(`First argument of \`#${A}\` predicate must be a capture. Got "${g[1].value}"`);if(D=!A.startsWith("any-"),g[2].type==="capture"){const O=g[1].name,P=g[2].name;h[u].push(k=>{const F=[],L=[];for(const j of k)j.name===O&&F.push(j.node),j.name===P&&L.push(j.node);const B=(j,W,U)=>U?j.text===W.text:j.text!==W.text;return D?F.every(j=>L.some(W=>B(j,W,T))):F.some(j=>L.some(W=>B(j,W,T)))})}else{w=g[1].name;const O=g[2].value,P=F=>F.text===O,k=F=>F.text!==O;h[u].push(F=>{const L=[];for(const j of F)j.name===w&&L.push(j.node);const B=T?P:k;return D?L.every(B):L.some(B)})}break;case"any-not-match?":case"not-match?":T=!1;case"any-match?":case"match?":if(g.length!==3)throw new Error(`Wrong number of arguments to \`#${A}\` predicate. Expected 2, got ${g.length-1}.`);if(g[1].type!=="capture")throw new Error(`First argument of \`#${A}\` predicate must be a capture. Got "${g[1].value}".`);if(g[2].type!=="string")throw new Error(`Second argument of \`#${A}\` predicate must be a string. Got @${g[2].value}.`);w=g[1].name;const I=new RegExp(g[2].value);D=!A.startsWith("any-"),h[u].push(O=>{const P=[];for(const F of O)F.name===w&&P.push(F.node.text);const k=(F,L)=>L?I.test(F):!I.test(F);return P.length===0?!T:D?P.every(F=>k(F,T)):P.some(F=>k(F,T))});break;case"set!":if(g.length<2||g.length>3)throw new Error(`Wrong number of arguments to \`#set!\` predicate. Expected 1 or 2. Got ${g.length-1}.`);if(g.some(O=>O.type!=="string"))throw new Error('Arguments to `#set!` predicate must be a strings.".');_[u]||(_[u]={}),_[u][g[1].value]=g[2]?g[2].value:null;break;case"is?":case"is-not?":if(g.length<2||g.length>3)throw new Error(`Wrong number of arguments to \`#${A}\` predicate. Expected 1 or 2. Got ${g.length-1}.`);if(g.some(O=>O.type!=="string"))throw new Error(`Arguments to \`#${A}\` predicate must be a strings.".`);const R=A==="is?"?s:f;R[u]||(R[u]={}),R[u][g[1].value]=g[2]?g[2].value:null;break;case"not-any-of?":T=!1;case"any-of?":if(g.length<2)throw new Error(`Wrong number of arguments to \`#${A}\` predicate. Expected at least 1. Got ${g.length-1}.`);if(g[1].type!=="capture")throw new Error(`First argument of \`#${A}\` predicate must be a capture. Got "${g[1].value}".`);for(let O=2;O<g.length;O++)if(g[O].type!=="string")throw new Error(`Arguments to \`#${A}\` predicate must be a strings.".`);w=g[1].name;const M=g.slice(2).map(O=>O.value);h[u].push(O=>{const P=[];for(const k of O)k.name===w&&P.push(k.node.text);return P.length===0?!T:P.every(k=>M.includes(k))===T});break;default:a[u].push({operator:A,operands:g.slice(1)})}g.length=0}}Object.freeze(_[u]),Object.freeze(s[u]),Object.freeze(f[u])}return C._free(n),new Query(INTERNAL,r,v,h,a,Object.freeze(_),Object.freeze(s),Object.freeze(f))}static load(t){let e;if(t instanceof Uint8Array)e=Promise.resolve(t);else{const n=t;if(typeof process<"u"&&process.versions&&process.versions.node){const r=__webpack_require__(83078);e=Promise.resolve(r.readFileSync(n))}else e=fetch(n).then(r=>r.arrayBuffer().then(o=>{if(r.ok)return new Uint8Array(o);{const l=new TextDecoder("utf-8").decode(o);throw new Error(`Language.load failed with status ${r.status}.
|
|
29997
29997
|
|
|
29998
29998
|
${l}`)}}))}return e.then(n=>loadWebAssemblyModule(n,{loadAsync:!0})).then(n=>{const r=Object.keys(n),o=r.find(p=>LANGUAGE_FUNCTION_REGEX.test(p)&&!p.includes("external_scanner_"));o||console.log(`Couldn't find language function in WASM file. Symbols:
|
|
29999
|
-
${JSON.stringify(r,null,2)}`);const l=n[o]();return new Language(INTERNAL,l)})}}class LookaheadIterable{constructor(t,e,n){assertInternal(t),this[0]=e,this.language=n}get currentTypeId(){return C._ts_lookahead_iterator_current_symbol(this[0])}get currentType(){return this.language.types[this.currentTypeId]||"ERROR"}delete(){C._ts_lookahead_iterator_delete(this[0]),this[0]=0}resetState(t){return C._ts_lookahead_iterator_reset_state(this[0],t)}reset(t,e){return!!C._ts_lookahead_iterator_reset(this[0],t[0],e)&&(this.language=t,!0)}[Symbol.iterator](){const t=this;return{next:()=>C._ts_lookahead_iterator_next(t[0])?{done:!1,value:t.currentType}:{done:!0,value:""}}}}class Query{constructor(t,e,n,r,o,l,p,v){assertInternal(t),this[0]=e,this.captureNames=n,this.textPredicates=r,this.predicates=o,this.setProperties=l,this.assertedProperties=p,this.refutedProperties=v,this.exceededMatchLimit=!1}delete(){C._ts_query_delete(this[0]),this[0]=0}matches(t,{startPosition:e=ZERO_POINT,endPosition:n=ZERO_POINT,startIndex:r=0,endIndex:o=0,matchLimit:l=4294967295,maxStartDepth:p=4294967295}={}){if(typeof l!="number")throw new Error("Arguments must be numbers");marshalNode(t),C._ts_query_matches_wasm(this[0],t.tree[0],e.row,e.column,n.row,n.column,r,o,l,p);const v=getValue(TRANSFER_BUFFER,"i32"),m=getValue(TRANSFER_BUFFER+SIZE_OF_INT,"i32"),_=getValue(TRANSFER_BUFFER+2*SIZE_OF_INT,"i32"),s=new Array(v);this.exceededMatchLimit=!!_;let f=0,a=m;for(let h=0;h<v;h++){const u=getValue(a,"i32");a+=SIZE_OF_INT;const d=getValue(a,"i32");a+=SIZE_OF_INT;const E=new Array(d);if(a=unmarshalCaptures(this,t.tree,a,E),this.textPredicates[u].every(g=>g(E))){s[f]={pattern:u,captures:E};const g=this.setProperties[u];g&&(s[f].setProperties=g);const c=this.assertedProperties[u];c&&(s[f].assertedProperties=c);const b=this.refutedProperties[u];b&&(s[f].refutedProperties=b),f++}}return s.length=f,C._free(m),s}captures(t,{startPosition:e=ZERO_POINT,endPosition:n=ZERO_POINT,startIndex:r=0,endIndex:o=0,matchLimit:l=4294967295,maxStartDepth:p=4294967295}={}){if(typeof l!="number")throw new Error("Arguments must be numbers");marshalNode(t),C._ts_query_captures_wasm(this[0],t.tree[0],e.row,e.column,n.row,n.column,r,o,l,p);const v=getValue(TRANSFER_BUFFER,"i32"),m=getValue(TRANSFER_BUFFER+SIZE_OF_INT,"i32"),_=getValue(TRANSFER_BUFFER+2*SIZE_OF_INT,"i32"),s=[];this.exceededMatchLimit=!!_;const f=[];let a=m;for(let h=0;h<v;h++){const u=getValue(a,"i32");a+=SIZE_OF_INT;const d=getValue(a,"i32");a+=SIZE_OF_INT;const E=getValue(a,"i32");if(a+=SIZE_OF_INT,f.length=d,a=unmarshalCaptures(this,t.tree,a,f),this.textPredicates[u].every(g=>g(f))){const g=f[E],c=this.setProperties[u];c&&(g.setProperties=c);const b=this.assertedProperties[u];b&&(g.assertedProperties=b);const y=this.refutedProperties[u];y&&(g.refutedProperties=y),s.push(g)}}return C._free(m),s}predicatesForPattern(t){return this.predicates[t]}disableCapture(t){const e=lengthBytesUTF8(t),n=C._malloc(e+1);stringToUTF8(t,n,e+1),C._ts_query_disable_capture(this[0],n,e),C._free(n)}didExceedMatchLimit(){return this.exceededMatchLimit}}function getText(x,t,e){const n=e-t;let r=x.textCallback(t,null,e);for(t+=r.length;t<e;){const o=x.textCallback(t,null,e);if(!(o&&o.length>0))break;t+=o.length,r+=o}return t>e&&(r=r.slice(0,n)),r}function unmarshalCaptures(x,t,e,n){for(let r=0,o=n.length;r<o;r++){const l=getValue(e,"i32"),p=unmarshalNode(t,e+=SIZE_OF_INT);e+=SIZE_OF_NODE,n[r]={name:x.captureNames[l],node:p}}return e}function assertInternal(x){if(x!==INTERNAL)throw new Error("Illegal constructor")}function isPoint(x){return x&&typeof x.row=="number"&&typeof x.column=="number"}function marshalNode(x){let t=TRANSFER_BUFFER;setValue(t,x.id,"i32"),t+=SIZE_OF_INT,setValue(t,x.startIndex,"i32"),t+=SIZE_OF_INT,setValue(t,x.startPosition.row,"i32"),t+=SIZE_OF_INT,setValue(t,x.startPosition.column,"i32"),t+=SIZE_OF_INT,setValue(t,x[0],"i32")}function unmarshalNode(x,t=TRANSFER_BUFFER){const e=getValue(t,"i32");if(e===0)return null;const n=getValue(t+=SIZE_OF_INT,"i32"),r=getValue(t+=SIZE_OF_INT,"i32"),o=getValue(t+=SIZE_OF_INT,"i32"),l=getValue(t+=SIZE_OF_INT,"i32"),p=new Node(INTERNAL,x);return p.id=e,p.startIndex=n,p.startPosition={row:r,column:o},p[0]=l,p}function marshalTreeCursor(x,t=TRANSFER_BUFFER){setValue(t+0*SIZE_OF_INT,x[0],"i32"),setValue(t+1*SIZE_OF_INT,x[1],"i32"),setValue(t+2*SIZE_OF_INT,x[2],"i32"),setValue(t+3*SIZE_OF_INT,x[3],"i32")}function unmarshalTreeCursor(x){x[0]=getValue(TRANSFER_BUFFER+0*SIZE_OF_INT,"i32"),x[1]=getValue(TRANSFER_BUFFER+1*SIZE_OF_INT,"i32"),x[2]=getValue(TRANSFER_BUFFER+2*SIZE_OF_INT,"i32"),x[3]=getValue(TRANSFER_BUFFER+3*SIZE_OF_INT,"i32")}function marshalPoint(x,t){setValue(x,t.row,"i32"),setValue(x+SIZE_OF_INT,t.column,"i32")}function unmarshalPoint(x){return{row:getValue(x,"i32")>>>0,column:getValue(x+SIZE_OF_INT,"i32")>>>0}}function marshalRange(x,t){marshalPoint(x,t.startPosition),marshalPoint(x+=SIZE_OF_POINT,t.endPosition),setValue(x+=SIZE_OF_POINT,t.startIndex,"i32"),setValue(x+=SIZE_OF_INT,t.endIndex,"i32"),x+=SIZE_OF_INT}function unmarshalRange(x){const t={};return t.startPosition=unmarshalPoint(x),x+=SIZE_OF_POINT,t.endPosition=unmarshalPoint(x),x+=SIZE_OF_POINT,t.startIndex=getValue(x,"i32")>>>0,x+=SIZE_OF_INT,t.endIndex=getValue(x,"i32")>>>0,t}function marshalEdit(x){let t=TRANSFER_BUFFER;marshalPoint(t,x.startPosition),t+=SIZE_OF_POINT,marshalPoint(t,x.oldEndPosition),t+=SIZE_OF_POINT,marshalPoint(t,x.newEndPosition),t+=SIZE_OF_POINT,setValue(t,x.startIndex,"i32"),t+=SIZE_OF_INT,setValue(t,x.oldEndIndex,"i32"),t+=SIZE_OF_INT,setValue(t,x.newEndIndex,"i32"),t+=SIZE_OF_INT}for(const x of Object.getOwnPropertyNames(ParserImpl.prototype))Object.defineProperty(Parser.prototype,x,{value:ParserImpl.prototype[x],enumerable:!1,writable:!1});Parser.Language=Language,Module.onRuntimeInitialized=()=>{ParserImpl.init(),resolveInitPromise()}}))}}return Parser}();module.exports=TreeSitter},52730:(x,t,e)=>{"use strict";var n=e(80705),r=e(14834),o=e(28498),l=e(79818),p=e(69336),v=l("Object.prototype.toString"),m=e(51913)(),_=typeof globalThis>"u"?e.g:globalThis,s=r(),f=l("String.prototype.slice"),a=Object.getPrototypeOf,h=l("Array.prototype.indexOf",!0)||function(c,b){for(var y=0;y<c.length;y+=1)if(c[y]===b)return y;return-1},u={__proto__:null};m&&p&&a?n(s,function(g){var c=new _[g];if(Symbol.toStringTag in c){var b=a(c),y=p(b,Symbol.toStringTag);if(!y){var S=a(b);y=p(S,Symbol.toStringTag)}u["$"+g]=o(y.get)}}):n(s,function(g){var c=new _[g],b=c.slice||c.set;b&&(u["$"+g]=o(b))});var d=function(c){var b=!1;return n(u,function(y,S){if(!b)try{"$"+y(c)===S&&(b=f(S,1))}catch{}}),b},E=function(c){var b=!1;return n(u,function(y,S){if(!b)try{y(c),b=f(S,1)}catch{}}),b};x.exports=function(c){if(!c||typeof c!="object")return!1;if(!m){var b=f(v(c),8,-1);return h(s,b)>-1?b:b!=="Object"?!1:E(c)}return p?d(c):null}},97442:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ZodError=t.quotelessJson=t.ZodIssueCode=void 0;const n=e(94705);t.ZodIssueCode=n.util.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);const r=l=>JSON.stringify(l,null,2).replace(/"([^"]+)":/g,"$1:");t.quotelessJson=r;class o extends Error{get errors(){return this.issues}constructor(p){super(),this.issues=[],this.addIssue=m=>{this.issues=[...this.issues,m]},this.addIssues=(m=[])=>{this.issues=[...this.issues,...m]};const v=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,v):this.__proto__=v,this.name="ZodError",this.issues=p}format(p){const v=p||function(s){return s.message},m={_errors:[]},_=s=>{for(const f of s.issues)if(f.code==="invalid_union")f.unionErrors.map(_);else if(f.code==="invalid_return_type")_(f.returnTypeError);else if(f.code==="invalid_arguments")_(f.argumentsError);else if(f.path.length===0)m._errors.push(v(f));else{let a=m,h=0;for(;h<f.path.length;){const u=f.path[h];h===f.path.length-1?(a[u]=a[u]||{_errors:[]},a[u]._errors.push(v(f))):a[u]=a[u]||{_errors:[]},a=a[u],h++}}};return _(this),m}static assert(p){if(!(p instanceof o))throw new Error(`Not a ZodError: ${p}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,n.util.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(p=v=>v.message){const v={},m=[];for(const _ of this.issues)_.path.length>0?(v[_.path[0]]=v[_.path[0]]||[],v[_.path[0]].push(p(_))):m.push(p(_));return{formErrors:m,fieldErrors:v}}get formErrors(){return this.flatten()}}t.ZodError=o,o.create=l=>new o(l)},30548:function(x,t,e){"use strict";var n=this&&this.__importDefault||function(v){return v&&v.__esModule?v:{default:v}};Object.defineProperty(t,"__esModule",{value:!0}),t.getErrorMap=t.setErrorMap=t.defaultErrorMap=void 0;const r=n(e(28412));t.defaultErrorMap=r.default;let o=r.default;function l(v){o=v}t.setErrorMap=l;function p(){return o}t.getErrorMap=p},86340:function(x,t,e){"use strict";var n=this&&this.__createBinding||(Object.create?function(o,l,p,v){v===void 0&&(v=p);var m=Object.getOwnPropertyDescriptor(l,p);(!m||("get"in m?!l.__esModule:m.writable||m.configurable))&&(m={enumerable:!0,get:function(){return l[p]}}),Object.defineProperty(o,v,m)}:function(o,l,p,v){v===void 0&&(v=p),o[v]=l[p]}),r=this&&this.__exportStar||function(o,l){for(var p in o)p!=="default"&&!Object.prototype.hasOwnProperty.call(l,p)&&n(l,o,p)};Object.defineProperty(t,"__esModule",{value:!0}),r(e(30548),t),r(e(66258),t),r(e(29201),t),r(e(94705),t),r(e(75226),t),r(e(97442),t)},15759:(x,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.errorUtil=void 0;var e;(function(n){n.errToObj=r=>typeof r=="string"?{message:r}:r||{},n.toString=r=>typeof r=="string"?r:r?.message})(e||(t.errorUtil=e={}))},66258:function(x,t,e){"use strict";var n=this&&this.__importDefault||function(u){return u&&u.__esModule?u:{default:u}};Object.defineProperty(t,"__esModule",{value:!0}),t.isAsync=t.isValid=t.isDirty=t.isAborted=t.OK=t.DIRTY=t.INVALID=t.ParseStatus=t.addIssueToContext=t.EMPTY_PATH=t.makeIssue=void 0;const r=e(30548),o=n(e(28412)),l=u=>{const{data:d,path:E,errorMaps:g,issueData:c}=u,b=[...E,...c.path||[]],y={...c,path:b};if(c.message!==void 0)return{...c,path:b,message:c.message};let S="";const A=g.filter(w=>!!w).slice().reverse();for(const w of A)S=w(y,{data:d,defaultError:S}).message;return{...c,path:b,message:S}};t.makeIssue=l,t.EMPTY_PATH=[];function p(u,d){const E=(0,r.getErrorMap)(),g=(0,t.makeIssue)({issueData:d,data:u.data,path:u.path,errorMaps:[u.common.contextualErrorMap,u.schemaErrorMap,E,E===o.default?void 0:o.default].filter(c=>!!c)});u.common.issues.push(g)}t.addIssueToContext=p;class v{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(d,E){const g=[];for(const c of E){if(c.status==="aborted")return t.INVALID;c.status==="dirty"&&d.dirty(),g.push(c.value)}return{status:d.value,value:g}}static async mergeObjectAsync(d,E){const g=[];for(const c of E){const b=await c.key,y=await c.value;g.push({key:b,value:y})}return v.mergeObjectSync(d,g)}static mergeObjectSync(d,E){const g={};for(const c of E){const{key:b,value:y}=c;if(b.status==="aborted"||y.status==="aborted")return t.INVALID;b.status==="dirty"&&d.dirty(),y.status==="dirty"&&d.dirty(),b.value!=="__proto__"&&(typeof y.value<"u"||c.alwaysSet)&&(g[b.value]=y.value)}return{status:d.value,value:g}}}t.ParseStatus=v,t.INVALID=Object.freeze({status:"aborted"});const m=u=>({status:"dirty",value:u});t.DIRTY=m;const _=u=>({status:"valid",value:u});t.OK=_;const s=u=>u.status==="aborted";t.isAborted=s;const f=u=>u.status==="dirty";t.isDirty=f;const a=u=>u.status==="valid";t.isValid=a;const h=u=>typeof Promise<"u"&&u instanceof Promise;t.isAsync=h},29201:(x,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},94705:(x,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getParsedType=t.ZodParsedType=t.objectUtil=t.util=void 0;var e;(function(o){o.assertEqual=m=>m;function l(m){}o.assertIs=l;function p(m){throw new Error}o.assertNever=p,o.arrayToEnum=m=>{const _={};for(const s of m)_[s]=s;return _},o.getValidEnumValues=m=>{const _=o.objectKeys(m).filter(f=>typeof m[m[f]]!="number"),s={};for(const f of _)s[f]=m[f];return o.objectValues(s)},o.objectValues=m=>o.objectKeys(m).map(function(_){return m[_]}),o.objectKeys=typeof Object.keys=="function"?m=>Object.keys(m):m=>{const _=[];for(const s in m)Object.prototype.hasOwnProperty.call(m,s)&&_.push(s);return _},o.find=(m,_)=>{for(const s of m)if(_(s))return s},o.isInteger=typeof Number.isInteger=="function"?m=>Number.isInteger(m):m=>typeof m=="number"&&isFinite(m)&&Math.floor(m)===m;function v(m,_=" | "){return m.map(s=>typeof s=="string"?`'${s}'`:s).join(_)}o.joinValues=v,o.jsonStringifyReplacer=(m,_)=>typeof _=="bigint"?_.toString():_})(e||(t.util=e={}));var n;(function(o){o.mergeShapes=(l,p)=>({...l,...p})})(n||(t.objectUtil=n={})),t.ZodParsedType=e.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]);const r=o=>{switch(typeof o){case"undefined":return t.ZodParsedType.undefined;case"string":return t.ZodParsedType.string;case"number":return isNaN(o)?t.ZodParsedType.nan:t.ZodParsedType.number;case"boolean":return t.ZodParsedType.boolean;case"function":return t.ZodParsedType.function;case"bigint":return t.ZodParsedType.bigint;case"symbol":return t.ZodParsedType.symbol;case"object":return Array.isArray(o)?t.ZodParsedType.array:o===null?t.ZodParsedType.null:o.then&&typeof o.then=="function"&&o.catch&&typeof o.catch=="function"?t.ZodParsedType.promise:typeof Map<"u"&&o instanceof Map?t.ZodParsedType.map:typeof Set<"u"&&o instanceof Set?t.ZodParsedType.set:typeof Date<"u"&&o instanceof Date?t.ZodParsedType.date:t.ZodParsedType.object;default:return t.ZodParsedType.unknown}};t.getParsedType=r},75995:function(x,t,e){"use strict";var n=this&&this.__createBinding||(Object.create?function(v,m,_,s){s===void 0&&(s=_);var f=Object.getOwnPropertyDescriptor(m,_);(!f||("get"in f?!m.__esModule:f.writable||f.configurable))&&(f={enumerable:!0,get:function(){return m[_]}}),Object.defineProperty(v,s,f)}:function(v,m,_,s){s===void 0&&(s=_),v[s]=m[_]}),r=this&&this.__setModuleDefault||(Object.create?function(v,m){Object.defineProperty(v,"default",{enumerable:!0,value:m})}:function(v,m){v.default=m}),o=this&&this.__importStar||function(v){if(v&&v.__esModule)return v;var m={};if(v!=null)for(var _ in v)_!=="default"&&Object.prototype.hasOwnProperty.call(v,_)&&n(m,v,_);return r(m,v),m},l=this&&this.__exportStar||function(v,m){for(var _ in v)_!=="default"&&!Object.prototype.hasOwnProperty.call(m,_)&&n(m,v,_)};Object.defineProperty(t,"__esModule",{value:!0}),t.z=void 0;const p=o(e(86340));t.z=p,l(e(86340),t),t.default=p},28412:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(94705),r=e(97442),o=(l,p)=>{let v;switch(l.code){case r.ZodIssueCode.invalid_type:l.received===n.ZodParsedType.undefined?v="Required":v=`Expected ${l.expected}, received ${l.received}`;break;case r.ZodIssueCode.invalid_literal:v=`Invalid literal value, expected ${JSON.stringify(l.expected,n.util.jsonStringifyReplacer)}`;break;case r.ZodIssueCode.unrecognized_keys:v=`Unrecognized key(s) in object: ${n.util.joinValues(l.keys,", ")}`;break;case r.ZodIssueCode.invalid_union:v="Invalid input";break;case r.ZodIssueCode.invalid_union_discriminator:v=`Invalid discriminator value. Expected ${n.util.joinValues(l.options)}`;break;case r.ZodIssueCode.invalid_enum_value:v=`Invalid enum value. Expected ${n.util.joinValues(l.options)}, received '${l.received}'`;break;case r.ZodIssueCode.invalid_arguments:v="Invalid function arguments";break;case r.ZodIssueCode.invalid_return_type:v="Invalid function return type";break;case r.ZodIssueCode.invalid_date:v="Invalid date";break;case r.ZodIssueCode.invalid_string:typeof l.validation=="object"?"includes"in l.validation?(v=`Invalid input: must include "${l.validation.includes}"`,typeof l.validation.position=="number"&&(v=`${v} at one or more positions greater than or equal to ${l.validation.position}`)):"startsWith"in l.validation?v=`Invalid input: must start with "${l.validation.startsWith}"`:"endsWith"in l.validation?v=`Invalid input: must end with "${l.validation.endsWith}"`:n.util.assertNever(l.validation):l.validation!=="regex"?v=`Invalid ${l.validation}`:v="Invalid";break;case r.ZodIssueCode.too_small:l.type==="array"?v=`Array must contain ${l.exact?"exactly":l.inclusive?"at least":"more than"} ${l.minimum} element(s)`:l.type==="string"?v=`String must contain ${l.exact?"exactly":l.inclusive?"at least":"over"} ${l.minimum} character(s)`:l.type==="number"?v=`Number must be ${l.exact?"exactly equal to ":l.inclusive?"greater than or equal to ":"greater than "}${l.minimum}`:l.type==="date"?v=`Date must be ${l.exact?"exactly equal to ":l.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(l.minimum))}`:v="Invalid input";break;case r.ZodIssueCode.too_big:l.type==="array"?v=`Array must contain ${l.exact?"exactly":l.inclusive?"at most":"less than"} ${l.maximum} element(s)`:l.type==="string"?v=`String must contain ${l.exact?"exactly":l.inclusive?"at most":"under"} ${l.maximum} character(s)`:l.type==="number"?v=`Number must be ${l.exact?"exactly":l.inclusive?"less than or equal to":"less than"} ${l.maximum}`:l.type==="bigint"?v=`BigInt must be ${l.exact?"exactly":l.inclusive?"less than or equal to":"less than"} ${l.maximum}`:l.type==="date"?v=`Date must be ${l.exact?"exactly":l.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(l.maximum))}`:v="Invalid input";break;case r.ZodIssueCode.custom:v="Invalid input";break;case r.ZodIssueCode.invalid_intersection_types:v="Intersection results could not be merged";break;case r.ZodIssueCode.not_multiple_of:v=`Number must be a multiple of ${l.multipleOf}`;break;case r.ZodIssueCode.not_finite:v="Number must be finite";break;default:v=p.defaultError,n.util.assertNever(l)}return{message:v}};t.default=o},75226:function(x,t,e){"use strict";var n=this&&this.__classPrivateFieldGet||function(dn,rt,zt,rn){if(zt==="a"&&!rn)throw new TypeError("Private accessor was defined without a getter");if(typeof rt=="function"?dn!==rt||!rn:!rt.has(dn))throw new TypeError("Cannot read private member from an object whose class did not declare it");return zt==="m"?rn:zt==="a"?rn.call(dn):rn?rn.value:rt.get(dn)},r=this&&this.__classPrivateFieldSet||function(dn,rt,zt,rn,Ln){if(rn==="m")throw new TypeError("Private method is not writable");if(rn==="a"&&!Ln)throw new TypeError("Private accessor was defined without a setter");if(typeof rt=="function"?dn!==rt||!Ln:!rt.has(dn))throw new TypeError("Cannot write private member to an object whose class did not declare it");return rn==="a"?Ln.call(dn,zt):Ln?Ln.value=zt:rt.set(dn,zt),zt},o,l;Object.defineProperty(t,"__esModule",{value:!0}),t.boolean=t.bigint=t.array=t.any=t.coerce=t.ZodFirstPartyTypeKind=t.late=t.ZodSchema=t.Schema=t.custom=t.ZodReadonly=t.ZodPipeline=t.ZodBranded=t.BRAND=t.ZodNaN=t.ZodCatch=t.ZodDefault=t.ZodNullable=t.ZodOptional=t.ZodTransformer=t.ZodEffects=t.ZodPromise=t.ZodNativeEnum=t.ZodEnum=t.ZodLiteral=t.ZodLazy=t.ZodFunction=t.ZodSet=t.ZodMap=t.ZodRecord=t.ZodTuple=t.ZodIntersection=t.ZodDiscriminatedUnion=t.ZodUnion=t.ZodObject=t.ZodArray=t.ZodVoid=t.ZodNever=t.ZodUnknown=t.ZodAny=t.ZodNull=t.ZodUndefined=t.ZodSymbol=t.ZodDate=t.ZodBoolean=t.ZodBigInt=t.ZodNumber=t.ZodString=t.datetimeRegex=t.ZodType=void 0,t.NEVER=t.void=t.unknown=t.union=t.undefined=t.tuple=t.transformer=t.symbol=t.string=t.strictObject=t.set=t.record=t.promise=t.preprocess=t.pipeline=t.ostring=t.optional=t.onumber=t.oboolean=t.object=t.number=t.nullable=t.null=t.never=t.nativeEnum=t.nan=t.map=t.literal=t.lazy=t.intersection=t.instanceof=t.function=t.enum=t.effect=t.discriminatedUnion=t.date=void 0;const p=e(30548),v=e(15759),m=e(66258),_=e(94705),s=e(97442);class f{constructor(rt,zt,rn,Ln){this._cachedPath=[],this.parent=rt,this.data=zt,this._path=rn,this._key=Ln}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const a=(dn,rt)=>{if((0,m.isValid)(rt))return{success:!0,data:rt.value};if(!dn.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const zt=new s.ZodError(dn.common.issues);return this._error=zt,this._error}}};function h(dn){if(!dn)return{};const{errorMap:rt,invalid_type_error:zt,required_error:rn,description:Ln}=dn;if(rt&&(zt||rn))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return rt?{errorMap:rt,description:Ln}:{errorMap:(Gi,Wi)=>{var oo,Mi;const{message:no}=dn;return Gi.code==="invalid_enum_value"?{message:no??Wi.defaultError}:typeof Wi.data>"u"?{message:(oo=no??rn)!==null&&oo!==void 0?oo:Wi.defaultError}:Gi.code!=="invalid_type"?{message:Wi.defaultError}:{message:(Mi=no??zt)!==null&&Mi!==void 0?Mi:Wi.defaultError}},description:Ln}}class u{get description(){return this._def.description}_getType(rt){return(0,_.getParsedType)(rt.data)}_getOrReturnCtx(rt,zt){return zt||{common:rt.parent.common,data:rt.data,parsedType:(0,_.getParsedType)(rt.data),schemaErrorMap:this._def.errorMap,path:rt.path,parent:rt.parent}}_processInputParams(rt){return{status:new m.ParseStatus,ctx:{common:rt.parent.common,data:rt.data,parsedType:(0,_.getParsedType)(rt.data),schemaErrorMap:this._def.errorMap,path:rt.path,parent:rt.parent}}}_parseSync(rt){const zt=this._parse(rt);if((0,m.isAsync)(zt))throw new Error("Synchronous parse encountered promise.");return zt}_parseAsync(rt){const zt=this._parse(rt);return Promise.resolve(zt)}parse(rt,zt){const rn=this.safeParse(rt,zt);if(rn.success)return rn.data;throw rn.error}safeParse(rt,zt){var rn;const Ln={common:{issues:[],async:(rn=zt?.async)!==null&&rn!==void 0?rn:!1,contextualErrorMap:zt?.errorMap},path:zt?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:rt,parsedType:(0,_.getParsedType)(rt)},Zn=this._parseSync({data:rt,path:Ln.path,parent:Ln});return a(Ln,Zn)}"~validate"(rt){var zt,rn;const Ln={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:rt,parsedType:(0,_.getParsedType)(rt)};if(!this["~standard"].async)try{const Zn=this._parseSync({data:rt,path:[],parent:Ln});return(0,m.isValid)(Zn)?{value:Zn.value}:{issues:Ln.common.issues}}catch(Zn){!((rn=(zt=Zn?.message)===null||zt===void 0?void 0:zt.toLowerCase())===null||rn===void 0)&&rn.includes("encountered")&&(this["~standard"].async=!0),Ln.common={issues:[],async:!0}}return this._parseAsync({data:rt,path:[],parent:Ln}).then(Zn=>(0,m.isValid)(Zn)?{value:Zn.value}:{issues:Ln.common.issues})}async parseAsync(rt,zt){const rn=await this.safeParseAsync(rt,zt);if(rn.success)return rn.data;throw rn.error}async safeParseAsync(rt,zt){const rn={common:{issues:[],contextualErrorMap:zt?.errorMap,async:!0},path:zt?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:rt,parsedType:(0,_.getParsedType)(rt)},Ln=this._parse({data:rt,path:rn.path,parent:rn}),Zn=await((0,m.isAsync)(Ln)?Ln:Promise.resolve(Ln));return a(rn,Zn)}refine(rt,zt){const rn=Ln=>typeof zt=="string"||typeof zt>"u"?{message:zt}:typeof zt=="function"?zt(Ln):zt;return this._refinement((Ln,Zn)=>{const Gi=rt(Ln),Wi=()=>Zn.addIssue({code:s.ZodIssueCode.custom,...rn(Ln)});return typeof Promise<"u"&&Gi instanceof Promise?Gi.then(oo=>oo?!0:(Wi(),!1)):Gi?!0:(Wi(),!1)})}refinement(rt,zt){return this._refinement((rn,Ln)=>rt(rn)?!0:(Ln.addIssue(typeof zt=="function"?zt(rn,Ln):zt),!1))}_refinement(rt){return new $e({schema:this,typeName:At.ZodEffects,effect:{type:"refinement",refinement:rt}})}superRefine(rt){return this._refinement(rt)}constructor(rt){this.spa=this.safeParseAsync,this._def=rt,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:zt=>this["~validate"](zt)}}optional(){return Ve.create(this,this._def)}nullable(){return mt.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Oe.create(this)}promise(){return Fe.create(this,this._def)}or(rt){return fe.create([this,rt],this._def)}and(rt){return Ae.create(this,rt,this._def)}transform(rt){return new $e({...h(this._def),schema:this,typeName:At.ZodEffects,effect:{type:"transform",transform:rt}})}default(rt){const zt=typeof rt=="function"?rt:()=>rt;return new it({...h(this._def),innerType:this,defaultValue:zt,typeName:At.ZodDefault})}brand(){return new Dt({typeName:At.ZodBranded,type:this,...h(this._def)})}catch(rt){const zt=typeof rt=="function"?rt:()=>rt;return new xt({...h(this._def),innerType:this,catchValue:zt,typeName:At.ZodCatch})}describe(rt){const zt=this.constructor;return new zt({...this._def,description:rt})}pipe(rt){return ot.create(this,rt)}readonly(){return ut.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}t.ZodType=u,t.Schema=u,t.ZodSchema=u;const d=/^c[^\s-]{8,}$/i,E=/^[0-9a-z]+$/,g=/^[0-9A-HJKMNP-TV-Z]{26}$/i,c=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,b=/^[a-z0-9_-]{21}$/i,y=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,S=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,A=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,w="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let T;const D=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,I=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,R=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,M=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,O=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,P=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,k="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",F=new RegExp(`^${k}$`);function L(dn){let rt="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return dn.precision?rt=`${rt}\\.\\d{${dn.precision}}`:dn.precision==null&&(rt=`${rt}(\\.\\d+)?`),rt}function B(dn){return new RegExp(`^${L(dn)}$`)}function j(dn){let rt=`${k}T${L(dn)}`;const zt=[];return zt.push(dn.local?"Z?":"Z"),dn.offset&&zt.push("([+-]\\d{2}:?\\d{2})"),rt=`${rt}(${zt.join("|")})`,new RegExp(`^${rt}$`)}t.datetimeRegex=j;function W(dn,rt){return!!((rt==="v4"||!rt)&&D.test(dn)||(rt==="v6"||!rt)&&R.test(dn))}function U(dn,rt){if(!y.test(dn))return!1;try{const[zt]=dn.split("."),rn=zt.replace(/-/g,"+").replace(/_/g,"/").padEnd(zt.length+(4-zt.length%4)%4,"="),Ln=JSON.parse(atob(rn));return!(typeof Ln!="object"||Ln===null||!Ln.typ||!Ln.alg||rt&&Ln.alg!==rt)}catch{return!1}}function X(dn,rt){return!!((rt==="v4"||!rt)&&I.test(dn)||(rt==="v6"||!rt)&&M.test(dn))}class V extends u{_parse(rt){if(this._def.coerce&&(rt.data=String(rt.data)),this._getType(rt)!==_.ZodParsedType.string){const Zn=this._getOrReturnCtx(rt);return(0,m.addIssueToContext)(Zn,{code:s.ZodIssueCode.invalid_type,expected:_.ZodParsedType.string,received:Zn.parsedType}),m.INVALID}const rn=new m.ParseStatus;let Ln;for(const Zn of this._def.checks)if(Zn.kind==="min")rt.data.length<Zn.value&&(Ln=this._getOrReturnCtx(rt,Ln),(0,m.addIssueToContext)(Ln,{code:s.ZodIssueCode.too_small,minimum:Zn.value,type:"string",inclusive:!0,exact:!1,message:Zn.message}),rn.dirty());else if(Zn.kind==="max")rt.data.length>Zn.value&&(Ln=this._getOrReturnCtx(rt,Ln),(0,m.addIssueToContext)(Ln,{code:s.ZodIssueCode.too_big,maximum:Zn.value,type:"string",inclusive:!0,exact:!1,message:Zn.message}),rn.dirty());else if(Zn.kind==="length"){const Gi=rt.data.length>Zn.value,Wi=rt.data.length<Zn.value;(Gi||Wi)&&(Ln=this._getOrReturnCtx(rt,Ln),Gi?(0,m.addIssueToContext)(Ln,{code:s.ZodIssueCode.too_big,maximum:Zn.value,type:"string",inclusive:!0,exact:!0,message:Zn.message}):Wi&&(0,m.addIssueToContext)(Ln,{code:s.ZodIssueCode.too_small,minimum:Zn.value,type:"string",inclusive:!0,exact:!0,message:Zn.message}),rn.dirty())}else if(Zn.kind==="email")A.test(rt.data)||(Ln=this._getOrReturnCtx(rt,Ln),(0,m.addIssueToContext)(Ln,{validation:"email",code:s.ZodIssueCode.invalid_string,message:Zn.message}),rn.dirty());else if(Zn.kind==="emoji")T||(T=new RegExp(w,"u")),T.test(rt.data)||(Ln=this._getOrReturnCtx(rt,Ln),(0,m.addIssueToContext)(Ln,{validation:"emoji",code:s.ZodIssueCode.invalid_string,message:Zn.message}),rn.dirty());else if(Zn.kind==="uuid")c.test(rt.data)||(Ln=this._getOrReturnCtx(rt,Ln),(0,m.addIssueToContext)(Ln,{validation:"uuid",code:s.ZodIssueCode.invalid_string,message:Zn.message}),rn.dirty());else if(Zn.kind==="nanoid")b.test(rt.data)||(Ln=this._getOrReturnCtx(rt,Ln),(0,m.addIssueToContext)(Ln,{validation:"nanoid",code:s.ZodIssueCode.invalid_string,message:Zn.message}),rn.dirty());else if(Zn.kind==="cuid")d.test(rt.data)||(Ln=this._getOrReturnCtx(rt,Ln),(0,m.addIssueToContext)(Ln,{validation:"cuid",code:s.ZodIssueCode.invalid_string,message:Zn.message}),rn.dirty());else if(Zn.kind==="cuid2")E.test(rt.data)||(Ln=this._getOrReturnCtx(rt,Ln),(0,m.addIssueToContext)(Ln,{validation:"cuid2",code:s.ZodIssueCode.invalid_string,message:Zn.message}),rn.dirty());else if(Zn.kind==="ulid")g.test(rt.data)||(Ln=this._getOrReturnCtx(rt,Ln),(0,m.addIssueToContext)(Ln,{validation:"ulid",code:s.ZodIssueCode.invalid_string,message:Zn.message}),rn.dirty());else if(Zn.kind==="url")try{new URL(rt.data)}catch{Ln=this._getOrReturnCtx(rt,Ln),(0,m.addIssueToContext)(Ln,{validation:"url",code:s.ZodIssueCode.invalid_string,message:Zn.message}),rn.dirty()}else Zn.kind==="regex"?(Zn.regex.lastIndex=0,Zn.regex.test(rt.data)||(Ln=this._getOrReturnCtx(rt,Ln),(0,m.addIssueToContext)(Ln,{validation:"regex",code:s.ZodIssueCode.invalid_string,message:Zn.message}),rn.dirty())):Zn.kind==="trim"?rt.data=rt.data.trim():Zn.kind==="includes"?rt.data.includes(Zn.value,Zn.position)||(Ln=this._getOrReturnCtx(rt,Ln),(0,m.addIssueToContext)(Ln,{code:s.ZodIssueCode.invalid_string,validation:{includes:Zn.value,position:Zn.position},message:Zn.message}),rn.dirty()):Zn.kind==="toLowerCase"?rt.data=rt.data.toLowerCase():Zn.kind==="toUpperCase"?rt.data=rt.data.toUpperCase():Zn.kind==="startsWith"?rt.data.startsWith(Zn.value)||(Ln=this._getOrReturnCtx(rt,Ln),(0,m.addIssueToContext)(Ln,{code:s.ZodIssueCode.invalid_string,validation:{startsWith:Zn.value},message:Zn.message}),rn.dirty()):Zn.kind==="endsWith"?rt.data.endsWith(Zn.value)||(Ln=this._getOrReturnCtx(rt,Ln),(0,m.addIssueToContext)(Ln,{code:s.ZodIssueCode.invalid_string,validation:{endsWith:Zn.value},message:Zn.message}),rn.dirty()):Zn.kind==="datetime"?j(Zn).test(rt.data)||(Ln=this._getOrReturnCtx(rt,Ln),(0,m.addIssueToContext)(Ln,{code:s.ZodIssueCode.invalid_string,validation:"datetime",message:Zn.message}),rn.dirty()):Zn.kind==="date"?F.test(rt.data)||(Ln=this._getOrReturnCtx(rt,Ln),(0,m.addIssueToContext)(Ln,{code:s.ZodIssueCode.invalid_string,validation:"date",message:Zn.message}),rn.dirty()):Zn.kind==="time"?B(Zn).test(rt.data)||(Ln=this._getOrReturnCtx(rt,Ln),(0,m.addIssueToContext)(Ln,{code:s.ZodIssueCode.invalid_string,validation:"time",message:Zn.message}),rn.dirty()):Zn.kind==="duration"?S.test(rt.data)||(Ln=this._getOrReturnCtx(rt,Ln),(0,m.addIssueToContext)(Ln,{validation:"duration",code:s.ZodIssueCode.invalid_string,message:Zn.message}),rn.dirty()):Zn.kind==="ip"?W(rt.data,Zn.version)||(Ln=this._getOrReturnCtx(rt,Ln),(0,m.addIssueToContext)(Ln,{validation:"ip",code:s.ZodIssueCode.invalid_string,message:Zn.message}),rn.dirty()):Zn.kind==="jwt"?U(rt.data,Zn.alg)||(Ln=this._getOrReturnCtx(rt,Ln),(0,m.addIssueToContext)(Ln,{validation:"jwt",code:s.ZodIssueCode.invalid_string,message:Zn.message}),rn.dirty()):Zn.kind==="cidr"?X(rt.data,Zn.version)||(Ln=this._getOrReturnCtx(rt,Ln),(0,m.addIssueToContext)(Ln,{validation:"cidr",code:s.ZodIssueCode.invalid_string,message:Zn.message}),rn.dirty()):Zn.kind==="base64"?O.test(rt.data)||(Ln=this._getOrReturnCtx(rt,Ln),(0,m.addIssueToContext)(Ln,{validation:"base64",code:s.ZodIssueCode.invalid_string,message:Zn.message}),rn.dirty()):Zn.kind==="base64url"?P.test(rt.data)||(Ln=this._getOrReturnCtx(rt,Ln),(0,m.addIssueToContext)(Ln,{validation:"base64url",code:s.ZodIssueCode.invalid_string,message:Zn.message}),rn.dirty()):_.util.assertNever(Zn);return{status:rn.value,value:rt.data}}_regex(rt,zt,rn){return this.refinement(Ln=>rt.test(Ln),{validation:zt,code:s.ZodIssueCode.invalid_string,...v.errorUtil.errToObj(rn)})}_addCheck(rt){return new V({...this._def,checks:[...this._def.checks,rt]})}email(rt){return this._addCheck({kind:"email",...v.errorUtil.errToObj(rt)})}url(rt){return this._addCheck({kind:"url",...v.errorUtil.errToObj(rt)})}emoji(rt){return this._addCheck({kind:"emoji",...v.errorUtil.errToObj(rt)})}uuid(rt){return this._addCheck({kind:"uuid",...v.errorUtil.errToObj(rt)})}nanoid(rt){return this._addCheck({kind:"nanoid",...v.errorUtil.errToObj(rt)})}cuid(rt){return this._addCheck({kind:"cuid",...v.errorUtil.errToObj(rt)})}cuid2(rt){return this._addCheck({kind:"cuid2",...v.errorUtil.errToObj(rt)})}ulid(rt){return this._addCheck({kind:"ulid",...v.errorUtil.errToObj(rt)})}base64(rt){return this._addCheck({kind:"base64",...v.errorUtil.errToObj(rt)})}base64url(rt){return this._addCheck({kind:"base64url",...v.errorUtil.errToObj(rt)})}jwt(rt){return this._addCheck({kind:"jwt",...v.errorUtil.errToObj(rt)})}ip(rt){return this._addCheck({kind:"ip",...v.errorUtil.errToObj(rt)})}cidr(rt){return this._addCheck({kind:"cidr",...v.errorUtil.errToObj(rt)})}datetime(rt){var zt,rn;return typeof rt=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:rt}):this._addCheck({kind:"datetime",precision:typeof rt?.precision>"u"?null:rt?.precision,offset:(zt=rt?.offset)!==null&&zt!==void 0?zt:!1,local:(rn=rt?.local)!==null&&rn!==void 0?rn:!1,...v.errorUtil.errToObj(rt?.message)})}date(rt){return this._addCheck({kind:"date",message:rt})}time(rt){return typeof rt=="string"?this._addCheck({kind:"time",precision:null,message:rt}):this._addCheck({kind:"time",precision:typeof rt?.precision>"u"?null:rt?.precision,...v.errorUtil.errToObj(rt?.message)})}duration(rt){return this._addCheck({kind:"duration",...v.errorUtil.errToObj(rt)})}regex(rt,zt){return this._addCheck({kind:"regex",regex:rt,...v.errorUtil.errToObj(zt)})}includes(rt,zt){return this._addCheck({kind:"includes",value:rt,position:zt?.position,...v.errorUtil.errToObj(zt?.message)})}startsWith(rt,zt){return this._addCheck({kind:"startsWith",value:rt,...v.errorUtil.errToObj(zt)})}endsWith(rt,zt){return this._addCheck({kind:"endsWith",value:rt,...v.errorUtil.errToObj(zt)})}min(rt,zt){return this._addCheck({kind:"min",value:rt,...v.errorUtil.errToObj(zt)})}max(rt,zt){return this._addCheck({kind:"max",value:rt,...v.errorUtil.errToObj(zt)})}length(rt,zt){return this._addCheck({kind:"length",value:rt,...v.errorUtil.errToObj(zt)})}nonempty(rt){return this.min(1,v.errorUtil.errToObj(rt))}trim(){return new V({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new V({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new V({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(rt=>rt.kind==="datetime")}get isDate(){return!!this._def.checks.find(rt=>rt.kind==="date")}get isTime(){return!!this._def.checks.find(rt=>rt.kind==="time")}get isDuration(){return!!this._def.checks.find(rt=>rt.kind==="duration")}get isEmail(){return!!this._def.checks.find(rt=>rt.kind==="email")}get isURL(){return!!this._def.checks.find(rt=>rt.kind==="url")}get isEmoji(){return!!this._def.checks.find(rt=>rt.kind==="emoji")}get isUUID(){return!!this._def.checks.find(rt=>rt.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(rt=>rt.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(rt=>rt.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(rt=>rt.kind==="cuid2")}get isULID(){return!!this._def.checks.find(rt=>rt.kind==="ulid")}get isIP(){return!!this._def.checks.find(rt=>rt.kind==="ip")}get isCIDR(){return!!this._def.checks.find(rt=>rt.kind==="cidr")}get isBase64(){return!!this._def.checks.find(rt=>rt.kind==="base64")}get isBase64url(){return!!this._def.checks.find(rt=>rt.kind==="base64url")}get minLength(){let rt=null;for(const zt of this._def.checks)zt.kind==="min"&&(rt===null||zt.value>rt)&&(rt=zt.value);return rt}get maxLength(){let rt=null;for(const zt of this._def.checks)zt.kind==="max"&&(rt===null||zt.value<rt)&&(rt=zt.value);return rt}}t.ZodString=V,V.create=dn=>{var rt;return new V({checks:[],typeName:At.ZodString,coerce:(rt=dn?.coerce)!==null&&rt!==void 0?rt:!1,...h(dn)})};function $(dn,rt){const zt=(dn.toString().split(".")[1]||"").length,rn=(rt.toString().split(".")[1]||"").length,Ln=zt>rn?zt:rn,Zn=parseInt(dn.toFixed(Ln).replace(".","")),Gi=parseInt(rt.toFixed(Ln).replace(".",""));return Zn%Gi/Math.pow(10,Ln)}class Y extends u{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(rt){if(this._def.coerce&&(rt.data=Number(rt.data)),this._getType(rt)!==_.ZodParsedType.number){const Zn=this._getOrReturnCtx(rt);return(0,m.addIssueToContext)(Zn,{code:s.ZodIssueCode.invalid_type,expected:_.ZodParsedType.number,received:Zn.parsedType}),m.INVALID}let rn;const Ln=new m.ParseStatus;for(const Zn of this._def.checks)Zn.kind==="int"?_.util.isInteger(rt.data)||(rn=this._getOrReturnCtx(rt,rn),(0,m.addIssueToContext)(rn,{code:s.ZodIssueCode.invalid_type,expected:"integer",received:"float",message:Zn.message}),Ln.dirty()):Zn.kind==="min"?(Zn.inclusive?rt.data<Zn.value:rt.data<=Zn.value)&&(rn=this._getOrReturnCtx(rt,rn),(0,m.addIssueToContext)(rn,{code:s.ZodIssueCode.too_small,minimum:Zn.value,type:"number",inclusive:Zn.inclusive,exact:!1,message:Zn.message}),Ln.dirty()):Zn.kind==="max"?(Zn.inclusive?rt.data>Zn.value:rt.data>=Zn.value)&&(rn=this._getOrReturnCtx(rt,rn),(0,m.addIssueToContext)(rn,{code:s.ZodIssueCode.too_big,maximum:Zn.value,type:"number",inclusive:Zn.inclusive,exact:!1,message:Zn.message}),Ln.dirty()):Zn.kind==="multipleOf"?$(rt.data,Zn.value)!==0&&(rn=this._getOrReturnCtx(rt,rn),(0,m.addIssueToContext)(rn,{code:s.ZodIssueCode.not_multiple_of,multipleOf:Zn.value,message:Zn.message}),Ln.dirty()):Zn.kind==="finite"?Number.isFinite(rt.data)||(rn=this._getOrReturnCtx(rt,rn),(0,m.addIssueToContext)(rn,{code:s.ZodIssueCode.not_finite,message:Zn.message}),Ln.dirty()):_.util.assertNever(Zn);return{status:Ln.value,value:rt.data}}gte(rt,zt){return this.setLimit("min",rt,!0,v.errorUtil.toString(zt))}gt(rt,zt){return this.setLimit("min",rt,!1,v.errorUtil.toString(zt))}lte(rt,zt){return this.setLimit("max",rt,!0,v.errorUtil.toString(zt))}lt(rt,zt){return this.setLimit("max",rt,!1,v.errorUtil.toString(zt))}setLimit(rt,zt,rn,Ln){return new Y({...this._def,checks:[...this._def.checks,{kind:rt,value:zt,inclusive:rn,message:v.errorUtil.toString(Ln)}]})}_addCheck(rt){return new Y({...this._def,checks:[...this._def.checks,rt]})}int(rt){return this._addCheck({kind:"int",message:v.errorUtil.toString(rt)})}positive(rt){return this._addCheck({kind:"min",value:0,inclusive:!1,message:v.errorUtil.toString(rt)})}negative(rt){return this._addCheck({kind:"max",value:0,inclusive:!1,message:v.errorUtil.toString(rt)})}nonpositive(rt){return this._addCheck({kind:"max",value:0,inclusive:!0,message:v.errorUtil.toString(rt)})}nonnegative(rt){return this._addCheck({kind:"min",value:0,inclusive:!0,message:v.errorUtil.toString(rt)})}multipleOf(rt,zt){return this._addCheck({kind:"multipleOf",value:rt,message:v.errorUtil.toString(zt)})}finite(rt){return this._addCheck({kind:"finite",message:v.errorUtil.toString(rt)})}safe(rt){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:v.errorUtil.toString(rt)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:v.errorUtil.toString(rt)})}get minValue(){let rt=null;for(const zt of this._def.checks)zt.kind==="min"&&(rt===null||zt.value>rt)&&(rt=zt.value);return rt}get maxValue(){let rt=null;for(const zt of this._def.checks)zt.kind==="max"&&(rt===null||zt.value<rt)&&(rt=zt.value);return rt}get isInt(){return!!this._def.checks.find(rt=>rt.kind==="int"||rt.kind==="multipleOf"&&_.util.isInteger(rt.value))}get isFinite(){let rt=null,zt=null;for(const rn of this._def.checks){if(rn.kind==="finite"||rn.kind==="int"||rn.kind==="multipleOf")return!0;rn.kind==="min"?(zt===null||rn.value>zt)&&(zt=rn.value):rn.kind==="max"&&(rt===null||rn.value<rt)&&(rt=rn.value)}return Number.isFinite(zt)&&Number.isFinite(rt)}}t.ZodNumber=Y,Y.create=dn=>new Y({checks:[],typeName:At.ZodNumber,coerce:dn?.coerce||!1,...h(dn)});class z extends u{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(rt){if(this._def.coerce)try{rt.data=BigInt(rt.data)}catch{return this._getInvalidInput(rt)}if(this._getType(rt)!==_.ZodParsedType.bigint)return this._getInvalidInput(rt);let rn;const Ln=new m.ParseStatus;for(const Zn of this._def.checks)Zn.kind==="min"?(Zn.inclusive?rt.data<Zn.value:rt.data<=Zn.value)&&(rn=this._getOrReturnCtx(rt,rn),(0,m.addIssueToContext)(rn,{code:s.ZodIssueCode.too_small,type:"bigint",minimum:Zn.value,inclusive:Zn.inclusive,message:Zn.message}),Ln.dirty()):Zn.kind==="max"?(Zn.inclusive?rt.data>Zn.value:rt.data>=Zn.value)&&(rn=this._getOrReturnCtx(rt,rn),(0,m.addIssueToContext)(rn,{code:s.ZodIssueCode.too_big,type:"bigint",maximum:Zn.value,inclusive:Zn.inclusive,message:Zn.message}),Ln.dirty()):Zn.kind==="multipleOf"?rt.data%Zn.value!==BigInt(0)&&(rn=this._getOrReturnCtx(rt,rn),(0,m.addIssueToContext)(rn,{code:s.ZodIssueCode.not_multiple_of,multipleOf:Zn.value,message:Zn.message}),Ln.dirty()):_.util.assertNever(Zn);return{status:Ln.value,value:rt.data}}_getInvalidInput(rt){const zt=this._getOrReturnCtx(rt);return(0,m.addIssueToContext)(zt,{code:s.ZodIssueCode.invalid_type,expected:_.ZodParsedType.bigint,received:zt.parsedType}),m.INVALID}gte(rt,zt){return this.setLimit("min",rt,!0,v.errorUtil.toString(zt))}gt(rt,zt){return this.setLimit("min",rt,!1,v.errorUtil.toString(zt))}lte(rt,zt){return this.setLimit("max",rt,!0,v.errorUtil.toString(zt))}lt(rt,zt){return this.setLimit("max",rt,!1,v.errorUtil.toString(zt))}setLimit(rt,zt,rn,Ln){return new z({...this._def,checks:[...this._def.checks,{kind:rt,value:zt,inclusive:rn,message:v.errorUtil.toString(Ln)}]})}_addCheck(rt){return new z({...this._def,checks:[...this._def.checks,rt]})}positive(rt){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:v.errorUtil.toString(rt)})}negative(rt){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:v.errorUtil.toString(rt)})}nonpositive(rt){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:v.errorUtil.toString(rt)})}nonnegative(rt){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:v.errorUtil.toString(rt)})}multipleOf(rt,zt){return this._addCheck({kind:"multipleOf",value:rt,message:v.errorUtil.toString(zt)})}get minValue(){let rt=null;for(const zt of this._def.checks)zt.kind==="min"&&(rt===null||zt.value>rt)&&(rt=zt.value);return rt}get maxValue(){let rt=null;for(const zt of this._def.checks)zt.kind==="max"&&(rt===null||zt.value<rt)&&(rt=zt.value);return rt}}t.ZodBigInt=z,z.create=dn=>{var rt;return new z({checks:[],typeName:At.ZodBigInt,coerce:(rt=dn?.coerce)!==null&&rt!==void 0?rt:!1,...h(dn)})};class H extends u{_parse(rt){if(this._def.coerce&&(rt.data=!!rt.data),this._getType(rt)!==_.ZodParsedType.boolean){const rn=this._getOrReturnCtx(rt);return(0,m.addIssueToContext)(rn,{code:s.ZodIssueCode.invalid_type,expected:_.ZodParsedType.boolean,received:rn.parsedType}),m.INVALID}return(0,m.OK)(rt.data)}}t.ZodBoolean=H,H.create=dn=>new H({typeName:At.ZodBoolean,coerce:dn?.coerce||!1,...h(dn)});class K extends u{_parse(rt){if(this._def.coerce&&(rt.data=new Date(rt.data)),this._getType(rt)!==_.ZodParsedType.date){const Zn=this._getOrReturnCtx(rt);return(0,m.addIssueToContext)(Zn,{code:s.ZodIssueCode.invalid_type,expected:_.ZodParsedType.date,received:Zn.parsedType}),m.INVALID}if(isNaN(rt.data.getTime())){const Zn=this._getOrReturnCtx(rt);return(0,m.addIssueToContext)(Zn,{code:s.ZodIssueCode.invalid_date}),m.INVALID}const rn=new m.ParseStatus;let Ln;for(const Zn of this._def.checks)Zn.kind==="min"?rt.data.getTime()<Zn.value&&(Ln=this._getOrReturnCtx(rt,Ln),(0,m.addIssueToContext)(Ln,{code:s.ZodIssueCode.too_small,message:Zn.message,inclusive:!0,exact:!1,minimum:Zn.value,type:"date"}),rn.dirty()):Zn.kind==="max"?rt.data.getTime()>Zn.value&&(Ln=this._getOrReturnCtx(rt,Ln),(0,m.addIssueToContext)(Ln,{code:s.ZodIssueCode.too_big,message:Zn.message,inclusive:!0,exact:!1,maximum:Zn.value,type:"date"}),rn.dirty()):_.util.assertNever(Zn);return{status:rn.value,value:new Date(rt.data.getTime())}}_addCheck(rt){return new K({...this._def,checks:[...this._def.checks,rt]})}min(rt,zt){return this._addCheck({kind:"min",value:rt.getTime(),message:v.errorUtil.toString(zt)})}max(rt,zt){return this._addCheck({kind:"max",value:rt.getTime(),message:v.errorUtil.toString(zt)})}get minDate(){let rt=null;for(const zt of this._def.checks)zt.kind==="min"&&(rt===null||zt.value>rt)&&(rt=zt.value);return rt!=null?new Date(rt):null}get maxDate(){let rt=null;for(const zt of this._def.checks)zt.kind==="max"&&(rt===null||zt.value<rt)&&(rt=zt.value);return rt!=null?new Date(rt):null}}t.ZodDate=K,K.create=dn=>new K({checks:[],coerce:dn?.coerce||!1,typeName:At.ZodDate,...h(dn)});class Z extends u{_parse(rt){if(this._getType(rt)!==_.ZodParsedType.symbol){const rn=this._getOrReturnCtx(rt);return(0,m.addIssueToContext)(rn,{code:s.ZodIssueCode.invalid_type,expected:_.ZodParsedType.symbol,received:rn.parsedType}),m.INVALID}return(0,m.OK)(rt.data)}}t.ZodSymbol=Z,Z.create=dn=>new Z({typeName:At.ZodSymbol,...h(dn)});class Q extends u{_parse(rt){if(this._getType(rt)!==_.ZodParsedType.undefined){const rn=this._getOrReturnCtx(rt);return(0,m.addIssueToContext)(rn,{code:s.ZodIssueCode.invalid_type,expected:_.ZodParsedType.undefined,received:rn.parsedType}),m.INVALID}return(0,m.OK)(rt.data)}}t.ZodUndefined=Q,Q.create=dn=>new Q({typeName:At.ZodUndefined,...h(dn)});class oe extends u{_parse(rt){if(this._getType(rt)!==_.ZodParsedType.null){const rn=this._getOrReturnCtx(rt);return(0,m.addIssueToContext)(rn,{code:s.ZodIssueCode.invalid_type,expected:_.ZodParsedType.null,received:rn.parsedType}),m.INVALID}return(0,m.OK)(rt.data)}}t.ZodNull=oe,oe.create=dn=>new oe({typeName:At.ZodNull,...h(dn)});class ne extends u{constructor(){super(...arguments),this._any=!0}_parse(rt){return(0,m.OK)(rt.data)}}t.ZodAny=ne,ne.create=dn=>new ne({typeName:At.ZodAny,...h(dn)});class he extends u{constructor(){super(...arguments),this._unknown=!0}_parse(rt){return(0,m.OK)(rt.data)}}t.ZodUnknown=he,he.create=dn=>new he({typeName:At.ZodUnknown,...h(dn)});class _e extends u{_parse(rt){const zt=this._getOrReturnCtx(rt);return(0,m.addIssueToContext)(zt,{code:s.ZodIssueCode.invalid_type,expected:_.ZodParsedType.never,received:zt.parsedType}),m.INVALID}}t.ZodNever=_e,_e.create=dn=>new _e({typeName:At.ZodNever,...h(dn)});class q extends u{_parse(rt){if(this._getType(rt)!==_.ZodParsedType.undefined){const rn=this._getOrReturnCtx(rt);return(0,m.addIssueToContext)(rn,{code:s.ZodIssueCode.invalid_type,expected:_.ZodParsedType.void,received:rn.parsedType}),m.INVALID}return(0,m.OK)(rt.data)}}t.ZodVoid=q,q.create=dn=>new q({typeName:At.ZodVoid,...h(dn)});class Oe extends u{_parse(rt){const{ctx:zt,status:rn}=this._processInputParams(rt),Ln=this._def;if(zt.parsedType!==_.ZodParsedType.array)return(0,m.addIssueToContext)(zt,{code:s.ZodIssueCode.invalid_type,expected:_.ZodParsedType.array,received:zt.parsedType}),m.INVALID;if(Ln.exactLength!==null){const Gi=zt.data.length>Ln.exactLength.value,Wi=zt.data.length<Ln.exactLength.value;(Gi||Wi)&&((0,m.addIssueToContext)(zt,{code:Gi?s.ZodIssueCode.too_big:s.ZodIssueCode.too_small,minimum:Wi?Ln.exactLength.value:void 0,maximum:Gi?Ln.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:Ln.exactLength.message}),rn.dirty())}if(Ln.minLength!==null&&zt.data.length<Ln.minLength.value&&((0,m.addIssueToContext)(zt,{code:s.ZodIssueCode.too_small,minimum:Ln.minLength.value,type:"array",inclusive:!0,exact:!1,message:Ln.minLength.message}),rn.dirty()),Ln.maxLength!==null&&zt.data.length>Ln.maxLength.value&&((0,m.addIssueToContext)(zt,{code:s.ZodIssueCode.too_big,maximum:Ln.maxLength.value,type:"array",inclusive:!0,exact:!1,message:Ln.maxLength.message}),rn.dirty()),zt.common.async)return Promise.all([...zt.data].map((Gi,Wi)=>Ln.type._parseAsync(new f(zt,Gi,zt.path,Wi)))).then(Gi=>m.ParseStatus.mergeArray(rn,Gi));const Zn=[...zt.data].map((Gi,Wi)=>Ln.type._parseSync(new f(zt,Gi,zt.path,Wi)));return m.ParseStatus.mergeArray(rn,Zn)}get element(){return this._def.type}min(rt,zt){return new Oe({...this._def,minLength:{value:rt,message:v.errorUtil.toString(zt)}})}max(rt,zt){return new Oe({...this._def,maxLength:{value:rt,message:v.errorUtil.toString(zt)}})}length(rt,zt){return new Oe({...this._def,exactLength:{value:rt,message:v.errorUtil.toString(zt)}})}nonempty(rt){return this.min(1,rt)}}t.ZodArray=Oe,Oe.create=(dn,rt)=>new Oe({type:dn,minLength:null,maxLength:null,exactLength:null,typeName:At.ZodArray,...h(rt)});function ye(dn){if(dn instanceof ie){const rt={};for(const zt in dn.shape){const rn=dn.shape[zt];rt[zt]=Ve.create(ye(rn))}return new ie({...dn._def,shape:()=>rt})}else return dn instanceof Oe?new Oe({...dn._def,type:ye(dn.element)}):dn instanceof Ve?Ve.create(ye(dn.unwrap())):dn instanceof mt?mt.create(ye(dn.unwrap())):dn instanceof ve?ve.create(dn.items.map(rt=>ye(rt))):dn}class ie extends u{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const rt=this._def.shape(),zt=_.util.objectKeys(rt);return this._cached={shape:rt,keys:zt}}_parse(rt){if(this._getType(rt)!==_.ZodParsedType.object){const Mi=this._getOrReturnCtx(rt);return(0,m.addIssueToContext)(Mi,{code:s.ZodIssueCode.invalid_type,expected:_.ZodParsedType.object,received:Mi.parsedType}),m.INVALID}const{status:rn,ctx:Ln}=this._processInputParams(rt),{shape:Zn,keys:Gi}=this._getCached(),Wi=[];if(!(this._def.catchall instanceof _e&&this._def.unknownKeys==="strip"))for(const Mi in Ln.data)Gi.includes(Mi)||Wi.push(Mi);const oo=[];for(const Mi of Gi){const no=Zn[Mi],uo=Ln.data[Mi];oo.push({key:{status:"valid",value:Mi},value:no._parse(new f(Ln,uo,Ln.path,Mi)),alwaysSet:Mi in Ln.data})}if(this._def.catchall instanceof _e){const Mi=this._def.unknownKeys;if(Mi==="passthrough")for(const no of Wi)oo.push({key:{status:"valid",value:no},value:{status:"valid",value:Ln.data[no]}});else if(Mi==="strict")Wi.length>0&&((0,m.addIssueToContext)(Ln,{code:s.ZodIssueCode.unrecognized_keys,keys:Wi}),rn.dirty());else if(Mi!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const Mi=this._def.catchall;for(const no of Wi){const uo=Ln.data[no];oo.push({key:{status:"valid",value:no},value:Mi._parse(new f(Ln,uo,Ln.path,no)),alwaysSet:no in Ln.data})}}return Ln.common.async?Promise.resolve().then(async()=>{const Mi=[];for(const no of oo){const uo=await no.key,Do=await no.value;Mi.push({key:uo,value:Do,alwaysSet:no.alwaysSet})}return Mi}).then(Mi=>m.ParseStatus.mergeObjectSync(rn,Mi)):m.ParseStatus.mergeObjectSync(rn,oo)}get shape(){return this._def.shape()}strict(rt){return v.errorUtil.errToObj,new ie({...this._def,unknownKeys:"strict",...rt!==void 0?{errorMap:(zt,rn)=>{var Ln,Zn,Gi,Wi;const oo=(Gi=(Zn=(Ln=this._def).errorMap)===null||Zn===void 0?void 0:Zn.call(Ln,zt,rn).message)!==null&&Gi!==void 0?Gi:rn.defaultError;return zt.code==="unrecognized_keys"?{message:(Wi=v.errorUtil.errToObj(rt).message)!==null&&Wi!==void 0?Wi:oo}:{message:oo}}}:{}})}strip(){return new ie({...this._def,unknownKeys:"strip"})}passthrough(){return new ie({...this._def,unknownKeys:"passthrough"})}extend(rt){return new ie({...this._def,shape:()=>({...this._def.shape(),...rt})})}merge(rt){return new ie({unknownKeys:rt._def.unknownKeys,catchall:rt._def.catchall,shape:()=>({...this._def.shape(),...rt._def.shape()}),typeName:At.ZodObject})}setKey(rt,zt){return this.augment({[rt]:zt})}catchall(rt){return new ie({...this._def,catchall:rt})}pick(rt){const zt={};return _.util.objectKeys(rt).forEach(rn=>{rt[rn]&&this.shape[rn]&&(zt[rn]=this.shape[rn])}),new ie({...this._def,shape:()=>zt})}omit(rt){const zt={};return _.util.objectKeys(this.shape).forEach(rn=>{rt[rn]||(zt[rn]=this.shape[rn])}),new ie({...this._def,shape:()=>zt})}deepPartial(){return ye(this)}partial(rt){const zt={};return _.util.objectKeys(this.shape).forEach(rn=>{const Ln=this.shape[rn];rt&&!rt[rn]?zt[rn]=Ln:zt[rn]=Ln.optional()}),new ie({...this._def,shape:()=>zt})}required(rt){const zt={};return _.util.objectKeys(this.shape).forEach(rn=>{if(rt&&!rt[rn])zt[rn]=this.shape[rn];else{let Zn=this.shape[rn];for(;Zn instanceof Ve;)Zn=Zn._def.innerType;zt[rn]=Zn}}),new ie({...this._def,shape:()=>zt})}keyof(){return le(_.util.objectKeys(this.shape))}}t.ZodObject=ie,ie.create=(dn,rt)=>new ie({shape:()=>dn,unknownKeys:"strip",catchall:_e.create(),typeName:At.ZodObject,...h(rt)}),ie.strictCreate=(dn,rt)=>new ie({shape:()=>dn,unknownKeys:"strict",catchall:_e.create(),typeName:At.ZodObject,...h(rt)}),ie.lazycreate=(dn,rt)=>new ie({shape:dn,unknownKeys:"strip",catchall:_e.create(),typeName:At.ZodObject,...h(rt)});class fe extends u{_parse(rt){const{ctx:zt}=this._processInputParams(rt),rn=this._def.options;function Ln(Zn){for(const Wi of Zn)if(Wi.result.status==="valid")return Wi.result;for(const Wi of Zn)if(Wi.result.status==="dirty")return zt.common.issues.push(...Wi.ctx.common.issues),Wi.result;const Gi=Zn.map(Wi=>new s.ZodError(Wi.ctx.common.issues));return(0,m.addIssueToContext)(zt,{code:s.ZodIssueCode.invalid_union,unionErrors:Gi}),m.INVALID}if(zt.common.async)return Promise.all(rn.map(async Zn=>{const Gi={...zt,common:{...zt.common,issues:[]},parent:null};return{result:await Zn._parseAsync({data:zt.data,path:zt.path,parent:Gi}),ctx:Gi}})).then(Ln);{let Zn;const Gi=[];for(const oo of rn){const Mi={...zt,common:{...zt.common,issues:[]},parent:null},no=oo._parseSync({data:zt.data,path:zt.path,parent:Mi});if(no.status==="valid")return no;no.status==="dirty"&&!Zn&&(Zn={result:no,ctx:Mi}),Mi.common.issues.length&&Gi.push(Mi.common.issues)}if(Zn)return zt.common.issues.push(...Zn.ctx.common.issues),Zn.result;const Wi=Gi.map(oo=>new s.ZodError(oo));return(0,m.addIssueToContext)(zt,{code:s.ZodIssueCode.invalid_union,unionErrors:Wi}),m.INVALID}}get options(){return this._def.options}}t.ZodUnion=fe,fe.create=(dn,rt)=>new fe({options:dn,typeName:At.ZodUnion,...h(rt)});const Me=dn=>dn instanceof pe?Me(dn.schema):dn instanceof $e?Me(dn.innerType()):dn instanceof re?[dn.value]:dn instanceof Te?dn.options:dn instanceof Se?_.util.objectValues(dn.enum):dn instanceof it?Me(dn._def.innerType):dn instanceof Q?[void 0]:dn instanceof oe?[null]:dn instanceof Ve?[void 0,...Me(dn.unwrap())]:dn instanceof mt?[null,...Me(dn.unwrap())]:dn instanceof Dt||dn instanceof ut?Me(dn.unwrap()):dn instanceof xt?Me(dn._def.innerType):[];class Le extends u{_parse(rt){const{ctx:zt}=this._processInputParams(rt);if(zt.parsedType!==_.ZodParsedType.object)return(0,m.addIssueToContext)(zt,{code:s.ZodIssueCode.invalid_type,expected:_.ZodParsedType.object,received:zt.parsedType}),m.INVALID;const rn=this.discriminator,Ln=zt.data[rn],Zn=this.optionsMap.get(Ln);return Zn?zt.common.async?Zn._parseAsync({data:zt.data,path:zt.path,parent:zt}):Zn._parseSync({data:zt.data,path:zt.path,parent:zt}):((0,m.addIssueToContext)(zt,{code:s.ZodIssueCode.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[rn]}),m.INVALID)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(rt,zt,rn){const Ln=new Map;for(const Zn of zt){const Gi=Me(Zn.shape[rt]);if(!Gi.length)throw new Error(`A discriminator value for key \`${rt}\` could not be extracted from all schema options`);for(const Wi of Gi){if(Ln.has(Wi))throw new Error(`Discriminator property ${String(rt)} has duplicate value ${String(Wi)}`);Ln.set(Wi,Zn)}}return new Le({typeName:At.ZodDiscriminatedUnion,discriminator:rt,options:zt,optionsMap:Ln,...h(rn)})}}t.ZodDiscriminatedUnion=Le;function Ce(dn,rt){const zt=(0,_.getParsedType)(dn),rn=(0,_.getParsedType)(rt);if(dn===rt)return{valid:!0,data:dn};if(zt===_.ZodParsedType.object&&rn===_.ZodParsedType.object){const Ln=_.util.objectKeys(rt),Zn=_.util.objectKeys(dn).filter(Wi=>Ln.indexOf(Wi)!==-1),Gi={...dn,...rt};for(const Wi of Zn){const oo=Ce(dn[Wi],rt[Wi]);if(!oo.valid)return{valid:!1};Gi[Wi]=oo.data}return{valid:!0,data:Gi}}else if(zt===_.ZodParsedType.array&&rn===_.ZodParsedType.array){if(dn.length!==rt.length)return{valid:!1};const Ln=[];for(let Zn=0;Zn<dn.length;Zn++){const Gi=dn[Zn],Wi=rt[Zn],oo=Ce(Gi,Wi);if(!oo.valid)return{valid:!1};Ln.push(oo.data)}return{valid:!0,data:Ln}}else return zt===_.ZodParsedType.date&&rn===_.ZodParsedType.date&&+dn==+rt?{valid:!0,data:dn}:{valid:!1}}class Ae extends u{_parse(rt){const{status:zt,ctx:rn}=this._processInputParams(rt),Ln=(Zn,Gi)=>{if((0,m.isAborted)(Zn)||(0,m.isAborted)(Gi))return m.INVALID;const Wi=Ce(Zn.value,Gi.value);return Wi.valid?(((0,m.isDirty)(Zn)||(0,m.isDirty)(Gi))&&zt.dirty(),{status:zt.value,value:Wi.data}):((0,m.addIssueToContext)(rn,{code:s.ZodIssueCode.invalid_intersection_types}),m.INVALID)};return rn.common.async?Promise.all([this._def.left._parseAsync({data:rn.data,path:rn.path,parent:rn}),this._def.right._parseAsync({data:rn.data,path:rn.path,parent:rn})]).then(([Zn,Gi])=>Ln(Zn,Gi)):Ln(this._def.left._parseSync({data:rn.data,path:rn.path,parent:rn}),this._def.right._parseSync({data:rn.data,path:rn.path,parent:rn}))}}t.ZodIntersection=Ae,Ae.create=(dn,rt,zt)=>new Ae({left:dn,right:rt,typeName:At.ZodIntersection,...h(zt)});class ve extends u{_parse(rt){const{status:zt,ctx:rn}=this._processInputParams(rt);if(rn.parsedType!==_.ZodParsedType.array)return(0,m.addIssueToContext)(rn,{code:s.ZodIssueCode.invalid_type,expected:_.ZodParsedType.array,received:rn.parsedType}),m.INVALID;if(rn.data.length<this._def.items.length)return(0,m.addIssueToContext)(rn,{code:s.ZodIssueCode.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),m.INVALID;!this._def.rest&&rn.data.length>this._def.items.length&&((0,m.addIssueToContext)(rn,{code:s.ZodIssueCode.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),zt.dirty());const Zn=[...rn.data].map((Gi,Wi)=>{const oo=this._def.items[Wi]||this._def.rest;return oo?oo._parse(new f(rn,Gi,rn.path,Wi)):null}).filter(Gi=>!!Gi);return rn.common.async?Promise.all(Zn).then(Gi=>m.ParseStatus.mergeArray(zt,Gi)):m.ParseStatus.mergeArray(zt,Zn)}get items(){return this._def.items}rest(rt){return new ve({...this._def,rest:rt})}}t.ZodTuple=ve,ve.create=(dn,rt)=>{if(!Array.isArray(dn))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new ve({items:dn,typeName:At.ZodTuple,rest:null,...h(rt)})};class ge extends u{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(rt){const{status:zt,ctx:rn}=this._processInputParams(rt);if(rn.parsedType!==_.ZodParsedType.object)return(0,m.addIssueToContext)(rn,{code:s.ZodIssueCode.invalid_type,expected:_.ZodParsedType.object,received:rn.parsedType}),m.INVALID;const Ln=[],Zn=this._def.keyType,Gi=this._def.valueType;for(const Wi in rn.data)Ln.push({key:Zn._parse(new f(rn,Wi,rn.path,Wi)),value:Gi._parse(new f(rn,rn.data[Wi],rn.path,Wi)),alwaysSet:Wi in rn.data});return rn.common.async?m.ParseStatus.mergeObjectAsync(zt,Ln):m.ParseStatus.mergeObjectSync(zt,Ln)}get element(){return this._def.valueType}static create(rt,zt,rn){return zt instanceof u?new ge({keyType:rt,valueType:zt,typeName:At.ZodRecord,...h(rn)}):new ge({keyType:V.create(),valueType:rt,typeName:At.ZodRecord,...h(zt)})}}t.ZodRecord=ge;class xe extends u{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(rt){const{status:zt,ctx:rn}=this._processInputParams(rt);if(rn.parsedType!==_.ZodParsedType.map)return(0,m.addIssueToContext)(rn,{code:s.ZodIssueCode.invalid_type,expected:_.ZodParsedType.map,received:rn.parsedType}),m.INVALID;const Ln=this._def.keyType,Zn=this._def.valueType,Gi=[...rn.data.entries()].map(([Wi,oo],Mi)=>({key:Ln._parse(new f(rn,Wi,rn.path,[Mi,"key"])),value:Zn._parse(new f(rn,oo,rn.path,[Mi,"value"]))}));if(rn.common.async){const Wi=new Map;return Promise.resolve().then(async()=>{for(const oo of Gi){const Mi=await oo.key,no=await oo.value;if(Mi.status==="aborted"||no.status==="aborted")return m.INVALID;(Mi.status==="dirty"||no.status==="dirty")&&zt.dirty(),Wi.set(Mi.value,no.value)}return{status:zt.value,value:Wi}})}else{const Wi=new Map;for(const oo of Gi){const Mi=oo.key,no=oo.value;if(Mi.status==="aborted"||no.status==="aborted")return m.INVALID;(Mi.status==="dirty"||no.status==="dirty")&&zt.dirty(),Wi.set(Mi.value,no.value)}return{status:zt.value,value:Wi}}}}t.ZodMap=xe,xe.create=(dn,rt,zt)=>new xe({valueType:rt,keyType:dn,typeName:At.ZodMap,...h(zt)});class Ie extends u{_parse(rt){const{status:zt,ctx:rn}=this._processInputParams(rt);if(rn.parsedType!==_.ZodParsedType.set)return(0,m.addIssueToContext)(rn,{code:s.ZodIssueCode.invalid_type,expected:_.ZodParsedType.set,received:rn.parsedType}),m.INVALID;const Ln=this._def;Ln.minSize!==null&&rn.data.size<Ln.minSize.value&&((0,m.addIssueToContext)(rn,{code:s.ZodIssueCode.too_small,minimum:Ln.minSize.value,type:"set",inclusive:!0,exact:!1,message:Ln.minSize.message}),zt.dirty()),Ln.maxSize!==null&&rn.data.size>Ln.maxSize.value&&((0,m.addIssueToContext)(rn,{code:s.ZodIssueCode.too_big,maximum:Ln.maxSize.value,type:"set",inclusive:!0,exact:!1,message:Ln.maxSize.message}),zt.dirty());const Zn=this._def.valueType;function Gi(oo){const Mi=new Set;for(const no of oo){if(no.status==="aborted")return m.INVALID;no.status==="dirty"&&zt.dirty(),Mi.add(no.value)}return{status:zt.value,value:Mi}}const Wi=[...rn.data.values()].map((oo,Mi)=>Zn._parse(new f(rn,oo,rn.path,Mi)));return rn.common.async?Promise.all(Wi).then(oo=>Gi(oo)):Gi(Wi)}min(rt,zt){return new Ie({...this._def,minSize:{value:rt,message:v.errorUtil.toString(zt)}})}max(rt,zt){return new Ie({...this._def,maxSize:{value:rt,message:v.errorUtil.toString(zt)}})}size(rt,zt){return this.min(rt,zt).max(rt,zt)}nonempty(rt){return this.min(1,rt)}}t.ZodSet=Ie,Ie.create=(dn,rt)=>new Ie({valueType:dn,minSize:null,maxSize:null,typeName:At.ZodSet,...h(rt)});class We extends u{constructor(){super(...arguments),this.validate=this.implement}_parse(rt){const{ctx:zt}=this._processInputParams(rt);if(zt.parsedType!==_.ZodParsedType.function)return(0,m.addIssueToContext)(zt,{code:s.ZodIssueCode.invalid_type,expected:_.ZodParsedType.function,received:zt.parsedType}),m.INVALID;function rn(Wi,oo){return(0,m.makeIssue)({data:Wi,path:zt.path,errorMaps:[zt.common.contextualErrorMap,zt.schemaErrorMap,(0,p.getErrorMap)(),p.defaultErrorMap].filter(Mi=>!!Mi),issueData:{code:s.ZodIssueCode.invalid_arguments,argumentsError:oo}})}function Ln(Wi,oo){return(0,m.makeIssue)({data:Wi,path:zt.path,errorMaps:[zt.common.contextualErrorMap,zt.schemaErrorMap,(0,p.getErrorMap)(),p.defaultErrorMap].filter(Mi=>!!Mi),issueData:{code:s.ZodIssueCode.invalid_return_type,returnTypeError:oo}})}const Zn={errorMap:zt.common.contextualErrorMap},Gi=zt.data;if(this._def.returns instanceof Fe){const Wi=this;return(0,m.OK)(async function(...oo){const Mi=new s.ZodError([]),no=await Wi._def.args.parseAsync(oo,Zn).catch(jo=>{throw Mi.addIssue(rn(oo,jo)),Mi}),uo=await Reflect.apply(Gi,this,no);return await Wi._def.returns._def.type.parseAsync(uo,Zn).catch(jo=>{throw Mi.addIssue(Ln(uo,jo)),Mi})})}else{const Wi=this;return(0,m.OK)(function(...oo){const Mi=Wi._def.args.safeParse(oo,Zn);if(!Mi.success)throw new s.ZodError([rn(oo,Mi.error)]);const no=Reflect.apply(Gi,this,Mi.data),uo=Wi._def.returns.safeParse(no,Zn);if(!uo.success)throw new s.ZodError([Ln(no,uo.error)]);return uo.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...rt){return new We({...this._def,args:ve.create(rt).rest(he.create())})}returns(rt){return new We({...this._def,returns:rt})}implement(rt){return this.parse(rt)}strictImplement(rt){return this.parse(rt)}static create(rt,zt,rn){return new We({args:rt||ve.create([]).rest(he.create()),returns:zt||he.create(),typeName:At.ZodFunction,...h(rn)})}}t.ZodFunction=We;class pe extends u{get schema(){return this._def.getter()}_parse(rt){const{ctx:zt}=this._processInputParams(rt);return this._def.getter()._parse({data:zt.data,path:zt.path,parent:zt})}}t.ZodLazy=pe,pe.create=(dn,rt)=>new pe({getter:dn,typeName:At.ZodLazy,...h(rt)});class re extends u{_parse(rt){if(rt.data!==this._def.value){const zt=this._getOrReturnCtx(rt);return(0,m.addIssueToContext)(zt,{received:zt.data,code:s.ZodIssueCode.invalid_literal,expected:this._def.value}),m.INVALID}return{status:"valid",value:rt.data}}get value(){return this._def.value}}t.ZodLiteral=re,re.create=(dn,rt)=>new re({value:dn,typeName:At.ZodLiteral,...h(rt)});function le(dn,rt){return new Te({values:dn,typeName:At.ZodEnum,...h(rt)})}class Te extends u{constructor(){super(...arguments),o.set(this,void 0)}_parse(rt){if(typeof rt.data!="string"){const zt=this._getOrReturnCtx(rt),rn=this._def.values;return(0,m.addIssueToContext)(zt,{expected:_.util.joinValues(rn),received:zt.parsedType,code:s.ZodIssueCode.invalid_type}),m.INVALID}if(n(this,o,"f")||r(this,o,new Set(this._def.values),"f"),!n(this,o,"f").has(rt.data)){const zt=this._getOrReturnCtx(rt),rn=this._def.values;return(0,m.addIssueToContext)(zt,{received:zt.data,code:s.ZodIssueCode.invalid_enum_value,options:rn}),m.INVALID}return(0,m.OK)(rt.data)}get options(){return this._def.values}get enum(){const rt={};for(const zt of this._def.values)rt[zt]=zt;return rt}get Values(){const rt={};for(const zt of this._def.values)rt[zt]=zt;return rt}get Enum(){const rt={};for(const zt of this._def.values)rt[zt]=zt;return rt}extract(rt,zt=this._def){return Te.create(rt,{...this._def,...zt})}exclude(rt,zt=this._def){return Te.create(this.options.filter(rn=>!rt.includes(rn)),{...this._def,...zt})}}t.ZodEnum=Te,o=new WeakMap,Te.create=le;class Se extends u{constructor(){super(...arguments),l.set(this,void 0)}_parse(rt){const zt=_.util.getValidEnumValues(this._def.values),rn=this._getOrReturnCtx(rt);if(rn.parsedType!==_.ZodParsedType.string&&rn.parsedType!==_.ZodParsedType.number){const Ln=_.util.objectValues(zt);return(0,m.addIssueToContext)(rn,{expected:_.util.joinValues(Ln),received:rn.parsedType,code:s.ZodIssueCode.invalid_type}),m.INVALID}if(n(this,l,"f")||r(this,l,new Set(_.util.getValidEnumValues(this._def.values)),"f"),!n(this,l,"f").has(rt.data)){const Ln=_.util.objectValues(zt);return(0,m.addIssueToContext)(rn,{received:rn.data,code:s.ZodIssueCode.invalid_enum_value,options:Ln}),m.INVALID}return(0,m.OK)(rt.data)}get enum(){return this._def.values}}t.ZodNativeEnum=Se,l=new WeakMap,Se.create=(dn,rt)=>new Se({values:dn,typeName:At.ZodNativeEnum,...h(rt)});class Fe extends u{unwrap(){return this._def.type}_parse(rt){const{ctx:zt}=this._processInputParams(rt);if(zt.parsedType!==_.ZodParsedType.promise&&zt.common.async===!1)return(0,m.addIssueToContext)(zt,{code:s.ZodIssueCode.invalid_type,expected:_.ZodParsedType.promise,received:zt.parsedType}),m.INVALID;const rn=zt.parsedType===_.ZodParsedType.promise?zt.data:Promise.resolve(zt.data);return(0,m.OK)(rn.then(Ln=>this._def.type.parseAsync(Ln,{path:zt.path,errorMap:zt.common.contextualErrorMap})))}}t.ZodPromise=Fe,Fe.create=(dn,rt)=>new Fe({type:dn,typeName:At.ZodPromise,...h(rt)});class $e extends u{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===At.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(rt){const{status:zt,ctx:rn}=this._processInputParams(rt),Ln=this._def.effect||null,Zn={addIssue:Gi=>{(0,m.addIssueToContext)(rn,Gi),Gi.fatal?zt.abort():zt.dirty()},get path(){return rn.path}};if(Zn.addIssue=Zn.addIssue.bind(Zn),Ln.type==="preprocess"){const Gi=Ln.transform(rn.data,Zn);if(rn.common.async)return Promise.resolve(Gi).then(async Wi=>{if(zt.value==="aborted")return m.INVALID;const oo=await this._def.schema._parseAsync({data:Wi,path:rn.path,parent:rn});return oo.status==="aborted"?m.INVALID:oo.status==="dirty"||zt.value==="dirty"?(0,m.DIRTY)(oo.value):oo});{if(zt.value==="aborted")return m.INVALID;const Wi=this._def.schema._parseSync({data:Gi,path:rn.path,parent:rn});return Wi.status==="aborted"?m.INVALID:Wi.status==="dirty"||zt.value==="dirty"?(0,m.DIRTY)(Wi.value):Wi}}if(Ln.type==="refinement"){const Gi=Wi=>{const oo=Ln.refinement(Wi,Zn);if(rn.common.async)return Promise.resolve(oo);if(oo instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return Wi};if(rn.common.async===!1){const Wi=this._def.schema._parseSync({data:rn.data,path:rn.path,parent:rn});return Wi.status==="aborted"?m.INVALID:(Wi.status==="dirty"&&zt.dirty(),Gi(Wi.value),{status:zt.value,value:Wi.value})}else return this._def.schema._parseAsync({data:rn.data,path:rn.path,parent:rn}).then(Wi=>Wi.status==="aborted"?m.INVALID:(Wi.status==="dirty"&&zt.dirty(),Gi(Wi.value).then(()=>({status:zt.value,value:Wi.value}))))}if(Ln.type==="transform")if(rn.common.async===!1){const Gi=this._def.schema._parseSync({data:rn.data,path:rn.path,parent:rn});if(!(0,m.isValid)(Gi))return Gi;const Wi=Ln.transform(Gi.value,Zn);if(Wi instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:zt.value,value:Wi}}else return this._def.schema._parseAsync({data:rn.data,path:rn.path,parent:rn}).then(Gi=>(0,m.isValid)(Gi)?Promise.resolve(Ln.transform(Gi.value,Zn)).then(Wi=>({status:zt.value,value:Wi})):Gi);_.util.assertNever(Ln)}}t.ZodEffects=$e,t.ZodTransformer=$e,$e.create=(dn,rt,zt)=>new $e({schema:dn,typeName:At.ZodEffects,effect:rt,...h(zt)}),$e.createWithPreprocess=(dn,rt,zt)=>new $e({schema:rt,effect:{type:"preprocess",transform:dn},typeName:At.ZodEffects,...h(zt)});class Ve extends u{_parse(rt){return this._getType(rt)===_.ZodParsedType.undefined?(0,m.OK)(void 0):this._def.innerType._parse(rt)}unwrap(){return this._def.innerType}}t.ZodOptional=Ve,Ve.create=(dn,rt)=>new Ve({innerType:dn,typeName:At.ZodOptional,...h(rt)});class mt extends u{_parse(rt){return this._getType(rt)===_.ZodParsedType.null?(0,m.OK)(null):this._def.innerType._parse(rt)}unwrap(){return this._def.innerType}}t.ZodNullable=mt,mt.create=(dn,rt)=>new mt({innerType:dn,typeName:At.ZodNullable,...h(rt)});class it extends u{_parse(rt){const{ctx:zt}=this._processInputParams(rt);let rn=zt.data;return zt.parsedType===_.ZodParsedType.undefined&&(rn=this._def.defaultValue()),this._def.innerType._parse({data:rn,path:zt.path,parent:zt})}removeDefault(){return this._def.innerType}}t.ZodDefault=it,it.create=(dn,rt)=>new it({innerType:dn,typeName:At.ZodDefault,defaultValue:typeof rt.default=="function"?rt.default:()=>rt.default,...h(rt)});class xt extends u{_parse(rt){const{ctx:zt}=this._processInputParams(rt),rn={...zt,common:{...zt.common,issues:[]}},Ln=this._def.innerType._parse({data:rn.data,path:rn.path,parent:{...rn}});return(0,m.isAsync)(Ln)?Ln.then(Zn=>({status:"valid",value:Zn.status==="valid"?Zn.value:this._def.catchValue({get error(){return new s.ZodError(rn.common.issues)},input:rn.data})})):{status:"valid",value:Ln.status==="valid"?Ln.value:this._def.catchValue({get error(){return new s.ZodError(rn.common.issues)},input:rn.data})}}removeCatch(){return this._def.innerType}}t.ZodCatch=xt,xt.create=(dn,rt)=>new xt({innerType:dn,typeName:At.ZodCatch,catchValue:typeof rt.catch=="function"?rt.catch:()=>rt.catch,...h(rt)});class lt extends u{_parse(rt){if(this._getType(rt)!==_.ZodParsedType.nan){const rn=this._getOrReturnCtx(rt);return(0,m.addIssueToContext)(rn,{code:s.ZodIssueCode.invalid_type,expected:_.ZodParsedType.nan,received:rn.parsedType}),m.INVALID}return{status:"valid",value:rt.data}}}t.ZodNaN=lt,lt.create=dn=>new lt({typeName:At.ZodNaN,...h(dn)}),t.BRAND=Symbol("zod_brand");class Dt extends u{_parse(rt){const{ctx:zt}=this._processInputParams(rt),rn=zt.data;return this._def.type._parse({data:rn,path:zt.path,parent:zt})}unwrap(){return this._def.type}}t.ZodBranded=Dt;class ot extends u{_parse(rt){const{status:zt,ctx:rn}=this._processInputParams(rt);if(rn.common.async)return(async()=>{const Zn=await this._def.in._parseAsync({data:rn.data,path:rn.path,parent:rn});return Zn.status==="aborted"?m.INVALID:Zn.status==="dirty"?(zt.dirty(),(0,m.DIRTY)(Zn.value)):this._def.out._parseAsync({data:Zn.value,path:rn.path,parent:rn})})();{const Ln=this._def.in._parseSync({data:rn.data,path:rn.path,parent:rn});return Ln.status==="aborted"?m.INVALID:Ln.status==="dirty"?(zt.dirty(),{status:"dirty",value:Ln.value}):this._def.out._parseSync({data:Ln.value,path:rn.path,parent:rn})}}static create(rt,zt){return new ot({in:rt,out:zt,typeName:At.ZodPipeline})}}t.ZodPipeline=ot;class ut extends u{_parse(rt){const zt=this._def.innerType._parse(rt),rn=Ln=>((0,m.isValid)(Ln)&&(Ln.value=Object.freeze(Ln.value)),Ln);return(0,m.isAsync)(zt)?zt.then(Ln=>rn(Ln)):rn(zt)}unwrap(){return this._def.innerType}}t.ZodReadonly=ut,ut.create=(dn,rt)=>new ut({innerType:dn,typeName:At.ZodReadonly,...h(rt)});function ht(dn,rt={},zt){return dn?ne.create().superRefine((rn,Ln)=>{var Zn,Gi;if(!dn(rn)){const Wi=typeof rt=="function"?rt(rn):typeof rt=="string"?{message:rt}:rt,oo=(Gi=(Zn=Wi.fatal)!==null&&Zn!==void 0?Zn:zt)!==null&&Gi!==void 0?Gi:!0,Mi=typeof Wi=="string"?{message:Wi}:Wi;Ln.addIssue({code:"custom",...Mi,fatal:oo})}}):ne.create()}t.custom=ht,t.late={object:ie.lazycreate};var At;(function(dn){dn.ZodString="ZodString",dn.ZodNumber="ZodNumber",dn.ZodNaN="ZodNaN",dn.ZodBigInt="ZodBigInt",dn.ZodBoolean="ZodBoolean",dn.ZodDate="ZodDate",dn.ZodSymbol="ZodSymbol",dn.ZodUndefined="ZodUndefined",dn.ZodNull="ZodNull",dn.ZodAny="ZodAny",dn.ZodUnknown="ZodUnknown",dn.ZodNever="ZodNever",dn.ZodVoid="ZodVoid",dn.ZodArray="ZodArray",dn.ZodObject="ZodObject",dn.ZodUnion="ZodUnion",dn.ZodDiscriminatedUnion="ZodDiscriminatedUnion",dn.ZodIntersection="ZodIntersection",dn.ZodTuple="ZodTuple",dn.ZodRecord="ZodRecord",dn.ZodMap="ZodMap",dn.ZodSet="ZodSet",dn.ZodFunction="ZodFunction",dn.ZodLazy="ZodLazy",dn.ZodLiteral="ZodLiteral",dn.ZodEnum="ZodEnum",dn.ZodEffects="ZodEffects",dn.ZodNativeEnum="ZodNativeEnum",dn.ZodOptional="ZodOptional",dn.ZodNullable="ZodNullable",dn.ZodDefault="ZodDefault",dn.ZodCatch="ZodCatch",dn.ZodPromise="ZodPromise",dn.ZodBranded="ZodBranded",dn.ZodPipeline="ZodPipeline",dn.ZodReadonly="ZodReadonly"})(At||(t.ZodFirstPartyTypeKind=At={}));class Ht{constructor(...rt){}}const bn=(dn,rt={message:`Input not instance of ${dn.name}`})=>ht(zt=>zt instanceof dn,rt);t.instanceof=bn;const Hn=V.create;t.string=Hn;const Ei=Y.create;t.number=Ei;const Un=lt.create;t.nan=Un;const Jt=z.create;t.bigint=Jt;const An=H.create;t.boolean=An;const cn=K.create;t.date=cn;const Vt=Z.create;t.symbol=Vt;const _t=Q.create;t.undefined=_t;const ze=oe.create;t.null=ze;const Je=ne.create;t.any=Je;const yt=he.create;t.unknown=yt;const In=_e.create;t.never=In;const qn=q.create;t.void=qn;const Pi=Oe.create;t.array=Pi;const Fi=ie.create;t.object=Fi;const so=ie.strictCreate;t.strictObject=so;const Ji=fe.create;t.union=Ji;const fo=Le.create;t.discriminatedUnion=fo;const ci=Ae.create;t.intersection=ci;const $n=ve.create;t.tuple=$n;const Di=ge.create;t.record=Di;const zi=xe.create;t.map=zi;const to=Ie.create;t.set=to;const Ki=We.create;t.function=Ki;const En=pe.create;t.lazy=En;const si=re.create;t.literal=si;const kn=Te.create;t.enum=kn;const st=Se.create;t.nativeEnum=st;const Pt=Fe.create;t.promise=Pt;const Tt=$e.create;t.effect=Tt,t.transformer=Tt;const St=Ve.create;t.optional=St;const Sn=mt.create;t.nullable=Sn;const gn=$e.createWithPreprocess;t.preprocess=gn;const ln=ot.create;t.pipeline=ln;const zn=()=>Hn().optional();t.ostring=zn;const hi=()=>Ei().optional();t.onumber=hi;const bi=()=>An().optional();t.oboolean=bi,t.coerce={string:dn=>V.create({...dn,coerce:!0}),number:dn=>Y.create({...dn,coerce:!0}),boolean:dn=>H.create({...dn,coerce:!0}),bigint:dn=>z.create({...dn,coerce:!0}),date:dn=>K.create({...dn,coerce:!0})},t.NEVER=m.INVALID},79682:(x,t,e)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.ChromeDevtoolsContribution=void 0;const r=e(85608),o=e(76003),l=e(41869),p=e(65265),v=e(98295),m=e(27654);let _=n=class extends l.Disposable{constructor(){super(...arguments),this.lantencyHandler=f=>{const{command:a}=f.detail;a===p.DevtoolsLantencyCommand.Start?this.interval||this.startRTTInterval():a===p.DevtoolsLantencyCommand.Stop&&this.interval&&(clearInterval(this.interval),this.interval=void 0)}}initialize(){var f;this.appConfig.devtools&&(window.addEventListener(p.EDevtoolsEvent.Latency,this.lantencyHandler),this.addDispose(l.Disposable.create(()=>{window.removeEventListener(p.EDevtoolsEvent.Latency,this.lantencyHandler),this.interval&&(clearInterval(this.interval),this.interval=void 0)})),!((f=window.__OPENSUMI_DEVTOOLS_GLOBAL_HOOK__)===null||f===void 0)&&f.captureRPC&&(this.interval||this.startRTTInterval()))}startRTTInterval(){this.interval=setInterval(async()=>{const f=Date.now();await this.rttService.measure();const a=Date.now()-f;window.__OPENSUMI_DEVTOOLS_GLOBAL_HOOK__.captureRPC&&(window.__OPENSUMI_DEVTOOLS_GLOBAL_HOOK__.latency=a)},n.INTERVAL)}};t.ChromeDevtoolsContribution=_,_.INTERVAL=1e3,r.__decorate([(0,o.Autowired)(l.AppConfig),r.__metadata("design:type",Object)],_.prototype,"appConfig",void 0),r.__decorate([(0,o.Autowired)(m.ConnectionRTTBrowserServiceToken),r.__metadata("design:type",m.ConnectionRTTBrowserService)],_.prototype,"rttService",void 0),t.ChromeDevtoolsContribution=_=n=r.__decorate([(0,v.Domain)(l.ClientAppContribution)],_)},72915:(x,t,e)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.ConnectionRTTContribution=void 0;const r=e(85608),o=e(76003),l=e(26542),p=e(92323),v=e(98295),m=e(27654),_={id:"connection.start.rtt",label:"%connection.start.rtt%",category:"%command.category.developerTools%"},s={id:"connection.stop.rtt",label:"%connection.stop.rtt%",category:"%command.category.developerTools%"},f={alignment:l.StatusBarAlignment.LEFT,priority:1/0-1};let a=n=class{registerCommands(u){u.registerCommand(_,{execute:()=>{this.interval||this.startRTTInterval()}}),u.registerCommand(s,{execute:()=>{this.interval&&(clearInterval(this.interval),this.statusBar&&(this.statusBar.dispose(),this.statusBar=void 0))}})}startRTTInterval(){this.interval=setInterval(async()=>{const u=Date.now();await this.rttService.measure();const E={text:`${Date.now()-u}ms`};if(this.statusBar)this.statusBar.update({...E,...f});else{const g=this.statusBarService.addElement("connection-rtt",{...E,...f});this.statusBar=g}},n.INTERVAL)}};t.ConnectionRTTContribution=a,a.INTERVAL=1e3,r.__decorate([(0,o.Autowired)(l.IStatusBarService),r.__metadata("design:type",Object)],a.prototype,"statusBarService",void 0),r.__decorate([(0,o.Autowired)(m.ConnectionRTTBrowserServiceToken),r.__metadata("design:type",m.ConnectionRTTBrowserService)],a.prototype,"rttService",void 0),t.ConnectionRTTContribution=a=n=r.__decorate([(0,v.Domain)(p.CommandContribution)],a)},27654:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ConnectionRTTBrowserService=t.ConnectionRTTBrowserServiceToken=void 0;const n=e(85608),r=e(76003),o=e(69452);t.ConnectionRTTBrowserServiceToken=Symbol("ConnectionRTTBrowserService");let l=class{async measure(){await this.connectionBackService.$measure()}};t.ConnectionRTTBrowserService=l,n.__decorate([(0,r.Autowired)(o.ConnectionBackServicePath),n.__metadata("design:type",Object)],l.prototype,"connectionBackService",void 0),t.ConnectionRTTBrowserService=l=n.__decorate([(0,r.Injectable)()],l)},17631:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FileDropContribution=void 0;const n=e(85608),r=e(76003),o=e(41869),l=e(43718),p=e(69452);let v=class extends l.WithEventBus{onDidDropFile(_){this.dropService.onDidDropFile(_)}};t.FileDropContribution=v,n.__decorate([(0,r.Autowired)(p.IFileDropFrontendServiceToken),n.__metadata("design:type",Object)],v.prototype,"dropService",void 0),n.__decorate([(0,l.OnEvent)(l.FileTreeDropEvent),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[l.FileTreeDropEvent]),n.__metadata("design:returntype",void 0)],v.prototype,"onDidDropFile",null),t.FileDropContribution=v=n.__decorate([(0,r.Injectable)(),(0,o.Domain)(o.ClientAppContribution)],v)},22874:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FileDropService=void 0;const n=e(85608),r=e(76003),o=e(41869),l=e(26542),p=e(43718),v=e(42933),{Path:m}=p.path,_=e(69452);let s=class extends p.WithEventBus{constructor(){super(...arguments),this.pending=new Set}onDidUploadFileStart(a){this.pending.add(a),this.createOrUpdateStatusBar()}onDidUploadFileEnd(a){this.pending.delete(a),this.createOrUpdateStatusBar()}createOrUpdateStatusBar(a){if(this.pending.size===0){this.uploadStatus&&(this.uploadStatus.dispose(),this.uploadStatus=void 0);return}const h="sumi-upload-file-status",u=(0,o.formatLocalize)("workbench.uploadingFiles",this.pending.size,a||"0 MB"),d={text:u,alignment:l.StatusBarAlignment.RIGHT,tooltip:u,iconClass:"kaitian-icon kticon-cloud-server"};this.uploadStatus?this.uploadStatus.update({id:h,...d}):this.uploadStatus=this.statusBarService.addElement(h,d)}onDidDropFile(a){var h;const{payload:{event:u,targetDir:d}}=a;if(!d||!(!((h=u.dataTransfer)===null||h===void 0)&&h.files)||u.dataTransfer.files.length===0)return;const E=u.dataTransfer.items;let g=0;const c=Date.now(),b=y=>{g+=y;const S=Date.now(),w=`${(g/((S-c)/1e3)/1024/1024).toFixed(2)} MB`;this.createOrUpdateStatusBar(w)};for(const y of E){const S=y.webkitGetAsEntry();this.processFilesEntry(d,S,b)}}async processFilesEntry(a,h,u){if(h.isFile)this.processFileEntry(h,a,u);else{const d=p.Uri.file(new m(a).join(h.fullPath).toString()).toString();await this.fs.createFolder(d),this.processDirEntry(h,a,u)}}toBinaryString(a){let h;const u=a.length;let d="";for(h=0;h<u;h+=1)d+=String.fromCharCode(a[h]);return d}async doUploadFile(a,h,u){var d;const E=new m(h).join(a.name).toString();this.onDidUploadFileStart(E.toString()),await this.fs.createFile(p.Uri.file(E.toString()).toString()),await this.dropService.$ensureFileExist(a.name,h);const g=a.stream().getReader();let c=await g.read();for(;!c.done;)await this.dropService.$writeStream(this.toBinaryString(c.value),a.name,h,c.done),u((d=c.value)===null||d===void 0?void 0:d.byteLength),c=await g.read();c.done&&this.onDidUploadFileEnd(E.toString())}processFileEntry(a,h,u){a.file(d=>{const E=new File([d],a.fullPath,{type:a.type});this.doUploadFile(E,h,u)},()=>{})}processDirEntry(a,h,u){a.createReader().readEntries(E=>{E.forEach(async g=>{this.processFilesEntry(h,g,u)})},()=>{})}};t.FileDropService=s,n.__decorate([(0,r.Autowired)(v.IFileServiceClient),n.__metadata("design:type",Object)],s.prototype,"fs",void 0),n.__decorate([(0,r.Autowired)(_.FileDropServicePath),n.__metadata("design:type",Object)],s.prototype,"dropService",void 0),n.__decorate([(0,r.Autowired)(l.IStatusBarService),n.__metadata("design:type",Object)],s.prototype,"statusBarService",void 0),t.FileDropService=s=n.__decorate([(0,r.Injectable)()],s)},79240:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FileSearchContribution=t.FileSearchQuickCommandHandler=t.matchLineReg=t.quickGoToSymbol=t.quickFileOpen=void 0,t.getValidateInput=b;const n=e(85608),r=n.__importDefault(e(39050)),o=e(76003),l=e(41869),p=e(26542),v=e(43718),m=e(98295),_=e(54414),s=e(17459),f=e(84660),a=n.__importStar(e(20868)),h=e(97821),u=e(80490),d=e(51500),E=e(30981),g=200;t.quickFileOpen={id:"workbench.action.quickOpen",category:"File",label:"Open File..."},t.quickGoToSymbol={id:"workbench.action.gotoSymbol",category:"File",label:"Open File Symbol..."},t.matchLineReg=/^([^:#(]*)[:#(]?L?(\d+)?[:,]?(\d+)?\)?/;function c(T=""){const D=T.match(t.matchLineReg)||[];if(D.length<2)return;const I={line:Number(D[2]||0),start:Number(D[3]||0)};return new a.Range(I.line,I.start,I.line,I.start)}function b(T){return T.replace(t.matchLineReg,"$1")}let y=class extends h.QuickOpenBaseAction{constructor(){super({id:"file-search:splitToRight",tooltip:(0,l.localize)("quickOpen.openOnTheRightSide"),class:(0,l.getIcon)("embed")})}async run(D){await this.commandService.executeCommand(l.EDITOR_COMMANDS.OPEN_RESOURCE.id,D.getUri(),{preview:!1,split:_.EditorGroupSplitAction.Right,range:c(this.injector.get(A).currentLookFor),focus:!0})}};n.__decorate([(0,o.Autowired)(l.CommandService),n.__metadata("design:type",Object)],y.prototype,"commandService",void 0),n.__decorate([(0,o.Autowired)(o.INJECTOR_TOKEN),n.__metadata("design:type",o.Injector)],y.prototype,"injector",void 0),y=n.__decorate([(0,o.Injectable)(),n.__metadata("design:paramtypes",[])],y);let S=class{hasActions(){return!0}getActions(){return[this.fileSearchActionLeftRight]}getValidateInput(D){return b(D)}};n.__decorate([(0,o.Autowired)(),n.__metadata("design:type",y)],S.prototype,"fileSearchActionLeftRight",void 0),S=n.__decorate([(0,o.Injectable)()],S);let A=class{constructor(){this.cancelIndicator=new v.CancellationTokenSource,this.default=!0,this.prefix="...",this.description=(0,l.localize)("file-search.command.fileOpen.description"),this.prevEditorState={},this.currentLookFor=""}getModel(){return{onType:async(D,I)=>{this.cancelIndicator.cancel(),this.cancelIndicator=new v.CancellationTokenSource;const R=this.cancelIndicator.token,M=new Set;let O=[];D=D.trim().replace(/\s/g,""),this.currentLookFor=D;const P=b(D),k=this.reporterService.time(v.REPORT_NAME.QUICK_OPEN_MEASURE),F=await this.getRecentlyItems(M,P,R);if(D&&(this.logger.debug("lookFor",D,P),O=await this.getFindOutItems(M,P,R)),R.isCancellationRequested)return;const L=F.concat(O);I(L,L.length?this.fileSearchActionProvider:void 0),k.timeEnd(D.indexOf("@")>-1?"file-symbol":"file",{lookFor:D,stat:{recently:F.length,find:O.length}})}}}getOptions(){return{placeholder:(0,l.localize)("file-search.command.fileOpen.placeholder"),fuzzyMatchLabel:{enableSeparateSubstringMatching:!0},showItemsWithoutHighlight:!0,fuzzyMatchDescription:{enableSeparateSubstringMatching:!0},getPlaceholderItem:D=>new l.QuickOpenItem({label:(0,l.localize)(D.indexOf("@")>-1?"search.fileSymbolResults.notfound":"search.fileResults.notfound"),run:()=>!1})}}onClose(D){D&&this.prevEditorState.uri&&(this.workbenchEditorService.open(this.prevEditorState.uri,{range:this.prevEditorState.range}),this.prevEditorState={}),this.prevSelected=void 0,this.cancelIndicator.cancel()}onToggle(){this.cancelIndicator.cancel()}trySaveEditorState(){var D;if(this.workbenchEditorService.currentResource){let I={startColumn:1,startLineNumber:1,endColumn:1,endLineNumber:1};const R=(D=this.workbenchEditorService.currentEditor)===null||D===void 0?void 0:D.getSelections();if(R){const{selectionStartLineNumber:M,selectionStartColumn:O,positionLineNumber:P,positionColumn:k}=R[0];I=new a.Range(M,O,P,k)}this.prevEditorState={uri:this.workbenchEditorService.currentResource.uri,range:I}}}async getFindOutItems(D,I,R){var M;let O;if(I.indexOf("@")>-1){this.trySaveEditorState(),O=[];const[P,k]=I.split("@");let F;if(this.prevSelected)F=this.prevSelected.withoutFragment();else if(P){const L=await this.getQueryFiles(P,D,R);L.length&&(F=L[0].getUri())}else F=(M=this.workbenchEditorService.currentResource)===null||M===void 0?void 0:M.uri;if(F){const L=await this.documentSymbolStore.getDocumentSymbolAsync(F)||[],B=[];this.flattenSymbols({children:L},B),O=B.filter(W=>{const U=(0,E.matchesFuzzy)(k,W.name,!0)||[];return U&&(W.labelHighlights=U),U&&U.length}).map((W,U)=>{var X;return new l.QuickOpenItem({uri:F,label:W.name,iconClass:(0,l.getSymbolIcon)(W.kind),description:(X=W.parent)===null||X===void 0?void 0:X.name,labelHighlights:W.labelHighlights,groupLabel:U===0?(0,l.formatLocalize)("search.fileSymbolResults",B.length):"",showBorder:!1,run:V=>V===l.Mode.PREVIEW?(this.locateSymbol(F,W),!0):V===l.Mode.OPEN?(this.locateSymbol(F,W),!0):!1})})}else return[]}else if(O=await this.getQueryFiles(I,D,R),O[0]){const P=await this.getItems([O[0].getUri().codeUri.fsPath],{groupLabel:(0,l.localize)("search.fileResults"),showBorder:!0});O[0]=P[0]}return O}async getQueryFiles(D,I,R){const O=(await this.workspaceService.roots).map(F=>new l.URI(F.uri).codeUri.fsPath),P=await this.fileSearchService.find(D,{rootUris:O,fuzzyMatch:!0,limit:g,useGitIgnore:!0,noIgnoreParent:!0,excludePatterns:this.getPreferenceSearchExcludes()},R),k=await this.getItems(P.filter(F=>I.has(F)||R.isCancellationRequested?!1:(I.add(F),!0)),{});return k.sort(this.compareItems.bind(this)),k}async flattenSymbols(D,I){D.children.forEach(R=>{I.push(R),R.children&&this.flattenSymbols(R,I)})}async getRecentlyItems(D,I,R){const M=await this.recentFilesManager.getMostRecentlyOpenedFiles(!0)||[];return await this.getItems(M.filter(O=>{const P=new l.URI(O);return D.has(O)||!r.default.test(I,P.displayName)||R.isCancellationRequested?!1:(D.add(O),!0)}),{groupLabel:(0,l.localize)("search.historyMatches")})}async getItems(D,I){const R=[];for(const[M,O]of D.entries()){const P=l.URI.isUriString(O)?new l.URI(O):l.URI.file(O),k=`file-icon ${this.labelService.getIcon(P.withoutFragment())}`;let F="";const L=await this.workspaceService.asRelativePath(P.parent);L&&(this.workspaceService.isMultiRootWorkspaceOpened?F=`${new l.URI(L.root).displayName}${L.path?` \u30FB ${L.path}`:""}`:F=L.path||"");const B=new l.QuickOpenItem({uri:P,label:P.displayName,tooltip:O,iconClass:k,description:F,groupLabel:M===0?I.groupLabel:"",showBorder:D.length>0&&M===0?I.showBorder:!1,run:j=>(j===l.Mode.PREVIEW&&(this.prevSelected=P),j===l.Mode.OPEN?(this.openFile(P),!0):!1)});R.push(B)}return R}openFile(D){const I=D.codeUri.fsPath;let R=c(this.currentLookFor);(!R||!R.startLineNumber&&!R.startColumn)&&(R=c(D.fragment?"#"+D.fragment:I)),this.currentLookFor="",this.commandService.executeCommand(l.EDITOR_COMMANDS.OPEN_RESOURCE.id,D.withoutFragment(),{preview:!1,range:R,focus:!0})}locateSymbol(D,I){this.workbenchEditorService.open(D,{range:I.range,preview:!0})}compareItems(D,I,R="getLabel"){function M(j){return j.trim().toLowerCase()}const O=M(b(this.currentLookFor));function P(j){const W=r.default.match(O,j);return W===null?0:W.score}let k=D[R](),F=I[R]();typeof k!="string"&&(k=k.path.toString()),typeof F!="string"&&(F=F.path.toString()),k=M(k),F=M(F);const L=P(k),B=P(F);if(L===B){const j=k.indexOf(O),W=F.indexOf(O);return j===W?k.length!==F.length?k.length<F.length?-1:1:F.localeCompare(k)===0?R==="getUri"?0:this.compareItems(D,I,"getUri"):F.localeCompare(k):j-W}return B-L}getPreferenceSearchExcludes(){const D=[],I=this.preferenceService.get("files.exclude"),R=this.preferenceService.get("search.exclude"),M=Object.assign({},I,R);for(const O of Object.keys(M))M[O]&&D.push(O);return D}};t.FileSearchQuickCommandHandler=A,n.__decorate([(0,o.Autowired)(l.CommandService),n.__metadata("design:type",Object)],A.prototype,"commandService",void 0),n.__decorate([(0,o.Autowired)(f.FileSearchServicePath),n.__metadata("design:type",Object)],A.prototype,"fileSearchService",void 0),n.__decorate([(0,o.Autowired)(_.WorkbenchEditorService),n.__metadata("design:type",_.WorkbenchEditorService)],A.prototype,"workbenchEditorService",void 0),n.__decorate([(0,o.Autowired)(s.DocumentSymbolStore),n.__metadata("design:type",s.DocumentSymbolStore)],A.prototype,"documentSymbolStore",void 0),n.__decorate([(0,o.Autowired)(),n.__metadata("design:type",p.LabelService)],A.prototype,"labelService",void 0),n.__decorate([(0,o.Autowired)(d.IWorkspaceService),n.__metadata("design:type",Object)],A.prototype,"workspaceService",void 0),n.__decorate([(0,o.Autowired)(l.RecentFilesManager),n.__metadata("design:type",l.RecentFilesManager)],A.prototype,"recentFilesManager",void 0),n.__decorate([(0,o.Autowired)(l.ILogger),n.__metadata("design:type",Object)],A.prototype,"logger",void 0),n.__decorate([(0,o.Autowired)(),n.__metadata("design:type",S)],A.prototype,"fileSearchActionProvider",void 0),n.__decorate([(0,o.Autowired)(l.PreferenceService),n.__metadata("design:type",Object)],A.prototype,"preferenceService",void 0),n.__decorate([(0,o.Autowired)(v.IReporterService),n.__metadata("design:type",Object)],A.prototype,"reporterService",void 0),t.FileSearchQuickCommandHandler=A=n.__decorate([(0,o.Injectable)()],A);let w=class{registerQuickOpenHandlers(D){D.registerHandler(this.fileSearchQuickCommandHandler,{title:(0,l.localize)("quickopen.tab.file"),commandId:t.quickFileOpen.id,order:1})}registerCommands(D){D.registerCommand(t.quickFileOpen,{execute:()=>this.quickOpenService.open("...")}),D.registerCommand(t.quickGoToSymbol,{execute:()=>this.quickOpenService.open("...@")})}registerKeybindings(D){D.registerKeybinding({command:t.quickFileOpen.id,keybinding:"ctrlcmd+p"})}};t.FileSearchContribution=w,n.__decorate([(0,o.Autowired)(A),n.__metadata("design:type",A)],w.prototype,"fileSearchQuickCommandHandler",void 0),n.__decorate([(0,o.Autowired)(h.PrefixQuickOpenService),n.__metadata("design:type",Object)],w.prototype,"quickOpenService",void 0),t.FileSearchContribution=w=n.__decorate([(0,m.Domain)(v.CommandContribution,l.KeybindingContribution,u.QuickOpenContribution)],w)},73827:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ClientAddonModule=void 0;const n=e(85608),r=e(76003),o=e(41869),l=e(69452),p=e(79682),v=e(72915),m=e(27654),_=e(17631),s=e(22874),f=e(79240),a=e(18256),h=e(7756),u=e(16426);let d=class extends o.BrowserModule{constructor(){super(...arguments),this.providers=[p.ChromeDevtoolsContribution,a.LanguageChangeHintContribution,f.FileSearchContribution,h.StatusBarContribution,u.ToolbarCustomizeContribution,_.FileDropContribution,v.ConnectionRTTContribution,{token:l.IFileDropFrontendServiceToken,useClass:s.FileDropService},{token:m.ConnectionRTTBrowserServiceToken,useClass:m.ConnectionRTTBrowserService}],this.backServices=[{servicePath:l.FileDropServicePath},{servicePath:l.ConnectionBackServicePath}]}};t.ClientAddonModule=d,t.ClientAddonModule=d=n.__decorate([(0,r.Injectable)()],d)},18256:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LanguageChangeHintContribution=void 0;const n=e(85608),r=e(76003),o=e(41869),l=e(72665);let p=class{onStart(){this.preferenceService.onSpecificPreferenceChange(o.GeneralSettingsId.Language,async m=>{(0,o.setLanguageId)(m.newValue),this.preferenceService.get("general.askReloadOnLanguageChange")&&await this.dialogService.info((0,o.localize)("preference.general.language.change.refresh.info","After changing the language, it should be restarted to take effect. Will it be refreshed immediately?"),[(0,o.localize)("preference.general.language.change.refresh.later","Later"),(0,o.localize)("preference.general.language.change.refresh.now","Now")])===(0,o.localize)("preference.general.language.change.refresh.now","Now")&&this.clientApp.fireOnReload()})}};t.LanguageChangeHintContribution=p,n.__decorate([(0,r.Autowired)(o.PreferenceService),n.__metadata("design:type",Object)],p.prototype,"preferenceService",void 0),n.__decorate([(0,r.Autowired)(o.IClientApp),n.__metadata("design:type",Object)],p.prototype,"clientApp",void 0),n.__decorate([(0,r.Autowired)(l.IDialogService),n.__metadata("design:type",Object)],p.prototype,"dialogService",void 0),t.LanguageChangeHintContribution=p=n.__decorate([(0,o.Domain)(o.ClientAppContribution)],p)},7756:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StatusBarContribution=void 0;const n=e(85608),r=e(76003),o=e(41869),l=e(43718);let p=class extends l.WithEventBus{onStart(){}handleBrowserConnectionOpen(){this.commandService.executeCommand("statusbar.changeBackgroundColor","var(--statusBar-background)"),this.logger.log("Browser connection open, change status bar background color")}handleBrowserConnectionClose(){this.commandService.executeCommand("statusbar.changeBackgroundColor","var(--kt-statusbar-offline-background)"),this.logger.log("Browser connection close, change status bar background color")}};t.StatusBarContribution=p,n.__decorate([(0,r.Autowired)(l.CommandService),n.__metadata("design:type",Object)],p.prototype,"commandService",void 0),n.__decorate([(0,r.Autowired)(l.ILogger),n.__metadata("design:type",Object)],p.prototype,"logger",void 0),n.__decorate([(0,l.OnEvent)(l.BrowserConnectionOpenEvent),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[]),n.__metadata("design:returntype",void 0)],p.prototype,"handleBrowserConnectionOpen",null),n.__decorate([(0,l.OnEvent)(l.BrowserConnectionCloseEvent),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[]),n.__metadata("design:returntype",void 0)],p.prototype,"handleBrowserConnectionClose",null),t.StatusBarContribution=p=n.__decorate([(0,l.Domain)(o.ClientAppContribution)],p)},16426:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ToolbarCustomizeContribution=void 0;const n=e(85608),r=e(76003),o=e(41869),l=e(93899),p=e(62132);let v=class{registerCommands(_){_.registerCommand({id:"toolbar.showCustomizePanel",label:"Show Toolbar Customization"},{execute:()=>{this.viewService.setVisible(!0)}})}registerComponent(_){_.register("addon/toolbar-customize",{id:"addon/toolbar-customize",component:p.ToolbarCustomizeComponent}),this.config.layoutConfig[o.SlotLocation.extra]||(this.config.layoutConfig[o.SlotLocation.extra]={modules:[]}),this.config.layoutConfig[o.SlotLocation.extra].modules.push("addon/toolbar-customize")}registerMenus(_){_.registerMenuItem(l.MenuId.KTToolbarLocationContext,{command:{id:"toolbar.showCustomizePanel",label:(0,o.localize)("toolbar.customize.menu")}})}};t.ToolbarCustomizeContribution=v,n.__decorate([(0,r.Autowired)(o.AppConfig),n.__metadata("design:type",Object)],v.prototype,"config",void 0),n.__decorate([(0,r.Autowired)(p.ToolbarCustomizeViewService),n.__metadata("design:type",p.ToolbarCustomizeViewService)],v.prototype,"viewService",void 0),t.ToolbarCustomizeContribution=v=n.__decorate([(0,o.Domain)(o.CommandContribution,o.ComponentContribution,l.MenuContribution)],v)},62132:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ToolbarCustomizeComponent=t.ToolbarCustomizeViewService=void 0;const n=e(85608),r=n.__importDefault(e(14041)),o=e(76003),l=e(97267),p=e(41869),v=n.__importDefault(e(18541));let m=class{bindSetVisibleHandle(f){this._setVisible=f}setVisible(f){this._setVisible(f)}async toggleActionVisibility(f,a,h){const u=this.preferenceService.getValid("toolbar.ignoreActions",{});if(u[f]||(u[f]=[]),!h)u[f].indexOf(a)===-1&&u[f].push(a);else{const E=u[f].indexOf(a);E!==-1&&u[f].splice(E,1)}const d=this.preferenceService.inspect("toolbar.ignoreActions").workspaceValue?p.PreferenceScope.Workspace:p.PreferenceScope.User;await this.preferenceService.set("toolbar.ignoreActions",u,d)}};t.ToolbarCustomizeViewService=m,n.__decorate([(0,o.Autowired)(p.PreferenceService),n.__metadata("design:type",Object)],m.prototype,"preferenceService",void 0),t.ToolbarCustomizeViewService=m=n.__decorate([(0,o.Injectable)()],m);const _=()=>{const[s,f]=r.default.useState(!1),a=(0,p.useInjectable)(m),h=(0,p.useInjectable)(p.IToolbarRegistry),u=(0,p.useInjectable)(p.PreferenceService);if(a.bindSetVisibleHandle(f),!s)return null;const d=h.getAllLocations(),E=u.get("toolbar.ignoreActions")||{};let g=u.get("toolbar.buttonDisplay","iconAndText");function c(b){const y=[{id:"_head"},...h.getActionGroups(b)||[],{id:"_tail"}],S=[],A=E[b]||[];return y.forEach((w,T)=>{const D=h.getToolbarActions({location:b,group:w.id});D&&D.actions.length>0&&(S.length>0&&S.push(r.default.createElement("div",{className:v.default["group-split"],key:"split-"+T})),D.actions.forEach((I,R)=>{var M;let O=A.indexOf(I.id)===-1;const P="action-toggle-"+I.id;S.push(r.default.createElement("div",{className:v.default["action-item"],key:R+"_"+I.id},r.default.createElement(l.CheckBox,{onChange:()=>{a.toggleActionVisibility(b,I.id,!O),O=!O},defaultChecked:O,id:P,label:(M=I.description)!==null&&M!==void 0?M:I.id})))}))}),S.length===0?null:r.default.createElement("div",{key:b,className:v.default["toolbar-customize-location"]},S)}return r.default.createElement("div",{className:v.default["toolbar-customize-overlay"]},r.default.createElement("div",{className:v.default["toolbar-customize"]},d.map(b=>c(b)),r.default.createElement("div",{className:v.default["button-display"]},r.default.createElement("div",null,(0,p.localize)("toolbar-customize.buttonDisplay.description")),r.default.createElement(l.Select,{options:[{label:(0,p.localize)("toolbar-customize.buttonDisplay.icon"),value:"icon"},{label:(0,p.localize)("toolbar-customize.buttonDisplay.iconAndText"),value:"iconAndText"}],value:g,onChange:b=>{const y=u.inspect("toolbar.buttonDisplay").workspaceValue?p.PreferenceScope.Workspace:p.PreferenceScope.User;u.set("toolbar.buttonDisplay",b,y),g=b},className:v.default["button-display-select"]})),r.default.createElement("div",{className:v.default["customize-complete"]},r.default.createElement(l.Button,{type:"primary",onClick:()=>f(!1)},(0,p.localize)("toolbar-customize.complete")))))};t.ToolbarCustomizeComponent=_},69452:(x,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IConnectionBackService=t.ConnectionBackServicePath=t.IFileDropFrontendServiceToken=t.IFileDropServiceToken=t.FileDropServicePath=void 0,t.FileDropServicePath="FileDropServicePath",t.IFileDropServiceToken=Symbol("IFileDropService"),t.IFileDropFrontendServiceToken=Symbol("IFileDropFrontendService"),t.ConnectionBackServicePath="ConnectionBackServicePath",t.IConnectionBackService=Symbol("IConnectionBackService")},77659:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AINativeContextKey=void 0;const n=e(85608),r=e(76003),o=e(41869),l=e(50394);let p=class{get contextKeyService(){return this._contextKeyService}constructor(m){this._contextKeyService=this.globalContextKeyService.createScoped(m),this.inlineChatIsVisible=l.InlineChatIsVisible.bind(this._contextKeyService),this.inlineCompletionIsTrigger=l.InlineCompletionIsTrigger.bind(this._contextKeyService),this.inlineHintWidgetIsVisible=l.InlineHintWidgetIsVisible.bind(this._contextKeyService),this.inlineInputWidgetIsVisible=l.InlineInputWidgetIsVisible.bind(this._contextKeyService),this.inlineInputWidgetIsStreaming=l.InlineInputWidgetIsStreaming.bind(this._contextKeyService),this.inlineDiffPartialEditsIsVisible=l.InlineDiffPartialEditsIsVisible.bind(this._contextKeyService),this.codeEditsIsVisible=l.CodeEditsIsVisible.bind(this._contextKeyService)}};t.AINativeContextKey=p,n.__decorate([(0,r.Autowired)(o.IContextKeyService),n.__metadata("design:type",Object)],p.prototype,"globalContextKeyService",void 0),t.AINativeContextKey=p=n.__decorate([(0,r.Injectable)(),n.__param(0,(0,r.Optional)()),n.__metadata("design:paramtypes",[Object])],p)},32016:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AINativeBrowserContribution=t.INLINE_DIFF_MANAGER_WIDGET_ID=void 0;const n=e(85608),r=e(76003),o=e(41869),l=e(57925),p=e(50394),v=e(1149),m=e(97222),_=e(43718),s=e(82353),f=e(54414),a=e(57517),h=e(51553),u=e(63067),d=e(46507),E=e(97682),g=e(68415),c=e(96640),b=e(19413),y=e(61282),S=e(51081),A=e(59347),w=e(76154),T=e(79559),D=e(57232),I=e(72991),R=e(71863),M=e(7511),O=e(42911),P=e(72801),k=e(87817),F=e(4972),L=e(82983),B=e(73974),j=e(77633),W=e(51221),U=e(2281),X=e(31031),V=e(95608),$=e(38890),Y=e(77886),z=e(89060),H=e(74353),K=e(22169),Z=e(90058);t.INLINE_DIFF_MANAGER_WIDGET_ID="inline-diff-manager-widget";let Q=class{constructor(){this.registerFeature()}async initialize(){const{supportsChatAssistant:ne}=this.aiNativeConfigService.capabilities;ne&&(o.ComponentRegistryImpl.addLayoutModule(this.appConfig.layoutConfig,b.AI_CHAT_VIEW_ID,b.AI_CHAT_CONTAINER_ID),o.ComponentRegistryImpl.addLayoutModule(this.appConfig.layoutConfig,s.DESIGN_MENU_BAR_RIGHT,b.AI_CHAT_LOGO_AVATAR_ID),this.chatProxyService.registerDefaultAgent(),this.chatInternalService.init(),await this.chatManagerService.init())}registerEditorExtensionContribution(ne){const{supportsInlineChat:he,supportsInlineCompletion:_e,supportsProblemFix:q,supportsCodeAction:Oe}=this.aiNativeConfigService.capabilities;ne($.InlineDiffController.ID,new c.SyncDescriptor($.InlineDiffController,[this.injector]),E.EditorContributionInstantiation.Lazy),Oe&&ne(Z.SumiLightBulbWidget.ID,Z.SumiLightBulbWidget,E.EditorContributionInstantiation.Lazy),he&&(ne(W.InlineChatEditorController.ID,new c.SyncDescriptor(W.InlineChatEditorController,[this.injector]),E.EditorContributionInstantiation.BeforeFirstInteraction),this.inlineInputService.getInteractiveInputHandler()&&(ne(Y.InlineHintController.ID,new c.SyncDescriptor(Y.InlineHintController,[this.injector]),E.EditorContributionInstantiation.AfterFirstRender),ne(z.InlineInputController.ID,new c.SyncDescriptor(z.InlineInputController,[this.injector]),E.EditorContributionInstantiation.AfterFirstRender))),_e&&(ne(M.IntelligentCompletionsController.ID,new c.SyncDescriptor(M.IntelligentCompletionsController,[this.injector]),E.EditorContributionInstantiation.Eager),ne(I.InlineCompletionsController.ID,new c.SyncDescriptor(I.InlineCompletionsController,[this.injector]),E.EditorContributionInstantiation.AfterFirstRender)),q&&ne(O.ProblemFixController.ID,new c.SyncDescriptor(O.ProblemFixController,[this.injector]),E.EditorContributionInstantiation.AfterFirstRender)}onDidStart(){(0,_.runWhenIdle)(()=>{var ne;const{supportsRenameSuggestions:he,supportsInlineChat:_e,supportsMCP:q,supportsCustomLLMSettings:Oe}=this.aiNativeConfigService.capabilities,ye=this.preferenceService.getValid(o.AINativeSettingSectionsId.ChatVisibleType);if(ye==="always"?this.commandService.executeCommand(l.AI_CHAT_VISIBLE.id,!0):ye==="never"&&this.commandService.executeCommand(l.AI_CHAT_VISIBLE.id,!1),he&&this.renameSingleHandler.load(),_e&&this.codeActionSingleHandler.load(),q){const ie=this.preferenceService.getValid(o.AINativeSettingSectionsId.MCPServers),fe=ie?.find(Me=>Me.name===b.BUILTIN_MCP_SERVER_NAME);if(this.sumiMCPServerBackendProxy.initBuiltinMCPServer((ne=fe?.enabled)!==null&&ne!==void 0?ne:!0),ie&&ie.length>0){const Me=ie.filter(Le=>Le.name!==b.BUILTIN_MCP_SERVER_NAME);Me.length>0&&this.sumiMCPServerBackendProxy.initExternalMCPServers(Me)}}Oe&&this.preferenceService.onSpecificPreferenceChange(o.AINativeSettingSectionsId.LLMModelSelection,ie=>{const fe=this.getModelByName(ie.newValue),Me=fe?Object.keys(fe):[],Le=Me.length?Me[0]:"",Ce=this.preferenceSchemaProvider.getPreferenceProperty(o.AINativeSettingSectionsId.ModelID);this.preferenceSchemaProvider.setSchema({properties:{[o.AINativeSettingSectionsId.ModelID]:{...Ce,default:Le,defaultValue:Le,enum:Me.length?Me:void 0}}},!0),this.preferenceService.set(o.AINativeSettingSectionsId.ModelID,Le,ie.scope),this.preferenceSettings.setEnumLabels(o.AINativeSettingSectionsId.ModelID,Me.reduce((Ae,ve)=>({...Ae,[ve]:ve}),{}))})})}getModelByName(ne){switch(ne){case"deepseek":return b.deepSeekModels;case"anthropic":return b.anthropicModels;case"openai":return b.openAiNativeModels;default:return}}registerFeature(){this.contributions.getContributions().forEach(ne=>{var he,_e,q,Oe,ye,ie,fe,Me,Le;(he=ne.registerInlineChatFeature)===null||he===void 0||he.call(ne,this.inlineChatFeatureRegistry),(_e=ne.registerChatFeature)===null||_e===void 0||_e.call(ne,this.chatFeatureRegistry),(q=ne.registerResolveConflictFeature)===null||q===void 0||q.call(ne,this.resolveConflictRegistry),(Oe=ne.registerRenameProvider)===null||Oe===void 0||Oe.call(ne,this.renameCandidatesProviderRegistry),(ye=ne.registerChatRender)===null||ye===void 0||ye.call(ne,this.chatRenderRegistry),(ie=ne.registerTerminalProvider)===null||ie===void 0||ie.call(ne,this.terminalProviderRegistry),(fe=ne.registerIntelligentCompletionFeature)===null||fe===void 0||fe.call(ne,this.intelligentCompletionsRegistry),(Me=ne.registerProblemFixFeature)===null||Me===void 0||Me.call(ne,this.problemFixProviderRegistry),(Le=ne.registerChatAgentPromptProvider)===null||Le===void 0||Le.call(ne)}),this.mcpServerContributions.getContributions().forEach(ne=>{ne.registerMCPServer(this.mcpServerRegistry)})}registerSetting(ne){ne.registerSettingGroup({id:o.AI_NATIVE_SETTING_GROUP_ID,title:_.AI_NATIVE_SETTING_GROUP_TITLE,iconClass:(0,o.getIcon)("magic-wand")}),ne.registerSettingSection(o.AI_NATIVE_SETTING_GROUP_ID,{title:(0,o.localize)("preference.ai.native.chat.title"),preferences:[{id:o.AINativeSettingSectionsId.ChatVisibleType,localized:"preference.ai.native.chat.visible.type"}]}),ne.registerSettingSection(o.AI_NATIVE_SETTING_GROUP_ID,{title:(0,o.localize)("preference.ai.native.interface.quick.title"),preferences:[{id:o.AINativeSettingSectionsId.InterfaceQuickNavigationEnabled,localized:"preference.ai.native.interface.quick.navigation"}]}),this.aiNativeConfigService.capabilities.supportsInlineCompletion&&(ne.registerSettingSection(o.AI_NATIVE_SETTING_GROUP_ID,{title:(0,o.localize)("preference.ai.native.intelligentCompletions.title"),preferences:[{id:o.AINativeSettingSectionsId.IntelligentCompletionsCacheEnabled,localized:"preference.ai.native.intelligentCompletions.cache.enabled"},{id:o.AINativeSettingSectionsId.IntelligentCompletionsDebounceTime,localized:"preference.ai.native.intelligentCompletions.debounceTime"},{id:o.AINativeSettingSectionsId.IntelligentCompletionsPromptEngineeringEnabled,localized:"preference.ai.native.intelligentCompletions.promptEngineering.enabled"},{id:o.AINativeSettingSectionsId.IntelligentCompletionsAlwaysVisible,localized:"preference.ai.native.intelligentCompletions.alwaysVisible"}]}),ne.registerSettingSection(o.AI_NATIVE_SETTING_GROUP_ID,{title:(0,o.localize)("preference.ai.native.codeEdits.title"),preferences:[{id:o.AINativeSettingSectionsId.CodeEditsLintErrors,localized:"preference.ai.native.codeEdits.lintErrors"},{id:o.AINativeSettingSectionsId.CodeEditsLineChange,localized:"preference.ai.native.codeEdits.lineChange"},{id:o.AINativeSettingSectionsId.CodeEditsTyping,localized:"preference.ai.native.codeEdits.typing"},{id:o.AINativeSettingSectionsId.CodeEditsRenderType,localized:"preference.ai.native.codeEdits.renderType"},{id:o.AINativeSettingSectionsId.SystemPrompt,localized:"preference.ai.native.chat.system.prompt"}]})),this.aiNativeConfigService.capabilities.supportsCustomLLMSettings&&ne.registerSettingSection(o.AI_NATIVE_SETTING_GROUP_ID,{title:(0,o.localize)("preference.ai.native.llm.apiSettings.title"),preferences:[{id:o.AINativeSettingSectionsId.LLMModelSelection,localized:"preference.ai.native.llm.model.selection"},{id:o.AINativeSettingSectionsId.ModelID,localized:"preference.ai.native.llm.model.id"},{id:o.AINativeSettingSectionsId.DeepseekApiKey,localized:"preference.ai.native.deepseek.apiKey"},{id:o.AINativeSettingSectionsId.AnthropicApiKey,localized:"preference.ai.native.anthropic.apiKey"},{id:o.AINativeSettingSectionsId.OpenaiApiKey,localized:"preference.ai.native.openai.apiKey"},{id:o.AINativeSettingSectionsId.OpenaiBaseURL,localized:"preference.ai.native.openai.baseURL"}]}),this.aiNativeConfigService.capabilities.supportsMCP&&ne.registerSettingSection(o.AI_NATIVE_SETTING_GROUP_ID,{title:(0,o.localize)("preference.ai.native.mcp.settings.title"),preferences:[{id:o.AINativeSettingSectionsId.MCPServers,localized:"preference.ai.native.mcp.servers"}]}),this.aiNativeConfigService.capabilities.supportsInlineChat&&ne.registerSettingSection(o.AI_NATIVE_SETTING_GROUP_ID,{title:(0,o.localize)("preference.ai.native.inlineChat.title"),preferences:[{id:o.AINativeSettingSectionsId.InlineChatAutoVisible,localized:"preference.ai.native.inlineChat.auto.visible"},{id:o.AINativeSettingSectionsId.InlineChatCodeActionEnabled,localized:"preference.ai.native.inlineChat.codeAction.enabled"},{id:o.AINativeSettingSectionsId.InlineDiffPreviewMode,localized:"preference.ai.native.inlineDiff.preview.mode"}]})}registerEditorFeature(ne){ne.registerEditorFeatureContribution({contribute:he=>{const{monacoEditor:_e}=he;return this.codeActionSingleHandler.mountEditor(he.monacoEditor),_e.onDidScrollChange(()=>{this.ctxMenuRenderer.visible&&this.ctxMenuRenderer.hide(!0)})}})}registerEditorComponent(ne){ne.registerEditorSideWidget({id:t.INLINE_DIFF_MANAGER_WIDGET_ID,component:V.InlineDiffManager,displaysOnResource:he=>!!this.applyService.getUriPendingCodeBlock(he.uri)})}registerCommands(ne){ne.registerCommand(l.AI_INLINE_CHAT_VISIBLE,{execute:he=>{this.aiInlineChatService._onInlineChatVisible.fire(he)}}),ne.registerCommand(l.AI_INLINE_CHAT_INTERACTIVE_INPUT_VISIBLE,{execute:async he=>{var _e;if(!he){this.inlineInputService.hide();return}this.commandService.executeCommand(l.AI_INLINE_CHAT_VISIBLE.id,!1);const q=this.workbenchEditorService.currentCodeEditor;if(!q)return;const Oe=q.monacoEditor.getPosition();if(!Oe)return;const ye=q.monacoEditor.getSelection();if(Oe?((_e=q.monacoEditor.getModel())===null||_e===void 0?void 0:_e.getLineLength(Oe.lineNumber))===0:!1){this.inlineInputService.visibleByPosition(Oe);return}if(ye&&!ye.isEmpty()){this.inlineInputService.visibleBySelection(ye);return}this.inlineInputService.visibleByNearestCodeBlock(Oe,q.monacoEditor)}}),ne.registerCommand(l.AI_INLINE_CHAT_INTERACTIVE_INPUT_CANCEL,{execute:()=>{var he;const _e=this.workbenchEditorService.currentCodeEditor;_e&&((he=z.InlineInputController.get(_e.monacoEditor))===null||he===void 0||he.cancelToken())}}),ne.registerCommand(l.AI_INLINE_COMPLETION_REPORTER,{execute:(he,_e,q,Oe)=>{this.aiCompletionsService.report({sessionId:_e,accept:q,relationId:he,code:Oe})}}),ne.registerCommand(l.AI_CHAT_VISIBLE,{execute:he=>{this.layoutService.toggleSlot(b.AI_CHAT_VIEW_ID,(0,_.isUndefined)(he)?!0:he)}}),ne.registerCommand(l.AI_INLINE_COMPLETION_VISIBLE,{execute:async he=>{he||(this.aiCompletionsService.hideStatusBarItem(),this.aiInlineCompletionsProvider.setVisibleCompletion(!1),this.aiInlineCompletionsProvider.cancelRequest())}}),ne.registerCommand(l.AI_INLINE_DIFF_PARTIAL_EDIT,{execute:he=>{this.inlineStreamDiffService.launchAcceptDiscardPartialEdit(he)}}),ne.afterExecuteCommand(g.HideInlineCompletion.ID,()=>{this.commandService.executeCommand(l.AI_INLINE_COMPLETION_VISIBLE.id,!1)})}registerRenderer(ne){this.designLayoutConfig.supportExternalChatPanel?ne.registerSlotRenderer(b.AI_CHAT_VIEW_ID,F.AIChatTabRendererWithTab):ne.registerSlotRenderer(b.AI_CHAT_VIEW_ID,F.AIChatTabRenderer),this.designLayoutConfig.useMergeRightWithLeftPanel&&(ne.registerSlotRenderer(o.SlotLocation.left,F.AILeftTabRenderer),ne.registerSlotRenderer(o.SlotLocation.right,F.AIRightTabRenderer))}registerComponent(ne){ne.register(b.AI_CHAT_CONTAINER_ID,[],{component:w.AIChatView,title:(0,o.localize)("aiNative.chat.ai.assistant.name"),iconClass:(0,o.getIcon)("magic-wand"),containerId:b.AI_CHAT_CONTAINER_ID}),ne.register(b.AI_MENU_BAR_DEBUG_TOOLBAR,{id:b.AI_MENU_BAR_DEBUG_TOOLBAR,component:k.AIRunToolbar}),ne.register(b.AI_CHAT_LOGO_AVATAR_ID,{id:b.AI_CHAT_LOGO_AVATAR_ID,component:L.AIChatLogoAvatar})}registerKeybindings(ne){this.aiNativeConfigService.capabilities.supportsInlineChat&&(ne.registerKeybinding({command:l.AI_INLINE_CHAT_VISIBLE.id,keybinding:"ctrlcmd+i",when:"editorTextFocus",args:!0,priority:0},o.KeybindingScope.USER),ne.registerKeybinding({command:l.AI_INLINE_CHAT_VISIBLE.id,keybinding:"esc",args:!1,when:`editorFocus && ${p.InlineChatIsVisible.raw}`}),this.inlineInputService.getInteractiveInputHandler()&&(ne.registerKeybinding({command:l.AI_INLINE_CHAT_INTERACTIVE_INPUT_VISIBLE.id,keybinding:this.aiNativeConfigService.inlineChat.inputKeybinding,args:!0,priority:0,when:`editorFocus && (${p.InlineChatIsVisible.raw} || inlineSuggestionVisible)`},o.KeybindingScope.USER),ne.registerKeybinding({command:l.AI_INLINE_CHAT_INTERACTIVE_INPUT_VISIBLE.id,keybinding:"esc",args:!1,priority:0,when:`editorFocus && ${p.InlineInputWidgetIsVisible.raw}`}),ne.registerKeybinding({command:l.AI_INLINE_CHAT_INTERACTIVE_INPUT_CANCEL.id,keybinding:"esc",priority:1,when:`editorFocus && ${p.InlineInputWidgetIsStreaming.raw}`}),ne.registerKeybinding({command:l.AI_INLINE_CHAT_INTERACTIVE_INPUT_VISIBLE.id,keybinding:this.aiNativeConfigService.inlineChat.inputKeybinding,args:!0,priority:0,when:`editorFocus && ${p.InlineHintWidgetIsVisible.raw} && ${p.InlineChatIsVisible.not}`},o.KeybindingScope.USER))),ne.registerKeybinding({command:l.AI_INLINE_DIFF_PARTIAL_EDIT.id,keybinding:"ctrl+y",args:!0,priority:100,when:`editorTextFocus && ${p.InlineDiffPartialEditsIsVisible.raw}`}),ne.registerKeybinding({command:l.AI_INLINE_DIFF_PARTIAL_EDIT.id,keybinding:"ctrl+n",args:!1,priority:100,when:`editorTextFocus && ${p.InlineDiffPartialEditsIsVisible.raw}`})}};t.AINativeBrowserContribution=Q,n.__decorate([(0,r.Autowired)(o.AppConfig),n.__metadata("design:type",Object)],Q.prototype,"appConfig",void 0),n.__decorate([(0,r.Autowired)(r.INJECTOR_TOKEN),n.__metadata("design:type",r.Injector)],Q.prototype,"injector",void 0),n.__decorate([(0,r.Autowired)(m.IBrowserCtxMenu),n.__metadata("design:type",m.IBrowserCtxMenu)],Q.prototype,"ctxMenuRenderer",void 0),n.__decorate([(0,r.Autowired)(j.AINativeCoreContribution),n.__metadata("design:type",Object)],Q.prototype,"contributions",void 0),n.__decorate([(0,r.Autowired)(j.MCPServerContribution),n.__metadata("design:type",Object)],Q.prototype,"mcpServerContributions",void 0),n.__decorate([(0,r.Autowired)(j.TokenMCPServerRegistry),n.__metadata("design:type",Object)],Q.prototype,"mcpServerRegistry",void 0),n.__decorate([(0,r.Autowired)(_.InlineChatFeatureRegistryToken),n.__metadata("design:type",U.InlineChatFeatureRegistry)],Q.prototype,"inlineChatFeatureRegistry",void 0),n.__decorate([(0,r.Autowired)(_.ChatFeatureRegistryToken),n.__metadata("design:type",Object)],Q.prototype,"chatFeatureRegistry",void 0),n.__decorate([(0,r.Autowired)(_.ChatRenderRegistryToken),n.__metadata("design:type",Object)],Q.prototype,"chatRenderRegistry",void 0),n.__decorate([(0,r.Autowired)(_.ResolveConflictRegistryToken),n.__metadata("design:type",Object)],Q.prototype,"resolveConflictRegistry",void 0),n.__decorate([(0,r.Autowired)(_.RenameCandidatesProviderRegistryToken),n.__metadata("design:type",Object)],Q.prototype,"renameCandidatesProviderRegistry",void 0),n.__decorate([(0,r.Autowired)(_.TerminalRegistryToken),n.__metadata("design:type",Object)],Q.prototype,"terminalProviderRegistry",void 0),n.__decorate([(0,r.Autowired)(_.IntelligentCompletionsRegistryToken),n.__metadata("design:type",Object)],Q.prototype,"intelligentCompletionsRegistry",void 0),n.__decorate([(0,r.Autowired)(_.ProblemFixRegistryToken),n.__metadata("design:type",Object)],Q.prototype,"problemFixProviderRegistry",void 0),n.__decorate([(0,r.Autowired)(o.AINativeConfigService),n.__metadata("design:type",o.AINativeConfigService)],Q.prototype,"aiNativeConfigService",void 0),n.__decorate([(0,r.Autowired)(v.DesignLayoutConfig),n.__metadata("design:type",v.DesignLayoutConfig)],Q.prototype,"designLayoutConfig",void 0),n.__decorate([(0,r.Autowired)(R.AICompletionsService),n.__metadata("design:type",R.AICompletionsService)],Q.prototype,"aiCompletionsService",void 0),n.__decorate([(0,r.Autowired)(D.AIInlineCompletionsProvider),n.__metadata("design:type",D.AIInlineCompletionsProvider)],Q.prototype,"aiInlineCompletionsProvider",void 0),n.__decorate([(0,r.Autowired)(_.CommandService),n.__metadata("design:type",Object)],Q.prototype,"commandService",void 0),n.__decorate([(0,r.Autowired)(o.PreferenceSchemaProvider),n.__metadata("design:type",o.PreferenceSchemaProvider)],Q.prototype,"preferenceSchemaProvider",void 0),n.__decorate([(0,r.Autowired)(o.IPreferenceSettingsService),n.__metadata("design:type",Object)],Q.prototype,"preferenceSettings",void 0),n.__decorate([(0,r.Autowired)(o.PreferenceService),n.__metadata("design:type",Object)],Q.prototype,"preferenceService",void 0),n.__decorate([(0,r.Autowired)(u.IMainLayoutService),n.__metadata("design:type",Object)],Q.prototype,"layoutService",void 0),n.__decorate([(0,r.Autowired)(b.ChatProxyServiceToken),n.__metadata("design:type",S.ChatProxyService)],Q.prototype,"chatProxyService",void 0),n.__decorate([(0,r.Autowired)(o.IAIInlineChatService),n.__metadata("design:type",X.InlineChatService)],Q.prototype,"aiInlineChatService",void 0),n.__decorate([(0,r.Autowired)(H.InlineInputService),n.__metadata("design:type",H.InlineInputService)],Q.prototype,"inlineInputService",void 0),n.__decorate([(0,r.Autowired)(K.InlineStreamDiffService),n.__metadata("design:type",K.InlineStreamDiffService)],Q.prototype,"inlineStreamDiffService",void 0),n.__decorate([(0,r.Autowired)(P.RenameSingleHandler),n.__metadata("design:type",P.RenameSingleHandler)],Q.prototype,"renameSingleHandler",void 0),n.__decorate([(0,r.Autowired)(T.CodeActionSingleHandler),n.__metadata("design:type",T.CodeActionSingleHandler)],Q.prototype,"codeActionSingleHandler",void 0),n.__decorate([(0,r.Autowired)(b.SumiMCPServerProxyServicePath),n.__metadata("design:type",Object)],Q.prototype,"sumiMCPServerBackendProxy",void 0),n.__decorate([(0,r.Autowired)(f.WorkbenchEditorService),n.__metadata("design:type",h.WorkbenchEditorServiceImpl)],Q.prototype,"workbenchEditorService",void 0),n.__decorate([(0,r.Autowired)(b.IChatManagerService),n.__metadata("design:type",y.ChatManagerService)],Q.prototype,"chatManagerService",void 0),n.__decorate([(0,r.Autowired)(b.IChatInternalService),n.__metadata("design:type",A.ChatInternalService)],Q.prototype,"chatInternalService",void 0),n.__decorate([(0,r.Autowired)(B.BaseApplyService),n.__metadata("design:type",B.BaseApplyService)],Q.prototype,"applyService",void 0),t.AINativeBrowserContribution=Q=n.__decorate([(0,o.Domain)(o.ClientAppContribution,a.BrowserEditorContribution,o.CommandContribution,d.SettingContribution,o.KeybindingContribution,o.ComponentContribution,o.SlotRendererContribution,o.MonacoContribution),n.__metadata("design:paramtypes",[])],Q)},74055:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ChatAgentService=void 0;const n=e(85608),r=n.__importDefault(e(66652)),o=e(76003),l=e(43718),p=e(29770);let v=class extends l.Disposable{constructor(){super(),this.agents=new Map,this._onDidChangeAgents=new l.Emitter,this.onDidChangeAgents=this._onDidChangeAgents.event,this._onDidSendMessage=new l.Emitter,this.onDidSendMessage=this._onDidSendMessage.event,this.addDispose(this._onDidChangeAgents)}registerAgent(_){if(this.agents.has(_.id))throw new Error(`Already registered an agent with id ${_.id}`);return this.agents.set(_.id,{agent:_,commands:[]}),this._onDidChangeAgents.fire(),(0,l.toDisposable)(()=>{this.agents.delete(_.id)&&this._onDidChangeAgents.fire()})}async updateAgent(_,s){const f=this.agents.get(_);if(!f)throw new Error(`No agent with id ${_} registered`);f.agent.metadata={...f.agent.metadata,...s},f.commands=await f.agent.provideSlashCommands(l.CancellationToken.None),s.isDefault&&(this.defaultAgentId=_);const a=await f.agent.provideChatWelcomeMessage(l.CancellationToken.None);if(a){const{content:h,sampleQuestions:u}=a;this.chatFeatureRegistry.registerWelcome(h,u)}this._onDidChangeAgents.fire()}getAgents(){return Array.from(this.agents.values(),_=>_.agent)}hasAgent(_){return this.agents.has(_)}getDefaultAgentId(){return this.defaultAgentId}getAgent(_){const s=this.agents.get(_);return s?.agent}async invokeAgent(_,s,f,a,h){const u=this.agents.get(_);if(!u)throw new Error(`No agent with id ${_}`);return u.agent.metadata.systemPrompt&&a.unshift({role:0,content:u.agent.metadata.systemPrompt}),await u.agent.invoke(s,f,a,h)}populateChatInput(_,s){this.aiChatService.sendMessage({...s,agentId:_,immediate:!1})}getCommands(){return(0,r.default)(Array.from(this.agents.values(),({agent:_,commands:s})=>s.map(f=>({...f,agentId:_.id}))))}async getFollowups(_,s,f){const a=this.agents.get(_);if(!a)throw new Error(`No agent with id ${_}`);return a.agent.provideFollowups?a.agent.provideFollowups(s,f):[]}async getSampleQuestions(_,s){const f=this.agents.get(_);if(!f)throw new Error(`No agent with id ${_}`);return f.agent.provideSampleQuestions?f.agent.provideSampleQuestions(s):[]}async getAllSampleQuestions(){const _=await Promise.all(Array.from(this.agents.values()).map(async({agent:s})=>{try{return await this.getSampleQuestions(s.id,l.CancellationToken.None)}catch(f){return this.logger.error(f),[]}}));return(0,r.default)(_)}sendMessage(_){this._onDidSendMessage.fire(_)}parseMessage(_,s){var f;const a={agentId:"",command:"",message:_};let h=s;const u=this.getAgents(),d=new RegExp(`^@(${u.map(g=>g.id).join("|")})(?:\\s+|$)`,"i"),E=a.message.match(d);if(E){const g=u.find(c=>c.id.toLowerCase()===E[1].toLowerCase());if(!g)return a;h=g.id,a.agentId=h,a.message=a.message.replace(E[0],"")}if(h){const g=(f=this.agents.get(h))===null||f===void 0?void 0:f.commands;if(g?.length){const c=new RegExp(`^/\\s?(${g.map(y=>y.name).join("|")})(?:\\s+|$)`,"i"),b=a.message.match(c);if(b){const y=g.find(S=>S.name.toLowerCase()===b[1].toLowerCase());if(!y)return a;a.command=y.name,a.message=a.message.replace(b[0],"")}}}return a}};t.ChatAgentService=v,n.__decorate([(0,o.Autowired)(l.ILogger),n.__metadata("design:type",Object)],v.prototype,"logger",void 0),n.__decorate([(0,o.Autowired)(l.ChatServiceToken),n.__metadata("design:type",p.ChatService)],v.prototype,"aiChatService",void 0),n.__decorate([(0,o.Autowired)(l.ChatFeatureRegistryToken),n.__metadata("design:type",Object)],v.prototype,"chatFeatureRegistry",void 0),t.ChatAgentService=v=n.__decorate([(0,o.Injectable)(),n.__metadata("design:paramtypes",[])],v)},84543:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ChatAgentViewService=void 0;const n=e(85608),r=e(76003),o=e(43718),l=e(19413),p=e(51081);let v=class{constructor(){this.componentsMap=new Map,this.componentsDeferredMap=new Map}registerChatComponent(_){return this.componentsMap.set(_.id,_),this.componentsDeferredMap.has(_.id)&&(this.componentsDeferredMap.get(_.id).resolve(_),this.componentsDeferredMap.delete(_.id)),{dispose:()=>{this.componentsMap.get(_.id)===_&&(this.componentsMap.delete(_.id),this.componentsDeferredMap.delete(_.id))}}}getChatComponent(_){return this.componentsMap.has(_)?this.componentsMap.get(_):(this.componentsDeferredMap.has(_)||this.componentsDeferredMap.set(_,new o.Deferred),null)}getChatComponentDeferred(_){return this.componentsDeferredMap.get(_)||null}getRenderAgents(){return this.chatAgentService.getAgents().filter(_=>_.id!==p.ChatProxyService.AGENT_ID)}};t.ChatAgentViewService=v,n.__decorate([(0,r.Autowired)(l.IChatAgentService),n.__metadata("design:type",Object)],v.prototype,"chatAgentService",void 0),t.ChatAgentViewService=v=n.__decorate([(0,r.Injectable)()],v)},61282:(x,t,e)=>{"use strict";var n,r;Object.defineProperty(t,"__esModule",{value:!0}),t.ChatManagerService=void 0;const o=e(85608),l=e(76003),p=e(43718),v=e(19413),m=e(44260),_=e(42033);let s=class extends p.Disposable{fromJSON(a){return a.map(h=>{const u=new _.ChatModel({sessionId:h.sessionId,history:new m.MsgHistoryManager(h.history)}),d=h.requests.map(E=>new _.ChatRequestModel(E.requestId,u,E.message,new _.ChatResponseModel(E.requestId,u,E.message.agentId,{responseContents:E.response.responseContents,isComplete:!0,responseText:E.response.responseText,errorDetails:E.response.errorDetails,followups:E.response.followups,isCanceled:E.response.isCanceled})));return u.restoreRequests(d),u})}constructor(){super(),n.set(this,this.registerDispose(new p.DisposableMap)),r.set(this,this.registerDispose(new p.DisposableMap)),this.storageInitEmitter=new p.Emitter,this.onStorageInit=this.storageInitEmitter.event}async init(){this._chatStorage=await this.storageProvider(p.STORAGE_NAMESPACE.CHAT);const a=this._chatStorage.get("sessionModels",[]);this.fromJSON(a).forEach(u=>{o.__classPrivateFieldGet(this,n,"f").set(u.sessionId,u),this.listenSession(u)}),await this.storageInitEmitter.fireAndAwait()}getSessions(){return Array.from(o.__classPrivateFieldGet(this,n,"f").values())}startSession(){const a=new _.ChatModel;return o.__classPrivateFieldGet(this,n,"f").set(a.sessionId,a),this.listenSession(a),a}getSession(a){return o.__classPrivateFieldGet(this,n,"f").get(a)}clearSession(a){var h;if(!o.__classPrivateFieldGet(this,n,"f").get(a))throw new Error(`Unknown session: ${a}`);o.__classPrivateFieldGet(this,n,"f").disposeKey(a),(h=o.__classPrivateFieldGet(this,r,"f").get(a))===null||h===void 0||h.cancel(),o.__classPrivateFieldGet(this,r,"f").disposeKey(a),this.saveSessions()}createRequest(a,h,u,d){const E=this.getSession(a);if(!E)throw new Error(`Unknown session: ${a}`);if(!o.__classPrivateFieldGet(this,r,"f").has(a))return E.addRequest({prompt:h,agentId:u,command:d})}async sendRequest(a,h,u){const d=this.getSession(a);if(!d)throw new Error(`Unknown session: ${a}`);const E=new p.CancellationTokenSource,g=E.token;o.__classPrivateFieldGet(this,r,"f").set(d.sessionId,E);const c=g.onCancellationRequested(()=>{h.response.cancel()}),b=[];for(const y of d.requests)y.response.isComplete&&(b.push({role:1,content:y.message.prompt}),b.push({role:2,content:y.response.responseText}));try{const y=w=>{g.isCancellationRequested||d.acceptResponseProgress(h,w)},S={sessionId:a,requestId:h.requestId,message:h.message.prompt,command:h.message.command,regenerate:u},A=await this.chatAgentService.invokeAgent(h.message.agentId,S,y,b,g);g.isCancellationRequested||(A.errorDetails&&h.response.setErrorDetails(A.errorDetails),this.chatAgentService.getFollowups(h.message.agentId,a,p.CancellationToken.None).then(T=>{h.response.setFollowups(T),h.response.complete()}))}finally{c.dispose(),o.__classPrivateFieldGet(this,r,"f").disposeKey(d.sessionId),this.saveSessions()}}listenSession(a){this.addDispose(a.history.onMessageAdditionalChange(()=>{this.saveSessions()}))}saveSessions(){this._chatStorage.set("sessionModels",this.getSessions())}cancelRequest(a){var h;(h=o.__classPrivateFieldGet(this,r,"f").get(a))===null||h===void 0||h.cancel(),o.__classPrivateFieldGet(this,r,"f").disposeKey(a),this.saveSessions()}};t.ChatManagerService=s,n=new WeakMap,r=new WeakMap,o.__decorate([(0,l.Autowired)(l.INJECTOR_TOKEN),o.__metadata("design:type",l.Injector)],s.prototype,"injector",void 0),o.__decorate([(0,l.Autowired)(v.IChatAgentService),o.__metadata("design:type",Object)],s.prototype,"chatAgentService",void 0),o.__decorate([(0,l.Autowired)(p.StorageProvider),o.__metadata("design:type",Function)],s.prototype,"storageProvider",void 0),o.__decorate([(0,p.debounce)(1e3),o.__metadata("design:type",Function),o.__metadata("design:paramtypes",[]),o.__metadata("design:returntype",void 0)],s.prototype,"saveSessions",null),t.ChatManagerService=s=o.__decorate([(0,l.Injectable)(),o.__metadata("design:paramtypes",[])],s)},42033:(x,t,e)=>{"use strict";var n,r,o,l,p,v,m,_,s,f,a,h,u,d,E;Object.defineProperty(t,"__esModule",{value:!0}),t.ChatSlashCommandItemModel=t.ChatWelcomeMessageModel=t.ChatModel=t.ChatRequestModel=t.ChatResponseModel=void 0;const g=e(85608),c=e(76003),b=e(43718),y=e(90684),S=e(19413),A=e(44260);class w extends b.Disposable{get responseParts(){return g.__classPrivateFieldGet(this,r,"f")}get responseContents(){return g.__classPrivateFieldGet(this,o,"f")}get isComplete(){return g.__classPrivateFieldGet(this,l,"f")}get isCanceled(){return g.__classPrivateFieldGet(this,p,"f")}get requestId(){return g.__classPrivateFieldGet(this,v,"f")}get responseText(){return g.__classPrivateFieldGet(this,m,"f")}get errorDetails(){return g.__classPrivateFieldGet(this,_,"f")}get followups(){return g.__classPrivateFieldGet(this,s,"f")}get onDidChange(){return g.__classPrivateFieldGet(this,f,"f").event}constructor(O,P,k,F){super(),n.add(this),this.session=P,this.agentId=k,r.set(this,[]),o.set(this,[]),l.set(this,!1),p.set(this,!1),v.set(this,void 0),m.set(this,""),_.set(this,void 0),s.set(this,void 0),f.set(this,this.registerDispose(new b.Emitter)),g.__classPrivateFieldSet(this,v,O,"f"),F&&(g.__classPrivateFieldSet(this,o,F.responseContents,"f"),g.__classPrivateFieldSet(this,m,F.responseText,"f"),g.__classPrivateFieldSet(this,l,F.isComplete,"f"),g.__classPrivateFieldSet(this,p,F.isCanceled,"f"),g.__classPrivateFieldSet(this,_,F.errorDetails,"f"),g.__classPrivateFieldSet(this,s,F.followups,"f"))}updateContent(O,P){var k;const F=g.__classPrivateFieldGet(this,r,"f").length-1;if(O.kind==="content"||O.kind==="markdownContent"){const L=g.__classPrivateFieldGet(this,r,"f")[F];!L||L.kind!=="markdownContent"?O.kind==="content"?g.__classPrivateFieldGet(this,r,"f").push({content:new y.MarkdownString(O.content),kind:"markdownContent"}):g.__classPrivateFieldGet(this,r,"f").push(O):O.kind==="markdownContent"?g.__classPrivateFieldGet(this,r,"f")[F]={content:new y.MarkdownString(L.content.value+O.content.value),kind:"markdownContent"}:g.__classPrivateFieldGet(this,r,"f")[F]={content:new y.MarkdownString(L.content.value+O.content,L.content),kind:"markdownContent"},g.__classPrivateFieldGet(this,n,"m",a).call(this)}else if(O.kind==="asyncContent"){const L=g.__classPrivateFieldGet(this,r,"f").push(O)-1;g.__classPrivateFieldGet(this,n,"m",a).call(this),(k=O.resolvedContent)===null||k===void 0||k.then(B=>{typeof B=="string"?g.__classPrivateFieldGet(this,r,"f")[L]={content:new y.MarkdownString(B),kind:"markdownContent"}:(0,y.isMarkdownString)(B)?g.__classPrivateFieldGet(this,r,"f")[L]={content:B,kind:"markdownContent"}:g.__classPrivateFieldGet(this,r,"f")[L]=B,g.__classPrivateFieldGet(this,n,"m",a).call(this,P)})}else if(O.kind==="treeData"||O.kind==="component")g.__classPrivateFieldGet(this,r,"f").push(O),g.__classPrivateFieldGet(this,n,"m",a).call(this,P);else if(O.kind==="toolCall"){const L=g.__classPrivateFieldGet(this,r,"f").find(B=>B.kind==="toolCall"&&B.content.id===O.content.id);L?L.content=O.content:g.__classPrivateFieldGet(this,r,"f").push(O),g.__classPrivateFieldGet(this,n,"m",a).call(this,P)}}complete(){g.__classPrivateFieldSet(this,l,!0,"f"),g.__classPrivateFieldGet(this,f,"f").fire()}cancel(){g.__classPrivateFieldSet(this,l,!0,"f"),g.__classPrivateFieldSet(this,p,!0,"f"),g.__classPrivateFieldGet(this,f,"f").fire()}reset(){g.__classPrivateFieldSet(this,o,[],"f"),g.__classPrivateFieldSet(this,r,[],"f"),g.__classPrivateFieldSet(this,m,"","f"),g.__classPrivateFieldSet(this,p,!1,"f"),g.__classPrivateFieldSet(this,l,!1,"f"),g.__classPrivateFieldSet(this,_,void 0,"f"),g.__classPrivateFieldSet(this,s,void 0,"f"),g.__classPrivateFieldGet(this,f,"f").fire()}setErrorDetails(O){g.__classPrivateFieldSet(this,_,O,"f"),g.__classPrivateFieldGet(this,f,"f").fire()}setFollowups(O){g.__classPrivateFieldSet(this,s,O,"f"),g.__classPrivateFieldGet(this,f,"f").fire()}toJSON(){return{isCanceled:this.isCanceled,responseContents:this.responseContents,responseText:this.responseText,errorDetails:this.errorDetails,followups:this.followups}}}t.ChatResponseModel=w,r=new WeakMap,o=new WeakMap,l=new WeakMap,p=new WeakMap,v=new WeakMap,m=new WeakMap,_=new WeakMap,s=new WeakMap,f=new WeakMap,n=new WeakSet,a=function(O){g.__classPrivateFieldSet(this,m,g.__classPrivateFieldGet(this,r,"f").map(k=>k.kind==="asyncContent"?k.content:k.kind==="treeData"||k.kind==="component"?"":k.kind==="toolCall"?k.content.function.name:k.content.value).join(`
|
|
29999
|
+
${JSON.stringify(r,null,2)}`);const l=n[o]();return new Language(INTERNAL,l)})}}class LookaheadIterable{constructor(t,e,n){assertInternal(t),this[0]=e,this.language=n}get currentTypeId(){return C._ts_lookahead_iterator_current_symbol(this[0])}get currentType(){return this.language.types[this.currentTypeId]||"ERROR"}delete(){C._ts_lookahead_iterator_delete(this[0]),this[0]=0}resetState(t){return C._ts_lookahead_iterator_reset_state(this[0],t)}reset(t,e){return!!C._ts_lookahead_iterator_reset(this[0],t[0],e)&&(this.language=t,!0)}[Symbol.iterator](){const t=this;return{next:()=>C._ts_lookahead_iterator_next(t[0])?{done:!1,value:t.currentType}:{done:!0,value:""}}}}class Query{constructor(t,e,n,r,o,l,p,v){assertInternal(t),this[0]=e,this.captureNames=n,this.textPredicates=r,this.predicates=o,this.setProperties=l,this.assertedProperties=p,this.refutedProperties=v,this.exceededMatchLimit=!1}delete(){C._ts_query_delete(this[0]),this[0]=0}matches(t,{startPosition:e=ZERO_POINT,endPosition:n=ZERO_POINT,startIndex:r=0,endIndex:o=0,matchLimit:l=4294967295,maxStartDepth:p=4294967295}={}){if(typeof l!="number")throw new Error("Arguments must be numbers");marshalNode(t),C._ts_query_matches_wasm(this[0],t.tree[0],e.row,e.column,n.row,n.column,r,o,l,p);const v=getValue(TRANSFER_BUFFER,"i32"),m=getValue(TRANSFER_BUFFER+SIZE_OF_INT,"i32"),_=getValue(TRANSFER_BUFFER+2*SIZE_OF_INT,"i32"),s=new Array(v);this.exceededMatchLimit=!!_;let f=0,a=m;for(let h=0;h<v;h++){const u=getValue(a,"i32");a+=SIZE_OF_INT;const d=getValue(a,"i32");a+=SIZE_OF_INT;const E=new Array(d);if(a=unmarshalCaptures(this,t.tree,a,E),this.textPredicates[u].every(g=>g(E))){s[f]={pattern:u,captures:E};const g=this.setProperties[u];g&&(s[f].setProperties=g);const c=this.assertedProperties[u];c&&(s[f].assertedProperties=c);const b=this.refutedProperties[u];b&&(s[f].refutedProperties=b),f++}}return s.length=f,C._free(m),s}captures(t,{startPosition:e=ZERO_POINT,endPosition:n=ZERO_POINT,startIndex:r=0,endIndex:o=0,matchLimit:l=4294967295,maxStartDepth:p=4294967295}={}){if(typeof l!="number")throw new Error("Arguments must be numbers");marshalNode(t),C._ts_query_captures_wasm(this[0],t.tree[0],e.row,e.column,n.row,n.column,r,o,l,p);const v=getValue(TRANSFER_BUFFER,"i32"),m=getValue(TRANSFER_BUFFER+SIZE_OF_INT,"i32"),_=getValue(TRANSFER_BUFFER+2*SIZE_OF_INT,"i32"),s=[];this.exceededMatchLimit=!!_;const f=[];let a=m;for(let h=0;h<v;h++){const u=getValue(a,"i32");a+=SIZE_OF_INT;const d=getValue(a,"i32");a+=SIZE_OF_INT;const E=getValue(a,"i32");if(a+=SIZE_OF_INT,f.length=d,a=unmarshalCaptures(this,t.tree,a,f),this.textPredicates[u].every(g=>g(f))){const g=f[E],c=this.setProperties[u];c&&(g.setProperties=c);const b=this.assertedProperties[u];b&&(g.assertedProperties=b);const y=this.refutedProperties[u];y&&(g.refutedProperties=y),s.push(g)}}return C._free(m),s}predicatesForPattern(t){return this.predicates[t]}disableCapture(t){const e=lengthBytesUTF8(t),n=C._malloc(e+1);stringToUTF8(t,n,e+1),C._ts_query_disable_capture(this[0],n,e),C._free(n)}didExceedMatchLimit(){return this.exceededMatchLimit}}function getText(x,t,e){const n=e-t;let r=x.textCallback(t,null,e);for(t+=r.length;t<e;){const o=x.textCallback(t,null,e);if(!(o&&o.length>0))break;t+=o.length,r+=o}return t>e&&(r=r.slice(0,n)),r}function unmarshalCaptures(x,t,e,n){for(let r=0,o=n.length;r<o;r++){const l=getValue(e,"i32"),p=unmarshalNode(t,e+=SIZE_OF_INT);e+=SIZE_OF_NODE,n[r]={name:x.captureNames[l],node:p}}return e}function assertInternal(x){if(x!==INTERNAL)throw new Error("Illegal constructor")}function isPoint(x){return x&&typeof x.row=="number"&&typeof x.column=="number"}function marshalNode(x){let t=TRANSFER_BUFFER;setValue(t,x.id,"i32"),t+=SIZE_OF_INT,setValue(t,x.startIndex,"i32"),t+=SIZE_OF_INT,setValue(t,x.startPosition.row,"i32"),t+=SIZE_OF_INT,setValue(t,x.startPosition.column,"i32"),t+=SIZE_OF_INT,setValue(t,x[0],"i32")}function unmarshalNode(x,t=TRANSFER_BUFFER){const e=getValue(t,"i32");if(e===0)return null;const n=getValue(t+=SIZE_OF_INT,"i32"),r=getValue(t+=SIZE_OF_INT,"i32"),o=getValue(t+=SIZE_OF_INT,"i32"),l=getValue(t+=SIZE_OF_INT,"i32"),p=new Node(INTERNAL,x);return p.id=e,p.startIndex=n,p.startPosition={row:r,column:o},p[0]=l,p}function marshalTreeCursor(x,t=TRANSFER_BUFFER){setValue(t+0*SIZE_OF_INT,x[0],"i32"),setValue(t+1*SIZE_OF_INT,x[1],"i32"),setValue(t+2*SIZE_OF_INT,x[2],"i32"),setValue(t+3*SIZE_OF_INT,x[3],"i32")}function unmarshalTreeCursor(x){x[0]=getValue(TRANSFER_BUFFER+0*SIZE_OF_INT,"i32"),x[1]=getValue(TRANSFER_BUFFER+1*SIZE_OF_INT,"i32"),x[2]=getValue(TRANSFER_BUFFER+2*SIZE_OF_INT,"i32"),x[3]=getValue(TRANSFER_BUFFER+3*SIZE_OF_INT,"i32")}function marshalPoint(x,t){setValue(x,t.row,"i32"),setValue(x+SIZE_OF_INT,t.column,"i32")}function unmarshalPoint(x){return{row:getValue(x,"i32")>>>0,column:getValue(x+SIZE_OF_INT,"i32")>>>0}}function marshalRange(x,t){marshalPoint(x,t.startPosition),marshalPoint(x+=SIZE_OF_POINT,t.endPosition),setValue(x+=SIZE_OF_POINT,t.startIndex,"i32"),setValue(x+=SIZE_OF_INT,t.endIndex,"i32"),x+=SIZE_OF_INT}function unmarshalRange(x){const t={};return t.startPosition=unmarshalPoint(x),x+=SIZE_OF_POINT,t.endPosition=unmarshalPoint(x),x+=SIZE_OF_POINT,t.startIndex=getValue(x,"i32")>>>0,x+=SIZE_OF_INT,t.endIndex=getValue(x,"i32")>>>0,t}function marshalEdit(x){let t=TRANSFER_BUFFER;marshalPoint(t,x.startPosition),t+=SIZE_OF_POINT,marshalPoint(t,x.oldEndPosition),t+=SIZE_OF_POINT,marshalPoint(t,x.newEndPosition),t+=SIZE_OF_POINT,setValue(t,x.startIndex,"i32"),t+=SIZE_OF_INT,setValue(t,x.oldEndIndex,"i32"),t+=SIZE_OF_INT,setValue(t,x.newEndIndex,"i32"),t+=SIZE_OF_INT}for(const x of Object.getOwnPropertyNames(ParserImpl.prototype))Object.defineProperty(Parser.prototype,x,{value:ParserImpl.prototype[x],enumerable:!1,writable:!1});Parser.Language=Language,Module.onRuntimeInitialized=()=>{ParserImpl.init(),resolveInitPromise()}}))}}return Parser}();module.exports=TreeSitter},52730:(x,t,e)=>{"use strict";var n=e(80705),r=e(14834),o=e(28498),l=e(79818),p=e(69336),v=l("Object.prototype.toString"),m=e(51913)(),_=typeof globalThis>"u"?e.g:globalThis,s=r(),f=l("String.prototype.slice"),a=Object.getPrototypeOf,h=l("Array.prototype.indexOf",!0)||function(c,b){for(var y=0;y<c.length;y+=1)if(c[y]===b)return y;return-1},u={__proto__:null};m&&p&&a?n(s,function(g){var c=new _[g];if(Symbol.toStringTag in c){var b=a(c),y=p(b,Symbol.toStringTag);if(!y){var S=a(b);y=p(S,Symbol.toStringTag)}u["$"+g]=o(y.get)}}):n(s,function(g){var c=new _[g],b=c.slice||c.set;b&&(u["$"+g]=o(b))});var d=function(c){var b=!1;return n(u,function(y,S){if(!b)try{"$"+y(c)===S&&(b=f(S,1))}catch{}}),b},E=function(c){var b=!1;return n(u,function(y,S){if(!b)try{y(c),b=f(S,1)}catch{}}),b};x.exports=function(c){if(!c||typeof c!="object")return!1;if(!m){var b=f(v(c),8,-1);return h(s,b)>-1?b:b!=="Object"?!1:E(c)}return p?d(c):null}},97442:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ZodError=t.quotelessJson=t.ZodIssueCode=void 0;const n=e(94705);t.ZodIssueCode=n.util.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);const r=l=>JSON.stringify(l,null,2).replace(/"([^"]+)":/g,"$1:");t.quotelessJson=r;class o extends Error{get errors(){return this.issues}constructor(p){super(),this.issues=[],this.addIssue=m=>{this.issues=[...this.issues,m]},this.addIssues=(m=[])=>{this.issues=[...this.issues,...m]};const v=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,v):this.__proto__=v,this.name="ZodError",this.issues=p}format(p){const v=p||function(s){return s.message},m={_errors:[]},_=s=>{for(const f of s.issues)if(f.code==="invalid_union")f.unionErrors.map(_);else if(f.code==="invalid_return_type")_(f.returnTypeError);else if(f.code==="invalid_arguments")_(f.argumentsError);else if(f.path.length===0)m._errors.push(v(f));else{let a=m,h=0;for(;h<f.path.length;){const u=f.path[h];h===f.path.length-1?(a[u]=a[u]||{_errors:[]},a[u]._errors.push(v(f))):a[u]=a[u]||{_errors:[]},a=a[u],h++}}};return _(this),m}static assert(p){if(!(p instanceof o))throw new Error(`Not a ZodError: ${p}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,n.util.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(p=v=>v.message){const v={},m=[];for(const _ of this.issues)_.path.length>0?(v[_.path[0]]=v[_.path[0]]||[],v[_.path[0]].push(p(_))):m.push(p(_));return{formErrors:m,fieldErrors:v}}get formErrors(){return this.flatten()}}t.ZodError=o,o.create=l=>new o(l)},30548:function(x,t,e){"use strict";var n=this&&this.__importDefault||function(v){return v&&v.__esModule?v:{default:v}};Object.defineProperty(t,"__esModule",{value:!0}),t.getErrorMap=t.setErrorMap=t.defaultErrorMap=void 0;const r=n(e(28412));t.defaultErrorMap=r.default;let o=r.default;function l(v){o=v}t.setErrorMap=l;function p(){return o}t.getErrorMap=p},86340:function(x,t,e){"use strict";var n=this&&this.__createBinding||(Object.create?function(o,l,p,v){v===void 0&&(v=p);var m=Object.getOwnPropertyDescriptor(l,p);(!m||("get"in m?!l.__esModule:m.writable||m.configurable))&&(m={enumerable:!0,get:function(){return l[p]}}),Object.defineProperty(o,v,m)}:function(o,l,p,v){v===void 0&&(v=p),o[v]=l[p]}),r=this&&this.__exportStar||function(o,l){for(var p in o)p!=="default"&&!Object.prototype.hasOwnProperty.call(l,p)&&n(l,o,p)};Object.defineProperty(t,"__esModule",{value:!0}),r(e(30548),t),r(e(66258),t),r(e(29201),t),r(e(94705),t),r(e(75226),t),r(e(97442),t)},15759:(x,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.errorUtil=void 0;var e;(function(n){n.errToObj=r=>typeof r=="string"?{message:r}:r||{},n.toString=r=>typeof r=="string"?r:r?.message})(e||(t.errorUtil=e={}))},66258:function(x,t,e){"use strict";var n=this&&this.__importDefault||function(u){return u&&u.__esModule?u:{default:u}};Object.defineProperty(t,"__esModule",{value:!0}),t.isAsync=t.isValid=t.isDirty=t.isAborted=t.OK=t.DIRTY=t.INVALID=t.ParseStatus=t.addIssueToContext=t.EMPTY_PATH=t.makeIssue=void 0;const r=e(30548),o=n(e(28412)),l=u=>{const{data:d,path:E,errorMaps:g,issueData:c}=u,b=[...E,...c.path||[]],y={...c,path:b};if(c.message!==void 0)return{...c,path:b,message:c.message};let S="";const A=g.filter(w=>!!w).slice().reverse();for(const w of A)S=w(y,{data:d,defaultError:S}).message;return{...c,path:b,message:S}};t.makeIssue=l,t.EMPTY_PATH=[];function p(u,d){const E=(0,r.getErrorMap)(),g=(0,t.makeIssue)({issueData:d,data:u.data,path:u.path,errorMaps:[u.common.contextualErrorMap,u.schemaErrorMap,E,E===o.default?void 0:o.default].filter(c=>!!c)});u.common.issues.push(g)}t.addIssueToContext=p;class v{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(d,E){const g=[];for(const c of E){if(c.status==="aborted")return t.INVALID;c.status==="dirty"&&d.dirty(),g.push(c.value)}return{status:d.value,value:g}}static async mergeObjectAsync(d,E){const g=[];for(const c of E){const b=await c.key,y=await c.value;g.push({key:b,value:y})}return v.mergeObjectSync(d,g)}static mergeObjectSync(d,E){const g={};for(const c of E){const{key:b,value:y}=c;if(b.status==="aborted"||y.status==="aborted")return t.INVALID;b.status==="dirty"&&d.dirty(),y.status==="dirty"&&d.dirty(),b.value!=="__proto__"&&(typeof y.value<"u"||c.alwaysSet)&&(g[b.value]=y.value)}return{status:d.value,value:g}}}t.ParseStatus=v,t.INVALID=Object.freeze({status:"aborted"});const m=u=>({status:"dirty",value:u});t.DIRTY=m;const _=u=>({status:"valid",value:u});t.OK=_;const s=u=>u.status==="aborted";t.isAborted=s;const f=u=>u.status==="dirty";t.isDirty=f;const a=u=>u.status==="valid";t.isValid=a;const h=u=>typeof Promise<"u"&&u instanceof Promise;t.isAsync=h},29201:(x,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},94705:(x,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getParsedType=t.ZodParsedType=t.objectUtil=t.util=void 0;var e;(function(o){o.assertEqual=m=>m;function l(m){}o.assertIs=l;function p(m){throw new Error}o.assertNever=p,o.arrayToEnum=m=>{const _={};for(const s of m)_[s]=s;return _},o.getValidEnumValues=m=>{const _=o.objectKeys(m).filter(f=>typeof m[m[f]]!="number"),s={};for(const f of _)s[f]=m[f];return o.objectValues(s)},o.objectValues=m=>o.objectKeys(m).map(function(_){return m[_]}),o.objectKeys=typeof Object.keys=="function"?m=>Object.keys(m):m=>{const _=[];for(const s in m)Object.prototype.hasOwnProperty.call(m,s)&&_.push(s);return _},o.find=(m,_)=>{for(const s of m)if(_(s))return s},o.isInteger=typeof Number.isInteger=="function"?m=>Number.isInteger(m):m=>typeof m=="number"&&isFinite(m)&&Math.floor(m)===m;function v(m,_=" | "){return m.map(s=>typeof s=="string"?`'${s}'`:s).join(_)}o.joinValues=v,o.jsonStringifyReplacer=(m,_)=>typeof _=="bigint"?_.toString():_})(e||(t.util=e={}));var n;(function(o){o.mergeShapes=(l,p)=>({...l,...p})})(n||(t.objectUtil=n={})),t.ZodParsedType=e.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]);const r=o=>{switch(typeof o){case"undefined":return t.ZodParsedType.undefined;case"string":return t.ZodParsedType.string;case"number":return isNaN(o)?t.ZodParsedType.nan:t.ZodParsedType.number;case"boolean":return t.ZodParsedType.boolean;case"function":return t.ZodParsedType.function;case"bigint":return t.ZodParsedType.bigint;case"symbol":return t.ZodParsedType.symbol;case"object":return Array.isArray(o)?t.ZodParsedType.array:o===null?t.ZodParsedType.null:o.then&&typeof o.then=="function"&&o.catch&&typeof o.catch=="function"?t.ZodParsedType.promise:typeof Map<"u"&&o instanceof Map?t.ZodParsedType.map:typeof Set<"u"&&o instanceof Set?t.ZodParsedType.set:typeof Date<"u"&&o instanceof Date?t.ZodParsedType.date:t.ZodParsedType.object;default:return t.ZodParsedType.unknown}};t.getParsedType=r},75995:function(x,t,e){"use strict";var n=this&&this.__createBinding||(Object.create?function(v,m,_,s){s===void 0&&(s=_);var f=Object.getOwnPropertyDescriptor(m,_);(!f||("get"in f?!m.__esModule:f.writable||f.configurable))&&(f={enumerable:!0,get:function(){return m[_]}}),Object.defineProperty(v,s,f)}:function(v,m,_,s){s===void 0&&(s=_),v[s]=m[_]}),r=this&&this.__setModuleDefault||(Object.create?function(v,m){Object.defineProperty(v,"default",{enumerable:!0,value:m})}:function(v,m){v.default=m}),o=this&&this.__importStar||function(v){if(v&&v.__esModule)return v;var m={};if(v!=null)for(var _ in v)_!=="default"&&Object.prototype.hasOwnProperty.call(v,_)&&n(m,v,_);return r(m,v),m},l=this&&this.__exportStar||function(v,m){for(var _ in v)_!=="default"&&!Object.prototype.hasOwnProperty.call(m,_)&&n(m,v,_)};Object.defineProperty(t,"__esModule",{value:!0}),t.z=void 0;const p=o(e(86340));t.z=p,l(e(86340),t),t.default=p},28412:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(94705),r=e(97442),o=(l,p)=>{let v;switch(l.code){case r.ZodIssueCode.invalid_type:l.received===n.ZodParsedType.undefined?v="Required":v=`Expected ${l.expected}, received ${l.received}`;break;case r.ZodIssueCode.invalid_literal:v=`Invalid literal value, expected ${JSON.stringify(l.expected,n.util.jsonStringifyReplacer)}`;break;case r.ZodIssueCode.unrecognized_keys:v=`Unrecognized key(s) in object: ${n.util.joinValues(l.keys,", ")}`;break;case r.ZodIssueCode.invalid_union:v="Invalid input";break;case r.ZodIssueCode.invalid_union_discriminator:v=`Invalid discriminator value. Expected ${n.util.joinValues(l.options)}`;break;case r.ZodIssueCode.invalid_enum_value:v=`Invalid enum value. Expected ${n.util.joinValues(l.options)}, received '${l.received}'`;break;case r.ZodIssueCode.invalid_arguments:v="Invalid function arguments";break;case r.ZodIssueCode.invalid_return_type:v="Invalid function return type";break;case r.ZodIssueCode.invalid_date:v="Invalid date";break;case r.ZodIssueCode.invalid_string:typeof l.validation=="object"?"includes"in l.validation?(v=`Invalid input: must include "${l.validation.includes}"`,typeof l.validation.position=="number"&&(v=`${v} at one or more positions greater than or equal to ${l.validation.position}`)):"startsWith"in l.validation?v=`Invalid input: must start with "${l.validation.startsWith}"`:"endsWith"in l.validation?v=`Invalid input: must end with "${l.validation.endsWith}"`:n.util.assertNever(l.validation):l.validation!=="regex"?v=`Invalid ${l.validation}`:v="Invalid";break;case r.ZodIssueCode.too_small:l.type==="array"?v=`Array must contain ${l.exact?"exactly":l.inclusive?"at least":"more than"} ${l.minimum} element(s)`:l.type==="string"?v=`String must contain ${l.exact?"exactly":l.inclusive?"at least":"over"} ${l.minimum} character(s)`:l.type==="number"?v=`Number must be ${l.exact?"exactly equal to ":l.inclusive?"greater than or equal to ":"greater than "}${l.minimum}`:l.type==="date"?v=`Date must be ${l.exact?"exactly equal to ":l.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(l.minimum))}`:v="Invalid input";break;case r.ZodIssueCode.too_big:l.type==="array"?v=`Array must contain ${l.exact?"exactly":l.inclusive?"at most":"less than"} ${l.maximum} element(s)`:l.type==="string"?v=`String must contain ${l.exact?"exactly":l.inclusive?"at most":"under"} ${l.maximum} character(s)`:l.type==="number"?v=`Number must be ${l.exact?"exactly":l.inclusive?"less than or equal to":"less than"} ${l.maximum}`:l.type==="bigint"?v=`BigInt must be ${l.exact?"exactly":l.inclusive?"less than or equal to":"less than"} ${l.maximum}`:l.type==="date"?v=`Date must be ${l.exact?"exactly":l.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(l.maximum))}`:v="Invalid input";break;case r.ZodIssueCode.custom:v="Invalid input";break;case r.ZodIssueCode.invalid_intersection_types:v="Intersection results could not be merged";break;case r.ZodIssueCode.not_multiple_of:v=`Number must be a multiple of ${l.multipleOf}`;break;case r.ZodIssueCode.not_finite:v="Number must be finite";break;default:v=p.defaultError,n.util.assertNever(l)}return{message:v}};t.default=o},75226:function(x,t,e){"use strict";var n=this&&this.__classPrivateFieldGet||function(dn,rt,zt,rn){if(zt==="a"&&!rn)throw new TypeError("Private accessor was defined without a getter");if(typeof rt=="function"?dn!==rt||!rn:!rt.has(dn))throw new TypeError("Cannot read private member from an object whose class did not declare it");return zt==="m"?rn:zt==="a"?rn.call(dn):rn?rn.value:rt.get(dn)},r=this&&this.__classPrivateFieldSet||function(dn,rt,zt,rn,Ln){if(rn==="m")throw new TypeError("Private method is not writable");if(rn==="a"&&!Ln)throw new TypeError("Private accessor was defined without a setter");if(typeof rt=="function"?dn!==rt||!Ln:!rt.has(dn))throw new TypeError("Cannot write private member to an object whose class did not declare it");return rn==="a"?Ln.call(dn,zt):Ln?Ln.value=zt:rt.set(dn,zt),zt},o,l;Object.defineProperty(t,"__esModule",{value:!0}),t.boolean=t.bigint=t.array=t.any=t.coerce=t.ZodFirstPartyTypeKind=t.late=t.ZodSchema=t.Schema=t.custom=t.ZodReadonly=t.ZodPipeline=t.ZodBranded=t.BRAND=t.ZodNaN=t.ZodCatch=t.ZodDefault=t.ZodNullable=t.ZodOptional=t.ZodTransformer=t.ZodEffects=t.ZodPromise=t.ZodNativeEnum=t.ZodEnum=t.ZodLiteral=t.ZodLazy=t.ZodFunction=t.ZodSet=t.ZodMap=t.ZodRecord=t.ZodTuple=t.ZodIntersection=t.ZodDiscriminatedUnion=t.ZodUnion=t.ZodObject=t.ZodArray=t.ZodVoid=t.ZodNever=t.ZodUnknown=t.ZodAny=t.ZodNull=t.ZodUndefined=t.ZodSymbol=t.ZodDate=t.ZodBoolean=t.ZodBigInt=t.ZodNumber=t.ZodString=t.datetimeRegex=t.ZodType=void 0,t.NEVER=t.void=t.unknown=t.union=t.undefined=t.tuple=t.transformer=t.symbol=t.string=t.strictObject=t.set=t.record=t.promise=t.preprocess=t.pipeline=t.ostring=t.optional=t.onumber=t.oboolean=t.object=t.number=t.nullable=t.null=t.never=t.nativeEnum=t.nan=t.map=t.literal=t.lazy=t.intersection=t.instanceof=t.function=t.enum=t.effect=t.discriminatedUnion=t.date=void 0;const p=e(30548),v=e(15759),m=e(66258),_=e(94705),s=e(97442);class f{constructor(rt,zt,rn,Ln){this._cachedPath=[],this.parent=rt,this.data=zt,this._path=rn,this._key=Ln}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const a=(dn,rt)=>{if((0,m.isValid)(rt))return{success:!0,data:rt.value};if(!dn.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const zt=new s.ZodError(dn.common.issues);return this._error=zt,this._error}}};function h(dn){if(!dn)return{};const{errorMap:rt,invalid_type_error:zt,required_error:rn,description:Ln}=dn;if(rt&&(zt||rn))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return rt?{errorMap:rt,description:Ln}:{errorMap:(Gi,Wi)=>{var oo,Mi;const{message:no}=dn;return Gi.code==="invalid_enum_value"?{message:no??Wi.defaultError}:typeof Wi.data>"u"?{message:(oo=no??rn)!==null&&oo!==void 0?oo:Wi.defaultError}:Gi.code!=="invalid_type"?{message:Wi.defaultError}:{message:(Mi=no??zt)!==null&&Mi!==void 0?Mi:Wi.defaultError}},description:Ln}}class u{get description(){return this._def.description}_getType(rt){return(0,_.getParsedType)(rt.data)}_getOrReturnCtx(rt,zt){return zt||{common:rt.parent.common,data:rt.data,parsedType:(0,_.getParsedType)(rt.data),schemaErrorMap:this._def.errorMap,path:rt.path,parent:rt.parent}}_processInputParams(rt){return{status:new m.ParseStatus,ctx:{common:rt.parent.common,data:rt.data,parsedType:(0,_.getParsedType)(rt.data),schemaErrorMap:this._def.errorMap,path:rt.path,parent:rt.parent}}}_parseSync(rt){const zt=this._parse(rt);if((0,m.isAsync)(zt))throw new Error("Synchronous parse encountered promise.");return zt}_parseAsync(rt){const zt=this._parse(rt);return Promise.resolve(zt)}parse(rt,zt){const rn=this.safeParse(rt,zt);if(rn.success)return rn.data;throw rn.error}safeParse(rt,zt){var rn;const Ln={common:{issues:[],async:(rn=zt?.async)!==null&&rn!==void 0?rn:!1,contextualErrorMap:zt?.errorMap},path:zt?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:rt,parsedType:(0,_.getParsedType)(rt)},Zn=this._parseSync({data:rt,path:Ln.path,parent:Ln});return a(Ln,Zn)}"~validate"(rt){var zt,rn;const Ln={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:rt,parsedType:(0,_.getParsedType)(rt)};if(!this["~standard"].async)try{const Zn=this._parseSync({data:rt,path:[],parent:Ln});return(0,m.isValid)(Zn)?{value:Zn.value}:{issues:Ln.common.issues}}catch(Zn){!((rn=(zt=Zn?.message)===null||zt===void 0?void 0:zt.toLowerCase())===null||rn===void 0)&&rn.includes("encountered")&&(this["~standard"].async=!0),Ln.common={issues:[],async:!0}}return this._parseAsync({data:rt,path:[],parent:Ln}).then(Zn=>(0,m.isValid)(Zn)?{value:Zn.value}:{issues:Ln.common.issues})}async parseAsync(rt,zt){const rn=await this.safeParseAsync(rt,zt);if(rn.success)return rn.data;throw rn.error}async safeParseAsync(rt,zt){const rn={common:{issues:[],contextualErrorMap:zt?.errorMap,async:!0},path:zt?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:rt,parsedType:(0,_.getParsedType)(rt)},Ln=this._parse({data:rt,path:rn.path,parent:rn}),Zn=await((0,m.isAsync)(Ln)?Ln:Promise.resolve(Ln));return a(rn,Zn)}refine(rt,zt){const rn=Ln=>typeof zt=="string"||typeof zt>"u"?{message:zt}:typeof zt=="function"?zt(Ln):zt;return this._refinement((Ln,Zn)=>{const Gi=rt(Ln),Wi=()=>Zn.addIssue({code:s.ZodIssueCode.custom,...rn(Ln)});return typeof Promise<"u"&&Gi instanceof Promise?Gi.then(oo=>oo?!0:(Wi(),!1)):Gi?!0:(Wi(),!1)})}refinement(rt,zt){return this._refinement((rn,Ln)=>rt(rn)?!0:(Ln.addIssue(typeof zt=="function"?zt(rn,Ln):zt),!1))}_refinement(rt){return new $e({schema:this,typeName:At.ZodEffects,effect:{type:"refinement",refinement:rt}})}superRefine(rt){return this._refinement(rt)}constructor(rt){this.spa=this.safeParseAsync,this._def=rt,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:zt=>this["~validate"](zt)}}optional(){return Ve.create(this,this._def)}nullable(){return mt.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Oe.create(this)}promise(){return Fe.create(this,this._def)}or(rt){return fe.create([this,rt],this._def)}and(rt){return Ae.create(this,rt,this._def)}transform(rt){return new $e({...h(this._def),schema:this,typeName:At.ZodEffects,effect:{type:"transform",transform:rt}})}default(rt){const zt=typeof rt=="function"?rt:()=>rt;return new it({...h(this._def),innerType:this,defaultValue:zt,typeName:At.ZodDefault})}brand(){return new Dt({typeName:At.ZodBranded,type:this,...h(this._def)})}catch(rt){const zt=typeof rt=="function"?rt:()=>rt;return new xt({...h(this._def),innerType:this,catchValue:zt,typeName:At.ZodCatch})}describe(rt){const zt=this.constructor;return new zt({...this._def,description:rt})}pipe(rt){return ot.create(this,rt)}readonly(){return ut.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}t.ZodType=u,t.Schema=u,t.ZodSchema=u;const d=/^c[^\s-]{8,}$/i,E=/^[0-9a-z]+$/,g=/^[0-9A-HJKMNP-TV-Z]{26}$/i,c=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,b=/^[a-z0-9_-]{21}$/i,y=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,S=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,A=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,w="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let T;const D=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,I=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,R=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,M=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,O=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,P=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,k="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",F=new RegExp(`^${k}$`);function L(dn){let rt="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return dn.precision?rt=`${rt}\\.\\d{${dn.precision}}`:dn.precision==null&&(rt=`${rt}(\\.\\d+)?`),rt}function B(dn){return new RegExp(`^${L(dn)}$`)}function j(dn){let rt=`${k}T${L(dn)}`;const zt=[];return zt.push(dn.local?"Z?":"Z"),dn.offset&&zt.push("([+-]\\d{2}:?\\d{2})"),rt=`${rt}(${zt.join("|")})`,new RegExp(`^${rt}$`)}t.datetimeRegex=j;function W(dn,rt){return!!((rt==="v4"||!rt)&&D.test(dn)||(rt==="v6"||!rt)&&R.test(dn))}function U(dn,rt){if(!y.test(dn))return!1;try{const[zt]=dn.split("."),rn=zt.replace(/-/g,"+").replace(/_/g,"/").padEnd(zt.length+(4-zt.length%4)%4,"="),Ln=JSON.parse(atob(rn));return!(typeof Ln!="object"||Ln===null||!Ln.typ||!Ln.alg||rt&&Ln.alg!==rt)}catch{return!1}}function X(dn,rt){return!!((rt==="v4"||!rt)&&I.test(dn)||(rt==="v6"||!rt)&&M.test(dn))}class V extends u{_parse(rt){if(this._def.coerce&&(rt.data=String(rt.data)),this._getType(rt)!==_.ZodParsedType.string){const Zn=this._getOrReturnCtx(rt);return(0,m.addIssueToContext)(Zn,{code:s.ZodIssueCode.invalid_type,expected:_.ZodParsedType.string,received:Zn.parsedType}),m.INVALID}const rn=new m.ParseStatus;let Ln;for(const Zn of this._def.checks)if(Zn.kind==="min")rt.data.length<Zn.value&&(Ln=this._getOrReturnCtx(rt,Ln),(0,m.addIssueToContext)(Ln,{code:s.ZodIssueCode.too_small,minimum:Zn.value,type:"string",inclusive:!0,exact:!1,message:Zn.message}),rn.dirty());else if(Zn.kind==="max")rt.data.length>Zn.value&&(Ln=this._getOrReturnCtx(rt,Ln),(0,m.addIssueToContext)(Ln,{code:s.ZodIssueCode.too_big,maximum:Zn.value,type:"string",inclusive:!0,exact:!1,message:Zn.message}),rn.dirty());else if(Zn.kind==="length"){const Gi=rt.data.length>Zn.value,Wi=rt.data.length<Zn.value;(Gi||Wi)&&(Ln=this._getOrReturnCtx(rt,Ln),Gi?(0,m.addIssueToContext)(Ln,{code:s.ZodIssueCode.too_big,maximum:Zn.value,type:"string",inclusive:!0,exact:!0,message:Zn.message}):Wi&&(0,m.addIssueToContext)(Ln,{code:s.ZodIssueCode.too_small,minimum:Zn.value,type:"string",inclusive:!0,exact:!0,message:Zn.message}),rn.dirty())}else if(Zn.kind==="email")A.test(rt.data)||(Ln=this._getOrReturnCtx(rt,Ln),(0,m.addIssueToContext)(Ln,{validation:"email",code:s.ZodIssueCode.invalid_string,message:Zn.message}),rn.dirty());else if(Zn.kind==="emoji")T||(T=new RegExp(w,"u")),T.test(rt.data)||(Ln=this._getOrReturnCtx(rt,Ln),(0,m.addIssueToContext)(Ln,{validation:"emoji",code:s.ZodIssueCode.invalid_string,message:Zn.message}),rn.dirty());else if(Zn.kind==="uuid")c.test(rt.data)||(Ln=this._getOrReturnCtx(rt,Ln),(0,m.addIssueToContext)(Ln,{validation:"uuid",code:s.ZodIssueCode.invalid_string,message:Zn.message}),rn.dirty());else if(Zn.kind==="nanoid")b.test(rt.data)||(Ln=this._getOrReturnCtx(rt,Ln),(0,m.addIssueToContext)(Ln,{validation:"nanoid",code:s.ZodIssueCode.invalid_string,message:Zn.message}),rn.dirty());else if(Zn.kind==="cuid")d.test(rt.data)||(Ln=this._getOrReturnCtx(rt,Ln),(0,m.addIssueToContext)(Ln,{validation:"cuid",code:s.ZodIssueCode.invalid_string,message:Zn.message}),rn.dirty());else if(Zn.kind==="cuid2")E.test(rt.data)||(Ln=this._getOrReturnCtx(rt,Ln),(0,m.addIssueToContext)(Ln,{validation:"cuid2",code:s.ZodIssueCode.invalid_string,message:Zn.message}),rn.dirty());else if(Zn.kind==="ulid")g.test(rt.data)||(Ln=this._getOrReturnCtx(rt,Ln),(0,m.addIssueToContext)(Ln,{validation:"ulid",code:s.ZodIssueCode.invalid_string,message:Zn.message}),rn.dirty());else if(Zn.kind==="url")try{new URL(rt.data)}catch{Ln=this._getOrReturnCtx(rt,Ln),(0,m.addIssueToContext)(Ln,{validation:"url",code:s.ZodIssueCode.invalid_string,message:Zn.message}),rn.dirty()}else Zn.kind==="regex"?(Zn.regex.lastIndex=0,Zn.regex.test(rt.data)||(Ln=this._getOrReturnCtx(rt,Ln),(0,m.addIssueToContext)(Ln,{validation:"regex",code:s.ZodIssueCode.invalid_string,message:Zn.message}),rn.dirty())):Zn.kind==="trim"?rt.data=rt.data.trim():Zn.kind==="includes"?rt.data.includes(Zn.value,Zn.position)||(Ln=this._getOrReturnCtx(rt,Ln),(0,m.addIssueToContext)(Ln,{code:s.ZodIssueCode.invalid_string,validation:{includes:Zn.value,position:Zn.position},message:Zn.message}),rn.dirty()):Zn.kind==="toLowerCase"?rt.data=rt.data.toLowerCase():Zn.kind==="toUpperCase"?rt.data=rt.data.toUpperCase():Zn.kind==="startsWith"?rt.data.startsWith(Zn.value)||(Ln=this._getOrReturnCtx(rt,Ln),(0,m.addIssueToContext)(Ln,{code:s.ZodIssueCode.invalid_string,validation:{startsWith:Zn.value},message:Zn.message}),rn.dirty()):Zn.kind==="endsWith"?rt.data.endsWith(Zn.value)||(Ln=this._getOrReturnCtx(rt,Ln),(0,m.addIssueToContext)(Ln,{code:s.ZodIssueCode.invalid_string,validation:{endsWith:Zn.value},message:Zn.message}),rn.dirty()):Zn.kind==="datetime"?j(Zn).test(rt.data)||(Ln=this._getOrReturnCtx(rt,Ln),(0,m.addIssueToContext)(Ln,{code:s.ZodIssueCode.invalid_string,validation:"datetime",message:Zn.message}),rn.dirty()):Zn.kind==="date"?F.test(rt.data)||(Ln=this._getOrReturnCtx(rt,Ln),(0,m.addIssueToContext)(Ln,{code:s.ZodIssueCode.invalid_string,validation:"date",message:Zn.message}),rn.dirty()):Zn.kind==="time"?B(Zn).test(rt.data)||(Ln=this._getOrReturnCtx(rt,Ln),(0,m.addIssueToContext)(Ln,{code:s.ZodIssueCode.invalid_string,validation:"time",message:Zn.message}),rn.dirty()):Zn.kind==="duration"?S.test(rt.data)||(Ln=this._getOrReturnCtx(rt,Ln),(0,m.addIssueToContext)(Ln,{validation:"duration",code:s.ZodIssueCode.invalid_string,message:Zn.message}),rn.dirty()):Zn.kind==="ip"?W(rt.data,Zn.version)||(Ln=this._getOrReturnCtx(rt,Ln),(0,m.addIssueToContext)(Ln,{validation:"ip",code:s.ZodIssueCode.invalid_string,message:Zn.message}),rn.dirty()):Zn.kind==="jwt"?U(rt.data,Zn.alg)||(Ln=this._getOrReturnCtx(rt,Ln),(0,m.addIssueToContext)(Ln,{validation:"jwt",code:s.ZodIssueCode.invalid_string,message:Zn.message}),rn.dirty()):Zn.kind==="cidr"?X(rt.data,Zn.version)||(Ln=this._getOrReturnCtx(rt,Ln),(0,m.addIssueToContext)(Ln,{validation:"cidr",code:s.ZodIssueCode.invalid_string,message:Zn.message}),rn.dirty()):Zn.kind==="base64"?O.test(rt.data)||(Ln=this._getOrReturnCtx(rt,Ln),(0,m.addIssueToContext)(Ln,{validation:"base64",code:s.ZodIssueCode.invalid_string,message:Zn.message}),rn.dirty()):Zn.kind==="base64url"?P.test(rt.data)||(Ln=this._getOrReturnCtx(rt,Ln),(0,m.addIssueToContext)(Ln,{validation:"base64url",code:s.ZodIssueCode.invalid_string,message:Zn.message}),rn.dirty()):_.util.assertNever(Zn);return{status:rn.value,value:rt.data}}_regex(rt,zt,rn){return this.refinement(Ln=>rt.test(Ln),{validation:zt,code:s.ZodIssueCode.invalid_string,...v.errorUtil.errToObj(rn)})}_addCheck(rt){return new V({...this._def,checks:[...this._def.checks,rt]})}email(rt){return this._addCheck({kind:"email",...v.errorUtil.errToObj(rt)})}url(rt){return this._addCheck({kind:"url",...v.errorUtil.errToObj(rt)})}emoji(rt){return this._addCheck({kind:"emoji",...v.errorUtil.errToObj(rt)})}uuid(rt){return this._addCheck({kind:"uuid",...v.errorUtil.errToObj(rt)})}nanoid(rt){return this._addCheck({kind:"nanoid",...v.errorUtil.errToObj(rt)})}cuid(rt){return this._addCheck({kind:"cuid",...v.errorUtil.errToObj(rt)})}cuid2(rt){return this._addCheck({kind:"cuid2",...v.errorUtil.errToObj(rt)})}ulid(rt){return this._addCheck({kind:"ulid",...v.errorUtil.errToObj(rt)})}base64(rt){return this._addCheck({kind:"base64",...v.errorUtil.errToObj(rt)})}base64url(rt){return this._addCheck({kind:"base64url",...v.errorUtil.errToObj(rt)})}jwt(rt){return this._addCheck({kind:"jwt",...v.errorUtil.errToObj(rt)})}ip(rt){return this._addCheck({kind:"ip",...v.errorUtil.errToObj(rt)})}cidr(rt){return this._addCheck({kind:"cidr",...v.errorUtil.errToObj(rt)})}datetime(rt){var zt,rn;return typeof rt=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:rt}):this._addCheck({kind:"datetime",precision:typeof rt?.precision>"u"?null:rt?.precision,offset:(zt=rt?.offset)!==null&&zt!==void 0?zt:!1,local:(rn=rt?.local)!==null&&rn!==void 0?rn:!1,...v.errorUtil.errToObj(rt?.message)})}date(rt){return this._addCheck({kind:"date",message:rt})}time(rt){return typeof rt=="string"?this._addCheck({kind:"time",precision:null,message:rt}):this._addCheck({kind:"time",precision:typeof rt?.precision>"u"?null:rt?.precision,...v.errorUtil.errToObj(rt?.message)})}duration(rt){return this._addCheck({kind:"duration",...v.errorUtil.errToObj(rt)})}regex(rt,zt){return this._addCheck({kind:"regex",regex:rt,...v.errorUtil.errToObj(zt)})}includes(rt,zt){return this._addCheck({kind:"includes",value:rt,position:zt?.position,...v.errorUtil.errToObj(zt?.message)})}startsWith(rt,zt){return this._addCheck({kind:"startsWith",value:rt,...v.errorUtil.errToObj(zt)})}endsWith(rt,zt){return this._addCheck({kind:"endsWith",value:rt,...v.errorUtil.errToObj(zt)})}min(rt,zt){return this._addCheck({kind:"min",value:rt,...v.errorUtil.errToObj(zt)})}max(rt,zt){return this._addCheck({kind:"max",value:rt,...v.errorUtil.errToObj(zt)})}length(rt,zt){return this._addCheck({kind:"length",value:rt,...v.errorUtil.errToObj(zt)})}nonempty(rt){return this.min(1,v.errorUtil.errToObj(rt))}trim(){return new V({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new V({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new V({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(rt=>rt.kind==="datetime")}get isDate(){return!!this._def.checks.find(rt=>rt.kind==="date")}get isTime(){return!!this._def.checks.find(rt=>rt.kind==="time")}get isDuration(){return!!this._def.checks.find(rt=>rt.kind==="duration")}get isEmail(){return!!this._def.checks.find(rt=>rt.kind==="email")}get isURL(){return!!this._def.checks.find(rt=>rt.kind==="url")}get isEmoji(){return!!this._def.checks.find(rt=>rt.kind==="emoji")}get isUUID(){return!!this._def.checks.find(rt=>rt.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(rt=>rt.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(rt=>rt.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(rt=>rt.kind==="cuid2")}get isULID(){return!!this._def.checks.find(rt=>rt.kind==="ulid")}get isIP(){return!!this._def.checks.find(rt=>rt.kind==="ip")}get isCIDR(){return!!this._def.checks.find(rt=>rt.kind==="cidr")}get isBase64(){return!!this._def.checks.find(rt=>rt.kind==="base64")}get isBase64url(){return!!this._def.checks.find(rt=>rt.kind==="base64url")}get minLength(){let rt=null;for(const zt of this._def.checks)zt.kind==="min"&&(rt===null||zt.value>rt)&&(rt=zt.value);return rt}get maxLength(){let rt=null;for(const zt of this._def.checks)zt.kind==="max"&&(rt===null||zt.value<rt)&&(rt=zt.value);return rt}}t.ZodString=V,V.create=dn=>{var rt;return new V({checks:[],typeName:At.ZodString,coerce:(rt=dn?.coerce)!==null&&rt!==void 0?rt:!1,...h(dn)})};function $(dn,rt){const zt=(dn.toString().split(".")[1]||"").length,rn=(rt.toString().split(".")[1]||"").length,Ln=zt>rn?zt:rn,Zn=parseInt(dn.toFixed(Ln).replace(".","")),Gi=parseInt(rt.toFixed(Ln).replace(".",""));return Zn%Gi/Math.pow(10,Ln)}class Y extends u{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(rt){if(this._def.coerce&&(rt.data=Number(rt.data)),this._getType(rt)!==_.ZodParsedType.number){const Zn=this._getOrReturnCtx(rt);return(0,m.addIssueToContext)(Zn,{code:s.ZodIssueCode.invalid_type,expected:_.ZodParsedType.number,received:Zn.parsedType}),m.INVALID}let rn;const Ln=new m.ParseStatus;for(const Zn of this._def.checks)Zn.kind==="int"?_.util.isInteger(rt.data)||(rn=this._getOrReturnCtx(rt,rn),(0,m.addIssueToContext)(rn,{code:s.ZodIssueCode.invalid_type,expected:"integer",received:"float",message:Zn.message}),Ln.dirty()):Zn.kind==="min"?(Zn.inclusive?rt.data<Zn.value:rt.data<=Zn.value)&&(rn=this._getOrReturnCtx(rt,rn),(0,m.addIssueToContext)(rn,{code:s.ZodIssueCode.too_small,minimum:Zn.value,type:"number",inclusive:Zn.inclusive,exact:!1,message:Zn.message}),Ln.dirty()):Zn.kind==="max"?(Zn.inclusive?rt.data>Zn.value:rt.data>=Zn.value)&&(rn=this._getOrReturnCtx(rt,rn),(0,m.addIssueToContext)(rn,{code:s.ZodIssueCode.too_big,maximum:Zn.value,type:"number",inclusive:Zn.inclusive,exact:!1,message:Zn.message}),Ln.dirty()):Zn.kind==="multipleOf"?$(rt.data,Zn.value)!==0&&(rn=this._getOrReturnCtx(rt,rn),(0,m.addIssueToContext)(rn,{code:s.ZodIssueCode.not_multiple_of,multipleOf:Zn.value,message:Zn.message}),Ln.dirty()):Zn.kind==="finite"?Number.isFinite(rt.data)||(rn=this._getOrReturnCtx(rt,rn),(0,m.addIssueToContext)(rn,{code:s.ZodIssueCode.not_finite,message:Zn.message}),Ln.dirty()):_.util.assertNever(Zn);return{status:Ln.value,value:rt.data}}gte(rt,zt){return this.setLimit("min",rt,!0,v.errorUtil.toString(zt))}gt(rt,zt){return this.setLimit("min",rt,!1,v.errorUtil.toString(zt))}lte(rt,zt){return this.setLimit("max",rt,!0,v.errorUtil.toString(zt))}lt(rt,zt){return this.setLimit("max",rt,!1,v.errorUtil.toString(zt))}setLimit(rt,zt,rn,Ln){return new Y({...this._def,checks:[...this._def.checks,{kind:rt,value:zt,inclusive:rn,message:v.errorUtil.toString(Ln)}]})}_addCheck(rt){return new Y({...this._def,checks:[...this._def.checks,rt]})}int(rt){return this._addCheck({kind:"int",message:v.errorUtil.toString(rt)})}positive(rt){return this._addCheck({kind:"min",value:0,inclusive:!1,message:v.errorUtil.toString(rt)})}negative(rt){return this._addCheck({kind:"max",value:0,inclusive:!1,message:v.errorUtil.toString(rt)})}nonpositive(rt){return this._addCheck({kind:"max",value:0,inclusive:!0,message:v.errorUtil.toString(rt)})}nonnegative(rt){return this._addCheck({kind:"min",value:0,inclusive:!0,message:v.errorUtil.toString(rt)})}multipleOf(rt,zt){return this._addCheck({kind:"multipleOf",value:rt,message:v.errorUtil.toString(zt)})}finite(rt){return this._addCheck({kind:"finite",message:v.errorUtil.toString(rt)})}safe(rt){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:v.errorUtil.toString(rt)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:v.errorUtil.toString(rt)})}get minValue(){let rt=null;for(const zt of this._def.checks)zt.kind==="min"&&(rt===null||zt.value>rt)&&(rt=zt.value);return rt}get maxValue(){let rt=null;for(const zt of this._def.checks)zt.kind==="max"&&(rt===null||zt.value<rt)&&(rt=zt.value);return rt}get isInt(){return!!this._def.checks.find(rt=>rt.kind==="int"||rt.kind==="multipleOf"&&_.util.isInteger(rt.value))}get isFinite(){let rt=null,zt=null;for(const rn of this._def.checks){if(rn.kind==="finite"||rn.kind==="int"||rn.kind==="multipleOf")return!0;rn.kind==="min"?(zt===null||rn.value>zt)&&(zt=rn.value):rn.kind==="max"&&(rt===null||rn.value<rt)&&(rt=rn.value)}return Number.isFinite(zt)&&Number.isFinite(rt)}}t.ZodNumber=Y,Y.create=dn=>new Y({checks:[],typeName:At.ZodNumber,coerce:dn?.coerce||!1,...h(dn)});class z extends u{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(rt){if(this._def.coerce)try{rt.data=BigInt(rt.data)}catch{return this._getInvalidInput(rt)}if(this._getType(rt)!==_.ZodParsedType.bigint)return this._getInvalidInput(rt);let rn;const Ln=new m.ParseStatus;for(const Zn of this._def.checks)Zn.kind==="min"?(Zn.inclusive?rt.data<Zn.value:rt.data<=Zn.value)&&(rn=this._getOrReturnCtx(rt,rn),(0,m.addIssueToContext)(rn,{code:s.ZodIssueCode.too_small,type:"bigint",minimum:Zn.value,inclusive:Zn.inclusive,message:Zn.message}),Ln.dirty()):Zn.kind==="max"?(Zn.inclusive?rt.data>Zn.value:rt.data>=Zn.value)&&(rn=this._getOrReturnCtx(rt,rn),(0,m.addIssueToContext)(rn,{code:s.ZodIssueCode.too_big,type:"bigint",maximum:Zn.value,inclusive:Zn.inclusive,message:Zn.message}),Ln.dirty()):Zn.kind==="multipleOf"?rt.data%Zn.value!==BigInt(0)&&(rn=this._getOrReturnCtx(rt,rn),(0,m.addIssueToContext)(rn,{code:s.ZodIssueCode.not_multiple_of,multipleOf:Zn.value,message:Zn.message}),Ln.dirty()):_.util.assertNever(Zn);return{status:Ln.value,value:rt.data}}_getInvalidInput(rt){const zt=this._getOrReturnCtx(rt);return(0,m.addIssueToContext)(zt,{code:s.ZodIssueCode.invalid_type,expected:_.ZodParsedType.bigint,received:zt.parsedType}),m.INVALID}gte(rt,zt){return this.setLimit("min",rt,!0,v.errorUtil.toString(zt))}gt(rt,zt){return this.setLimit("min",rt,!1,v.errorUtil.toString(zt))}lte(rt,zt){return this.setLimit("max",rt,!0,v.errorUtil.toString(zt))}lt(rt,zt){return this.setLimit("max",rt,!1,v.errorUtil.toString(zt))}setLimit(rt,zt,rn,Ln){return new z({...this._def,checks:[...this._def.checks,{kind:rt,value:zt,inclusive:rn,message:v.errorUtil.toString(Ln)}]})}_addCheck(rt){return new z({...this._def,checks:[...this._def.checks,rt]})}positive(rt){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:v.errorUtil.toString(rt)})}negative(rt){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:v.errorUtil.toString(rt)})}nonpositive(rt){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:v.errorUtil.toString(rt)})}nonnegative(rt){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:v.errorUtil.toString(rt)})}multipleOf(rt,zt){return this._addCheck({kind:"multipleOf",value:rt,message:v.errorUtil.toString(zt)})}get minValue(){let rt=null;for(const zt of this._def.checks)zt.kind==="min"&&(rt===null||zt.value>rt)&&(rt=zt.value);return rt}get maxValue(){let rt=null;for(const zt of this._def.checks)zt.kind==="max"&&(rt===null||zt.value<rt)&&(rt=zt.value);return rt}}t.ZodBigInt=z,z.create=dn=>{var rt;return new z({checks:[],typeName:At.ZodBigInt,coerce:(rt=dn?.coerce)!==null&&rt!==void 0?rt:!1,...h(dn)})};class H extends u{_parse(rt){if(this._def.coerce&&(rt.data=!!rt.data),this._getType(rt)!==_.ZodParsedType.boolean){const rn=this._getOrReturnCtx(rt);return(0,m.addIssueToContext)(rn,{code:s.ZodIssueCode.invalid_type,expected:_.ZodParsedType.boolean,received:rn.parsedType}),m.INVALID}return(0,m.OK)(rt.data)}}t.ZodBoolean=H,H.create=dn=>new H({typeName:At.ZodBoolean,coerce:dn?.coerce||!1,...h(dn)});class K extends u{_parse(rt){if(this._def.coerce&&(rt.data=new Date(rt.data)),this._getType(rt)!==_.ZodParsedType.date){const Zn=this._getOrReturnCtx(rt);return(0,m.addIssueToContext)(Zn,{code:s.ZodIssueCode.invalid_type,expected:_.ZodParsedType.date,received:Zn.parsedType}),m.INVALID}if(isNaN(rt.data.getTime())){const Zn=this._getOrReturnCtx(rt);return(0,m.addIssueToContext)(Zn,{code:s.ZodIssueCode.invalid_date}),m.INVALID}const rn=new m.ParseStatus;let Ln;for(const Zn of this._def.checks)Zn.kind==="min"?rt.data.getTime()<Zn.value&&(Ln=this._getOrReturnCtx(rt,Ln),(0,m.addIssueToContext)(Ln,{code:s.ZodIssueCode.too_small,message:Zn.message,inclusive:!0,exact:!1,minimum:Zn.value,type:"date"}),rn.dirty()):Zn.kind==="max"?rt.data.getTime()>Zn.value&&(Ln=this._getOrReturnCtx(rt,Ln),(0,m.addIssueToContext)(Ln,{code:s.ZodIssueCode.too_big,message:Zn.message,inclusive:!0,exact:!1,maximum:Zn.value,type:"date"}),rn.dirty()):_.util.assertNever(Zn);return{status:rn.value,value:new Date(rt.data.getTime())}}_addCheck(rt){return new K({...this._def,checks:[...this._def.checks,rt]})}min(rt,zt){return this._addCheck({kind:"min",value:rt.getTime(),message:v.errorUtil.toString(zt)})}max(rt,zt){return this._addCheck({kind:"max",value:rt.getTime(),message:v.errorUtil.toString(zt)})}get minDate(){let rt=null;for(const zt of this._def.checks)zt.kind==="min"&&(rt===null||zt.value>rt)&&(rt=zt.value);return rt!=null?new Date(rt):null}get maxDate(){let rt=null;for(const zt of this._def.checks)zt.kind==="max"&&(rt===null||zt.value<rt)&&(rt=zt.value);return rt!=null?new Date(rt):null}}t.ZodDate=K,K.create=dn=>new K({checks:[],coerce:dn?.coerce||!1,typeName:At.ZodDate,...h(dn)});class Z extends u{_parse(rt){if(this._getType(rt)!==_.ZodParsedType.symbol){const rn=this._getOrReturnCtx(rt);return(0,m.addIssueToContext)(rn,{code:s.ZodIssueCode.invalid_type,expected:_.ZodParsedType.symbol,received:rn.parsedType}),m.INVALID}return(0,m.OK)(rt.data)}}t.ZodSymbol=Z,Z.create=dn=>new Z({typeName:At.ZodSymbol,...h(dn)});class Q extends u{_parse(rt){if(this._getType(rt)!==_.ZodParsedType.undefined){const rn=this._getOrReturnCtx(rt);return(0,m.addIssueToContext)(rn,{code:s.ZodIssueCode.invalid_type,expected:_.ZodParsedType.undefined,received:rn.parsedType}),m.INVALID}return(0,m.OK)(rt.data)}}t.ZodUndefined=Q,Q.create=dn=>new Q({typeName:At.ZodUndefined,...h(dn)});class oe extends u{_parse(rt){if(this._getType(rt)!==_.ZodParsedType.null){const rn=this._getOrReturnCtx(rt);return(0,m.addIssueToContext)(rn,{code:s.ZodIssueCode.invalid_type,expected:_.ZodParsedType.null,received:rn.parsedType}),m.INVALID}return(0,m.OK)(rt.data)}}t.ZodNull=oe,oe.create=dn=>new oe({typeName:At.ZodNull,...h(dn)});class ne extends u{constructor(){super(...arguments),this._any=!0}_parse(rt){return(0,m.OK)(rt.data)}}t.ZodAny=ne,ne.create=dn=>new ne({typeName:At.ZodAny,...h(dn)});class he extends u{constructor(){super(...arguments),this._unknown=!0}_parse(rt){return(0,m.OK)(rt.data)}}t.ZodUnknown=he,he.create=dn=>new he({typeName:At.ZodUnknown,...h(dn)});class _e extends u{_parse(rt){const zt=this._getOrReturnCtx(rt);return(0,m.addIssueToContext)(zt,{code:s.ZodIssueCode.invalid_type,expected:_.ZodParsedType.never,received:zt.parsedType}),m.INVALID}}t.ZodNever=_e,_e.create=dn=>new _e({typeName:At.ZodNever,...h(dn)});class q extends u{_parse(rt){if(this._getType(rt)!==_.ZodParsedType.undefined){const rn=this._getOrReturnCtx(rt);return(0,m.addIssueToContext)(rn,{code:s.ZodIssueCode.invalid_type,expected:_.ZodParsedType.void,received:rn.parsedType}),m.INVALID}return(0,m.OK)(rt.data)}}t.ZodVoid=q,q.create=dn=>new q({typeName:At.ZodVoid,...h(dn)});class Oe extends u{_parse(rt){const{ctx:zt,status:rn}=this._processInputParams(rt),Ln=this._def;if(zt.parsedType!==_.ZodParsedType.array)return(0,m.addIssueToContext)(zt,{code:s.ZodIssueCode.invalid_type,expected:_.ZodParsedType.array,received:zt.parsedType}),m.INVALID;if(Ln.exactLength!==null){const Gi=zt.data.length>Ln.exactLength.value,Wi=zt.data.length<Ln.exactLength.value;(Gi||Wi)&&((0,m.addIssueToContext)(zt,{code:Gi?s.ZodIssueCode.too_big:s.ZodIssueCode.too_small,minimum:Wi?Ln.exactLength.value:void 0,maximum:Gi?Ln.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:Ln.exactLength.message}),rn.dirty())}if(Ln.minLength!==null&&zt.data.length<Ln.minLength.value&&((0,m.addIssueToContext)(zt,{code:s.ZodIssueCode.too_small,minimum:Ln.minLength.value,type:"array",inclusive:!0,exact:!1,message:Ln.minLength.message}),rn.dirty()),Ln.maxLength!==null&&zt.data.length>Ln.maxLength.value&&((0,m.addIssueToContext)(zt,{code:s.ZodIssueCode.too_big,maximum:Ln.maxLength.value,type:"array",inclusive:!0,exact:!1,message:Ln.maxLength.message}),rn.dirty()),zt.common.async)return Promise.all([...zt.data].map((Gi,Wi)=>Ln.type._parseAsync(new f(zt,Gi,zt.path,Wi)))).then(Gi=>m.ParseStatus.mergeArray(rn,Gi));const Zn=[...zt.data].map((Gi,Wi)=>Ln.type._parseSync(new f(zt,Gi,zt.path,Wi)));return m.ParseStatus.mergeArray(rn,Zn)}get element(){return this._def.type}min(rt,zt){return new Oe({...this._def,minLength:{value:rt,message:v.errorUtil.toString(zt)}})}max(rt,zt){return new Oe({...this._def,maxLength:{value:rt,message:v.errorUtil.toString(zt)}})}length(rt,zt){return new Oe({...this._def,exactLength:{value:rt,message:v.errorUtil.toString(zt)}})}nonempty(rt){return this.min(1,rt)}}t.ZodArray=Oe,Oe.create=(dn,rt)=>new Oe({type:dn,minLength:null,maxLength:null,exactLength:null,typeName:At.ZodArray,...h(rt)});function ye(dn){if(dn instanceof ie){const rt={};for(const zt in dn.shape){const rn=dn.shape[zt];rt[zt]=Ve.create(ye(rn))}return new ie({...dn._def,shape:()=>rt})}else return dn instanceof Oe?new Oe({...dn._def,type:ye(dn.element)}):dn instanceof Ve?Ve.create(ye(dn.unwrap())):dn instanceof mt?mt.create(ye(dn.unwrap())):dn instanceof ve?ve.create(dn.items.map(rt=>ye(rt))):dn}class ie extends u{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const rt=this._def.shape(),zt=_.util.objectKeys(rt);return this._cached={shape:rt,keys:zt}}_parse(rt){if(this._getType(rt)!==_.ZodParsedType.object){const Mi=this._getOrReturnCtx(rt);return(0,m.addIssueToContext)(Mi,{code:s.ZodIssueCode.invalid_type,expected:_.ZodParsedType.object,received:Mi.parsedType}),m.INVALID}const{status:rn,ctx:Ln}=this._processInputParams(rt),{shape:Zn,keys:Gi}=this._getCached(),Wi=[];if(!(this._def.catchall instanceof _e&&this._def.unknownKeys==="strip"))for(const Mi in Ln.data)Gi.includes(Mi)||Wi.push(Mi);const oo=[];for(const Mi of Gi){const no=Zn[Mi],uo=Ln.data[Mi];oo.push({key:{status:"valid",value:Mi},value:no._parse(new f(Ln,uo,Ln.path,Mi)),alwaysSet:Mi in Ln.data})}if(this._def.catchall instanceof _e){const Mi=this._def.unknownKeys;if(Mi==="passthrough")for(const no of Wi)oo.push({key:{status:"valid",value:no},value:{status:"valid",value:Ln.data[no]}});else if(Mi==="strict")Wi.length>0&&((0,m.addIssueToContext)(Ln,{code:s.ZodIssueCode.unrecognized_keys,keys:Wi}),rn.dirty());else if(Mi!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const Mi=this._def.catchall;for(const no of Wi){const uo=Ln.data[no];oo.push({key:{status:"valid",value:no},value:Mi._parse(new f(Ln,uo,Ln.path,no)),alwaysSet:no in Ln.data})}}return Ln.common.async?Promise.resolve().then(async()=>{const Mi=[];for(const no of oo){const uo=await no.key,Do=await no.value;Mi.push({key:uo,value:Do,alwaysSet:no.alwaysSet})}return Mi}).then(Mi=>m.ParseStatus.mergeObjectSync(rn,Mi)):m.ParseStatus.mergeObjectSync(rn,oo)}get shape(){return this._def.shape()}strict(rt){return v.errorUtil.errToObj,new ie({...this._def,unknownKeys:"strict",...rt!==void 0?{errorMap:(zt,rn)=>{var Ln,Zn,Gi,Wi;const oo=(Gi=(Zn=(Ln=this._def).errorMap)===null||Zn===void 0?void 0:Zn.call(Ln,zt,rn).message)!==null&&Gi!==void 0?Gi:rn.defaultError;return zt.code==="unrecognized_keys"?{message:(Wi=v.errorUtil.errToObj(rt).message)!==null&&Wi!==void 0?Wi:oo}:{message:oo}}}:{}})}strip(){return new ie({...this._def,unknownKeys:"strip"})}passthrough(){return new ie({...this._def,unknownKeys:"passthrough"})}extend(rt){return new ie({...this._def,shape:()=>({...this._def.shape(),...rt})})}merge(rt){return new ie({unknownKeys:rt._def.unknownKeys,catchall:rt._def.catchall,shape:()=>({...this._def.shape(),...rt._def.shape()}),typeName:At.ZodObject})}setKey(rt,zt){return this.augment({[rt]:zt})}catchall(rt){return new ie({...this._def,catchall:rt})}pick(rt){const zt={};return _.util.objectKeys(rt).forEach(rn=>{rt[rn]&&this.shape[rn]&&(zt[rn]=this.shape[rn])}),new ie({...this._def,shape:()=>zt})}omit(rt){const zt={};return _.util.objectKeys(this.shape).forEach(rn=>{rt[rn]||(zt[rn]=this.shape[rn])}),new ie({...this._def,shape:()=>zt})}deepPartial(){return ye(this)}partial(rt){const zt={};return _.util.objectKeys(this.shape).forEach(rn=>{const Ln=this.shape[rn];rt&&!rt[rn]?zt[rn]=Ln:zt[rn]=Ln.optional()}),new ie({...this._def,shape:()=>zt})}required(rt){const zt={};return _.util.objectKeys(this.shape).forEach(rn=>{if(rt&&!rt[rn])zt[rn]=this.shape[rn];else{let Zn=this.shape[rn];for(;Zn instanceof Ve;)Zn=Zn._def.innerType;zt[rn]=Zn}}),new ie({...this._def,shape:()=>zt})}keyof(){return le(_.util.objectKeys(this.shape))}}t.ZodObject=ie,ie.create=(dn,rt)=>new ie({shape:()=>dn,unknownKeys:"strip",catchall:_e.create(),typeName:At.ZodObject,...h(rt)}),ie.strictCreate=(dn,rt)=>new ie({shape:()=>dn,unknownKeys:"strict",catchall:_e.create(),typeName:At.ZodObject,...h(rt)}),ie.lazycreate=(dn,rt)=>new ie({shape:dn,unknownKeys:"strip",catchall:_e.create(),typeName:At.ZodObject,...h(rt)});class fe extends u{_parse(rt){const{ctx:zt}=this._processInputParams(rt),rn=this._def.options;function Ln(Zn){for(const Wi of Zn)if(Wi.result.status==="valid")return Wi.result;for(const Wi of Zn)if(Wi.result.status==="dirty")return zt.common.issues.push(...Wi.ctx.common.issues),Wi.result;const Gi=Zn.map(Wi=>new s.ZodError(Wi.ctx.common.issues));return(0,m.addIssueToContext)(zt,{code:s.ZodIssueCode.invalid_union,unionErrors:Gi}),m.INVALID}if(zt.common.async)return Promise.all(rn.map(async Zn=>{const Gi={...zt,common:{...zt.common,issues:[]},parent:null};return{result:await Zn._parseAsync({data:zt.data,path:zt.path,parent:Gi}),ctx:Gi}})).then(Ln);{let Zn;const Gi=[];for(const oo of rn){const Mi={...zt,common:{...zt.common,issues:[]},parent:null},no=oo._parseSync({data:zt.data,path:zt.path,parent:Mi});if(no.status==="valid")return no;no.status==="dirty"&&!Zn&&(Zn={result:no,ctx:Mi}),Mi.common.issues.length&&Gi.push(Mi.common.issues)}if(Zn)return zt.common.issues.push(...Zn.ctx.common.issues),Zn.result;const Wi=Gi.map(oo=>new s.ZodError(oo));return(0,m.addIssueToContext)(zt,{code:s.ZodIssueCode.invalid_union,unionErrors:Wi}),m.INVALID}}get options(){return this._def.options}}t.ZodUnion=fe,fe.create=(dn,rt)=>new fe({options:dn,typeName:At.ZodUnion,...h(rt)});const Me=dn=>dn instanceof pe?Me(dn.schema):dn instanceof $e?Me(dn.innerType()):dn instanceof re?[dn.value]:dn instanceof Te?dn.options:dn instanceof Se?_.util.objectValues(dn.enum):dn instanceof it?Me(dn._def.innerType):dn instanceof Q?[void 0]:dn instanceof oe?[null]:dn instanceof Ve?[void 0,...Me(dn.unwrap())]:dn instanceof mt?[null,...Me(dn.unwrap())]:dn instanceof Dt||dn instanceof ut?Me(dn.unwrap()):dn instanceof xt?Me(dn._def.innerType):[];class Le extends u{_parse(rt){const{ctx:zt}=this._processInputParams(rt);if(zt.parsedType!==_.ZodParsedType.object)return(0,m.addIssueToContext)(zt,{code:s.ZodIssueCode.invalid_type,expected:_.ZodParsedType.object,received:zt.parsedType}),m.INVALID;const rn=this.discriminator,Ln=zt.data[rn],Zn=this.optionsMap.get(Ln);return Zn?zt.common.async?Zn._parseAsync({data:zt.data,path:zt.path,parent:zt}):Zn._parseSync({data:zt.data,path:zt.path,parent:zt}):((0,m.addIssueToContext)(zt,{code:s.ZodIssueCode.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[rn]}),m.INVALID)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(rt,zt,rn){const Ln=new Map;for(const Zn of zt){const Gi=Me(Zn.shape[rt]);if(!Gi.length)throw new Error(`A discriminator value for key \`${rt}\` could not be extracted from all schema options`);for(const Wi of Gi){if(Ln.has(Wi))throw new Error(`Discriminator property ${String(rt)} has duplicate value ${String(Wi)}`);Ln.set(Wi,Zn)}}return new Le({typeName:At.ZodDiscriminatedUnion,discriminator:rt,options:zt,optionsMap:Ln,...h(rn)})}}t.ZodDiscriminatedUnion=Le;function Ce(dn,rt){const zt=(0,_.getParsedType)(dn),rn=(0,_.getParsedType)(rt);if(dn===rt)return{valid:!0,data:dn};if(zt===_.ZodParsedType.object&&rn===_.ZodParsedType.object){const Ln=_.util.objectKeys(rt),Zn=_.util.objectKeys(dn).filter(Wi=>Ln.indexOf(Wi)!==-1),Gi={...dn,...rt};for(const Wi of Zn){const oo=Ce(dn[Wi],rt[Wi]);if(!oo.valid)return{valid:!1};Gi[Wi]=oo.data}return{valid:!0,data:Gi}}else if(zt===_.ZodParsedType.array&&rn===_.ZodParsedType.array){if(dn.length!==rt.length)return{valid:!1};const Ln=[];for(let Zn=0;Zn<dn.length;Zn++){const Gi=dn[Zn],Wi=rt[Zn],oo=Ce(Gi,Wi);if(!oo.valid)return{valid:!1};Ln.push(oo.data)}return{valid:!0,data:Ln}}else return zt===_.ZodParsedType.date&&rn===_.ZodParsedType.date&&+dn==+rt?{valid:!0,data:dn}:{valid:!1}}class Ae extends u{_parse(rt){const{status:zt,ctx:rn}=this._processInputParams(rt),Ln=(Zn,Gi)=>{if((0,m.isAborted)(Zn)||(0,m.isAborted)(Gi))return m.INVALID;const Wi=Ce(Zn.value,Gi.value);return Wi.valid?(((0,m.isDirty)(Zn)||(0,m.isDirty)(Gi))&&zt.dirty(),{status:zt.value,value:Wi.data}):((0,m.addIssueToContext)(rn,{code:s.ZodIssueCode.invalid_intersection_types}),m.INVALID)};return rn.common.async?Promise.all([this._def.left._parseAsync({data:rn.data,path:rn.path,parent:rn}),this._def.right._parseAsync({data:rn.data,path:rn.path,parent:rn})]).then(([Zn,Gi])=>Ln(Zn,Gi)):Ln(this._def.left._parseSync({data:rn.data,path:rn.path,parent:rn}),this._def.right._parseSync({data:rn.data,path:rn.path,parent:rn}))}}t.ZodIntersection=Ae,Ae.create=(dn,rt,zt)=>new Ae({left:dn,right:rt,typeName:At.ZodIntersection,...h(zt)});class ve extends u{_parse(rt){const{status:zt,ctx:rn}=this._processInputParams(rt);if(rn.parsedType!==_.ZodParsedType.array)return(0,m.addIssueToContext)(rn,{code:s.ZodIssueCode.invalid_type,expected:_.ZodParsedType.array,received:rn.parsedType}),m.INVALID;if(rn.data.length<this._def.items.length)return(0,m.addIssueToContext)(rn,{code:s.ZodIssueCode.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),m.INVALID;!this._def.rest&&rn.data.length>this._def.items.length&&((0,m.addIssueToContext)(rn,{code:s.ZodIssueCode.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),zt.dirty());const Zn=[...rn.data].map((Gi,Wi)=>{const oo=this._def.items[Wi]||this._def.rest;return oo?oo._parse(new f(rn,Gi,rn.path,Wi)):null}).filter(Gi=>!!Gi);return rn.common.async?Promise.all(Zn).then(Gi=>m.ParseStatus.mergeArray(zt,Gi)):m.ParseStatus.mergeArray(zt,Zn)}get items(){return this._def.items}rest(rt){return new ve({...this._def,rest:rt})}}t.ZodTuple=ve,ve.create=(dn,rt)=>{if(!Array.isArray(dn))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new ve({items:dn,typeName:At.ZodTuple,rest:null,...h(rt)})};class ge extends u{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(rt){const{status:zt,ctx:rn}=this._processInputParams(rt);if(rn.parsedType!==_.ZodParsedType.object)return(0,m.addIssueToContext)(rn,{code:s.ZodIssueCode.invalid_type,expected:_.ZodParsedType.object,received:rn.parsedType}),m.INVALID;const Ln=[],Zn=this._def.keyType,Gi=this._def.valueType;for(const Wi in rn.data)Ln.push({key:Zn._parse(new f(rn,Wi,rn.path,Wi)),value:Gi._parse(new f(rn,rn.data[Wi],rn.path,Wi)),alwaysSet:Wi in rn.data});return rn.common.async?m.ParseStatus.mergeObjectAsync(zt,Ln):m.ParseStatus.mergeObjectSync(zt,Ln)}get element(){return this._def.valueType}static create(rt,zt,rn){return zt instanceof u?new ge({keyType:rt,valueType:zt,typeName:At.ZodRecord,...h(rn)}):new ge({keyType:V.create(),valueType:rt,typeName:At.ZodRecord,...h(zt)})}}t.ZodRecord=ge;class xe extends u{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(rt){const{status:zt,ctx:rn}=this._processInputParams(rt);if(rn.parsedType!==_.ZodParsedType.map)return(0,m.addIssueToContext)(rn,{code:s.ZodIssueCode.invalid_type,expected:_.ZodParsedType.map,received:rn.parsedType}),m.INVALID;const Ln=this._def.keyType,Zn=this._def.valueType,Gi=[...rn.data.entries()].map(([Wi,oo],Mi)=>({key:Ln._parse(new f(rn,Wi,rn.path,[Mi,"key"])),value:Zn._parse(new f(rn,oo,rn.path,[Mi,"value"]))}));if(rn.common.async){const Wi=new Map;return Promise.resolve().then(async()=>{for(const oo of Gi){const Mi=await oo.key,no=await oo.value;if(Mi.status==="aborted"||no.status==="aborted")return m.INVALID;(Mi.status==="dirty"||no.status==="dirty")&&zt.dirty(),Wi.set(Mi.value,no.value)}return{status:zt.value,value:Wi}})}else{const Wi=new Map;for(const oo of Gi){const Mi=oo.key,no=oo.value;if(Mi.status==="aborted"||no.status==="aborted")return m.INVALID;(Mi.status==="dirty"||no.status==="dirty")&&zt.dirty(),Wi.set(Mi.value,no.value)}return{status:zt.value,value:Wi}}}}t.ZodMap=xe,xe.create=(dn,rt,zt)=>new xe({valueType:rt,keyType:dn,typeName:At.ZodMap,...h(zt)});class Ie extends u{_parse(rt){const{status:zt,ctx:rn}=this._processInputParams(rt);if(rn.parsedType!==_.ZodParsedType.set)return(0,m.addIssueToContext)(rn,{code:s.ZodIssueCode.invalid_type,expected:_.ZodParsedType.set,received:rn.parsedType}),m.INVALID;const Ln=this._def;Ln.minSize!==null&&rn.data.size<Ln.minSize.value&&((0,m.addIssueToContext)(rn,{code:s.ZodIssueCode.too_small,minimum:Ln.minSize.value,type:"set",inclusive:!0,exact:!1,message:Ln.minSize.message}),zt.dirty()),Ln.maxSize!==null&&rn.data.size>Ln.maxSize.value&&((0,m.addIssueToContext)(rn,{code:s.ZodIssueCode.too_big,maximum:Ln.maxSize.value,type:"set",inclusive:!0,exact:!1,message:Ln.maxSize.message}),zt.dirty());const Zn=this._def.valueType;function Gi(oo){const Mi=new Set;for(const no of oo){if(no.status==="aborted")return m.INVALID;no.status==="dirty"&&zt.dirty(),Mi.add(no.value)}return{status:zt.value,value:Mi}}const Wi=[...rn.data.values()].map((oo,Mi)=>Zn._parse(new f(rn,oo,rn.path,Mi)));return rn.common.async?Promise.all(Wi).then(oo=>Gi(oo)):Gi(Wi)}min(rt,zt){return new Ie({...this._def,minSize:{value:rt,message:v.errorUtil.toString(zt)}})}max(rt,zt){return new Ie({...this._def,maxSize:{value:rt,message:v.errorUtil.toString(zt)}})}size(rt,zt){return this.min(rt,zt).max(rt,zt)}nonempty(rt){return this.min(1,rt)}}t.ZodSet=Ie,Ie.create=(dn,rt)=>new Ie({valueType:dn,minSize:null,maxSize:null,typeName:At.ZodSet,...h(rt)});class We extends u{constructor(){super(...arguments),this.validate=this.implement}_parse(rt){const{ctx:zt}=this._processInputParams(rt);if(zt.parsedType!==_.ZodParsedType.function)return(0,m.addIssueToContext)(zt,{code:s.ZodIssueCode.invalid_type,expected:_.ZodParsedType.function,received:zt.parsedType}),m.INVALID;function rn(Wi,oo){return(0,m.makeIssue)({data:Wi,path:zt.path,errorMaps:[zt.common.contextualErrorMap,zt.schemaErrorMap,(0,p.getErrorMap)(),p.defaultErrorMap].filter(Mi=>!!Mi),issueData:{code:s.ZodIssueCode.invalid_arguments,argumentsError:oo}})}function Ln(Wi,oo){return(0,m.makeIssue)({data:Wi,path:zt.path,errorMaps:[zt.common.contextualErrorMap,zt.schemaErrorMap,(0,p.getErrorMap)(),p.defaultErrorMap].filter(Mi=>!!Mi),issueData:{code:s.ZodIssueCode.invalid_return_type,returnTypeError:oo}})}const Zn={errorMap:zt.common.contextualErrorMap},Gi=zt.data;if(this._def.returns instanceof Fe){const Wi=this;return(0,m.OK)(async function(...oo){const Mi=new s.ZodError([]),no=await Wi._def.args.parseAsync(oo,Zn).catch(jo=>{throw Mi.addIssue(rn(oo,jo)),Mi}),uo=await Reflect.apply(Gi,this,no);return await Wi._def.returns._def.type.parseAsync(uo,Zn).catch(jo=>{throw Mi.addIssue(Ln(uo,jo)),Mi})})}else{const Wi=this;return(0,m.OK)(function(...oo){const Mi=Wi._def.args.safeParse(oo,Zn);if(!Mi.success)throw new s.ZodError([rn(oo,Mi.error)]);const no=Reflect.apply(Gi,this,Mi.data),uo=Wi._def.returns.safeParse(no,Zn);if(!uo.success)throw new s.ZodError([Ln(no,uo.error)]);return uo.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...rt){return new We({...this._def,args:ve.create(rt).rest(he.create())})}returns(rt){return new We({...this._def,returns:rt})}implement(rt){return this.parse(rt)}strictImplement(rt){return this.parse(rt)}static create(rt,zt,rn){return new We({args:rt||ve.create([]).rest(he.create()),returns:zt||he.create(),typeName:At.ZodFunction,...h(rn)})}}t.ZodFunction=We;class pe extends u{get schema(){return this._def.getter()}_parse(rt){const{ctx:zt}=this._processInputParams(rt);return this._def.getter()._parse({data:zt.data,path:zt.path,parent:zt})}}t.ZodLazy=pe,pe.create=(dn,rt)=>new pe({getter:dn,typeName:At.ZodLazy,...h(rt)});class re extends u{_parse(rt){if(rt.data!==this._def.value){const zt=this._getOrReturnCtx(rt);return(0,m.addIssueToContext)(zt,{received:zt.data,code:s.ZodIssueCode.invalid_literal,expected:this._def.value}),m.INVALID}return{status:"valid",value:rt.data}}get value(){return this._def.value}}t.ZodLiteral=re,re.create=(dn,rt)=>new re({value:dn,typeName:At.ZodLiteral,...h(rt)});function le(dn,rt){return new Te({values:dn,typeName:At.ZodEnum,...h(rt)})}class Te extends u{constructor(){super(...arguments),o.set(this,void 0)}_parse(rt){if(typeof rt.data!="string"){const zt=this._getOrReturnCtx(rt),rn=this._def.values;return(0,m.addIssueToContext)(zt,{expected:_.util.joinValues(rn),received:zt.parsedType,code:s.ZodIssueCode.invalid_type}),m.INVALID}if(n(this,o,"f")||r(this,o,new Set(this._def.values),"f"),!n(this,o,"f").has(rt.data)){const zt=this._getOrReturnCtx(rt),rn=this._def.values;return(0,m.addIssueToContext)(zt,{received:zt.data,code:s.ZodIssueCode.invalid_enum_value,options:rn}),m.INVALID}return(0,m.OK)(rt.data)}get options(){return this._def.values}get enum(){const rt={};for(const zt of this._def.values)rt[zt]=zt;return rt}get Values(){const rt={};for(const zt of this._def.values)rt[zt]=zt;return rt}get Enum(){const rt={};for(const zt of this._def.values)rt[zt]=zt;return rt}extract(rt,zt=this._def){return Te.create(rt,{...this._def,...zt})}exclude(rt,zt=this._def){return Te.create(this.options.filter(rn=>!rt.includes(rn)),{...this._def,...zt})}}t.ZodEnum=Te,o=new WeakMap,Te.create=le;class Se extends u{constructor(){super(...arguments),l.set(this,void 0)}_parse(rt){const zt=_.util.getValidEnumValues(this._def.values),rn=this._getOrReturnCtx(rt);if(rn.parsedType!==_.ZodParsedType.string&&rn.parsedType!==_.ZodParsedType.number){const Ln=_.util.objectValues(zt);return(0,m.addIssueToContext)(rn,{expected:_.util.joinValues(Ln),received:rn.parsedType,code:s.ZodIssueCode.invalid_type}),m.INVALID}if(n(this,l,"f")||r(this,l,new Set(_.util.getValidEnumValues(this._def.values)),"f"),!n(this,l,"f").has(rt.data)){const Ln=_.util.objectValues(zt);return(0,m.addIssueToContext)(rn,{received:rn.data,code:s.ZodIssueCode.invalid_enum_value,options:Ln}),m.INVALID}return(0,m.OK)(rt.data)}get enum(){return this._def.values}}t.ZodNativeEnum=Se,l=new WeakMap,Se.create=(dn,rt)=>new Se({values:dn,typeName:At.ZodNativeEnum,...h(rt)});class Fe extends u{unwrap(){return this._def.type}_parse(rt){const{ctx:zt}=this._processInputParams(rt);if(zt.parsedType!==_.ZodParsedType.promise&&zt.common.async===!1)return(0,m.addIssueToContext)(zt,{code:s.ZodIssueCode.invalid_type,expected:_.ZodParsedType.promise,received:zt.parsedType}),m.INVALID;const rn=zt.parsedType===_.ZodParsedType.promise?zt.data:Promise.resolve(zt.data);return(0,m.OK)(rn.then(Ln=>this._def.type.parseAsync(Ln,{path:zt.path,errorMap:zt.common.contextualErrorMap})))}}t.ZodPromise=Fe,Fe.create=(dn,rt)=>new Fe({type:dn,typeName:At.ZodPromise,...h(rt)});class $e extends u{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===At.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(rt){const{status:zt,ctx:rn}=this._processInputParams(rt),Ln=this._def.effect||null,Zn={addIssue:Gi=>{(0,m.addIssueToContext)(rn,Gi),Gi.fatal?zt.abort():zt.dirty()},get path(){return rn.path}};if(Zn.addIssue=Zn.addIssue.bind(Zn),Ln.type==="preprocess"){const Gi=Ln.transform(rn.data,Zn);if(rn.common.async)return Promise.resolve(Gi).then(async Wi=>{if(zt.value==="aborted")return m.INVALID;const oo=await this._def.schema._parseAsync({data:Wi,path:rn.path,parent:rn});return oo.status==="aborted"?m.INVALID:oo.status==="dirty"||zt.value==="dirty"?(0,m.DIRTY)(oo.value):oo});{if(zt.value==="aborted")return m.INVALID;const Wi=this._def.schema._parseSync({data:Gi,path:rn.path,parent:rn});return Wi.status==="aborted"?m.INVALID:Wi.status==="dirty"||zt.value==="dirty"?(0,m.DIRTY)(Wi.value):Wi}}if(Ln.type==="refinement"){const Gi=Wi=>{const oo=Ln.refinement(Wi,Zn);if(rn.common.async)return Promise.resolve(oo);if(oo instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return Wi};if(rn.common.async===!1){const Wi=this._def.schema._parseSync({data:rn.data,path:rn.path,parent:rn});return Wi.status==="aborted"?m.INVALID:(Wi.status==="dirty"&&zt.dirty(),Gi(Wi.value),{status:zt.value,value:Wi.value})}else return this._def.schema._parseAsync({data:rn.data,path:rn.path,parent:rn}).then(Wi=>Wi.status==="aborted"?m.INVALID:(Wi.status==="dirty"&&zt.dirty(),Gi(Wi.value).then(()=>({status:zt.value,value:Wi.value}))))}if(Ln.type==="transform")if(rn.common.async===!1){const Gi=this._def.schema._parseSync({data:rn.data,path:rn.path,parent:rn});if(!(0,m.isValid)(Gi))return Gi;const Wi=Ln.transform(Gi.value,Zn);if(Wi instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:zt.value,value:Wi}}else return this._def.schema._parseAsync({data:rn.data,path:rn.path,parent:rn}).then(Gi=>(0,m.isValid)(Gi)?Promise.resolve(Ln.transform(Gi.value,Zn)).then(Wi=>({status:zt.value,value:Wi})):Gi);_.util.assertNever(Ln)}}t.ZodEffects=$e,t.ZodTransformer=$e,$e.create=(dn,rt,zt)=>new $e({schema:dn,typeName:At.ZodEffects,effect:rt,...h(zt)}),$e.createWithPreprocess=(dn,rt,zt)=>new $e({schema:rt,effect:{type:"preprocess",transform:dn},typeName:At.ZodEffects,...h(zt)});class Ve extends u{_parse(rt){return this._getType(rt)===_.ZodParsedType.undefined?(0,m.OK)(void 0):this._def.innerType._parse(rt)}unwrap(){return this._def.innerType}}t.ZodOptional=Ve,Ve.create=(dn,rt)=>new Ve({innerType:dn,typeName:At.ZodOptional,...h(rt)});class mt extends u{_parse(rt){return this._getType(rt)===_.ZodParsedType.null?(0,m.OK)(null):this._def.innerType._parse(rt)}unwrap(){return this._def.innerType}}t.ZodNullable=mt,mt.create=(dn,rt)=>new mt({innerType:dn,typeName:At.ZodNullable,...h(rt)});class it extends u{_parse(rt){const{ctx:zt}=this._processInputParams(rt);let rn=zt.data;return zt.parsedType===_.ZodParsedType.undefined&&(rn=this._def.defaultValue()),this._def.innerType._parse({data:rn,path:zt.path,parent:zt})}removeDefault(){return this._def.innerType}}t.ZodDefault=it,it.create=(dn,rt)=>new it({innerType:dn,typeName:At.ZodDefault,defaultValue:typeof rt.default=="function"?rt.default:()=>rt.default,...h(rt)});class xt extends u{_parse(rt){const{ctx:zt}=this._processInputParams(rt),rn={...zt,common:{...zt.common,issues:[]}},Ln=this._def.innerType._parse({data:rn.data,path:rn.path,parent:{...rn}});return(0,m.isAsync)(Ln)?Ln.then(Zn=>({status:"valid",value:Zn.status==="valid"?Zn.value:this._def.catchValue({get error(){return new s.ZodError(rn.common.issues)},input:rn.data})})):{status:"valid",value:Ln.status==="valid"?Ln.value:this._def.catchValue({get error(){return new s.ZodError(rn.common.issues)},input:rn.data})}}removeCatch(){return this._def.innerType}}t.ZodCatch=xt,xt.create=(dn,rt)=>new xt({innerType:dn,typeName:At.ZodCatch,catchValue:typeof rt.catch=="function"?rt.catch:()=>rt.catch,...h(rt)});class lt extends u{_parse(rt){if(this._getType(rt)!==_.ZodParsedType.nan){const rn=this._getOrReturnCtx(rt);return(0,m.addIssueToContext)(rn,{code:s.ZodIssueCode.invalid_type,expected:_.ZodParsedType.nan,received:rn.parsedType}),m.INVALID}return{status:"valid",value:rt.data}}}t.ZodNaN=lt,lt.create=dn=>new lt({typeName:At.ZodNaN,...h(dn)}),t.BRAND=Symbol("zod_brand");class Dt extends u{_parse(rt){const{ctx:zt}=this._processInputParams(rt),rn=zt.data;return this._def.type._parse({data:rn,path:zt.path,parent:zt})}unwrap(){return this._def.type}}t.ZodBranded=Dt;class ot extends u{_parse(rt){const{status:zt,ctx:rn}=this._processInputParams(rt);if(rn.common.async)return(async()=>{const Zn=await this._def.in._parseAsync({data:rn.data,path:rn.path,parent:rn});return Zn.status==="aborted"?m.INVALID:Zn.status==="dirty"?(zt.dirty(),(0,m.DIRTY)(Zn.value)):this._def.out._parseAsync({data:Zn.value,path:rn.path,parent:rn})})();{const Ln=this._def.in._parseSync({data:rn.data,path:rn.path,parent:rn});return Ln.status==="aborted"?m.INVALID:Ln.status==="dirty"?(zt.dirty(),{status:"dirty",value:Ln.value}):this._def.out._parseSync({data:Ln.value,path:rn.path,parent:rn})}}static create(rt,zt){return new ot({in:rt,out:zt,typeName:At.ZodPipeline})}}t.ZodPipeline=ot;class ut extends u{_parse(rt){const zt=this._def.innerType._parse(rt),rn=Ln=>((0,m.isValid)(Ln)&&(Ln.value=Object.freeze(Ln.value)),Ln);return(0,m.isAsync)(zt)?zt.then(Ln=>rn(Ln)):rn(zt)}unwrap(){return this._def.innerType}}t.ZodReadonly=ut,ut.create=(dn,rt)=>new ut({innerType:dn,typeName:At.ZodReadonly,...h(rt)});function ht(dn,rt={},zt){return dn?ne.create().superRefine((rn,Ln)=>{var Zn,Gi;if(!dn(rn)){const Wi=typeof rt=="function"?rt(rn):typeof rt=="string"?{message:rt}:rt,oo=(Gi=(Zn=Wi.fatal)!==null&&Zn!==void 0?Zn:zt)!==null&&Gi!==void 0?Gi:!0,Mi=typeof Wi=="string"?{message:Wi}:Wi;Ln.addIssue({code:"custom",...Mi,fatal:oo})}}):ne.create()}t.custom=ht,t.late={object:ie.lazycreate};var At;(function(dn){dn.ZodString="ZodString",dn.ZodNumber="ZodNumber",dn.ZodNaN="ZodNaN",dn.ZodBigInt="ZodBigInt",dn.ZodBoolean="ZodBoolean",dn.ZodDate="ZodDate",dn.ZodSymbol="ZodSymbol",dn.ZodUndefined="ZodUndefined",dn.ZodNull="ZodNull",dn.ZodAny="ZodAny",dn.ZodUnknown="ZodUnknown",dn.ZodNever="ZodNever",dn.ZodVoid="ZodVoid",dn.ZodArray="ZodArray",dn.ZodObject="ZodObject",dn.ZodUnion="ZodUnion",dn.ZodDiscriminatedUnion="ZodDiscriminatedUnion",dn.ZodIntersection="ZodIntersection",dn.ZodTuple="ZodTuple",dn.ZodRecord="ZodRecord",dn.ZodMap="ZodMap",dn.ZodSet="ZodSet",dn.ZodFunction="ZodFunction",dn.ZodLazy="ZodLazy",dn.ZodLiteral="ZodLiteral",dn.ZodEnum="ZodEnum",dn.ZodEffects="ZodEffects",dn.ZodNativeEnum="ZodNativeEnum",dn.ZodOptional="ZodOptional",dn.ZodNullable="ZodNullable",dn.ZodDefault="ZodDefault",dn.ZodCatch="ZodCatch",dn.ZodPromise="ZodPromise",dn.ZodBranded="ZodBranded",dn.ZodPipeline="ZodPipeline",dn.ZodReadonly="ZodReadonly"})(At||(t.ZodFirstPartyTypeKind=At={}));class Ht{constructor(...rt){}}const bn=(dn,rt={message:`Input not instance of ${dn.name}`})=>ht(zt=>zt instanceof dn,rt);t.instanceof=bn;const Hn=V.create;t.string=Hn;const Ei=Y.create;t.number=Ei;const Un=lt.create;t.nan=Un;const Jt=z.create;t.bigint=Jt;const An=H.create;t.boolean=An;const cn=K.create;t.date=cn;const Vt=Z.create;t.symbol=Vt;const _t=Q.create;t.undefined=_t;const ze=oe.create;t.null=ze;const Je=ne.create;t.any=Je;const yt=he.create;t.unknown=yt;const In=_e.create;t.never=In;const qn=q.create;t.void=qn;const Pi=Oe.create;t.array=Pi;const Fi=ie.create;t.object=Fi;const so=ie.strictCreate;t.strictObject=so;const Ji=fe.create;t.union=Ji;const fo=Le.create;t.discriminatedUnion=fo;const ci=Ae.create;t.intersection=ci;const $n=ve.create;t.tuple=$n;const Di=ge.create;t.record=Di;const zi=xe.create;t.map=zi;const to=Ie.create;t.set=to;const Ki=We.create;t.function=Ki;const En=pe.create;t.lazy=En;const si=re.create;t.literal=si;const kn=Te.create;t.enum=kn;const st=Se.create;t.nativeEnum=st;const Pt=Fe.create;t.promise=Pt;const Tt=$e.create;t.effect=Tt,t.transformer=Tt;const St=Ve.create;t.optional=St;const Sn=mt.create;t.nullable=Sn;const gn=$e.createWithPreprocess;t.preprocess=gn;const ln=ot.create;t.pipeline=ln;const zn=()=>Hn().optional();t.ostring=zn;const hi=()=>Ei().optional();t.onumber=hi;const bi=()=>An().optional();t.oboolean=bi,t.coerce={string:dn=>V.create({...dn,coerce:!0}),number:dn=>Y.create({...dn,coerce:!0}),boolean:dn=>H.create({...dn,coerce:!0}),bigint:dn=>z.create({...dn,coerce:!0}),date:dn=>K.create({...dn,coerce:!0})},t.NEVER=m.INVALID},79682:(x,t,e)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.ChromeDevtoolsContribution=void 0;const r=e(85608),o=e(76003),l=e(41869),p=e(65265),v=e(98295),m=e(27654);let _=n=class extends l.Disposable{constructor(){super(...arguments),this.lantencyHandler=f=>{const{command:a}=f.detail;a===p.DevtoolsLantencyCommand.Start?this.interval||this.startRTTInterval():a===p.DevtoolsLantencyCommand.Stop&&this.interval&&(clearInterval(this.interval),this.interval=void 0)}}initialize(){var f;this.appConfig.devtools&&(window.addEventListener(p.EDevtoolsEvent.Latency,this.lantencyHandler),this.addDispose(l.Disposable.create(()=>{window.removeEventListener(p.EDevtoolsEvent.Latency,this.lantencyHandler),this.interval&&(clearInterval(this.interval),this.interval=void 0)})),!((f=window.__OPENSUMI_DEVTOOLS_GLOBAL_HOOK__)===null||f===void 0)&&f.captureRPC&&(this.interval||this.startRTTInterval()))}startRTTInterval(){this.interval=setInterval(async()=>{const f=Date.now();await this.rttService.measure();const a=Date.now()-f;window.__OPENSUMI_DEVTOOLS_GLOBAL_HOOK__.captureRPC&&(window.__OPENSUMI_DEVTOOLS_GLOBAL_HOOK__.latency=a)},n.INTERVAL)}};t.ChromeDevtoolsContribution=_,_.INTERVAL=1e3,r.__decorate([(0,o.Autowired)(l.AppConfig),r.__metadata("design:type",Object)],_.prototype,"appConfig",void 0),r.__decorate([(0,o.Autowired)(m.ConnectionRTTBrowserServiceToken),r.__metadata("design:type",m.ConnectionRTTBrowserService)],_.prototype,"rttService",void 0),t.ChromeDevtoolsContribution=_=n=r.__decorate([(0,v.Domain)(l.ClientAppContribution)],_)},72915:(x,t,e)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.ConnectionRTTContribution=void 0;const r=e(85608),o=e(76003),l=e(26542),p=e(92323),v=e(98295),m=e(27654),_={id:"connection.start.rtt",label:"%connection.start.rtt%",category:"%command.category.developerTools%"},s={id:"connection.stop.rtt",label:"%connection.stop.rtt%",category:"%command.category.developerTools%"},f={alignment:l.StatusBarAlignment.LEFT,priority:1/0-1};let a=n=class{registerCommands(u){u.registerCommand(_,{execute:()=>{this.interval||this.startRTTInterval()}}),u.registerCommand(s,{execute:()=>{this.interval&&(clearInterval(this.interval),this.statusBar&&(this.statusBar.dispose(),this.statusBar=void 0))}})}startRTTInterval(){this.interval=setInterval(async()=>{const u=Date.now();await this.rttService.measure();const E={text:`${Date.now()-u}ms`};if(this.statusBar)this.statusBar.update({...E,...f});else{const g=this.statusBarService.addElement("connection-rtt",{...E,...f});this.statusBar=g}},n.INTERVAL)}};t.ConnectionRTTContribution=a,a.INTERVAL=1e3,r.__decorate([(0,o.Autowired)(l.IStatusBarService),r.__metadata("design:type",Object)],a.prototype,"statusBarService",void 0),r.__decorate([(0,o.Autowired)(m.ConnectionRTTBrowserServiceToken),r.__metadata("design:type",m.ConnectionRTTBrowserService)],a.prototype,"rttService",void 0),t.ConnectionRTTContribution=a=n=r.__decorate([(0,v.Domain)(p.CommandContribution)],a)},27654:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ConnectionRTTBrowserService=t.ConnectionRTTBrowserServiceToken=void 0;const n=e(85608),r=e(76003),o=e(69452);t.ConnectionRTTBrowserServiceToken=Symbol("ConnectionRTTBrowserService");let l=class{async measure(){await this.connectionBackService.$measure()}};t.ConnectionRTTBrowserService=l,n.__decorate([(0,r.Autowired)(o.ConnectionBackServicePath),n.__metadata("design:type",Object)],l.prototype,"connectionBackService",void 0),t.ConnectionRTTBrowserService=l=n.__decorate([(0,r.Injectable)()],l)},17631:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FileDropContribution=void 0;const n=e(85608),r=e(76003),o=e(41869),l=e(43718),p=e(69452);let v=class extends l.WithEventBus{onDidDropFile(_){this.dropService.onDidDropFile(_)}};t.FileDropContribution=v,n.__decorate([(0,r.Autowired)(p.IFileDropFrontendServiceToken),n.__metadata("design:type",Object)],v.prototype,"dropService",void 0),n.__decorate([(0,l.OnEvent)(l.FileTreeDropEvent),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[l.FileTreeDropEvent]),n.__metadata("design:returntype",void 0)],v.prototype,"onDidDropFile",null),t.FileDropContribution=v=n.__decorate([(0,r.Injectable)(),(0,o.Domain)(o.ClientAppContribution)],v)},22874:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FileDropService=void 0;const n=e(85608),r=e(76003),o=e(41869),l=e(26542),p=e(43718),v=e(42933),{Path:m}=p.path,_=e(69452);let s=class extends p.WithEventBus{constructor(){super(...arguments),this.pending=new Set}onDidUploadFileStart(a){this.pending.add(a),this.createOrUpdateStatusBar()}onDidUploadFileEnd(a){this.pending.delete(a),this.createOrUpdateStatusBar()}createOrUpdateStatusBar(a){if(this.pending.size===0){this.uploadStatus&&(this.uploadStatus.dispose(),this.uploadStatus=void 0);return}const h="sumi-upload-file-status",u=(0,o.formatLocalize)("workbench.uploadingFiles",this.pending.size,a||"0 MB"),d={text:u,alignment:l.StatusBarAlignment.RIGHT,tooltip:u,iconClass:"kaitian-icon kticon-cloud-server"};this.uploadStatus?this.uploadStatus.update({id:h,...d}):this.uploadStatus=this.statusBarService.addElement(h,d)}onDidDropFile(a){var h;const{payload:{event:u,targetDir:d}}=a;if(!d||!(!((h=u.dataTransfer)===null||h===void 0)&&h.files)||u.dataTransfer.files.length===0)return;const E=u.dataTransfer.items;let g=0;const c=Date.now(),b=y=>{g+=y;const S=Date.now(),w=`${(g/((S-c)/1e3)/1024/1024).toFixed(2)} MB`;this.createOrUpdateStatusBar(w)};for(const y of E){const S=y.webkitGetAsEntry();this.processFilesEntry(d,S,b)}}async processFilesEntry(a,h,u){if(h.isFile)this.processFileEntry(h,a,u);else{const d=p.Uri.file(new m(a).join(h.fullPath).toString()).toString();await this.fs.createFolder(d),this.processDirEntry(h,a,u)}}toBinaryString(a){let h;const u=a.length;let d="";for(h=0;h<u;h+=1)d+=String.fromCharCode(a[h]);return d}async doUploadFile(a,h,u){var d;const E=new m(h).join(a.name).toString();this.onDidUploadFileStart(E.toString()),await this.fs.createFile(p.Uri.file(E.toString()).toString()),await this.dropService.$ensureFileExist(a.name,h);const g=a.stream().getReader();let c=await g.read();for(;!c.done;)await this.dropService.$writeStream(this.toBinaryString(c.value),a.name,h,c.done),u((d=c.value)===null||d===void 0?void 0:d.byteLength),c=await g.read();c.done&&this.onDidUploadFileEnd(E.toString())}processFileEntry(a,h,u){a.file(d=>{const E=new File([d],a.fullPath,{type:a.type});this.doUploadFile(E,h,u)},()=>{})}processDirEntry(a,h,u){a.createReader().readEntries(E=>{E.forEach(async g=>{this.processFilesEntry(h,g,u)})},()=>{})}};t.FileDropService=s,n.__decorate([(0,r.Autowired)(v.IFileServiceClient),n.__metadata("design:type",Object)],s.prototype,"fs",void 0),n.__decorate([(0,r.Autowired)(_.FileDropServicePath),n.__metadata("design:type",Object)],s.prototype,"dropService",void 0),n.__decorate([(0,r.Autowired)(l.IStatusBarService),n.__metadata("design:type",Object)],s.prototype,"statusBarService",void 0),t.FileDropService=s=n.__decorate([(0,r.Injectable)()],s)},79240:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FileSearchContribution=t.FileSearchQuickCommandHandler=t.matchLineReg=t.quickGoToSymbol=t.quickFileOpen=void 0,t.getValidateInput=b;const n=e(85608),r=n.__importDefault(e(39050)),o=e(76003),l=e(41869),p=e(26542),v=e(43718),m=e(98295),_=e(54414),s=e(17459),f=e(84660),a=n.__importStar(e(20868)),h=e(97821),u=e(80490),d=e(51500),E=e(30981),g=200;t.quickFileOpen={id:"workbench.action.quickOpen",category:"File",label:"Open File..."},t.quickGoToSymbol={id:"workbench.action.gotoSymbol",category:"File",label:"Open File Symbol..."},t.matchLineReg=/^([^:#(]*)[:#(]?L?(\d+)?[:,]?(\d+)?\)?/;function c(T=""){const D=T.match(t.matchLineReg)||[];if(D.length<2)return;const I={line:Number(D[2]||0),start:Number(D[3]||0)};return new a.Range(I.line,I.start,I.line,I.start)}function b(T){return T.replace(t.matchLineReg,"$1")}let y=class extends h.QuickOpenBaseAction{constructor(){super({id:"file-search:splitToRight",tooltip:(0,l.localize)("quickOpen.openOnTheRightSide"),class:(0,l.getIcon)("embed")})}async run(D){await this.commandService.executeCommand(l.EDITOR_COMMANDS.OPEN_RESOURCE.id,D.getUri(),{preview:!1,split:_.EditorGroupSplitAction.Right,range:c(this.injector.get(A).currentLookFor),focus:!0})}};n.__decorate([(0,o.Autowired)(l.CommandService),n.__metadata("design:type",Object)],y.prototype,"commandService",void 0),n.__decorate([(0,o.Autowired)(o.INJECTOR_TOKEN),n.__metadata("design:type",o.Injector)],y.prototype,"injector",void 0),y=n.__decorate([(0,o.Injectable)(),n.__metadata("design:paramtypes",[])],y);let S=class{hasActions(){return!0}getActions(){return[this.fileSearchActionLeftRight]}getValidateInput(D){return b(D)}};n.__decorate([(0,o.Autowired)(),n.__metadata("design:type",y)],S.prototype,"fileSearchActionLeftRight",void 0),S=n.__decorate([(0,o.Injectable)()],S);let A=class{constructor(){this.cancelIndicator=new v.CancellationTokenSource,this.default=!0,this.prefix="...",this.description=(0,l.localize)("file-search.command.fileOpen.description"),this.prevEditorState={},this.currentLookFor=""}getModel(){return{onType:async(D,I)=>{this.cancelIndicator.cancel(),this.cancelIndicator=new v.CancellationTokenSource;const R=this.cancelIndicator.token,M=new Set;let O=[];D=D.trim().replace(/\s/g,""),this.currentLookFor=D;const P=b(D),k=this.reporterService.time(v.REPORT_NAME.QUICK_OPEN_MEASURE),F=await this.getRecentlyItems(M,P,R);if(D&&(this.logger.debug("lookFor",D,P),O=await this.getFindOutItems(M,P,R)),R.isCancellationRequested)return;const L=F.concat(O);I(L,L.length?this.fileSearchActionProvider:void 0),k.timeEnd(D.indexOf("@")>-1?"file-symbol":"file",{lookFor:D,stat:{recently:F.length,find:O.length}})}}}getOptions(){return{placeholder:(0,l.localize)("file-search.command.fileOpen.placeholder"),fuzzyMatchLabel:{enableSeparateSubstringMatching:!0},showItemsWithoutHighlight:!0,fuzzyMatchDescription:{enableSeparateSubstringMatching:!0},getPlaceholderItem:D=>new l.QuickOpenItem({label:(0,l.localize)(D.indexOf("@")>-1?"search.fileSymbolResults.notfound":"search.fileResults.notfound"),run:()=>!1})}}onClose(D){D&&this.prevEditorState.uri&&(this.workbenchEditorService.open(this.prevEditorState.uri,{range:this.prevEditorState.range}),this.prevEditorState={}),this.prevSelected=void 0,this.cancelIndicator.cancel()}onToggle(){this.cancelIndicator.cancel()}trySaveEditorState(){var D;if(this.workbenchEditorService.currentResource){let I={startColumn:1,startLineNumber:1,endColumn:1,endLineNumber:1};const R=(D=this.workbenchEditorService.currentEditor)===null||D===void 0?void 0:D.getSelections();if(R){const{selectionStartLineNumber:M,selectionStartColumn:O,positionLineNumber:P,positionColumn:k}=R[0];I=new a.Range(M,O,P,k)}this.prevEditorState={uri:this.workbenchEditorService.currentResource.uri,range:I}}}async getFindOutItems(D,I,R){var M;let O;if(I.indexOf("@")>-1){this.trySaveEditorState(),O=[];const[P,k]=I.split("@");let F;if(this.prevSelected)F=this.prevSelected.withoutFragment();else if(P){const L=await this.getQueryFiles(P,D,R);L.length&&(F=L[0].getUri())}else F=(M=this.workbenchEditorService.currentResource)===null||M===void 0?void 0:M.uri;if(F){const L=await this.documentSymbolStore.getDocumentSymbolAsync(F)||[],B=[];this.flattenSymbols({children:L},B),O=B.filter(W=>{const U=(0,E.matchesFuzzy)(k,W.name,!0)||[];return U&&(W.labelHighlights=U),U&&U.length}).map((W,U)=>{var X;return new l.QuickOpenItem({uri:F,label:W.name,iconClass:(0,l.getSymbolIcon)(W.kind),description:(X=W.parent)===null||X===void 0?void 0:X.name,labelHighlights:W.labelHighlights,groupLabel:U===0?(0,l.formatLocalize)("search.fileSymbolResults",B.length):"",showBorder:!1,run:V=>V===l.Mode.PREVIEW?(this.locateSymbol(F,W),!0):V===l.Mode.OPEN?(this.locateSymbol(F,W),!0):!1})})}else return[]}else if(O=await this.getQueryFiles(I,D,R),O[0]){const P=await this.getItems([O[0].getUri().codeUri.fsPath],{groupLabel:(0,l.localize)("search.fileResults"),showBorder:!0});O[0]=P[0]}return O}async getQueryFiles(D,I,R){const O=(await this.workspaceService.roots).map(F=>new l.URI(F.uri).codeUri.fsPath),P=await this.fileSearchService.find(D,{rootUris:O,fuzzyMatch:!0,limit:g,useGitIgnore:!0,noIgnoreParent:!0,excludePatterns:this.getPreferenceSearchExcludes()},R),k=await this.getItems(P.filter(F=>I.has(F)||R.isCancellationRequested?!1:(I.add(F),!0)),{});return k.sort(this.compareItems.bind(this)),k}async flattenSymbols(D,I){D.children.forEach(R=>{I.push(R),R.children&&this.flattenSymbols(R,I)})}async getRecentlyItems(D,I,R){const M=await this.recentFilesManager.getMostRecentlyOpenedFiles(!0)||[];return await this.getItems(M.filter(O=>{const P=new l.URI(O);return D.has(O)||!r.default.test(I,P.displayName)||R.isCancellationRequested?!1:(D.add(O),!0)}),{groupLabel:(0,l.localize)("search.historyMatches")})}async getItems(D,I){const R=[];for(const[M,O]of D.entries()){const P=l.URI.isUriString(O)?new l.URI(O):l.URI.file(O),k=`file-icon ${this.labelService.getIcon(P.withoutFragment())}`;let F="";const L=await this.workspaceService.asRelativePath(P.parent);L&&(this.workspaceService.isMultiRootWorkspaceOpened?F=`${new l.URI(L.root).displayName}${L.path?` \u30FB ${L.path}`:""}`:F=L.path||"");const B=new l.QuickOpenItem({uri:P,label:P.displayName,tooltip:O,iconClass:k,description:F,groupLabel:M===0?I.groupLabel:"",showBorder:D.length>0&&M===0?I.showBorder:!1,run:j=>(j===l.Mode.PREVIEW&&(this.prevSelected=P),j===l.Mode.OPEN?(this.openFile(P),!0):!1)});R.push(B)}return R}openFile(D){const I=D.codeUri.fsPath;let R=c(this.currentLookFor);(!R||!R.startLineNumber&&!R.startColumn)&&(R=c(D.fragment?"#"+D.fragment:I)),this.currentLookFor="",this.commandService.executeCommand(l.EDITOR_COMMANDS.OPEN_RESOURCE.id,D.withoutFragment(),{preview:!1,range:R,focus:!0})}locateSymbol(D,I){this.workbenchEditorService.open(D,{range:I.range,preview:!0})}compareItems(D,I,R="getLabel"){function M(j){return j.trim().toLowerCase()}const O=M(b(this.currentLookFor));function P(j){const W=r.default.match(O,j);return W===null?0:W.score}let k=D[R](),F=I[R]();typeof k!="string"&&(k=k.path.toString()),typeof F!="string"&&(F=F.path.toString()),k=M(k),F=M(F);const L=P(k),B=P(F);if(L===B){const j=k.indexOf(O),W=F.indexOf(O);return j===W?k.length!==F.length?k.length<F.length?-1:1:F.localeCompare(k)===0?R==="getUri"?0:this.compareItems(D,I,"getUri"):F.localeCompare(k):j-W}return B-L}getPreferenceSearchExcludes(){const D=[],I=this.preferenceService.get("files.exclude"),R=this.preferenceService.get("search.exclude"),M=Object.assign({},I,R);for(const O of Object.keys(M))M[O]&&D.push(O);return D}};t.FileSearchQuickCommandHandler=A,n.__decorate([(0,o.Autowired)(l.CommandService),n.__metadata("design:type",Object)],A.prototype,"commandService",void 0),n.__decorate([(0,o.Autowired)(f.FileSearchServicePath),n.__metadata("design:type",Object)],A.prototype,"fileSearchService",void 0),n.__decorate([(0,o.Autowired)(_.WorkbenchEditorService),n.__metadata("design:type",_.WorkbenchEditorService)],A.prototype,"workbenchEditorService",void 0),n.__decorate([(0,o.Autowired)(s.DocumentSymbolStore),n.__metadata("design:type",s.DocumentSymbolStore)],A.prototype,"documentSymbolStore",void 0),n.__decorate([(0,o.Autowired)(),n.__metadata("design:type",p.LabelService)],A.prototype,"labelService",void 0),n.__decorate([(0,o.Autowired)(d.IWorkspaceService),n.__metadata("design:type",Object)],A.prototype,"workspaceService",void 0),n.__decorate([(0,o.Autowired)(l.RecentFilesManager),n.__metadata("design:type",l.RecentFilesManager)],A.prototype,"recentFilesManager",void 0),n.__decorate([(0,o.Autowired)(l.ILogger),n.__metadata("design:type",Object)],A.prototype,"logger",void 0),n.__decorate([(0,o.Autowired)(),n.__metadata("design:type",S)],A.prototype,"fileSearchActionProvider",void 0),n.__decorate([(0,o.Autowired)(l.PreferenceService),n.__metadata("design:type",Object)],A.prototype,"preferenceService",void 0),n.__decorate([(0,o.Autowired)(v.IReporterService),n.__metadata("design:type",Object)],A.prototype,"reporterService",void 0),t.FileSearchQuickCommandHandler=A=n.__decorate([(0,o.Injectable)()],A);let w=class{registerQuickOpenHandlers(D){D.registerHandler(this.fileSearchQuickCommandHandler,{title:(0,l.localize)("quickopen.tab.file"),commandId:t.quickFileOpen.id,order:1})}registerCommands(D){D.registerCommand(t.quickFileOpen,{execute:()=>this.quickOpenService.open("...")}),D.registerCommand(t.quickGoToSymbol,{execute:()=>this.quickOpenService.open("...@")})}registerKeybindings(D){D.registerKeybinding({command:t.quickFileOpen.id,keybinding:"ctrlcmd+p"})}};t.FileSearchContribution=w,n.__decorate([(0,o.Autowired)(A),n.__metadata("design:type",A)],w.prototype,"fileSearchQuickCommandHandler",void 0),n.__decorate([(0,o.Autowired)(h.PrefixQuickOpenService),n.__metadata("design:type",Object)],w.prototype,"quickOpenService",void 0),t.FileSearchContribution=w=n.__decorate([(0,m.Domain)(v.CommandContribution,l.KeybindingContribution,u.QuickOpenContribution)],w)},73827:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ClientAddonModule=void 0;const n=e(85608),r=e(76003),o=e(41869),l=e(69452),p=e(79682),v=e(72915),m=e(27654),_=e(17631),s=e(22874),f=e(79240),a=e(18256),h=e(7756),u=e(16426);let d=class extends o.BrowserModule{constructor(){super(...arguments),this.providers=[p.ChromeDevtoolsContribution,a.LanguageChangeHintContribution,f.FileSearchContribution,h.StatusBarContribution,u.ToolbarCustomizeContribution,_.FileDropContribution,v.ConnectionRTTContribution,{token:l.IFileDropFrontendServiceToken,useClass:s.FileDropService},{token:m.ConnectionRTTBrowserServiceToken,useClass:m.ConnectionRTTBrowserService}],this.backServices=[{servicePath:l.FileDropServicePath},{servicePath:l.ConnectionBackServicePath}]}};t.ClientAddonModule=d,t.ClientAddonModule=d=n.__decorate([(0,r.Injectable)()],d)},18256:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LanguageChangeHintContribution=void 0;const n=e(85608),r=e(76003),o=e(41869),l=e(72665);let p=class{onStart(){this.preferenceService.onSpecificPreferenceChange(o.GeneralSettingsId.Language,async m=>{(0,o.setLanguageId)(m.newValue),this.preferenceService.get("general.askReloadOnLanguageChange")&&await this.dialogService.info((0,o.localize)("preference.general.language.change.refresh.info","After changing the language, it should be restarted to take effect. Will it be refreshed immediately?"),[(0,o.localize)("preference.general.language.change.refresh.later","Later"),(0,o.localize)("preference.general.language.change.refresh.now","Now")])===(0,o.localize)("preference.general.language.change.refresh.now","Now")&&this.clientApp.fireOnReload()})}};t.LanguageChangeHintContribution=p,n.__decorate([(0,r.Autowired)(o.PreferenceService),n.__metadata("design:type",Object)],p.prototype,"preferenceService",void 0),n.__decorate([(0,r.Autowired)(o.IClientApp),n.__metadata("design:type",Object)],p.prototype,"clientApp",void 0),n.__decorate([(0,r.Autowired)(l.IDialogService),n.__metadata("design:type",Object)],p.prototype,"dialogService",void 0),t.LanguageChangeHintContribution=p=n.__decorate([(0,o.Domain)(o.ClientAppContribution)],p)},7756:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StatusBarContribution=void 0;const n=e(85608),r=e(76003),o=e(41869),l=e(43718);let p=class extends l.WithEventBus{onStart(){}handleBrowserConnectionOpen(){this.commandService.executeCommand("statusbar.changeBackgroundColor","var(--statusBar-background)"),this.logger.log("Browser connection open, change status bar background color")}handleBrowserConnectionClose(){this.commandService.executeCommand("statusbar.changeBackgroundColor","var(--kt-statusbar-offline-background)"),this.logger.log("Browser connection close, change status bar background color")}};t.StatusBarContribution=p,n.__decorate([(0,r.Autowired)(l.CommandService),n.__metadata("design:type",Object)],p.prototype,"commandService",void 0),n.__decorate([(0,r.Autowired)(l.ILogger),n.__metadata("design:type",Object)],p.prototype,"logger",void 0),n.__decorate([(0,l.OnEvent)(l.BrowserConnectionOpenEvent),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[]),n.__metadata("design:returntype",void 0)],p.prototype,"handleBrowserConnectionOpen",null),n.__decorate([(0,l.OnEvent)(l.BrowserConnectionCloseEvent),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[]),n.__metadata("design:returntype",void 0)],p.prototype,"handleBrowserConnectionClose",null),t.StatusBarContribution=p=n.__decorate([(0,l.Domain)(o.ClientAppContribution)],p)},16426:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ToolbarCustomizeContribution=void 0;const n=e(85608),r=e(76003),o=e(41869),l=e(93899),p=e(62132);let v=class{registerCommands(_){_.registerCommand({id:"toolbar.showCustomizePanel",label:"Show Toolbar Customization"},{execute:()=>{this.viewService.setVisible(!0)}})}registerComponent(_){_.register("addon/toolbar-customize",{id:"addon/toolbar-customize",component:p.ToolbarCustomizeComponent}),this.config.layoutConfig[o.SlotLocation.extra]||(this.config.layoutConfig[o.SlotLocation.extra]={modules:[]}),this.config.layoutConfig[o.SlotLocation.extra].modules.push("addon/toolbar-customize")}registerMenus(_){_.registerMenuItem(l.MenuId.KTToolbarLocationContext,{command:{id:"toolbar.showCustomizePanel",label:(0,o.localize)("toolbar.customize.menu")}})}};t.ToolbarCustomizeContribution=v,n.__decorate([(0,r.Autowired)(o.AppConfig),n.__metadata("design:type",Object)],v.prototype,"config",void 0),n.__decorate([(0,r.Autowired)(p.ToolbarCustomizeViewService),n.__metadata("design:type",p.ToolbarCustomizeViewService)],v.prototype,"viewService",void 0),t.ToolbarCustomizeContribution=v=n.__decorate([(0,o.Domain)(o.CommandContribution,o.ComponentContribution,l.MenuContribution)],v)},62132:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ToolbarCustomizeComponent=t.ToolbarCustomizeViewService=void 0;const n=e(85608),r=n.__importDefault(e(14041)),o=e(76003),l=e(97267),p=e(41869),v=n.__importDefault(e(18541));let m=class{bindSetVisibleHandle(f){this._setVisible=f}setVisible(f){this._setVisible(f)}async toggleActionVisibility(f,a,h){const u=this.preferenceService.getValid("toolbar.ignoreActions",{});if(u[f]||(u[f]=[]),!h)u[f].indexOf(a)===-1&&u[f].push(a);else{const E=u[f].indexOf(a);E!==-1&&u[f].splice(E,1)}const d=this.preferenceService.inspect("toolbar.ignoreActions").workspaceValue?p.PreferenceScope.Workspace:p.PreferenceScope.User;await this.preferenceService.set("toolbar.ignoreActions",u,d)}};t.ToolbarCustomizeViewService=m,n.__decorate([(0,o.Autowired)(p.PreferenceService),n.__metadata("design:type",Object)],m.prototype,"preferenceService",void 0),t.ToolbarCustomizeViewService=m=n.__decorate([(0,o.Injectable)()],m);const _=()=>{const[s,f]=r.default.useState(!1),a=(0,p.useInjectable)(m),h=(0,p.useInjectable)(p.IToolbarRegistry),u=(0,p.useInjectable)(p.PreferenceService);if(a.bindSetVisibleHandle(f),!s)return null;const d=h.getAllLocations(),E=u.get("toolbar.ignoreActions")||{};let g=u.get("toolbar.buttonDisplay","iconAndText");function c(b){const y=[{id:"_head"},...h.getActionGroups(b)||[],{id:"_tail"}],S=[],A=E[b]||[];return y.forEach((w,T)=>{const D=h.getToolbarActions({location:b,group:w.id});D&&D.actions.length>0&&(S.length>0&&S.push(r.default.createElement("div",{className:v.default["group-split"],key:"split-"+T})),D.actions.forEach((I,R)=>{var M;let O=A.indexOf(I.id)===-1;const P="action-toggle-"+I.id;S.push(r.default.createElement("div",{className:v.default["action-item"],key:R+"_"+I.id},r.default.createElement(l.CheckBox,{onChange:()=>{a.toggleActionVisibility(b,I.id,!O),O=!O},defaultChecked:O,id:P,label:(M=I.description)!==null&&M!==void 0?M:I.id})))}))}),S.length===0?null:r.default.createElement("div",{key:b,className:v.default["toolbar-customize-location"]},S)}return r.default.createElement("div",{className:v.default["toolbar-customize-overlay"]},r.default.createElement("div",{className:v.default["toolbar-customize"]},d.map(b=>c(b)),r.default.createElement("div",{className:v.default["button-display"]},r.default.createElement("div",null,(0,p.localize)("toolbar-customize.buttonDisplay.description")),r.default.createElement(l.Select,{options:[{label:(0,p.localize)("toolbar-customize.buttonDisplay.icon"),value:"icon"},{label:(0,p.localize)("toolbar-customize.buttonDisplay.iconAndText"),value:"iconAndText"}],value:g,onChange:b=>{const y=u.inspect("toolbar.buttonDisplay").workspaceValue?p.PreferenceScope.Workspace:p.PreferenceScope.User;u.set("toolbar.buttonDisplay",b,y),g=b},className:v.default["button-display-select"]})),r.default.createElement("div",{className:v.default["customize-complete"]},r.default.createElement(l.Button,{type:"primary",onClick:()=>f(!1)},(0,p.localize)("toolbar-customize.complete")))))};t.ToolbarCustomizeComponent=_},69452:(x,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IConnectionBackService=t.ConnectionBackServicePath=t.IFileDropFrontendServiceToken=t.IFileDropServiceToken=t.FileDropServicePath=void 0,t.FileDropServicePath="FileDropServicePath",t.IFileDropServiceToken=Symbol("IFileDropService"),t.IFileDropFrontendServiceToken=Symbol("IFileDropFrontendService"),t.ConnectionBackServicePath="ConnectionBackServicePath",t.IConnectionBackService=Symbol("IConnectionBackService")},77659:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AINativeContextKey=void 0;const n=e(85608),r=e(76003),o=e(41869),l=e(50394);let p=class{get contextKeyService(){return this._contextKeyService}constructor(m){this._contextKeyService=this.globalContextKeyService.createScoped(m),this.inlineChatIsVisible=l.InlineChatIsVisible.bind(this._contextKeyService),this.inlineCompletionIsTrigger=l.InlineCompletionIsTrigger.bind(this._contextKeyService),this.inlineHintWidgetIsVisible=l.InlineHintWidgetIsVisible.bind(this._contextKeyService),this.inlineInputWidgetIsVisible=l.InlineInputWidgetIsVisible.bind(this._contextKeyService),this.inlineInputWidgetIsStreaming=l.InlineInputWidgetIsStreaming.bind(this._contextKeyService),this.inlineDiffPartialEditsIsVisible=l.InlineDiffPartialEditsIsVisible.bind(this._contextKeyService),this.codeEditsIsVisible=l.CodeEditsIsVisible.bind(this._contextKeyService)}};t.AINativeContextKey=p,n.__decorate([(0,r.Autowired)(o.IContextKeyService),n.__metadata("design:type",Object)],p.prototype,"globalContextKeyService",void 0),t.AINativeContextKey=p=n.__decorate([(0,r.Injectable)(),n.__param(0,(0,r.Optional)()),n.__metadata("design:paramtypes",[Object])],p)},32016:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AINativeBrowserContribution=t.INLINE_DIFF_MANAGER_WIDGET_ID=void 0;const n=e(85608),r=e(76003),o=e(41869),l=e(57925),p=e(50394),v=e(1149),m=e(97222),_=e(43718),s=e(82353),f=e(54414),a=e(57517),h=e(51553),u=e(63067),d=e(46507),E=e(97682),g=e(68415),c=e(96640),b=e(19413),y=e(61282),S=e(51081),A=e(59347),w=e(76154),T=e(79559),D=e(57232),I=e(72991),R=e(71863),M=e(7511),O=e(42911),P=e(72801),k=e(87817),F=e(4972),L=e(82983),B=e(73974),j=e(77633),W=e(51221),U=e(2281),X=e(31031),V=e(95608),$=e(38890),Y=e(77886),z=e(89060),H=e(74353),K=e(22169),Z=e(90058);t.INLINE_DIFF_MANAGER_WIDGET_ID="inline-diff-manager-widget";let Q=class{constructor(){this.registerFeature()}async initialize(){const{supportsChatAssistant:ne}=this.aiNativeConfigService.capabilities;ne&&(o.ComponentRegistryImpl.addLayoutModule(this.appConfig.layoutConfig,b.AI_CHAT_VIEW_ID,b.AI_CHAT_CONTAINER_ID),o.ComponentRegistryImpl.addLayoutModule(this.appConfig.layoutConfig,s.DESIGN_MENU_BAR_RIGHT,b.AI_CHAT_LOGO_AVATAR_ID),this.chatProxyService.registerDefaultAgent(),this.chatInternalService.init(),await this.chatManagerService.init())}registerEditorExtensionContribution(ne){const{supportsInlineChat:he,supportsInlineCompletion:_e,supportsProblemFix:q,supportsCodeAction:Oe}=this.aiNativeConfigService.capabilities;ne($.InlineDiffController.ID,new c.SyncDescriptor($.InlineDiffController,[this.injector]),E.EditorContributionInstantiation.Lazy),Oe&&ne(Z.SumiLightBulbWidget.ID,Z.SumiLightBulbWidget,E.EditorContributionInstantiation.Lazy),he&&(ne(W.InlineChatEditorController.ID,new c.SyncDescriptor(W.InlineChatEditorController,[this.injector]),E.EditorContributionInstantiation.BeforeFirstInteraction),this.inlineInputService.getInteractiveInputHandler()&&(ne(Y.InlineHintController.ID,new c.SyncDescriptor(Y.InlineHintController,[this.injector]),E.EditorContributionInstantiation.AfterFirstRender),ne(z.InlineInputController.ID,new c.SyncDescriptor(z.InlineInputController,[this.injector]),E.EditorContributionInstantiation.AfterFirstRender))),_e&&(ne(M.IntelligentCompletionsController.ID,new c.SyncDescriptor(M.IntelligentCompletionsController,[this.injector]),E.EditorContributionInstantiation.Eager),ne(I.InlineCompletionsController.ID,new c.SyncDescriptor(I.InlineCompletionsController,[this.injector]),E.EditorContributionInstantiation.AfterFirstRender)),q&&ne(O.ProblemFixController.ID,new c.SyncDescriptor(O.ProblemFixController,[this.injector]),E.EditorContributionInstantiation.AfterFirstRender)}onReconnect(){const{supportsMCP:ne}=this.aiNativeConfigService.capabilities;ne&&this.initMCPServers()}onDidStart(){(0,_.runWhenIdle)(()=>{const{supportsRenameSuggestions:ne,supportsInlineChat:he,supportsMCP:_e}=this.aiNativeConfigService.capabilities,q=this.preferenceService.getValid(o.AINativeSettingSectionsId.ChatVisibleType);q==="always"?this.commandService.executeCommand(l.AI_CHAT_VISIBLE.id,!0):q==="never"&&this.commandService.executeCommand(l.AI_CHAT_VISIBLE.id,!1),ne&&this.renameSingleHandler.load(),he&&this.codeActionSingleHandler.load(),_e&&this.initMCPServers()})}initMCPServers(){var ne;const he=this.preferenceService.getValid(o.AINativeSettingSectionsId.MCPServers),_e=he?.find(q=>q.name===b.BUILTIN_MCP_SERVER_NAME);if(this.sumiMCPServerBackendProxy.initBuiltinMCPServer((ne=_e?.enabled)!==null&&ne!==void 0?ne:!0),he&&he.length>0){const q=he.filter(Oe=>Oe.name!==b.BUILTIN_MCP_SERVER_NAME);q.length>0&&this.sumiMCPServerBackendProxy.initExternalMCPServers(q),this.aiNativeConfigService.capabilities.supportsCustomLLMSettings&&this.preferenceService.onSpecificPreferenceChange(o.AINativeSettingSectionsId.LLMModelSelection,Oe=>{const ye=this.getModelByName(Oe.newValue),ie=ye?Object.keys(ye):[],fe=ie.length?ie[0]:"",Me=this.preferenceSchemaProvider.getPreferenceProperty(o.AINativeSettingSectionsId.ModelID);this.preferenceSchemaProvider.setSchema({properties:{[o.AINativeSettingSectionsId.ModelID]:{...Me,default:fe,defaultValue:fe,enum:ie.length?ie:void 0}}},!0),this.preferenceService.set(o.AINativeSettingSectionsId.ModelID,fe,Oe.scope),this.preferenceSettings.setEnumLabels(o.AINativeSettingSectionsId.ModelID,ie.reduce((Le,Ce)=>({...Le,[Ce]:Ce}),{}))})}}getModelByName(ne){switch(ne){case"deepseek":return b.deepSeekModels;case"anthropic":return b.anthropicModels;case"openai":return b.openAiNativeModels;default:return}}registerFeature(){this.contributions.getContributions().forEach(ne=>{var he,_e,q,Oe,ye,ie,fe,Me,Le;(he=ne.registerInlineChatFeature)===null||he===void 0||he.call(ne,this.inlineChatFeatureRegistry),(_e=ne.registerChatFeature)===null||_e===void 0||_e.call(ne,this.chatFeatureRegistry),(q=ne.registerResolveConflictFeature)===null||q===void 0||q.call(ne,this.resolveConflictRegistry),(Oe=ne.registerRenameProvider)===null||Oe===void 0||Oe.call(ne,this.renameCandidatesProviderRegistry),(ye=ne.registerChatRender)===null||ye===void 0||ye.call(ne,this.chatRenderRegistry),(ie=ne.registerTerminalProvider)===null||ie===void 0||ie.call(ne,this.terminalProviderRegistry),(fe=ne.registerIntelligentCompletionFeature)===null||fe===void 0||fe.call(ne,this.intelligentCompletionsRegistry),(Me=ne.registerProblemFixFeature)===null||Me===void 0||Me.call(ne,this.problemFixProviderRegistry),(Le=ne.registerChatAgentPromptProvider)===null||Le===void 0||Le.call(ne)}),this.mcpServerContributions.getContributions().forEach(ne=>{ne.registerMCPServer(this.mcpServerRegistry)})}registerSetting(ne){ne.registerSettingGroup({id:o.AI_NATIVE_SETTING_GROUP_ID,title:_.AI_NATIVE_SETTING_GROUP_TITLE,iconClass:(0,o.getIcon)("magic-wand")}),ne.registerSettingSection(o.AI_NATIVE_SETTING_GROUP_ID,{title:(0,o.localize)("preference.ai.native.chat.title"),preferences:[{id:o.AINativeSettingSectionsId.ChatVisibleType,localized:"preference.ai.native.chat.visible.type"}]}),ne.registerSettingSection(o.AI_NATIVE_SETTING_GROUP_ID,{title:(0,o.localize)("preference.ai.native.interface.quick.title"),preferences:[{id:o.AINativeSettingSectionsId.InterfaceQuickNavigationEnabled,localized:"preference.ai.native.interface.quick.navigation"}]}),this.aiNativeConfigService.capabilities.supportsInlineCompletion&&(ne.registerSettingSection(o.AI_NATIVE_SETTING_GROUP_ID,{title:(0,o.localize)("preference.ai.native.intelligentCompletions.title"),preferences:[{id:o.AINativeSettingSectionsId.IntelligentCompletionsCacheEnabled,localized:"preference.ai.native.intelligentCompletions.cache.enabled"},{id:o.AINativeSettingSectionsId.IntelligentCompletionsDebounceTime,localized:"preference.ai.native.intelligentCompletions.debounceTime"},{id:o.AINativeSettingSectionsId.IntelligentCompletionsPromptEngineeringEnabled,localized:"preference.ai.native.intelligentCompletions.promptEngineering.enabled"},{id:o.AINativeSettingSectionsId.IntelligentCompletionsAlwaysVisible,localized:"preference.ai.native.intelligentCompletions.alwaysVisible"}]}),ne.registerSettingSection(o.AI_NATIVE_SETTING_GROUP_ID,{title:(0,o.localize)("preference.ai.native.codeEdits.title"),preferences:[{id:o.AINativeSettingSectionsId.CodeEditsLintErrors,localized:"preference.ai.native.codeEdits.lintErrors"},{id:o.AINativeSettingSectionsId.CodeEditsLineChange,localized:"preference.ai.native.codeEdits.lineChange"},{id:o.AINativeSettingSectionsId.CodeEditsTyping,localized:"preference.ai.native.codeEdits.typing"},{id:o.AINativeSettingSectionsId.CodeEditsRenderType,localized:"preference.ai.native.codeEdits.renderType"},{id:o.AINativeSettingSectionsId.SystemPrompt,localized:"preference.ai.native.chat.system.prompt"}]})),this.aiNativeConfigService.capabilities.supportsCustomLLMSettings&&ne.registerSettingSection(o.AI_NATIVE_SETTING_GROUP_ID,{title:(0,o.localize)("preference.ai.native.llm.apiSettings.title"),preferences:[{id:o.AINativeSettingSectionsId.LLMModelSelection,localized:"preference.ai.native.llm.model.selection"},{id:o.AINativeSettingSectionsId.ModelID,localized:"preference.ai.native.llm.model.id"},{id:o.AINativeSettingSectionsId.DeepseekApiKey,localized:"preference.ai.native.deepseek.apiKey"},{id:o.AINativeSettingSectionsId.AnthropicApiKey,localized:"preference.ai.native.anthropic.apiKey"},{id:o.AINativeSettingSectionsId.OpenaiApiKey,localized:"preference.ai.native.openai.apiKey"},{id:o.AINativeSettingSectionsId.OpenaiBaseURL,localized:"preference.ai.native.openai.baseURL"}]}),this.aiNativeConfigService.capabilities.supportsMCP&&ne.registerSettingSection(o.AI_NATIVE_SETTING_GROUP_ID,{title:(0,o.localize)("preference.ai.native.mcp.settings.title"),preferences:[{id:o.AINativeSettingSectionsId.MCPServers,localized:"preference.ai.native.mcp.servers"}]}),this.aiNativeConfigService.capabilities.supportsInlineChat&&ne.registerSettingSection(o.AI_NATIVE_SETTING_GROUP_ID,{title:(0,o.localize)("preference.ai.native.inlineChat.title"),preferences:[{id:o.AINativeSettingSectionsId.InlineChatAutoVisible,localized:"preference.ai.native.inlineChat.auto.visible"},{id:o.AINativeSettingSectionsId.InlineChatCodeActionEnabled,localized:"preference.ai.native.inlineChat.codeAction.enabled"},{id:o.AINativeSettingSectionsId.InlineDiffPreviewMode,localized:"preference.ai.native.inlineDiff.preview.mode"}]})}registerEditorFeature(ne){ne.registerEditorFeatureContribution({contribute:he=>{const{monacoEditor:_e}=he;return this.codeActionSingleHandler.mountEditor(he.monacoEditor),_e.onDidScrollChange(()=>{this.ctxMenuRenderer.visible&&this.ctxMenuRenderer.hide(!0)})}})}registerEditorComponent(ne){ne.registerEditorSideWidget({id:t.INLINE_DIFF_MANAGER_WIDGET_ID,component:V.InlineDiffManager,displaysOnResource:he=>!!this.applyService.getUriPendingCodeBlock(he.uri)})}registerCommands(ne){ne.registerCommand(l.AI_INLINE_CHAT_VISIBLE,{execute:he=>{this.aiInlineChatService._onInlineChatVisible.fire(he)}}),ne.registerCommand(l.AI_INLINE_CHAT_INTERACTIVE_INPUT_VISIBLE,{execute:async he=>{var _e;if(!he){this.inlineInputService.hide();return}this.commandService.executeCommand(l.AI_INLINE_CHAT_VISIBLE.id,!1);const q=this.workbenchEditorService.currentCodeEditor;if(!q)return;const Oe=q.monacoEditor.getPosition();if(!Oe)return;const ye=q.monacoEditor.getSelection();if(Oe?((_e=q.monacoEditor.getModel())===null||_e===void 0?void 0:_e.getLineLength(Oe.lineNumber))===0:!1){this.inlineInputService.visibleByPosition(Oe);return}if(ye&&!ye.isEmpty()){this.inlineInputService.visibleBySelection(ye);return}this.inlineInputService.visibleByNearestCodeBlock(Oe,q.monacoEditor)}}),ne.registerCommand(l.AI_INLINE_CHAT_INTERACTIVE_INPUT_CANCEL,{execute:()=>{var he;const _e=this.workbenchEditorService.currentCodeEditor;_e&&((he=z.InlineInputController.get(_e.monacoEditor))===null||he===void 0||he.cancelToken())}}),ne.registerCommand(l.AI_INLINE_COMPLETION_REPORTER,{execute:(he,_e,q,Oe)=>{this.aiCompletionsService.report({sessionId:_e,accept:q,relationId:he,code:Oe})}}),ne.registerCommand(l.AI_CHAT_VISIBLE,{execute:he=>{this.layoutService.toggleSlot(b.AI_CHAT_VIEW_ID,(0,_.isUndefined)(he)?!0:he)}}),ne.registerCommand(l.AI_INLINE_COMPLETION_VISIBLE,{execute:async he=>{he||(this.aiCompletionsService.hideStatusBarItem(),this.aiInlineCompletionsProvider.setVisibleCompletion(!1),this.aiInlineCompletionsProvider.cancelRequest())}}),ne.registerCommand(l.AI_INLINE_DIFF_PARTIAL_EDIT,{execute:he=>{this.inlineStreamDiffService.launchAcceptDiscardPartialEdit(he)}}),ne.afterExecuteCommand(g.HideInlineCompletion.ID,()=>{this.commandService.executeCommand(l.AI_INLINE_COMPLETION_VISIBLE.id,!1)})}registerRenderer(ne){this.designLayoutConfig.supportExternalChatPanel?ne.registerSlotRenderer(b.AI_CHAT_VIEW_ID,F.AIChatTabRendererWithTab):ne.registerSlotRenderer(b.AI_CHAT_VIEW_ID,F.AIChatTabRenderer),this.designLayoutConfig.useMergeRightWithLeftPanel&&(ne.registerSlotRenderer(o.SlotLocation.left,F.AILeftTabRenderer),ne.registerSlotRenderer(o.SlotLocation.right,F.AIRightTabRenderer))}registerComponent(ne){ne.register(b.AI_CHAT_CONTAINER_ID,[],{component:w.AIChatView,title:(0,o.localize)("aiNative.chat.ai.assistant.name"),iconClass:(0,o.getIcon)("magic-wand"),containerId:b.AI_CHAT_CONTAINER_ID}),ne.register(b.AI_MENU_BAR_DEBUG_TOOLBAR,{id:b.AI_MENU_BAR_DEBUG_TOOLBAR,component:k.AIRunToolbar}),ne.register(b.AI_CHAT_LOGO_AVATAR_ID,{id:b.AI_CHAT_LOGO_AVATAR_ID,component:L.AIChatLogoAvatar})}registerKeybindings(ne){this.aiNativeConfigService.capabilities.supportsInlineChat&&(ne.registerKeybinding({command:l.AI_INLINE_CHAT_VISIBLE.id,keybinding:"ctrlcmd+i",when:"editorTextFocus",args:!0,priority:0},o.KeybindingScope.USER),ne.registerKeybinding({command:l.AI_INLINE_CHAT_VISIBLE.id,keybinding:"esc",args:!1,when:`editorFocus && ${p.InlineChatIsVisible.raw}`}),this.inlineInputService.getInteractiveInputHandler()&&(ne.registerKeybinding({command:l.AI_INLINE_CHAT_INTERACTIVE_INPUT_VISIBLE.id,keybinding:this.aiNativeConfigService.inlineChat.inputKeybinding,args:!0,priority:0,when:`editorFocus && (${p.InlineChatIsVisible.raw} || inlineSuggestionVisible)`},o.KeybindingScope.USER),ne.registerKeybinding({command:l.AI_INLINE_CHAT_INTERACTIVE_INPUT_VISIBLE.id,keybinding:"esc",args:!1,priority:0,when:`editorFocus && ${p.InlineInputWidgetIsVisible.raw}`}),ne.registerKeybinding({command:l.AI_INLINE_CHAT_INTERACTIVE_INPUT_CANCEL.id,keybinding:"esc",priority:1,when:`editorFocus && ${p.InlineInputWidgetIsStreaming.raw}`}),ne.registerKeybinding({command:l.AI_INLINE_CHAT_INTERACTIVE_INPUT_VISIBLE.id,keybinding:this.aiNativeConfigService.inlineChat.inputKeybinding,args:!0,priority:0,when:`editorFocus && ${p.InlineHintWidgetIsVisible.raw} && ${p.InlineChatIsVisible.not}`},o.KeybindingScope.USER))),ne.registerKeybinding({command:l.AI_INLINE_DIFF_PARTIAL_EDIT.id,keybinding:"ctrl+y",args:!0,priority:100,when:`editorTextFocus && ${p.InlineDiffPartialEditsIsVisible.raw}`}),ne.registerKeybinding({command:l.AI_INLINE_DIFF_PARTIAL_EDIT.id,keybinding:"ctrl+n",args:!1,priority:100,when:`editorTextFocus && ${p.InlineDiffPartialEditsIsVisible.raw}`})}};t.AINativeBrowserContribution=Q,n.__decorate([(0,r.Autowired)(o.AppConfig),n.__metadata("design:type",Object)],Q.prototype,"appConfig",void 0),n.__decorate([(0,r.Autowired)(r.INJECTOR_TOKEN),n.__metadata("design:type",r.Injector)],Q.prototype,"injector",void 0),n.__decorate([(0,r.Autowired)(m.IBrowserCtxMenu),n.__metadata("design:type",m.IBrowserCtxMenu)],Q.prototype,"ctxMenuRenderer",void 0),n.__decorate([(0,r.Autowired)(j.AINativeCoreContribution),n.__metadata("design:type",Object)],Q.prototype,"contributions",void 0),n.__decorate([(0,r.Autowired)(j.MCPServerContribution),n.__metadata("design:type",Object)],Q.prototype,"mcpServerContributions",void 0),n.__decorate([(0,r.Autowired)(j.TokenMCPServerRegistry),n.__metadata("design:type",Object)],Q.prototype,"mcpServerRegistry",void 0),n.__decorate([(0,r.Autowired)(_.InlineChatFeatureRegistryToken),n.__metadata("design:type",U.InlineChatFeatureRegistry)],Q.prototype,"inlineChatFeatureRegistry",void 0),n.__decorate([(0,r.Autowired)(_.ChatFeatureRegistryToken),n.__metadata("design:type",Object)],Q.prototype,"chatFeatureRegistry",void 0),n.__decorate([(0,r.Autowired)(_.ChatRenderRegistryToken),n.__metadata("design:type",Object)],Q.prototype,"chatRenderRegistry",void 0),n.__decorate([(0,r.Autowired)(_.ResolveConflictRegistryToken),n.__metadata("design:type",Object)],Q.prototype,"resolveConflictRegistry",void 0),n.__decorate([(0,r.Autowired)(_.RenameCandidatesProviderRegistryToken),n.__metadata("design:type",Object)],Q.prototype,"renameCandidatesProviderRegistry",void 0),n.__decorate([(0,r.Autowired)(_.TerminalRegistryToken),n.__metadata("design:type",Object)],Q.prototype,"terminalProviderRegistry",void 0),n.__decorate([(0,r.Autowired)(_.IntelligentCompletionsRegistryToken),n.__metadata("design:type",Object)],Q.prototype,"intelligentCompletionsRegistry",void 0),n.__decorate([(0,r.Autowired)(_.ProblemFixRegistryToken),n.__metadata("design:type",Object)],Q.prototype,"problemFixProviderRegistry",void 0),n.__decorate([(0,r.Autowired)(o.AINativeConfigService),n.__metadata("design:type",o.AINativeConfigService)],Q.prototype,"aiNativeConfigService",void 0),n.__decorate([(0,r.Autowired)(v.DesignLayoutConfig),n.__metadata("design:type",v.DesignLayoutConfig)],Q.prototype,"designLayoutConfig",void 0),n.__decorate([(0,r.Autowired)(R.AICompletionsService),n.__metadata("design:type",R.AICompletionsService)],Q.prototype,"aiCompletionsService",void 0),n.__decorate([(0,r.Autowired)(D.AIInlineCompletionsProvider),n.__metadata("design:type",D.AIInlineCompletionsProvider)],Q.prototype,"aiInlineCompletionsProvider",void 0),n.__decorate([(0,r.Autowired)(_.CommandService),n.__metadata("design:type",Object)],Q.prototype,"commandService",void 0),n.__decorate([(0,r.Autowired)(o.PreferenceSchemaProvider),n.__metadata("design:type",o.PreferenceSchemaProvider)],Q.prototype,"preferenceSchemaProvider",void 0),n.__decorate([(0,r.Autowired)(o.IPreferenceSettingsService),n.__metadata("design:type",Object)],Q.prototype,"preferenceSettings",void 0),n.__decorate([(0,r.Autowired)(o.PreferenceService),n.__metadata("design:type",Object)],Q.prototype,"preferenceService",void 0),n.__decorate([(0,r.Autowired)(u.IMainLayoutService),n.__metadata("design:type",Object)],Q.prototype,"layoutService",void 0),n.__decorate([(0,r.Autowired)(b.ChatProxyServiceToken),n.__metadata("design:type",S.ChatProxyService)],Q.prototype,"chatProxyService",void 0),n.__decorate([(0,r.Autowired)(o.IAIInlineChatService),n.__metadata("design:type",X.InlineChatService)],Q.prototype,"aiInlineChatService",void 0),n.__decorate([(0,r.Autowired)(H.InlineInputService),n.__metadata("design:type",H.InlineInputService)],Q.prototype,"inlineInputService",void 0),n.__decorate([(0,r.Autowired)(K.InlineStreamDiffService),n.__metadata("design:type",K.InlineStreamDiffService)],Q.prototype,"inlineStreamDiffService",void 0),n.__decorate([(0,r.Autowired)(P.RenameSingleHandler),n.__metadata("design:type",P.RenameSingleHandler)],Q.prototype,"renameSingleHandler",void 0),n.__decorate([(0,r.Autowired)(T.CodeActionSingleHandler),n.__metadata("design:type",T.CodeActionSingleHandler)],Q.prototype,"codeActionSingleHandler",void 0),n.__decorate([(0,r.Autowired)(b.SumiMCPServerProxyServicePath),n.__metadata("design:type",Object)],Q.prototype,"sumiMCPServerBackendProxy",void 0),n.__decorate([(0,r.Autowired)(f.WorkbenchEditorService),n.__metadata("design:type",h.WorkbenchEditorServiceImpl)],Q.prototype,"workbenchEditorService",void 0),n.__decorate([(0,r.Autowired)(b.IChatManagerService),n.__metadata("design:type",y.ChatManagerService)],Q.prototype,"chatManagerService",void 0),n.__decorate([(0,r.Autowired)(b.IChatInternalService),n.__metadata("design:type",A.ChatInternalService)],Q.prototype,"chatInternalService",void 0),n.__decorate([(0,r.Autowired)(B.BaseApplyService),n.__metadata("design:type",B.BaseApplyService)],Q.prototype,"applyService",void 0),t.AINativeBrowserContribution=Q=n.__decorate([(0,o.Domain)(o.ClientAppContribution,a.BrowserEditorContribution,o.CommandContribution,d.SettingContribution,o.KeybindingContribution,o.ComponentContribution,o.SlotRendererContribution,o.MonacoContribution),n.__metadata("design:paramtypes",[])],Q)},74055:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ChatAgentService=void 0;const n=e(85608),r=n.__importDefault(e(66652)),o=e(76003),l=e(43718),p=e(29770);let v=class extends l.Disposable{constructor(){super(),this.agents=new Map,this._onDidChangeAgents=new l.Emitter,this.onDidChangeAgents=this._onDidChangeAgents.event,this._onDidSendMessage=new l.Emitter,this.onDidSendMessage=this._onDidSendMessage.event,this.addDispose(this._onDidChangeAgents)}registerAgent(_){if(this.agents.has(_.id))throw new Error(`Already registered an agent with id ${_.id}`);return this.agents.set(_.id,{agent:_,commands:[]}),this._onDidChangeAgents.fire(),(0,l.toDisposable)(()=>{this.agents.delete(_.id)&&this._onDidChangeAgents.fire()})}async updateAgent(_,s){const f=this.agents.get(_);if(!f)throw new Error(`No agent with id ${_} registered`);f.agent.metadata={...f.agent.metadata,...s},f.commands=await f.agent.provideSlashCommands(l.CancellationToken.None),s.isDefault&&(this.defaultAgentId=_);const a=await f.agent.provideChatWelcomeMessage(l.CancellationToken.None);if(a){const{content:h,sampleQuestions:u}=a;this.chatFeatureRegistry.registerWelcome(h,u)}this._onDidChangeAgents.fire()}getAgents(){return Array.from(this.agents.values(),_=>_.agent)}hasAgent(_){return this.agents.has(_)}getDefaultAgentId(){return this.defaultAgentId}getAgent(_){const s=this.agents.get(_);return s?.agent}async invokeAgent(_,s,f,a,h){const u=this.agents.get(_);if(!u)throw new Error(`No agent with id ${_}`);return u.agent.metadata.systemPrompt&&a.unshift({role:0,content:u.agent.metadata.systemPrompt}),await u.agent.invoke(s,f,a,h)}populateChatInput(_,s){this.aiChatService.sendMessage({...s,agentId:_,immediate:!1})}getCommands(){return(0,r.default)(Array.from(this.agents.values(),({agent:_,commands:s})=>s.map(f=>({...f,agentId:_.id}))))}async getFollowups(_,s,f){const a=this.agents.get(_);if(!a)throw new Error(`No agent with id ${_}`);return a.agent.provideFollowups?a.agent.provideFollowups(s,f):[]}async getSampleQuestions(_,s){const f=this.agents.get(_);if(!f)throw new Error(`No agent with id ${_}`);return f.agent.provideSampleQuestions?f.agent.provideSampleQuestions(s):[]}async getAllSampleQuestions(){const _=await Promise.all(Array.from(this.agents.values()).map(async({agent:s})=>{try{return await this.getSampleQuestions(s.id,l.CancellationToken.None)}catch(f){return this.logger.error(f),[]}}));return(0,r.default)(_)}sendMessage(_){this._onDidSendMessage.fire(_)}parseMessage(_,s){var f;const a={agentId:"",command:"",message:_};let h=s;const u=this.getAgents(),d=new RegExp(`^@(${u.map(g=>g.id).join("|")})(?:\\s+|$)`,"i"),E=a.message.match(d);if(E){const g=u.find(c=>c.id.toLowerCase()===E[1].toLowerCase());if(!g)return a;h=g.id,a.agentId=h,a.message=a.message.replace(E[0],"")}if(h){const g=(f=this.agents.get(h))===null||f===void 0?void 0:f.commands;if(g?.length){const c=new RegExp(`^/\\s?(${g.map(y=>y.name).join("|")})(?:\\s+|$)`,"i"),b=a.message.match(c);if(b){const y=g.find(S=>S.name.toLowerCase()===b[1].toLowerCase());if(!y)return a;a.command=y.name,a.message=a.message.replace(b[0],"")}}}return a}};t.ChatAgentService=v,n.__decorate([(0,o.Autowired)(l.ILogger),n.__metadata("design:type",Object)],v.prototype,"logger",void 0),n.__decorate([(0,o.Autowired)(l.ChatServiceToken),n.__metadata("design:type",p.ChatService)],v.prototype,"aiChatService",void 0),n.__decorate([(0,o.Autowired)(l.ChatFeatureRegistryToken),n.__metadata("design:type",Object)],v.prototype,"chatFeatureRegistry",void 0),t.ChatAgentService=v=n.__decorate([(0,o.Injectable)(),n.__metadata("design:paramtypes",[])],v)},84543:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ChatAgentViewService=void 0;const n=e(85608),r=e(76003),o=e(43718),l=e(19413),p=e(51081);let v=class{constructor(){this.componentsMap=new Map,this.componentsDeferredMap=new Map}registerChatComponent(_){return this.componentsMap.set(_.id,_),this.componentsDeferredMap.has(_.id)&&(this.componentsDeferredMap.get(_.id).resolve(_),this.componentsDeferredMap.delete(_.id)),{dispose:()=>{this.componentsMap.get(_.id)===_&&(this.componentsMap.delete(_.id),this.componentsDeferredMap.delete(_.id))}}}getChatComponent(_){return this.componentsMap.has(_)?this.componentsMap.get(_):(this.componentsDeferredMap.has(_)||this.componentsDeferredMap.set(_,new o.Deferred),null)}getChatComponentDeferred(_){return this.componentsDeferredMap.get(_)||null}getRenderAgents(){return this.chatAgentService.getAgents().filter(_=>_.id!==p.ChatProxyService.AGENT_ID)}};t.ChatAgentViewService=v,n.__decorate([(0,r.Autowired)(l.IChatAgentService),n.__metadata("design:type",Object)],v.prototype,"chatAgentService",void 0),t.ChatAgentViewService=v=n.__decorate([(0,r.Injectable)()],v)},61282:(x,t,e)=>{"use strict";var n,r;Object.defineProperty(t,"__esModule",{value:!0}),t.ChatManagerService=void 0;const o=e(85608),l=e(76003),p=e(43718),v=e(19413),m=e(44260),_=e(42033);let s=class extends p.Disposable{fromJSON(a){return a.map(h=>{const u=new _.ChatModel({sessionId:h.sessionId,history:new m.MsgHistoryManager(h.history)}),d=h.requests.map(E=>new _.ChatRequestModel(E.requestId,u,E.message,new _.ChatResponseModel(E.requestId,u,E.message.agentId,{responseContents:E.response.responseContents,isComplete:!0,responseText:E.response.responseText,errorDetails:E.response.errorDetails,followups:E.response.followups,isCanceled:E.response.isCanceled})));return u.restoreRequests(d),u})}constructor(){super(),n.set(this,this.registerDispose(new p.DisposableMap)),r.set(this,this.registerDispose(new p.DisposableMap)),this.storageInitEmitter=new p.Emitter,this.onStorageInit=this.storageInitEmitter.event}async init(){this._chatStorage=await this.storageProvider(p.STORAGE_NAMESPACE.CHAT);const a=this._chatStorage.get("sessionModels",[]);this.fromJSON(a).forEach(u=>{o.__classPrivateFieldGet(this,n,"f").set(u.sessionId,u),this.listenSession(u)}),await this.storageInitEmitter.fireAndAwait()}getSessions(){return Array.from(o.__classPrivateFieldGet(this,n,"f").values())}startSession(){const a=new _.ChatModel;return o.__classPrivateFieldGet(this,n,"f").set(a.sessionId,a),this.listenSession(a),a}getSession(a){return o.__classPrivateFieldGet(this,n,"f").get(a)}clearSession(a){var h;if(!o.__classPrivateFieldGet(this,n,"f").get(a))throw new Error(`Unknown session: ${a}`);o.__classPrivateFieldGet(this,n,"f").disposeKey(a),(h=o.__classPrivateFieldGet(this,r,"f").get(a))===null||h===void 0||h.cancel(),o.__classPrivateFieldGet(this,r,"f").disposeKey(a),this.saveSessions()}createRequest(a,h,u,d){const E=this.getSession(a);if(!E)throw new Error(`Unknown session: ${a}`);if(!o.__classPrivateFieldGet(this,r,"f").has(a))return E.addRequest({prompt:h,agentId:u,command:d})}async sendRequest(a,h,u){const d=this.getSession(a);if(!d)throw new Error(`Unknown session: ${a}`);const E=new p.CancellationTokenSource,g=E.token;o.__classPrivateFieldGet(this,r,"f").set(d.sessionId,E);const c=g.onCancellationRequested(()=>{h.response.cancel()}),b=[];for(const y of d.requests)y.response.isComplete&&(b.push({role:1,content:y.message.prompt}),b.push({role:2,content:y.response.responseText}));try{const y=w=>{g.isCancellationRequested||d.acceptResponseProgress(h,w)},S={sessionId:a,requestId:h.requestId,message:h.message.prompt,command:h.message.command,regenerate:u},A=await this.chatAgentService.invokeAgent(h.message.agentId,S,y,b,g);g.isCancellationRequested||(A.errorDetails&&h.response.setErrorDetails(A.errorDetails),this.chatAgentService.getFollowups(h.message.agentId,a,p.CancellationToken.None).then(T=>{h.response.setFollowups(T),h.response.complete()}))}finally{c.dispose(),o.__classPrivateFieldGet(this,r,"f").disposeKey(d.sessionId),this.saveSessions()}}listenSession(a){this.addDispose(a.history.onMessageAdditionalChange(()=>{this.saveSessions()}))}saveSessions(){this._chatStorage.set("sessionModels",this.getSessions())}cancelRequest(a){var h;(h=o.__classPrivateFieldGet(this,r,"f").get(a))===null||h===void 0||h.cancel(),o.__classPrivateFieldGet(this,r,"f").disposeKey(a),this.saveSessions()}};t.ChatManagerService=s,n=new WeakMap,r=new WeakMap,o.__decorate([(0,l.Autowired)(l.INJECTOR_TOKEN),o.__metadata("design:type",l.Injector)],s.prototype,"injector",void 0),o.__decorate([(0,l.Autowired)(v.IChatAgentService),o.__metadata("design:type",Object)],s.prototype,"chatAgentService",void 0),o.__decorate([(0,l.Autowired)(p.StorageProvider),o.__metadata("design:type",Function)],s.prototype,"storageProvider",void 0),o.__decorate([(0,p.debounce)(1e3),o.__metadata("design:type",Function),o.__metadata("design:paramtypes",[]),o.__metadata("design:returntype",void 0)],s.prototype,"saveSessions",null),t.ChatManagerService=s=o.__decorate([(0,l.Injectable)(),o.__metadata("design:paramtypes",[])],s)},42033:(x,t,e)=>{"use strict";var n,r,o,l,p,v,m,_,s,f,a,h,u,d,E;Object.defineProperty(t,"__esModule",{value:!0}),t.ChatSlashCommandItemModel=t.ChatWelcomeMessageModel=t.ChatModel=t.ChatRequestModel=t.ChatResponseModel=void 0;const g=e(85608),c=e(76003),b=e(43718),y=e(90684),S=e(19413),A=e(44260);class w extends b.Disposable{get responseParts(){return g.__classPrivateFieldGet(this,r,"f")}get responseContents(){return g.__classPrivateFieldGet(this,o,"f")}get isComplete(){return g.__classPrivateFieldGet(this,l,"f")}get isCanceled(){return g.__classPrivateFieldGet(this,p,"f")}get requestId(){return g.__classPrivateFieldGet(this,v,"f")}get responseText(){return g.__classPrivateFieldGet(this,m,"f")}get errorDetails(){return g.__classPrivateFieldGet(this,_,"f")}get followups(){return g.__classPrivateFieldGet(this,s,"f")}get onDidChange(){return g.__classPrivateFieldGet(this,f,"f").event}constructor(O,P,k,F){super(),n.add(this),this.session=P,this.agentId=k,r.set(this,[]),o.set(this,[]),l.set(this,!1),p.set(this,!1),v.set(this,void 0),m.set(this,""),_.set(this,void 0),s.set(this,void 0),f.set(this,this.registerDispose(new b.Emitter)),g.__classPrivateFieldSet(this,v,O,"f"),F&&(g.__classPrivateFieldSet(this,o,F.responseContents,"f"),g.__classPrivateFieldSet(this,m,F.responseText,"f"),g.__classPrivateFieldSet(this,l,F.isComplete,"f"),g.__classPrivateFieldSet(this,p,F.isCanceled,"f"),g.__classPrivateFieldSet(this,_,F.errorDetails,"f"),g.__classPrivateFieldSet(this,s,F.followups,"f"))}updateContent(O,P){var k;const F=g.__classPrivateFieldGet(this,r,"f").length-1;if(O.kind==="content"||O.kind==="markdownContent"){const L=g.__classPrivateFieldGet(this,r,"f")[F];!L||L.kind!=="markdownContent"?O.kind==="content"?g.__classPrivateFieldGet(this,r,"f").push({content:new y.MarkdownString(O.content),kind:"markdownContent"}):g.__classPrivateFieldGet(this,r,"f").push(O):O.kind==="markdownContent"?g.__classPrivateFieldGet(this,r,"f")[F]={content:new y.MarkdownString(L.content.value+O.content.value),kind:"markdownContent"}:g.__classPrivateFieldGet(this,r,"f")[F]={content:new y.MarkdownString(L.content.value+O.content,L.content),kind:"markdownContent"},g.__classPrivateFieldGet(this,n,"m",a).call(this)}else if(O.kind==="asyncContent"){const L=g.__classPrivateFieldGet(this,r,"f").push(O)-1;g.__classPrivateFieldGet(this,n,"m",a).call(this),(k=O.resolvedContent)===null||k===void 0||k.then(B=>{typeof B=="string"?g.__classPrivateFieldGet(this,r,"f")[L]={content:new y.MarkdownString(B),kind:"markdownContent"}:(0,y.isMarkdownString)(B)?g.__classPrivateFieldGet(this,r,"f")[L]={content:B,kind:"markdownContent"}:g.__classPrivateFieldGet(this,r,"f")[L]=B,g.__classPrivateFieldGet(this,n,"m",a).call(this,P)})}else if(O.kind==="treeData"||O.kind==="component")g.__classPrivateFieldGet(this,r,"f").push(O),g.__classPrivateFieldGet(this,n,"m",a).call(this,P);else if(O.kind==="toolCall"){const L=g.__classPrivateFieldGet(this,r,"f").find(B=>B.kind==="toolCall"&&B.content.id===O.content.id);L?L.content=O.content:g.__classPrivateFieldGet(this,r,"f").push(O),g.__classPrivateFieldGet(this,n,"m",a).call(this,P)}}complete(){g.__classPrivateFieldSet(this,l,!0,"f"),g.__classPrivateFieldGet(this,f,"f").fire()}cancel(){g.__classPrivateFieldSet(this,l,!0,"f"),g.__classPrivateFieldSet(this,p,!0,"f"),g.__classPrivateFieldGet(this,f,"f").fire()}reset(){g.__classPrivateFieldSet(this,o,[],"f"),g.__classPrivateFieldSet(this,r,[],"f"),g.__classPrivateFieldSet(this,m,"","f"),g.__classPrivateFieldSet(this,p,!1,"f"),g.__classPrivateFieldSet(this,l,!1,"f"),g.__classPrivateFieldSet(this,_,void 0,"f"),g.__classPrivateFieldSet(this,s,void 0,"f"),g.__classPrivateFieldGet(this,f,"f").fire()}setErrorDetails(O){g.__classPrivateFieldSet(this,_,O,"f"),g.__classPrivateFieldGet(this,f,"f").fire()}setFollowups(O){g.__classPrivateFieldSet(this,s,O,"f"),g.__classPrivateFieldGet(this,f,"f").fire()}toJSON(){return{isCanceled:this.isCanceled,responseContents:this.responseContents,responseText:this.responseText,errorDetails:this.errorDetails,followups:this.followups}}}t.ChatResponseModel=w,r=new WeakMap,o=new WeakMap,l=new WeakMap,p=new WeakMap,v=new WeakMap,m=new WeakMap,_=new WeakMap,s=new WeakMap,f=new WeakMap,n=new WeakSet,a=function(O){g.__classPrivateFieldSet(this,m,g.__classPrivateFieldGet(this,r,"f").map(k=>k.kind==="asyncContent"?k.content:k.kind==="treeData"||k.kind==="component"?"":k.kind==="toolCall"?k.content.function.name:k.content.value).join(`
|
|
30000
30000
|
|
|
30001
30001
|
`),"f");const P=[];for(const k of g.__classPrivateFieldGet(this,r,"f")){const F=P[P.length-1];k.kind==="markdownContent"&&F?.kind==="markdownContent"?P[P.length-1]={content:new y.MarkdownString(F.content.value+k.content.value,{isTrusted:F.content.isTrusted}),kind:"markdownContent"}:P.push(k)}g.__classPrivateFieldSet(this,o,P,"f"),O||g.__classPrivateFieldGet(this,f,"f").fire()};class T{get requestId(){return g.__classPrivateFieldGet(this,h,"f")}constructor(O,P,k,F){this.session=P,this.message=k,this.response=F,h.set(this,void 0),g.__classPrivateFieldSet(this,h,O,"f")}toJSON(){return{requestId:this.requestId,message:this.message,response:this.response}}}t.ChatRequestModel=T,h=new WeakMap;class D extends b.Disposable{constructor(O){var P,k;super(),u.set(this,void 0),d.set(this,new Map),g.__classPrivateFieldSet(this,u,(P=O?.sessionId)!==null&&P!==void 0?P:(0,b.uuid)(),"f"),this.history=(k=O?.history)!==null&&k!==void 0?k:new A.MsgHistoryManager,O?.requests&&g.__classPrivateFieldSet(this,d,new Map(O.requests.map(F=>[F.requestId,F])),"f")}get sessionId(){return g.__classPrivateFieldGet(this,u,"f")}get requests(){return Array.from(g.__classPrivateFieldGet(this,d,"f").values())}restoreRequests(O){g.__classPrivateFieldSet(this,d,new Map(O.map(P=>[P.requestId,P])),"f")}addRequest(O){const P=`${this.sessionId}_request_${D.requestIdPool++}`,k=new w(P,this,O.agentId),F=new T(P,this,O,k);return g.__classPrivateFieldGet(this,d,"f").set(P,F),F}acceptResponseProgress(O,P,k){if(O.response.isComplete)throw new Error("acceptResponseProgress: Adding progress to a completed response");const{kind:F}=P;["content","markdownContent","asyncContent","treeData","component","toolCall"].includes(F)?O.response.updateContent(P,k):console.error(`Couldn't handle progress: ${JSON.stringify(P)}`)}getRequest(O){return g.__classPrivateFieldGet(this,d,"f").get(O)}dispose(){super.dispose(),g.__classPrivateFieldGet(this,d,"f").forEach(O=>O.response.dispose())}toJSON(){return{sessionId:this.sessionId,history:this.history,requests:this.requests}}}t.ChatModel=D,u=new WeakMap,d=new WeakMap,D.requestIdPool=0;let I=E=class extends b.Disposable{get id(){return this._id}constructor(O,P){super(),this.content=O,this.sampleQuestions=P,this._id="welcome_"+E.nextId++}};t.ChatWelcomeMessageModel=I,I.nextId=0,t.ChatWelcomeMessageModel=I=E=g.__decorate([(0,c.Injectable)({multiple:!0}),g.__metadata("design:paramtypes",[Object,Array])],I);let R=class extends b.Disposable{constructor(O,P,k){super(),this.chatCommand=O,this.command=P,this.agentId=k}get name(){return this.chatCommand.name}get isShortcut(){return!!this.chatCommand.isShortcut}get icon(){return this.chatCommand.icon}get description(){return this.chatCommand.description}get tooltip(){return this.chatCommand.tooltip}get nameWithSlash(){return this.name.startsWith(S.SLASH_SYMBOL)?this.name:`${S.SLASH_SYMBOL} ${this.name}`}};t.ChatSlashCommandItemModel=R,t.ChatSlashCommandItemModel=R=g.__decorate([(0,c.Injectable)({multiple:!0}),g.__metadata("design:paramtypes",[Object,String,String])],R)},51081:(x,t,e)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.ChatProxyService=void 0;const r=e(85608),o=e(76003),l=e(41869),p=e(43718),v=e(27284),m=e(9447),_=e(72665),s=e(93062),f=e(19413),a=e(34817),h=e(29770),u=e(11735);let d=n=class extends p.Disposable{constructor(){super(...arguments),this.chatDeferred=new p.Deferred}registerDefaultAgent(){this.chatAgentViewService.registerChatComponent({id:"toolCall",component:a.ChatToolRender,initialProps:{}}),this.addDispose(this.chatAgentService.registerAgent({id:n.AGENT_ID,metadata:{systemPrompt:this.preferenceService.get(v.AINativeSettingSectionsId.SystemPrompt,`You are a powerful AI coding assistant working in OpenSumi, a top IDE framework. You collaborate with a USER to solve coding tasks, which may involve creating, modifying, or debugging code, or answering questions. When the USER sends a message, relevant context (e.g., open files, cursor position, edit history, linter errors) may be attached. Use this information as needed.
|
|
30002
30002
|
|
|
@@ -30060,7 +30060,7 @@ The user's OS version is ${this.applicationService.frontendOS}. The absolute pat
|
|
|
30060
30060
|
`);return f.length>n.lineBasedCompletionModelConfigs.completionPromptMaxLineSize&&(s=f.slice(-n.lineBasedCompletionModelConfigs.completionPromptMaxLineSize).join(`
|
|
30061
30061
|
`)),s}function _(s){s=s.replace(/^s*[\n]/gm,"");const f=s.split(`
|
|
30062
30062
|
`);return f.length>n.lineBasedCompletionModelConfigs.completionSuffixMaxLineSize&&(s=f.slice(-n.lineBasedCompletionModelConfigs.completionSuffixMaxLineSize).join(`
|
|
30063
|
-
`)),s}t.lineBasedPromptProcessor={processPrefix:m,processSuffix:_}},71863:(x,t,e)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.AICompletionsService=void 0;const r=e(85608),o=e(76003),l=e(41869),p=e(43718),v=e(52664);let m=n=class extends p.Disposable{constructor(){super(...arguments),this._onVisibleCompletion=new p.Emitter,this.onVisibleCompletion=this._onVisibleCompletion.event,this.cancelIndicator=new p.CancellationTokenSource,this.isDefaultCompletionModel=!0,this._isVisibleCompletion=!1,this.validCompletionThreshold=750}recordRenderTime(){this.lastRenderTime=Date.now()}recordCompletionUseTime(s){this.lastCompletionUseTime=Date.now()-s}get isVisibleCompletion(){return this._isVisibleCompletion}async complete(s){var f,a;this.isDefaultCompletionModel=!0;const h=Date.now();try{const u=await((a=(f=this.aiBackService).requestCompletion)===null||a===void 0?void 0:a.call(f,s,this.cancelIndicator.token));this.recordCompletionUseTime(h);const{sessionId:d,codeModelList:E,isCancel:g}=u;return{items:E.map(c=>({...c,insertText:c.content})),extra:{sessionId:d,isCancel:g}}}catch{return}}async report(s){const{relationId:f,accept:a}=s;s.renderingTime=Date.now()-this.lastRenderTime,s.completionUseTime=this.lastCompletionUseTime,this.reporterEnd(f,{success:!0,isReceive:a,renderingTime:s.renderingTime,code:s.code,actionSource:p.ActionSourceEnum.Completion,actionType:p.ActionTypeEnum.Completion}),this._isVisibleCompletion=!1}async reporterEnd(s,f){const a={...f,isValid:typeof f.renderingTime=="number"?f.renderingTime>this.validCompletionThreshold:!1};a.isValid&&this.aiReporter.end(s,a)}setVisibleCompletion(s){this._isVisibleCompletion===!0&&s===!1&&this.report({sessionId:this.lastSessionId,accept:!1,relationId:this.lastRelationId,code:this.lastCompletionContent}),this._isVisibleCompletion=s,this._onVisibleCompletion.fire(s),s===!0&&this.recordRenderTime()}setLastSessionId(s){this.lastSessionId=s}setLastRelationId(s){this.lastRelationId=s}setLastCompletionContent(s){this.lastCompletionContent=s}async cancelRequest(){this.cancelIndicator.cancel(),this.cancelIndicator=new p.CancellationTokenSource}updateStatusBarItem(s,f){const a=f?`$(loading~spin) ${s}`:`$(magic-wand) ${s}`;this.statusBarService.addElement(n.STATUS_ID,{text:a,alignment:l.StatusBarAlignment.RIGHT,priority:1})}hideStatusBarItem(){this.statusBarService.removeElement(n.STATUS_ID)}};t.AICompletionsService=m,m.STATUS_ID="ai_completion_status",r.__decorate([(0,o.Autowired)(p.AIBackSerivcePath),r.__metadata("design:type",Object)],m.prototype,"aiBackService",void 0),r.__decorate([(0,o.Autowired)(l.IStatusBarService),r.__metadata("design:type",Object)],m.prototype,"statusBarService",void 0),r.__decorate([(0,o.Autowired)(v.IAIReporter),r.__metadata("design:type",Object)],m.prototype,"aiReporter",void 0),t.AICompletionsService=m=n=r.__decorate([(0,o.Injectable)()],m)},71585:(x,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SnippetSemantics=t.SortOption=t.WishListAttributeName=t.NeighboringTabsOption=t.SnippetSelectionOption=t.StrategyType=t.TokenizerName=void 0;var e;(function(m){m.cl100k_base="cl100k_base",m.gpt2="gpt2",m.r50k_base="r50k_base",m.p50k_base="p50k_base",m.p50k_edit="p50k_edit",m.o200k_base="o200k_base"})(e||(t.TokenizerName=e={}));var n;(function(m){m.InterceptBasedOnChar="InterceptBasedOnChar",m.InterceptBasedOnLine="InterceptBasedOnLine",m.InterceptBasedOnFunction="InterceptBasedOnFunction"})(n||(t.StrategyType=n={}));var r;(function(m){m.BestMatch="bestMatch",m.TopK="topK"})(r||(t.SnippetSelectionOption=r={}));var o;(function(m){m.openFileHistory="openFileHistory",m.editFileRecent="editFileRecent",m.editFileHistory="editFileHistory"})(o||(t.NeighboringTabsOption=o={}));var l;(function(m){m.beforeCursor="beforeCursor",m.afterCursor="afterCursor",m.importedFile="importedFile",m.languageMarker="languageMarker",m.pathMarker="pathMarker",m.similarFile="similarFile"})(l||(t.WishListAttributeName=l={}));var p;(function(m){m.Ascending="ascending",m.Descending="descending",m.None="none"})(p||(t.SortOption=p={}));var v;(function(m){m.Function="function",m.Snippet="snippet",m.Variable="variable",m.Parameter="parameter",m.Method="method",m.Class="class",m.Module="module",m.Alias="alias",m.Enum="enum member",m.Interface="interface"})(v||(t.SnippetSemantics=v={}))},84176:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AdditionsDeletionsDecorationModel=void 0;const n=e(85608),r=e(20868),o=e(53617),l=e(8191),p=n.__importDefault(e(71800));class v{constructor(_){this.editor=_,this.deletionsDecorations=new o.EnhanceDecorationsCollection(this.editor),this.additionsDecorations=new o.EnhanceDecorationsCollection(this.editor)}generateRange(_,s,f){const a=[];let h=1,u=1;for(const d of _){const E=d.value.split(f),g=E.length,c=h+g-1,b=g>1?E[g-1].length+1:u+d.value.length;d.added&&(a.push({startLineNumber:h+s.startLineNumber-1,startColumn:u,endLineNumber:c+s.startLineNumber-1,endColumn:b}),u=b,h=c),d.removed||(u=b,h=c)}return a}clearDeletionsDecorations(){this.deletionsDecorations.clear()}clearAdditionsDecorations(){this.additionsDecorations.clear()}updateDeletionsDecoration(_,s,f){const a=this.generateRange(_.map(h=>{const u=h.value;return h.removed?{value:u,added:!0}:h.added?{value:u,removed:!0}:h}),s,f);this.deletionsDecorations.set(a.map(h=>({range:h,options:{description:"suggestion_deletions_background",className:p.default.suggestion_deletions_background,stickiness:r.TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges}})))}updateAdditionsDecoration(_){this.additionsDecorations.set(_.map(s=>({range:s,options:{description:l.REWRITE_DECORATION_INLINE_ADD,className:p.default.suggestion_additions_background,stickiness:r.TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges}})))}}t.AdditionsDeletionsDecorationModel=v},591:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MultiLineDecorationModel=t.GHOST_TEXT=t.GHOST_TEXT_DESCRIPTION=void 0;const n=e(43718),r=e(20868),o=e(77714),l=e(2261),p=e(37705),v=e(53617);var m;(function(s){s.beginning="beginning",s.end="end"})(m||(m={})),t.GHOST_TEXT_DESCRIPTION="ghost-text-decoration",t.GHOST_TEXT="ghost-text";class _{constructor(f){this.editor=f,this.ghostTextDecorations=new v.EnhanceDecorationsCollection(this.editor)}splitDiffChanges(f,a){const h=f.flatMap(u=>{const d=u.value.split(a),E=g=>({value:g,added:u.added,removed:u.removed});return d.flatMap((g,c)=>c<d.length-1?[E(g),E(a)]:E(g)).filter(g=>g.value!==o.empty)});for(let u=0;u<h.length-1;u++){const d=h[u],E=h[u+1];d.removed&&E.added&&E.value.startsWith(d.value)&&(d.added=!0,d.removed=!0)}return h}combineContinuousMods(f){const a=[];let h=o.empty;for(const u of f)u.isEolLine?(a.push(h),h=o.empty):h+=u.newValue;return h!==o.empty&&a.push(h),a}processLineModifications(f,a,h,u,d=!0){const E=this.combineContinuousMods(f),g=E.length,c=[],b=[];if(g===0)return{fullLineMods:c,inlineMods:b};const y=E[0],S=E[g-1];if(g===1)return d?!(0,n.isUndefined)(h)&&h.value!==a?b.push({status:m.beginning,newValue:h.value+y,oldValue:h.value}):!(0,n.isUndefined)(u)&&u.value!==a?b.push({status:m.end,newValue:S+u.value,oldValue:u.value}):c.push(y):c.push(y),{fullLineMods:c,inlineMods:b};if((0,n.isUndefined)(h)||h.value===a?c.push(y):b.push({status:m.beginning,newValue:h.value+y,oldValue:h.value}),g>2){const A=E.slice(1,-1);for(const w of A)c.push(w)}return(0,n.isUndefined)(u)||u.value===a?c.push(S):b.push({status:m.end,newValue:S+u.value,oldValue:u.value}),{fullLineMods:c,inlineMods:b}}getEdits(){return this.ghostTextDecorations.getDecorations().map(({editorDecoration:h,range:u})=>{var d;const g=((d=h.options.after)===null||d===void 0?void 0:d.content)||"";return{range:u,text:g}})}clearDecorations(){this.ghostTextDecorations.clear()}updateLineModificationDecorations(f){if(f.length===0){this.clearDecorations();return}const a=f.map(h=>{let u;if(h.newValue.startsWith(h.oldValue))u=h.newValue.slice(h.oldValue.length);else{const d=h.newValue.indexOf(h.oldValue);u=d!==-1?h.newValue.slice(0,d):h.newValue}return{range:r.Range.fromPositions(new r.Position(h.lineNumber,h.column)),options:{description:t.GHOST_TEXT,showIfCollapsed:!0,after:{content:u,inlineClassName:t.GHOST_TEXT_DESCRIPTION}}}});this.ghostTextDecorations.set(a)}applyInlineDecorations(f,a,h,u){var d,E,g,c,b,y,S,A,w;const T=f.getModel();if(!T)return;const D=T.getEOL();a=this.splitDiffChanges(a,D),a.unshift({value:D,added:void 0,removed:void 0});let I=Math.max(h-1,0);const R=T.getValue(),M=T.getLineContent(u.lineNumber),O={},P=[];let k=o.empty,F=M.trim()===o.empty,L,B=[],j=I,W=1;const U=V=>{var $;const Y=!P.some(K=>K.lineNumber===I&&K.lockLineGhostText),{fullLineMods:z,inlineMods:H}=this.processLineModifications(B,D,L,V,Y);return O[I]=[...($=O[I])!==null&&$!==void 0?$:[],...z.map(K=>({content:K,decorations:[new p.LineDecoration(1,K.length+1,"ghost-text",0)]}))],H.forEach(K=>P.push({lineNumber:K.status===m.beginning?I:I+1,column:K.status===m.beginning?W:1,newValue:K.newValue,oldValue:K.oldValue})),{fullLineMods:z,inlineMods:H}};for(const V of a)if(V.added){const $=V.value===D;$&&(k=o.empty),B.push({isEolLine:$,lineNumber:I,newValue:$?o.empty:V.value,oldValue:$?o.empty:k})}else{const{inlineMods:$}=U(V);if(O[I].length>0&&R.split(D)[I]===o.empty){const Y=O[I];if(Y.length>0){const z=Y[0].content,H=Y.slice(1);z.startsWith(M)&&(P.some(K=>K.lineNumber===I+1&&K.lockLineGhostText)?((E=O[S=I+1])!==null&&E!==void 0||(O[S]=[]),O[I+1].unshift(...Y)):(P.push({lineNumber:I+1,column:1,newValue:z,oldValue:o.empty,lockLineGhostText:!0}),(d=O[y=I+1])!==null&&d!==void 0||(O[y]=[]),O[I+1].unshift(...H)),O[I]=[])}}if(I===u.lineNumber&&$.length>0&&(F=!1,I<u.lineNumber&&((g=O[I])===null||g===void 0?void 0:g.length)>0||I===u.lineNumber&&$.length>0&&W<u.column))return;L=V,B=[],V.value===D?(j++,W=1,k=o.empty):j>I?(I=j,W+=V.value.length,B=[],k+=V.value):(W+=V.value.length,k+=V.value)}const{fullLineMods:X}=U(void 0);if(F){const V=O[u.lineNumber-1];if(V?.length>0){const $=V[0].content,Y=V.slice(1);P.some(z=>z.lineNumber===u.lineNumber&&z.lockLineGhostText)?((b=O[w=u.lineNumber])!==null&&b!==void 0||(O[w]=[]),O[u.lineNumber].unshift(...V)):(P.push({lineNumber:u.lineNumber,column:u.column,newValue:$.slice(u.column-1),oldValue:M,lockLineGhostText:!0}),(c=O[A=u.lineNumber])!==null&&c!==void 0||(O[A]=[]),O[u.lineNumber].unshift(...Y)),O[u.lineNumber-1]=[]}}else if(I<u.lineNumber&&X.length>0)return;return{fullLineMods:O,inlineMods:P}}accept(){const f=this.getEdits();f.length!==0&&(this.editor.pushUndoStop(),this.editor.executeEdits("multiLineCompletions.accept",f.map(a=>l.EditOperation.insert(r.Position.lift({lineNumber:a.range.startLineNumber,column:a.range.startColumn}),a.text))))}}t.MultiLineDecorationModel=_},59945:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.wordChangesToLineChangesMap=t.computeMultiLineDiffChanges=t.mergeMultiLineDiffChanges=t.rewriteDiffComputer=t.multiLineDiffComputer=void 0;const n=e(77714);class r{extractCommon(f,a,h,u){const d=a.length,E=h.length;let g=f.newPos,c=g-u,b=0;for(;g+1<d&&c+1<E&&this.equals(a[g+1],h[c+1]);)g++,c++,b++;return b&&(f.changeResult.push({count:b,value:n.empty}),f.newPos=g),c}equals(f,a){return f===a}tokenize(f){return f.split(n.empty).filter(Boolean)}diff(f,a){const h=I=>({newPos:I.newPos,changeResult:[...I.changeResult]}),u=I=>I.join(n.empty),d=(I,R,M)=>{const O=I.length;let P=0,k=0,F=0;for(;P<O;P++){const L=I[P];L.removed?(L.value=u(M.slice(F,F+L.count)),F+=L.count,P&&I[P-1].added&&([I[P-1],I[P]]=[I[P],I[P-1]])):(L.value=u(R.slice(k,k+L.count)),k+=L.count,L.added||(F+=L.count))}return O>1&&typeof I[O-1].value=="string"&&(I[O-1].added||I[O-1].removed)&&this.equals(n.empty,I[O-1].value)&&(I[O-2].value+=I[O-1].value,I.pop()),I},E=this.tokenize(f),g=this.tokenize(a),c=E.length,b=g.length,y=c+b,S=[{newPos:-1,changeResult:[]}],A=this.extractCommon(S[0],g,E,0),w=(I,R,M)=>{const O=I.length,P=I[O-1];O>0&&P.added===R&&P.removed===M?I[O-1]={count:P.count+1,added:R,removed:M,value:n.empty}:I.push({count:1,added:R,removed:M,value:n.empty})};let T=1;if(S[0].newPos+1>=c&&A+1>=b)return[{value:u(g),count:g.length}];const D=()=>{for(let I=-T;I<=T;I+=2){const R=S[I-1],M=S[I+1];let O,P=(M?M.newPos:0)-I;R&&(S[I-1]=void 0);const k=R&&R.newPos+1<b,F=M&&0<=P&&P<c;if(!k&&!F){S[I]=void 0;continue}if(!k||F&&R.newPos<M.newPos?(O=h(M),w(O.changeResult,void 0,!0)):(O=R,O.newPos++,w(O.changeResult,!0,void 0)),P=this.extractCommon(O,g,E,I),O.newPos+1>=b&&P+1>=c)return d(O.changeResult,g,E);S[I]=O}T++};for(;T<=y;){const I=D();if(I)return I}}}const o=/^[a-zA-Z]+$/u,l=/([^\S\r\n]+|[()[\]{}'"\r\n]|\b)/;class p extends r{equals(f,a){const h=f.toLowerCase(),u=a.toLowerCase();return h===u}tokenize(f){const a=f.split(l);for(let h=0;h<a.length-1;h++){const u=a[h+1],d=a[h+2];!u&&d&&o.test(a[h])&&o.test(d)&&(a[h]+=d,a.splice(h+1,2),h--)}return a}}t.multiLineDiffComputer=new r,t.rewriteDiffComputer=new p;const v=(s,f)=>{const a=s.flatMap(h=>{const u=h.value.split(f),d=E=>({value:E,added:h.added,removed:h.removed});return u.flatMap((E,g)=>g<u.length-1?[d(E),d(f)]:d(E)).filter(E=>E.value!==n.empty)});for(let h=0;h<a.length-1;h++){const u=a[h],d=a[h+1];u.removed&&d.added&&d.value.startsWith(u.value)&&(u.added=!0,u.removed=!0)}return a};t.mergeMultiLineDiffChanges=v;const m=(s,f,a,h,u)=>{var d,E;let g=t.rewriteDiffComputer.diff(s,f)||[],c=t.multiLineDiffComputer.diff(s,f)||[];const b=s.split(u),y=f.split(u);b.length===y.length&&b.every((D,I)=>y[I].startsWith(D))&&(c=b.map((D,I)=>{const R=y[I],M=[{value:D}];if(R!==D){const O=R.substring(D.length);M.push({value:O,added:!0},{value:u})}else M[0].value=M[0].value+u;return M}).flat());const S=a.getPosition();if(S){const D={lineNumber:S.lineNumber-h+1,column:S.column},I=b.slice(0,D.lineNumber-1).join(u),R=(d=b[D.lineNumber-1])===null||d===void 0?void 0:d.slice(0,D.column-1),M=I===y.slice(0,D.lineNumber-1).join(u),O=R===((E=y[D.lineNumber-1])===null||E===void 0?void 0:E.slice(0,D.column-1));if(M&&O){const P=B=>{var j;return((j=B[D.lineNumber-1])===null||j===void 0?void 0:j.slice(D.column-1))+u+B.slice(D.lineNumber).join(u)},k=P(y),F=P(b),L=I+(b.slice(0,D.lineNumber-1).length>0?u:n.empty)+R;if(k.endsWith(F)){const B=k.slice(0,k.length-F.length);c=[{value:L},{value:B,added:!0},{value:F}]}}}const A=(0,t.mergeMultiLineDiffChanges)(g,u),w=b.length===y.length&&!A.some(D=>D.added!==!0&&D.removed&&D.value!==u);return{singleLineCharChanges:(0,t.mergeMultiLineDiffChanges)(c,u),charChanges:c,wordChanges:g,isOnlyAddingToEachWord:w}};t.computeMultiLineDiffChanges=m;const _=(s,f,a)=>{const h={},u=a?.getEOL();let d=f.startLineNumber;const E=b=>{h[d]||(h[d]=[]),h[d].push([b])},g=b=>{var y;const S=(y=h[d])===null||y===void 0?void 0:y[h[d].length-1];S?S.push(b):E(b)},c=()=>{d++};return s.forEach(b=>{const{value:y,added:S,removed:A}=b;y.split(u).forEach((T,D)=>{D===0?g({value:T,added:S,removed:A}):(c(),E({value:T,added:S,removed:A}))})}),h};t.wordChangesToLineChangesMap=_},40650:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CodeEditsResultValue=t.VALID_TIME=t.CodeEditsRenderType=void 0;const n=e(43718);var r;(function(l){l.Legacy="legacy",l.Default="default"})(r||(t.CodeEditsRenderType=r={})),t.VALID_TIME=750;class o extends n.Disposable{constructor(p){super(),this.raw=p}get items(){return this.raw.items.map(p=>({...p,isInlineEdit:!0}))}get firstRange(){return this.raw.items[0].range}get firstText(){return this.raw.items[0].insertText}}t.CodeEditsResultValue=o},99301:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IntelligentCompletionsContribution=void 0;const n=e(85608),r=e(76003),o=e(41869),l=e(57925),p=e(50394),v=e(43718),m=e(54414),_=e(51553),s=e(28423),f=e(7511);let a=class{registerCommands(u){u.registerCommand(l.AI_CODE_EDITS_COMMANDS.DISCARD,{execute:()=>{var d;const E=this.workbenchEditorService.currentCodeEditor;E&&((d=f.IntelligentCompletionsController.get(E.monacoEditor))===null||d===void 0||d.discard.get())}}),u.registerCommand(l.AI_CODE_EDITS_COMMANDS.ACCEPT,{execute:()=>{var d;const E=this.workbenchEditorService.currentCodeEditor;E&&((d=f.IntelligentCompletionsController.get(E.monacoEditor))===null||d===void 0||d.accept.get())}}),u.registerCommand(l.AI_CODE_EDITS_COMMANDS.TRIGGER,{execute:()=>{const d=this.workbenchEditorService.currentCodeEditor;d&&(0,s.transaction)(E=>{var g;(g=f.IntelligentCompletionsController.get(d.monacoEditor))===null||g===void 0||g.trigger(E)})}})}registerKeybindings(u){const{codeEdits:d}=this.aiNativeConfigService;u.registerKeybinding({command:l.AI_CODE_EDITS_COMMANDS.DISCARD.id,keybinding:o.Key.ESCAPE.code,when:p.CodeEditsIsVisible.raw,priority:100}),u.registerKeybinding({command:l.AI_CODE_EDITS_COMMANDS.ACCEPT.id,keybinding:o.Key.TAB.code,when:p.CodeEditsIsVisible.raw},o.KeybindingScope.USER),u.registerKeybinding({command:l.AI_CODE_EDITS_COMMANDS.TRIGGER.id,keybinding:d.triggerKeybinding,when:"editorFocus"},o.KeybindingScope.USER)}};t.IntelligentCompletionsContribution=a,n.__decorate([(0,r.Autowired)(m.WorkbenchEditorService),n.__metadata("design:type",_.WorkbenchEditorServiceImpl)],a.prototype,"workbenchEditorService",void 0),n.__decorate([(0,r.Autowired)(o.AINativeConfigService),n.__metadata("design:type",o.AINativeConfigService)],a.prototype,"aiNativeConfigService",void 0),t.IntelligentCompletionsContribution=a=n.__decorate([(0,v.Domain)(o.ClientAppContribution,o.KeybindingContribution,v.CommandContribution)],a)},7511:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IntelligentCompletionsController=void 0;const n=e(41869),r=e(50394),o=e(43718),l=e(28423),p=e(94170),v=e(69292),m=e(37355),_=e(22846),s=e(23268),f=e(77659),a=e(99906),h=e(78409),u=e(36368),d=e(12979),E=e(91267),g=e(25576),c=e(19447),b=e(40650);class y extends a.BaseAIMonacoEditorController{constructor(){super(...arguments),this.reportData=(0,l.derived)(this,A=>{const w=this.codeEditsSourceCollection.codeEditsContextBean.read(A),T=this.codeEditsResult.read(A);if(w&&T){const{range:D,insertText:I}=T.items[0],R=I,M=this.model.getValueInRange(D);return(O,P=!0)=>{const k={[O]:P,code:R,originCode:M};w.reporterEnd(k)}}}),this.discard=(0,l.derivedHandleChanges)({owner:this,createEmptyChangeSummary:()=>({lastVisibleTime:Date.now()}),handleChange:(A,w)=>A.didChange(this.multiLineEditsIsVisibleObs)?(w.lastVisibleTime=Date.now(),this.multiLineEditsIsVisibleObs.get()):!1,equalityComparer:()=>!1},(A,w)=>{this.multiLineEditsIsVisibleObs.read(A);const T=w.lastVisibleTime,D=this.reportData.read(A);let I=!1;return T&&Date.now()-T>b.VALID_TIME?(I=!0,D?.("isDrop")):(I=!1,D?.("isValid",!1)),this.codeEditsPreviewer.discard(),this.hide(),I}),this.accept=(0,l.derivedOpts)({owner:this,equalsFn:()=>!1},A=>{const w=this.reportData.read(A);w?.("isReceive"),this.codeEditsPreviewer.accept(),this.hide()})}static get(A){return A.getContribution(y.ID)}get model(){return this.monacoEditor.getModel()}get preferenceService(){return this.injector.get(n.PreferenceService)}get keybindingRegistry(){return this.injector.get(n.KeybindingRegistry)}get intelligentCompletionsRegistry(){return this.injector.get(o.IntelligentCompletionsRegistryToken)}get logger(){return this.injector.get(o.ILogger)}mount(){this.handlerAlwaysVisiblePreference(),this.codeEditsResult=(0,l.observableValue)(this,void 0),this.aiNativeContextKey=this.injector.get(f.AINativeContextKey,[this.monacoEditor.contextKeyService]),this.codeEditsPreviewer=this.injector.get(c.CodeEditsPreviewer,[this.monacoEditor,this.aiNativeContextKey]),this.codeEditsSourceCollection=this.injector.get(h.CodeEditsSourceCollection,[[d.LintErrorCodeEditsSource,u.LineChangeCodeEditsSource,g.TypingCodeEditsSource,E.TriggerCodeEditsSource],this.monacoEditor]);const A=new Set([r.CodeEditsIsVisible.raw]);return this.multiLineEditsIsVisibleObs=(0,l.observableFromEvent)(this,o.Event.filter(this.aiNativeContextKey.contextKeyService.onDidChangeContext,w=>w.payload.affectsSome(A)),()=>!!this.aiNativeContextKey.codeEditsIsVisible.get()),this.registerFeature(this.monacoEditor),this.featureDisposable}handlerAlwaysVisiblePreference(){let A=new o.Disposable;const w=()=>{A.addDispose(this.keybindingRegistry.registerKeybinding({command:v.inlineSuggestCommitId,keybinding:n.Key.TAB.code,when:s.ContextKeyExpr.and(m.InlineCompletionContextKeys.inlineSuggestionVisible,p.EditorContextKeys.tabMovesFocus.toNegated(),m.InlineCompletionContextKeys.inlineSuggestionHasIndentationLessThanTabSize,p.EditorContextKeys.hoverFocused.toNegated())},n.KeybindingScope.USER));const I=_.InlineCompletionsController.get(this.monacoEditor);I&&A.addDispose((0,l.autorun)(R=>{const M=I.model.read(R);M?.inlineCompletionState.read(R);const O=I._suggestWidgetAdapter;if(!O||!O.selectedItem.get())return;const k=O._suggestWidgetAdaptor;k._currentSuggestItemInfo=void 0,k._onDidSelectedItemChange.fire()}))},T=()=>{A&&(A.dispose(),A=new o.Disposable)};this.preferenceService.getValid(o.AINativeSettingSectionsId.IntelligentCompletionsAlwaysVisible,!0)&&w(),this.featureDisposable.addDispose(this.preferenceService.onSpecificPreferenceChange(o.AINativeSettingSectionsId.IntelligentCompletionsAlwaysVisible,({newValue:I})=>{I?w():T()}))}hide(){this.cancelToken(),this.aiNativeContextKey.codeEditsIsVisible.reset(),this.codeEditsPreviewer.hide()}trigger(A){const w=this.codeEditsSourceCollection.getSource(E.TriggerCodeEditsSource);w&&(this.hide(),w.triggerSignal.trigger(A))}registerFeature(A){this.featureDisposable.addDispose(this.monacoEditor.onDidChangeCursorPosition(w=>{const T=this.multiLineEditsIsVisibleObs.get(),D=this.codeEditsResult.get();if(T&&D){const I=w.position,R=D.items[0].range;(I.lineNumber<R.startLineNumber||I.lineNumber>R.endLineNumber)&&(0,o.runWhenIdle)(()=>{this.discard.get()})}})),this.featureDisposable.addDispose(o.Event.any(A.onDidChangeModel,A.onDidChangeModelContent)(()=>{(0,o.runWhenIdle)(()=>{this.hide()})})),this.featureDisposable.addDispose((0,l.autorunWithStoreHandleChanges)({createEmptyChangeSummary:()=>({}),handleChange:w=>w.didChange(this.codeEditsSourceCollection.codeEditsContextBean)?!this.aiNativeContextKey.codeEditsIsVisible.get():!1},async(w,T,D)=>{const I=this.codeEditsSourceCollection.codeEditsContextBean.read(w),R=this.intelligentCompletionsRegistry.getCodeEditsProvider();if(I&&R){D.add(o.Disposable.create(()=>I.cancelToken())),I.reporterStart();const M=await R(this.monacoEditor,I.position,I.bean,I.token);M&&M.items.length>0&&(0,l.transaction)(O=>{this.codeEditsResult.set(new b.CodeEditsResultValue(M),O)})}})),this.featureDisposable.addDispose((0,l.autorun)(w=>{const T=this.codeEditsResult.read(w);if(T)try{this.codeEditsPreviewer.render(T)}catch(D){this.logger.warn("IntelligentCompletionsController applyInlineDecorations error",D)}})),this.featureDisposable.addDispose(this.codeEditsSourceCollection)}}t.IntelligentCompletionsController=y,y.ID="editor.contrib.ai.intelligent.completions"},74292:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IntelligentCompletionsRegistry=void 0;const n=e(85608),r=e(76003),o=e(43718);let l=class extends o.Disposable{registerIntelligentCompletionProvider(v){this.inlineCompletionsProvider=v}registerInlineCompletionsProvider(v){this.inlineCompletionsProvider=v}registerInlineEditProvider(v){this.inlineEditProvider=v}registerCodeEditsProvider(v){this.codeEditsProvider=v}getInlineCompletionsProvider(){return this.inlineCompletionsProvider}getCodeEditsProvider(){return this.codeEditsProvider}getInlineEditProvider(){return this.inlineEditProvider}};t.IntelligentCompletionsRegistry=l,t.IntelligentCompletionsRegistry=l=n.__decorate([(0,r.Injectable)()],l)},78409:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CodeEditsSourceCollection=t.BaseCodeEditsSource=t.CodeEditsContextBean=void 0;const n=e(85608),r=e(76003),o=e(41869),l=e(43718),p=e(20868),v=e(28423);class m extends l.Disposable{constructor(a,h){super(),this.raw=a,this.source=h,this.uid=(0,l.uuid)(6)}get priority(){return this.source.priority}get bean(){return this.raw}get typing(){return this.raw.typing}get position(){return this.raw.position}get data(){return this.raw.data}get token(){return this.source.token}joinData(a){this.raw.data={...this.data,...a}}reporterStart(){return this.source.reporterStart()}cancelToken(){return this.source.cancelToken()}reporterEnd(a){return this.source.reporterEnd(a)}}t.CodeEditsContextBean=m;let _=class extends l.Disposable{get token(){return this.cancellationTokenSource.token}cancelToken(){this.cancellationTokenSource.cancel(),this.cancellationTokenSource=new p.CancellationTokenSource,this.reporterEnd({isValid:!1})}constructor(a){super(),this.monacoEditor=a,this.cancellationTokenSource=new p.CancellationTokenSource,this.relationID=(0,v.observableValue)(this,void 0),this.codeEditsContextBean=(0,v.disposableObservableValue)(this,void 0)}get model(){return this.monacoEditor.getModel()}resetBean(){(0,v.transaction)(a=>{this.cancelToken(),this.codeEditsContextBean.set(void 0,a)})}setBean(a){(0,v.transaction)(h=>{const u=new m({...a,position:this.monacoEditor.getPosition()},this);this.codeEditsContextBean.set(u,h)})}reporterStart(){const a=this.codeEditsContextBean.get();if(a){const h=this.aiReporter.start(l.AIServiceType.CodeEdits,{type:l.AIServiceType.CodeEdits,actionSource:a?.typing});(0,v.transaction)(u=>{this.relationID.set(h,u)})}}reporterEnd(a){const h=this.relationID.get();h&&this.aiReporter.end(h,a)}};t.BaseCodeEditsSource=_,n.__decorate([(0,r.Autowired)(l.IAIReporter),n.__metadata("design:type",Object)],_.prototype,"aiReporter",void 0),n.__decorate([(0,r.Autowired)(o.PreferenceService),n.__metadata("design:type",Object)],_.prototype,"preferenceService",void 0),t.BaseCodeEditsSource=_=n.__decorate([(0,r.Injectable)({multiple:!0}),n.__param(0,(0,r.Optional)()),n.__metadata("design:paramtypes",[Object])],_);let s=class extends l.Disposable{getSource(a){return this.sources.find(h=>h instanceof a)}constructor(a,h){super(),this.constructorSources=a,this.monacoEditor=h,this.sources=[],this.codeEditsContextBean=(0,v.disposableObservableValue)(this,void 0),this.sources=this.constructorSources.map(d=>this.injector.get(d,[this.monacoEditor])),this.sources.forEach(d=>this.addDispose(d.mount()));const u=(0,v.derived)(d=>({codeEditsContextBean:new Map(this.sources.map(E=>[E,E.codeEditsContextBean.read(d)]))}));this.addDispose((0,v.autorunDelta)((0,v.debouncedObservable2)(u,0),({lastValue:d,newValue:E})=>{const g=this.sources.filter(y=>{var S;const A=E?.codeEditsContextBean.get(y),w=(S=d?.codeEditsContextBean)===null||S===void 0?void 0:S.get(y);return A&&(!w||A.uid!==w.uid)});let c=0,b;for(const y of g){const S=y.codeEditsContextBean.get();if(!S)return;b||(b=S),S.priority>=c&&(c=S.priority,S.joinData(b.data),b=S),b.joinData(S.data)}(0,v.transaction)(y=>{this.codeEditsContextBean.set(b,y)})}))}};t.CodeEditsSourceCollection=s,n.__decorate([(0,r.Autowired)(r.INJECTOR_TOKEN),n.__metadata("design:type",r.Injector)],s.prototype,"injector",void 0),t.CodeEditsSourceCollection=s=n.__decorate([(0,r.Injectable)({multiple:!0}),n.__metadata("design:paramtypes",[Array,Object])],s)},36368:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LineChangeCodeEditsSource=void 0;const n=e(85608),r=e(76003),o=e(43718),l=e(28423),p=e(7511),v=e(78409),m=5,_=60*1e3;let s=class extends v.BaseCodeEditsSource{constructor(){super(...arguments),this.priority=1,this.deprecatedStore=new Map,this.positionChangeObs=(0,l.observableFromEvent)(this,this.monacoEditor.onDidChangeCursorPosition,a=>a),this.contentChangeObs=(0,l.observableFromEvent)(this,this.monacoEditor.onDidChangeModelContent,a=>a),this.latestContentChangeTimeObs=(0,l.derivedHandleChanges)({owner:this,createEmptyChangeSummary:()=>({latestContentChangeTime:0}),handleChange:(a,h)=>(a.didChange(this.contentChangeObs)&&(h.latestContentChangeTime=Date.now()),!0)},(a,h)=>(this.contentChangeObs.read(a),h.latestContentChangeTime)),this.isAllowTriggerObs=(0,l.derived)(a=>{var h;this.positionChangeObs.read(a);const u=this.latestContentChangeTimeObs.read(a);if(!this.preferenceService.getValid(o.AINativeSettingSectionsId.CodeEditsLineChange,!1))return!1;const E=this.deprecatedStore.get(((h=this.model)===null||h===void 0?void 0:h.id)||"");return!(E&&E>=m||u===0||u&&Date.now()-u>_)})}mount(){var a,h;this.addDispose((0,l.autorunDelta)(this.positionChangeObs,({lastValue:E,newValue:g},c)=>{if(!this.isAllowTriggerObs.read(c))return!1;const y=E?.position,S=g?.position;y&&y.lineNumber!==S?.lineNumber&&this.setBean({typing:o.ECodeEditsSourceTyping.LineChange,data:{[o.ECodeEditsSourceTyping.LineChange]:{preLineNumber:y.lineNumber,currentLineNumber:S.lineNumber}}})}));const u=(a=p.IntelligentCompletionsController.get(this.monacoEditor))===null||a===void 0?void 0:a.discard,d=(h=p.IntelligentCompletionsController.get(this.monacoEditor))===null||h===void 0?void 0:h.accept;return u&&this.addDispose((0,l.onObservableChange)(u,E=>{var g;const c=(g=this.model)===null||g===void 0?void 0:g.id;if(!c||!E)return;const b=this.deprecatedStore.get(c)||0;this.deprecatedStore.set(c,b+1)})),d&&this.addDispose((0,l.onObservableChange)(d,()=>{var E;const g=(E=this.model)===null||E===void 0?void 0:E.id;g&&this.deprecatedStore.delete(g)})),this}};t.LineChangeCodeEditsSource=s,t.LineChangeCodeEditsSource=s=n.__decorate([(0,r.Injectable)({multiple:!0})],s)},12979:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LintErrorCodeEditsSource=void 0;const n=e(85608),r=e(76003),o=e(43718),l=e(28423),p=e(16781),v=e(34835),m=e(78409);var _;(function(f){function a(h){return{message:h.message,range:{startPosition:{lineNumber:h.startLineNumber,column:h.startColumn},endPosition:{lineNumber:h.endLineNumber,column:h.endColumn}},source:h.resource,relatedInformation:h.relatedInformation,severity:v.MarkerSeverity.toString(h.severity)}}f.toData=a})(_||(_={}));let s=class extends m.BaseCodeEditsSource{constructor(){super(...arguments),this.priority=0}mount(){const a=(0,l.observableFromEvent)(this,this.monacoEditor.onDidChangeCursorPosition,h=>h);return this.addDispose((0,l.autorunDelta)(a,({lastValue:h,newValue:u})=>{const d=h?.position,E=u?.position,g=this.monacoEditor.getSelection();g?.isEmpty()&&d&&d.lineNumber!==E?.lineNumber&&this.doTrigger(E)})),this}doTrigger(a){if(!this.preferenceService.getValid(o.AINativeSettingSectionsId.CodeEditsLintErrors,!1)||!this.model)return;const u=p.StandaloneServices.get(v.IMarkerService),d=this.model.uri;let E=u.read({resource:d,severities:v.MarkerSeverity.Error});E=E.filter(g=>Math.abs(g.startLineNumber-a.lineNumber)<=1),E.length&&this.setBean({typing:o.ECodeEditsSourceTyping.LinterErrors,data:{[o.ECodeEditsSourceTyping.LinterErrors]:{errors:E.map(g=>_.toData(g))}}})}};t.LintErrorCodeEditsSource=s,t.LintErrorCodeEditsSource=s=n.__decorate([(0,r.Injectable)({multiple:!0})],s)},91267:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TriggerCodeEditsSource=void 0;const n=e(85608),r=e(76003),o=e(43718),l=e(28423),p=e(78409);let v=class extends p.BaseCodeEditsSource{constructor(){super(...arguments),this.priority=Number.MAX_SAFE_INTEGER,this.triggerSignal=(0,l.observableSignal)(this)}mount(){return this.addDispose((0,l.runOnChangeWithStore)((0,l.derived)(_=>(this.triggerSignal.read(_),{})),()=>{const _=this.monacoEditor.getPosition();this.setBean({typing:o.ECodeEditsSourceTyping.Trigger,data:{[o.ECodeEditsSourceTyping.Trigger]:{position:_}}})})),this}};t.TriggerCodeEditsSource=v,t.TriggerCodeEditsSource=v=n.__decorate([(0,r.Injectable)({multiple:!0})],v)},25576:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TypingCodeEditsSource=void 0;const n=e(85608),r=e(76003),o=e(43718),l=e(78409);let p=class extends l.BaseCodeEditsSource{constructor(){super(...arguments),this.priority=2}mount(){return this.addDispose(this.monacoEditor.onDidChangeModelContent(m=>{this.doTrigger(m)})),this}async doTrigger(m){!this.preferenceService.getValid(o.AINativeSettingSectionsId.CodeEditsTyping,!1)||!this.model||this.setBean({typing:o.ECodeEditsSourceTyping.Typing,data:{[o.ECodeEditsSourceTyping.Typing]:m}})}};t.TypingCodeEditsSource=p,t.TypingCodeEditsSource=p=n.__decorate([(0,r.Injectable)({multiple:!0})],p)},34809:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BaseCodeEditsView=void 0;const n=e(43718),r=e(52436);class o extends n.Disposable{constructor(p,v){super(),this.monacoEditor=p,this.injector=v,this.editorObs=(0,r.observableCodeEditor)(this.monacoEditor),this.mount(),this.addDispose({dispose:()=>this.hide()})}mount(){}}t.BaseCodeEditsView=o},19447:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CodeEditsPreviewer=void 0;const n=e(85608),r=e(76003),o=e(41869),l=e(43718),p=e(28423),v=e(77659),m=e(40650),_=e(19211),s=e(56059);let f=class extends l.Disposable{constructor(h,u){super(),this.monacoEditor=h,this.aiNativeContextKey=u,this.renderTypeObs=(0,p.observableFromEvent)(this,this.preferenceService.onPreferenceChanged,()=>this.preferenceService.getValid(l.AINativeSettingSectionsId.CodeEditsRenderType,m.CodeEditsRenderType.Default)),this.addDispose((0,p.autorun)(d=>{const E=this.renderTypeObs.read(d);this.view&&(this.view.dispose(),this.view=void 0),E===m.CodeEditsRenderType.Default?this.view=new _.DefaultCodeEditsView(this.monacoEditor,this.injector):this.view=new s.LegacyCodeEditsView(this.monacoEditor,this.injector)}))}render(h){var u;(u=this.view)===null||u===void 0||u.render(h),this.aiNativeContextKey.codeEditsIsVisible.set(!0)}hide(){var h;(h=this.view)===null||h===void 0||h.hide(),this.aiNativeContextKey.codeEditsIsVisible.set(!1)}accept(){var h;(h=this.view)===null||h===void 0||h.accept(),this.aiNativeContextKey.codeEditsIsVisible.set(!1)}discard(){var h;(h=this.view)===null||h===void 0||h.discard(),this.aiNativeContextKey.codeEditsIsVisible.set(!1)}};t.CodeEditsPreviewer=f,n.__decorate([(0,r.Autowired)(r.INJECTOR_TOKEN),n.__metadata("design:type",r.Injector)],f.prototype,"injector",void 0),n.__decorate([(0,r.Autowired)(o.PreferenceService),n.__metadata("design:type",Object)],f.prototype,"preferenceService",void 0),t.CodeEditsPreviewer=f=n.__decorate([(0,r.Injectable)(),n.__param(0,(0,r.Optional)()),n.__param(1,(0,r.Optional)()),n.__metadata("design:paramtypes",[Object,v.AINativeContextKey])],f)},19211:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DefaultCodeEditsView=void 0;const n=e(20868),r=e(28423),o=e(10897),l=e(22846),p=e(53511),v=e(99889),m=e(34809);class _{constructor(a,h,u){this.position=a,this.context=h,this.versionId=u}satisfies(a){return this.position.equals(a.position)&&(0,o.equalsIfDefined)(this.context.selectedSuggestionInfo,a.context.selectedSuggestionInfo,(0,o.itemEquals)())&&(a.context.triggerKind===n.InlineCompletionTriggerKind.Automatic||this.context.triggerKind===n.InlineCompletionTriggerKind.Explicit)&&this.versionId===a.versionId}get isExplicitRequest(){return this.context.triggerKind===n.InlineCompletionTriggerKind.Explicit}}class s extends m.BaseCodeEditsView{constructor(){super(...arguments),this.monacoCompletionsModel=(0,r.derived)(this,a=>{const h=l.InlineCompletionsController.get(this.monacoEditor);if(h)return h.model.read(a)}),this.monacoCompletionsSource=(0,r.derived)(this,a=>{const h=this.monacoCompletionsModel.read(a);return h?h._source:void 0})}render(a){var h;const u=this.monacoCompletionsSource.get();if(!u)return;const d=(h=this.editorObs.positions.get())===null||h===void 0?void 0:h[0];if(!d)return;const E=this.editorObs.model.get();!E||E.getValueInRange(a.firstRange)===a.firstText||(0,r.asyncTransaction)(async c=>{const b=this.editorObs.versionId.get(),y={triggerKind:n.InlineCompletionTriggerKind.Automatic,selectedSuggestionInfo:void 0,includeInlineCompletions:!1,includeInlineEdits:!0},S=new _(d,y,b),A=await(0,v.provideInlineCompletions)({all:()=>[{provideInlineCompletions:()=>{},provideInlineEditsForRange(T,D,I,R){return a},freeInlineCompletions:()=>[]}]},n.Range.lift(a.firstRange),E,y),w=new p.UpToDateInlineCompletions(A,S,E,this.editorObs.versionId,(0,r.constObservable)(4e3));u.inlineCompletions.set(w,c),u.loading.set(!1,c)})}accept(){const a=this.monacoCompletionsModel.get();a?.accept()}discard(){const a=this.monacoCompletionsModel.get();(0,r.transaction)(h=>{a?.stop("explicitCancel",h)})}hide(){var a,h;(h=(a=this.monacoCompletionsSource.get())===null||a===void 0?void 0:a.inlineCompletions)===null||h===void 0||h.set(void 0,void 0)}}t.DefaultCodeEditsView=s},56059:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LegacyCodeEditsView=void 0;const n=e(20868),r=e(70392),o=e(77714),l=e(8191),p=e(84176),v=e(591),m=e(59945),_=e(34809);class s extends _.BaseCodeEditsView{constructor(){super(...arguments),this.multiLineDecorationModel=new v.MultiLineDecorationModel(this.monacoEditor),this.additionsDeletionsDecorationModel=new p.AdditionsDeletionsDecorationModel(this.monacoEditor)}get model(){return this.monacoEditor.getModel()}mount(){this.addDispose(r.Event.any(this.monacoEditor.onDidChangeCursorPosition,this.monacoEditor.onDidChangeModelContent,this.monacoEditor.onDidBlurEditorWidget)(()=>{this.additionsDeletionsDecorationModel.clearAdditionsDecorations()}))}destroyRewriteWidget(){this.rewriteWidget&&(this.rewriteWidget.dispose(),this.rewriteWidget=null)}async renderRewriteWidget(a,h,u,d){this.destroyRewriteWidget();const E=this.monacoEditor.getPosition();if(!E)return;this.rewriteWidget=this.injector.get(l.RewriteWidget,[this.monacoEditor]);const g=this.model.getOffsetAt({lineNumber:u.startLineNumber,column:u.startColumn}),c=this.model.getOffsetAt({lineNumber:u.endLineNumber,column:u.endColumn}),b=this.model.getValue(),y=b.substring(0,g)+d+b.substring(c),S=(0,m.wordChangesToLineChangesMap)(a,u,h);await this.rewriteWidget.defered.promise;const A=Object.values(S).map(w=>({changes:w.map(T=>T.filter(D=>D.value.trim()!==o.empty)).filter(T=>T.length>0)}));this.rewriteWidget.setInsertText(d),this.rewriteWidget.show({position:E}),this.rewriteWidget.setEditArea(u),A.every(({changes:w})=>w.every(T=>T.every(({removed:D})=>D)))?this.rewriteWidget.renderTextLineThrough(A):this.rewriteWidget.renderVirtualEditor(y,a)}render(a){const{items:h}=a,{range:u,insertText:d}=h[0];if(!u)return;const E=this.monacoEditor.getPosition(),g=this.monacoEditor.getModel(),c=d.toString(),b=g?.getValueInRange(u),y=this.model.getEOL(),S=(0,m.computeMultiLineDiffChanges)(b,c,this.monacoEditor,u.startLineNumber,y);if(!S)return;const{singleLineCharChanges:A,charChanges:w,wordChanges:T,isOnlyAddingToEachWord:D}=S;if(u&&D&&w.length<=20&&T.length<=20){const M=this.multiLineDecorationModel.applyInlineDecorations(this.monacoEditor,(0,m.mergeMultiLineDiffChanges)(A,y),u.startLineNumber,E);this.multiLineDecorationModel.clearDecorations(),M?M&&M.inlineMods&&this.multiLineDecorationModel.updateLineModificationDecorations(M.inlineMods):this.renderRewriteWidget(T,g,u,c)}else this.additionsDeletionsDecorationModel.updateDeletionsDecoration(T,u,y),this.renderRewriteWidget(T,g,u,c)}accept(){if(this.multiLineDecorationModel.accept(),this.rewriteWidget){this.rewriteWidget.accept();const a=this.rewriteWidget.getVirtualEditor();if(a){const h=this.rewriteWidget.getEditArea(),u=a.getDecorationsInRange(n.Range.lift(h)),d=u?.filter(E=>E.options.description===l.REWRITE_DECORATION_INLINE_ADD);d&&this.additionsDeletionsDecorationModel.updateAdditionsDecoration(d.map(E=>E.range))}}}discard(){this.hide()}hide(){this.multiLineDecorationModel.clearDecorations(),this.additionsDeletionsDecorationModel.clearDeletionsDecorations(),this.destroyRewriteWidget()}}t.LegacyCodeEditsView=s},35363:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InterfaceNavigationContribution=t.InterfaceNavigationDecorationsContribution=void 0;const n=e(85608),r=n.__importDefault(e(12784)),o=n.__importDefault(e(13833)),l=e(76003),p=e(41869),v=e(43718),m=e(57517),_=n.__importStar(e(20868)),s=e(90052),f=e(52416),a=e(85679),h=e(53374),u=n.__importDefault(e(26754)),d="PCEtLSBDb3B5cmlnaHQgMjAwMC0yMDIyIEpldEJyYWlucyBzLnIuby4gYW5kIGNvbnRyaWJ1dG9ycy4gVXNlIG9mIHRoaXMgc291cmNlIGNvZGUgaXMgZ292ZXJuZWQgYnkgdGhlIEFwYWNoZSAyLjAgbGljZW5zZS4gLS0+Cjxzdmcgd2lkdGg9IjE2IiBoZWlnaHQ9IjE2IiB2aWV3Qm94PSIwIDAgMTYgMTYiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxjaXJjbGUgY3g9IjgiIGN5PSI4IiByPSI2LjUiIGZpbGw9IiMyNTM2MjciIHN0cm9rZT0iIzU3OTY1QyIvPgo8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTEwIDQuNVY1LjVMOC41IDUuNVYxMC41SDEwVjExLjVMOC41IDExLjVINy41TDYgMTEuNVYxMC41SDcuNVY1LjVMNiA1LjVWNC41SDcuNUg4LjVIMTBaIiBmaWxsPSIjNTc5NjVDIi8+Cjwvc3ZnPgo=",E="PCEtLSBDb3B5cmlnaHQgMjAwMC0yMDIyIEpldEJyYWlucyBzLnIuby4gYW5kIGNvbnRyaWJ1dG9ycy4gVXNlIG9mIHRoaXMgc291cmNlIGNvZGUgaXMgZ292ZXJuZWQgYnkgdGhlIEFwYWNoZSAyLjAgbGljZW5zZS4gLS0+Cjxzdmcgd2lkdGg9IjE2IiBoZWlnaHQ9IjE2IiB2aWV3Qm94PSIwIDAgMTYgMTYiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxjaXJjbGUgY3g9IjgiIGN5PSI4IiByPSI2LjUiIGZpbGw9IiNGMkZDRjMiIHN0cm9rZT0iIzVGQjg2NSIvPgo8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTEwIDQuNVY1LjVMOC41IDUuNVYxMC41SDEwVjExLjVMOC41IDExLjVINy41TDYgMTEuNVYxMC41SDcuNVY1LjVMNiA1LjVWNC41SDcuNUg4LjVIMTBaIiBmaWxsPSIjNUZCODY1Ii8+Cjwvc3ZnPgo=";let g=class extends p.Disposable{constructor(S,A){super(),this.interfaceNode=S,this.editor=A,this.id="";const w=this.themeService.getCurrentThemeSync().type==="dark"?d:E,D=`${this.iconService.fromIcon("",`data:image/svg+xml;base64,${w}`,f.IconType.Base64)} ${u.default["interface-navigation-icon"]} interface-navigation-glyph`;this.editorDecoration={range:(0,h.toMonacoRange)(S),options:{isWholeLine:!0,glyphMarginClassName:D,description:"interface-decoration",glyphMarginHoverMessage:{value:(0,p.localize)("preference.ai.native.interface.quick.navigation.hover")},stickiness:_.editor.TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges}}}get line(){return this.editorDecoration.range.startLineNumber}click(S){var A;return((A=S.target.position)===null||A===void 0?void 0:A.lineNumber)!==this.line||S.target.type!==s.MouseTargetType.GUTTER_GLYPH_MARGIN?!1:(this.editor.setPosition({lineNumber:this.interfaceNode.startPosition.row+1,column:this.interfaceNode.startPosition.column+1}),this.commandService.executeCommand("editor.action.goToImplementation"),!0)}};n.__decorate([(0,l.Autowired)(p.CommandService),n.__metadata("design:type",Object)],g.prototype,"commandService",void 0),n.__decorate([(0,l.Autowired)(f.IIconService),n.__metadata("design:type",Object)],g.prototype,"iconService",void 0),n.__decorate([(0,l.Autowired)(f.IThemeService),n.__metadata("design:type",Object)],g.prototype,"themeService",void 0),g=n.__decorate([(0,l.Injectable)({multiple:!0}),n.__metadata("design:paramtypes",[Object,Object])],g);let c=class{get currentUri(){return this.editor.currentUri}constructor(S){this.editor=S,this.disposer=new p.Disposable,this.lastDecorations=[],this.supportLanguages=["java","typescript","typescriptreact"]}getInterfaceQuickJumpEnabled(){return this.preferenceService.getValid(v.AINativeSettingSectionsId.InterfaceQuickNavigationEnabled,!0)}async parseJavaInterfaces(S){const A=[];function w(T){if(T.type==="interface_declaration"){const D=T.children.find(M=>M.type==="identifier"),I=T.children.find(M=>M.type==="interface_body"),R=I?.children.filter(M=>M.type==="field_declaration"||M.type==="method_declaration").map(M=>M.children.find(O=>O.type==="identifier")).filter(M=>!!M);A.push({interfaceNode:D,members:R})}T.children.forEach(D=>w(D))}return w(S),A}async parseTypeScriptInterfaces(S){const A=[];function w(T){if(T.type==="interface_declaration"){const D=T.children.find(I=>I.type==="type_identifier");A.push({interfaceNode:D,members:[]})}T.children.forEach(D=>w(D))}return w(S),A}async decorateEditor(){if(!this.getInterfaceQuickJumpEnabled())return;const S=this.editor.monacoEditor.getModel();if(!S)return;const A=S.getLanguageId();if(!this.supportLanguages.includes(A))return;const w=this.languageParserService.createParser(A);if(!w)return;const T=await w.parseAST(S);if(!T)return;let D=[];if(A==="typescript"||A==="typescriptreact")D=await this.parseTypeScriptInterfaces(T);else if(A==="java")D=await this.parseJavaInterfaces(T);else return;D=A==="java"?await this.parseJavaInterfaces(T):await this.parseTypeScriptInterfaces(T);const I=D.map(({interfaceNode:R,members:M})=>{if(!R||!M)return[];const O=[this.injector.get(g,[R,this.editor.monacoEditor])];return M.forEach(P=>{O.push(this.injector.get(g,[P,this.editor.monacoEditor]))}),O}).flat();this.editor.monacoEditor.changeDecorations(R=>{const M=I;R.deltaDecorations(this.lastDecorations.map(O=>O.id),M.map(O=>O.editorDecoration)).forEach((O,P)=>M[P].id=O),this.lastDecorations=M})}contribute(){if(!this.getInterfaceQuickJumpEnabled())return this.disposer;this.disposer.addDispose(this.editor.monacoEditor.onDidChangeModel(async()=>{await this.decorateEditor()}));const S=(0,r.default)(()=>{this.decorateEditor()},3e3);return this.disposer.addDispose(this.editor.monacoEditor.onDidChangeModelContent(S)),this.disposer.addDispose(this.editor.monacoEditor.onMouseDown(A=>{for(const w of this.lastDecorations)if(w.click(A)){A.event.stopPropagation();return}})),this.disposer}};t.InterfaceNavigationDecorationsContribution=c,n.__decorate([(0,l.Autowired)(l.INJECTOR_TOKEN),n.__metadata("design:type",l.Injector)],c.prototype,"injector",void 0),n.__decorate([(0,l.Autowired)(a.LanguageParserService),n.__metadata("design:type",a.LanguageParserService)],c.prototype,"languageParserService",void 0),n.__decorate([(0,l.Autowired)(p.PreferenceService),n.__metadata("design:type",Object)],c.prototype,"preferenceService",void 0),t.InterfaceNavigationDecorationsContribution=c=n.__decorate([(0,l.Injectable)({multiple:!0}),n.__param(0,(0,l.Optional)()),n.__metadata("design:paramtypes",[Object])],c);let b=class{registerEditorFeature(S){S.registerEditorFeatureContribution({contribute:A=>this.injector.get(c,[A]).contribute()})}};t.InterfaceNavigationContribution=b,n.__decorate([(0,l.Autowired)(l.INJECTOR_TOKEN),n.__metadata("design:type",l.Injector)],b.prototype,"injector",void 0),t.InterfaceNavigationContribution=b=n.__decorate([(0,p.Domain)(m.BrowserEditorContribution)],b)},44298:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MergeConflictContribution=void 0;const n=e(85608),r=n.__importDefault(e(12784)),o=e(76003),l=e(41869),p=e(38070),v=e(43718),m=e(27833),_=e(57517),s=e(31375),f=n.__importStar(e(20868)),a=e(75526),h=e(24093),u=n.__importDefault(e(89543)),d=e(67641),E=e(80922),g=e(52902),c=e(79865),b=e(28160),y="merge-conflict-codelens-style",S=`
|
|
30063
|
+
`)),s}t.lineBasedPromptProcessor={processPrefix:m,processSuffix:_}},71863:(x,t,e)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.AICompletionsService=void 0;const r=e(85608),o=e(76003),l=e(41869),p=e(43718),v=e(52664);let m=n=class extends p.Disposable{constructor(){super(...arguments),this._onVisibleCompletion=new p.Emitter,this.onVisibleCompletion=this._onVisibleCompletion.event,this.cancelIndicator=new p.CancellationTokenSource,this.isDefaultCompletionModel=!0,this._isVisibleCompletion=!1,this.validCompletionThreshold=750}recordRenderTime(){this.lastRenderTime=Date.now()}recordCompletionUseTime(s){this.lastCompletionUseTime=Date.now()-s}get isVisibleCompletion(){return this._isVisibleCompletion}async complete(s){var f,a;this.isDefaultCompletionModel=!0;const h=Date.now();try{const u=await((a=(f=this.aiBackService).requestCompletion)===null||a===void 0?void 0:a.call(f,s,this.cancelIndicator.token));this.recordCompletionUseTime(h);const{sessionId:d,codeModelList:E,isCancel:g}=u;return{items:E.map(c=>({...c,insertText:c.content})),extra:{sessionId:d,isCancel:g}}}catch{return}}async report(s){const{relationId:f,accept:a}=s;s.renderingTime=Date.now()-this.lastRenderTime,s.completionUseTime=this.lastCompletionUseTime,this.reporterEnd(f,{success:!0,isReceive:a,renderingTime:s.renderingTime,code:s.code,actionSource:p.ActionSourceEnum.Completion,actionType:p.ActionTypeEnum.Completion}),this._isVisibleCompletion=!1}async reporterEnd(s,f){const a={...f,isValid:typeof f.renderingTime=="number"?f.renderingTime>this.validCompletionThreshold:!1};a.isValid&&this.aiReporter.end(s,a)}setVisibleCompletion(s){this._isVisibleCompletion===!0&&s===!1&&this.report({sessionId:this.lastSessionId,accept:!1,relationId:this.lastRelationId,code:this.lastCompletionContent}),this._isVisibleCompletion=s,this._onVisibleCompletion.fire(s),s===!0&&this.recordRenderTime()}setLastSessionId(s){this.lastSessionId=s}setLastRelationId(s){this.lastRelationId=s}setLastCompletionContent(s){this.lastCompletionContent=s}async cancelRequest(){this.cancelIndicator.cancel(),this.cancelIndicator=new p.CancellationTokenSource}updateStatusBarItem(s,f){const a=f?`$(loading~spin) ${s}`:`$(magic-wand) ${s}`;this.statusBarService.addElement(n.STATUS_ID,{text:a,alignment:l.StatusBarAlignment.RIGHT,priority:1})}hideStatusBarItem(){this.statusBarService.removeElement(n.STATUS_ID)}};t.AICompletionsService=m,m.STATUS_ID="ai_completion_status",r.__decorate([(0,o.Autowired)(p.AIBackSerivcePath),r.__metadata("design:type",Object)],m.prototype,"aiBackService",void 0),r.__decorate([(0,o.Autowired)(l.IStatusBarService),r.__metadata("design:type",Object)],m.prototype,"statusBarService",void 0),r.__decorate([(0,o.Autowired)(v.IAIReporter),r.__metadata("design:type",Object)],m.prototype,"aiReporter",void 0),t.AICompletionsService=m=n=r.__decorate([(0,o.Injectable)()],m)},71585:(x,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SnippetSemantics=t.SortOption=t.WishListAttributeName=t.NeighboringTabsOption=t.SnippetSelectionOption=t.StrategyType=t.TokenizerName=void 0;var e;(function(m){m.cl100k_base="cl100k_base",m.gpt2="gpt2",m.r50k_base="r50k_base",m.p50k_base="p50k_base",m.p50k_edit="p50k_edit",m.o200k_base="o200k_base"})(e||(t.TokenizerName=e={}));var n;(function(m){m.InterceptBasedOnChar="InterceptBasedOnChar",m.InterceptBasedOnLine="InterceptBasedOnLine",m.InterceptBasedOnFunction="InterceptBasedOnFunction"})(n||(t.StrategyType=n={}));var r;(function(m){m.BestMatch="bestMatch",m.TopK="topK"})(r||(t.SnippetSelectionOption=r={}));var o;(function(m){m.openFileHistory="openFileHistory",m.editFileRecent="editFileRecent",m.editFileHistory="editFileHistory"})(o||(t.NeighboringTabsOption=o={}));var l;(function(m){m.beforeCursor="beforeCursor",m.afterCursor="afterCursor",m.importedFile="importedFile",m.languageMarker="languageMarker",m.pathMarker="pathMarker",m.similarFile="similarFile"})(l||(t.WishListAttributeName=l={}));var p;(function(m){m.Ascending="ascending",m.Descending="descending",m.None="none"})(p||(t.SortOption=p={}));var v;(function(m){m.Function="function",m.Snippet="snippet",m.Variable="variable",m.Parameter="parameter",m.Method="method",m.Class="class",m.Module="module",m.Alias="alias",m.Enum="enum member",m.Interface="interface"})(v||(t.SnippetSemantics=v={}))},84176:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AdditionsDeletionsDecorationModel=void 0;const n=e(85608),r=e(20868),o=e(53617),l=e(8191),p=n.__importDefault(e(71800));class v{constructor(_){this.editor=_,this.deletionsDecorations=new o.EnhanceDecorationsCollection(this.editor),this.additionsDecorations=new o.EnhanceDecorationsCollection(this.editor)}generateRange(_,s,f){const a=[];let h=1,u=1;for(const d of _){const E=d.value.split(f),g=E.length,c=h+g-1,b=g>1?E[g-1].length+1:u+d.value.length;d.added&&(a.push({startLineNumber:h+s.startLineNumber-1,startColumn:u,endLineNumber:c+s.startLineNumber-1,endColumn:b}),u=b,h=c),d.removed||(u=b,h=c)}return a}clearDeletionsDecorations(){this.deletionsDecorations.clear()}clearAdditionsDecorations(){this.additionsDecorations.clear()}updateDeletionsDecoration(_,s,f){const a=this.generateRange(_.map(h=>{const u=h.value;return h.removed?{value:u,added:!0}:h.added?{value:u,removed:!0}:h}),s,f);this.deletionsDecorations.set(a.map(h=>({range:h,options:{description:"suggestion_deletions_background",className:p.default.suggestion_deletions_background,stickiness:r.TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges}})))}updateAdditionsDecoration(_){this.additionsDecorations.set(_.map(s=>({range:s,options:{description:l.REWRITE_DECORATION_INLINE_ADD,className:p.default.suggestion_additions_background,stickiness:r.TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges}})))}}t.AdditionsDeletionsDecorationModel=v},591:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MultiLineDecorationModel=t.GHOST_TEXT=t.GHOST_TEXT_DESCRIPTION=void 0;const n=e(43718),r=e(20868),o=e(77714),l=e(2261),p=e(37705),v=e(53617);var m;(function(s){s.beginning="beginning",s.end="end"})(m||(m={})),t.GHOST_TEXT_DESCRIPTION="ghost-text-decoration",t.GHOST_TEXT="ghost-text";class _{constructor(f){this.editor=f,this.ghostTextDecorations=new v.EnhanceDecorationsCollection(this.editor)}splitDiffChanges(f,a){const h=f.flatMap(u=>{const d=u.value.split(a),E=g=>({value:g,added:u.added,removed:u.removed});return d.flatMap((g,c)=>c<d.length-1?[E(g),E(a)]:E(g)).filter(g=>g.value!==o.empty)});for(let u=0;u<h.length-1;u++){const d=h[u],E=h[u+1];d.removed&&E.added&&E.value.startsWith(d.value)&&(d.added=!0,d.removed=!0)}return h}combineContinuousMods(f){const a=[];let h=o.empty;for(const u of f)u.isEolLine?(a.push(h),h=o.empty):h+=u.newValue;return h!==o.empty&&a.push(h),a}processLineModifications(f,a,h,u,d=!0){const E=this.combineContinuousMods(f),g=E.length,c=[],b=[];if(g===0)return{fullLineMods:c,inlineMods:b};const y=E[0],S=E[g-1];if(g===1)return d?!(0,n.isUndefined)(h)&&h.value!==a?b.push({status:m.beginning,newValue:h.value+y,oldValue:h.value}):!(0,n.isUndefined)(u)&&u.value!==a?b.push({status:m.end,newValue:S+u.value,oldValue:u.value}):c.push(y):c.push(y),{fullLineMods:c,inlineMods:b};if((0,n.isUndefined)(h)||h.value===a?c.push(y):b.push({status:m.beginning,newValue:h.value+y,oldValue:h.value}),g>2){const A=E.slice(1,-1);for(const w of A)c.push(w)}return(0,n.isUndefined)(u)||u.value===a?c.push(S):b.push({status:m.end,newValue:S+u.value,oldValue:u.value}),{fullLineMods:c,inlineMods:b}}getEdits(){return this.ghostTextDecorations.getDecorations().map(({editorDecoration:h,range:u})=>{var d;const g=((d=h.options.after)===null||d===void 0?void 0:d.content)||"";return{range:u,text:g}})}clearDecorations(){this.ghostTextDecorations.clear()}updateLineModificationDecorations(f){if(f.length===0){this.clearDecorations();return}const a=f.map(h=>{let u;if(h.newValue.startsWith(h.oldValue))u=h.newValue.slice(h.oldValue.length);else{const d=h.newValue.indexOf(h.oldValue);u=d!==-1?h.newValue.slice(0,d):h.newValue}return{range:r.Range.fromPositions(new r.Position(h.lineNumber,h.column)),options:{description:t.GHOST_TEXT,showIfCollapsed:!0,after:{content:u,inlineClassName:t.GHOST_TEXT_DESCRIPTION}}}});this.ghostTextDecorations.set(a)}applyInlineDecorations(f,a,h,u){var d,E,g,c,b,y,S,A,w;const T=f.getModel();if(!T)return;const D=T.getEOL();a=this.splitDiffChanges(a,D),a.unshift({value:D,added:void 0,removed:void 0});let I=Math.max(h-1,0);const R=T.getValue(),M=T.getLineContent(u.lineNumber),O={},P=[];let k=o.empty,F=M.trim()===o.empty,L,B=[],j=I,W=1;const U=V=>{var $;const Y=!P.some(K=>K.lineNumber===I&&K.lockLineGhostText),{fullLineMods:z,inlineMods:H}=this.processLineModifications(B,D,L,V,Y);return O[I]=[...($=O[I])!==null&&$!==void 0?$:[],...z.map(K=>({content:K,decorations:[new p.LineDecoration(1,K.length+1,"ghost-text",0)]}))],H.forEach(K=>P.push({lineNumber:K.status===m.beginning?I:I+1,column:K.status===m.beginning?W:1,newValue:K.newValue,oldValue:K.oldValue})),{fullLineMods:z,inlineMods:H}};for(const V of a)if(V.added){const $=V.value===D;$&&(k=o.empty),B.push({isEolLine:$,lineNumber:I,newValue:$?o.empty:V.value,oldValue:$?o.empty:k})}else{const{inlineMods:$}=U(V);if(O[I].length>0&&R.split(D)[I]===o.empty){const Y=O[I];if(Y.length>0){const z=Y[0].content,H=Y.slice(1);z.startsWith(M)&&(P.some(K=>K.lineNumber===I+1&&K.lockLineGhostText)?((E=O[S=I+1])!==null&&E!==void 0||(O[S]=[]),O[I+1].unshift(...Y)):(P.push({lineNumber:I+1,column:1,newValue:z,oldValue:o.empty,lockLineGhostText:!0}),(d=O[y=I+1])!==null&&d!==void 0||(O[y]=[]),O[I+1].unshift(...H)),O[I]=[])}}if(I===u.lineNumber&&$.length>0&&(F=!1,I<u.lineNumber&&((g=O[I])===null||g===void 0?void 0:g.length)>0||I===u.lineNumber&&$.length>0&&W<u.column))return;L=V,B=[],V.value===D?(j++,W=1,k=o.empty):j>I?(I=j,W+=V.value.length,B=[],k+=V.value):(W+=V.value.length,k+=V.value)}const{fullLineMods:X}=U(void 0);if(F){const V=O[u.lineNumber-1];if(V?.length>0){const $=V[0].content,Y=V.slice(1);P.some(z=>z.lineNumber===u.lineNumber&&z.lockLineGhostText)?((b=O[w=u.lineNumber])!==null&&b!==void 0||(O[w]=[]),O[u.lineNumber].unshift(...V)):(P.push({lineNumber:u.lineNumber,column:u.column,newValue:$.slice(u.column-1),oldValue:M,lockLineGhostText:!0}),(c=O[A=u.lineNumber])!==null&&c!==void 0||(O[A]=[]),O[u.lineNumber].unshift(...Y)),O[u.lineNumber-1]=[]}}else if(I<u.lineNumber&&X.length>0)return;return{fullLineMods:O,inlineMods:P}}accept(){const f=this.getEdits();f.length!==0&&(this.editor.pushUndoStop(),this.editor.executeEdits("multiLineCompletions.accept",f.map(a=>l.EditOperation.insert(r.Position.lift({lineNumber:a.range.startLineNumber,column:a.range.startColumn}),a.text))))}}t.MultiLineDecorationModel=_},59945:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.wordChangesToLineChangesMap=t.computeMultiLineDiffChanges=t.mergeMultiLineDiffChanges=t.rewriteDiffComputer=t.multiLineDiffComputer=void 0;const n=e(77714);class r{extractCommon(f,a,h,u){const d=a.length,E=h.length;let g=f.newPos,c=g-u,b=0;for(;g+1<d&&c+1<E&&this.equals(a[g+1],h[c+1]);)g++,c++,b++;return b&&(f.changeResult.push({count:b,value:n.empty}),f.newPos=g),c}equals(f,a){return f===a}tokenize(f){return f.split(n.empty).filter(Boolean)}diff(f,a){const h=I=>({newPos:I.newPos,changeResult:[...I.changeResult]}),u=I=>I.join(n.empty),d=(I,R,M)=>{const O=I.length;let P=0,k=0,F=0;for(;P<O;P++){const L=I[P];L.removed?(L.value=u(M.slice(F,F+L.count)),F+=L.count,P&&I[P-1].added&&([I[P-1],I[P]]=[I[P],I[P-1]])):(L.value=u(R.slice(k,k+L.count)),k+=L.count,L.added||(F+=L.count))}return O>1&&typeof I[O-1].value=="string"&&(I[O-1].added||I[O-1].removed)&&this.equals(n.empty,I[O-1].value)&&(I[O-2].value+=I[O-1].value,I.pop()),I},E=this.tokenize(f),g=this.tokenize(a),c=E.length,b=g.length,y=c+b,S=[{newPos:-1,changeResult:[]}],A=this.extractCommon(S[0],g,E,0),w=(I,R,M)=>{const O=I.length,P=I[O-1];O>0&&P.added===R&&P.removed===M?I[O-1]={count:P.count+1,added:R,removed:M,value:n.empty}:I.push({count:1,added:R,removed:M,value:n.empty})};let T=1;if(S[0].newPos+1>=c&&A+1>=b)return[{value:u(g),count:g.length}];const D=()=>{for(let I=-T;I<=T;I+=2){const R=S[I-1],M=S[I+1];let O,P=(M?M.newPos:0)-I;R&&(S[I-1]=void 0);const k=R&&R.newPos+1<b,F=M&&0<=P&&P<c;if(!k&&!F){S[I]=void 0;continue}if(!k||F&&R.newPos<M.newPos?(O=h(M),w(O.changeResult,void 0,!0)):(O=R,O.newPos++,w(O.changeResult,!0,void 0)),P=this.extractCommon(O,g,E,I),O.newPos+1>=b&&P+1>=c)return d(O.changeResult,g,E);S[I]=O}T++};for(;T<=y;){const I=D();if(I)return I}}}const o=/^[a-zA-Z]+$/u,l=/([^\S\r\n]+|[()[\]{}'"\r\n]|\b)/;class p extends r{equals(f,a){const h=f.toLowerCase(),u=a.toLowerCase();return h===u}tokenize(f){const a=f.split(l);for(let h=0;h<a.length-1;h++){const u=a[h+1],d=a[h+2];!u&&d&&o.test(a[h])&&o.test(d)&&(a[h]+=d,a.splice(h+1,2),h--)}return a}}t.multiLineDiffComputer=new r,t.rewriteDiffComputer=new p;const v=(s,f)=>{const a=s.flatMap(h=>{const u=h.value.split(f),d=E=>({value:E,added:h.added,removed:h.removed});return u.flatMap((E,g)=>g<u.length-1?[d(E),d(f)]:d(E)).filter(E=>E.value!==n.empty)});for(let h=0;h<a.length-1;h++){const u=a[h],d=a[h+1];u.removed&&d.added&&d.value.startsWith(u.value)&&(u.added=!0,u.removed=!0)}return a};t.mergeMultiLineDiffChanges=v;const m=(s,f,a,h,u)=>{var d,E;let g=t.rewriteDiffComputer.diff(s,f)||[],c=t.multiLineDiffComputer.diff(s,f)||[];const b=s.split(u),y=f.split(u);b.length===y.length&&b.every((D,I)=>y[I].startsWith(D))&&(c=b.map((D,I)=>{const R=y[I],M=[{value:D}];if(R!==D){const O=R.substring(D.length);M.push({value:O,added:!0},{value:u})}else M[0].value=M[0].value+u;return M}).flat());const S=a.getPosition();if(S){const D={lineNumber:S.lineNumber-h+1,column:S.column},I=b.slice(0,D.lineNumber-1).join(u),R=(d=b[D.lineNumber-1])===null||d===void 0?void 0:d.slice(0,D.column-1),M=I===y.slice(0,D.lineNumber-1).join(u),O=R===((E=y[D.lineNumber-1])===null||E===void 0?void 0:E.slice(0,D.column-1));if(M&&O){const P=B=>{var j;return((j=B[D.lineNumber-1])===null||j===void 0?void 0:j.slice(D.column-1))+u+B.slice(D.lineNumber).join(u)},k=P(y),F=P(b),L=I+(b.slice(0,D.lineNumber-1).length>0?u:n.empty)+R;if(k.endsWith(F)){const B=k.slice(0,k.length-F.length);c=[{value:L},{value:B,added:!0},{value:F}]}}}const A=(0,t.mergeMultiLineDiffChanges)(g,u),w=b.length===y.length&&!A.some(D=>D.added!==!0&&D.removed&&D.value!==u);return{singleLineCharChanges:(0,t.mergeMultiLineDiffChanges)(c,u),charChanges:c,wordChanges:g,isOnlyAddingToEachWord:w}};t.computeMultiLineDiffChanges=m;const _=(s,f,a)=>{const h={},u=a?.getEOL();let d=f.startLineNumber;const E=b=>{h[d]||(h[d]=[]),h[d].push([b])},g=b=>{var y;const S=(y=h[d])===null||y===void 0?void 0:y[h[d].length-1];S?S.push(b):E(b)},c=()=>{d++};return s.forEach(b=>{const{value:y,added:S,removed:A}=b;y.split(u).forEach((T,D)=>{D===0?g({value:T,added:S,removed:A}):(c(),E({value:T,added:S,removed:A}))})}),h};t.wordChangesToLineChangesMap=_},40650:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CodeEditsResultValue=t.VALID_TIME=t.CodeEditsRenderType=void 0;const n=e(43718);var r;(function(l){l.Legacy="legacy",l.Default="default"})(r||(t.CodeEditsRenderType=r={})),t.VALID_TIME=750;class o extends n.Disposable{constructor(p){super(),this.raw=p}get items(){return this.raw.items.map(p=>({...p,isInlineEdit:!0}))}get firstRange(){return this.raw.items[0].range}get firstText(){return this.raw.items[0].insertText}}t.CodeEditsResultValue=o},99301:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IntelligentCompletionsContribution=void 0;const n=e(85608),r=e(76003),o=e(41869),l=e(57925),p=e(50394),v=e(43718),m=e(54414),_=e(51553),s=e(28423),f=e(7511);let a=class{registerCommands(u){u.registerCommand(l.AI_CODE_EDITS_COMMANDS.DISCARD,{execute:()=>{var d;const E=this.workbenchEditorService.currentCodeEditor;E&&((d=f.IntelligentCompletionsController.get(E.monacoEditor))===null||d===void 0||d.discard.get())}}),u.registerCommand(l.AI_CODE_EDITS_COMMANDS.ACCEPT,{execute:()=>{var d;const E=this.workbenchEditorService.currentCodeEditor;E&&((d=f.IntelligentCompletionsController.get(E.monacoEditor))===null||d===void 0||d.accept.get())}}),u.registerCommand(l.AI_CODE_EDITS_COMMANDS.TRIGGER,{execute:()=>{const d=this.workbenchEditorService.currentCodeEditor;d&&(0,s.transaction)(E=>{var g;(g=f.IntelligentCompletionsController.get(d.monacoEditor))===null||g===void 0||g.trigger(E)})}})}registerKeybindings(u){const{codeEdits:d}=this.aiNativeConfigService;u.registerKeybinding({command:l.AI_CODE_EDITS_COMMANDS.DISCARD.id,keybinding:o.Key.ESCAPE.code,when:p.CodeEditsIsVisible.raw,priority:100}),u.registerKeybinding({command:l.AI_CODE_EDITS_COMMANDS.ACCEPT.id,keybinding:o.Key.TAB.code,when:p.CodeEditsIsVisible.raw},o.KeybindingScope.USER),u.registerKeybinding({command:l.AI_CODE_EDITS_COMMANDS.TRIGGER.id,keybinding:d.triggerKeybinding,when:"editorFocus"},o.KeybindingScope.USER)}};t.IntelligentCompletionsContribution=a,n.__decorate([(0,r.Autowired)(m.WorkbenchEditorService),n.__metadata("design:type",_.WorkbenchEditorServiceImpl)],a.prototype,"workbenchEditorService",void 0),n.__decorate([(0,r.Autowired)(o.AINativeConfigService),n.__metadata("design:type",o.AINativeConfigService)],a.prototype,"aiNativeConfigService",void 0),t.IntelligentCompletionsContribution=a=n.__decorate([(0,v.Domain)(o.ClientAppContribution,o.KeybindingContribution,v.CommandContribution)],a)},7511:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IntelligentCompletionsController=void 0;const n=e(41869),r=e(50394),o=e(43718),l=e(28423),p=e(94170),v=e(69292),m=e(37355),_=e(22846),s=e(23268),f=e(77659),a=e(99906),h=e(78409),u=e(36368),d=e(12979),E=e(91267),g=e(25576),c=e(19447),b=e(40650);class y extends a.BaseAIMonacoEditorController{constructor(){super(...arguments),this.reportData=(0,l.derived)(this,A=>{const w=this.codeEditsSourceCollection.codeEditsContextBean.read(A),T=this.codeEditsResult.read(A);if(w&&T){const{range:D,insertText:I}=T.items[0],R=I,M=this.model.getValueInRange(D);return(O,P=!0)=>{const k={[O]:P,code:R,originCode:M};w.reporterEnd(k)}}}),this.discard=(0,l.derivedHandleChanges)({owner:this,createEmptyChangeSummary:()=>({lastVisibleTime:Date.now()}),handleChange:(A,w)=>A.didChange(this.multiLineEditsIsVisibleObs)?(w.lastVisibleTime=Date.now(),this.multiLineEditsIsVisibleObs.get()):!1,equalityComparer:()=>!1},(A,w)=>{this.multiLineEditsIsVisibleObs.read(A);const T=w.lastVisibleTime,D=this.reportData.read(A);let I=!1;return T&&Date.now()-T>b.VALID_TIME?(I=!0,D?.("isDrop")):(I=!1,D?.("isValid",!1)),this.codeEditsPreviewer.discard(),this.hide(),I}),this.accept=(0,l.derivedOpts)({owner:this,equalsFn:()=>!1},A=>{const w=this.reportData.read(A);w?.("isReceive"),this.codeEditsPreviewer.accept(),this.hide()})}static get(A){return A.getContribution(y.ID)}get model(){return this.monacoEditor.getModel()}get preferenceService(){return this.injector.get(n.PreferenceService)}get keybindingRegistry(){return this.injector.get(n.KeybindingRegistry)}get intelligentCompletionsRegistry(){return this.injector.get(o.IntelligentCompletionsRegistryToken)}get logger(){return this.injector.get(o.ILogger)}mount(){this.handlerAlwaysVisiblePreference(),this.codeEditsResult=(0,l.observableValue)(this,void 0),this.aiNativeContextKey=this.injector.get(f.AINativeContextKey,[this.monacoEditor.contextKeyService]),this.codeEditsPreviewer=this.injector.get(c.CodeEditsPreviewer,[this.monacoEditor,this.aiNativeContextKey]),this.codeEditsSourceCollection=this.injector.get(h.CodeEditsSourceCollection,[[d.LintErrorCodeEditsSource,u.LineChangeCodeEditsSource,g.TypingCodeEditsSource,E.TriggerCodeEditsSource],this.monacoEditor]);const A=new Set([r.CodeEditsIsVisible.raw]);return this.multiLineEditsIsVisibleObs=(0,l.observableFromEvent)(this,o.Event.filter(this.aiNativeContextKey.contextKeyService.onDidChangeContext,w=>w.payload.affectsSome(A)),()=>!!this.aiNativeContextKey.codeEditsIsVisible.get()),this.registerFeature(this.monacoEditor),this.featureDisposable}handlerAlwaysVisiblePreference(){let A=new o.Disposable;const w=()=>{A.addDispose(this.keybindingRegistry.registerKeybinding({command:v.inlineSuggestCommitId,keybinding:n.Key.TAB.code,when:s.ContextKeyExpr.and(m.InlineCompletionContextKeys.inlineSuggestionVisible,p.EditorContextKeys.tabMovesFocus.toNegated(),m.InlineCompletionContextKeys.inlineSuggestionHasIndentationLessThanTabSize,p.EditorContextKeys.hoverFocused.toNegated())},n.KeybindingScope.USER));const I=_.InlineCompletionsController.get(this.monacoEditor);I&&A.addDispose((0,l.autorun)(R=>{const M=I.model.read(R);M?.inlineCompletionState.read(R);const O=I._suggestWidgetAdapter;if(!O||!O.selectedItem.get())return;const k=O._suggestWidgetAdaptor;k._currentSuggestItemInfo=void 0,k._onDidSelectedItemChange.fire()}))},T=()=>{A&&(A.dispose(),A=new o.Disposable)};this.preferenceService.getValid(o.AINativeSettingSectionsId.IntelligentCompletionsAlwaysVisible,!0)&&w(),this.featureDisposable.addDispose(this.preferenceService.onSpecificPreferenceChange(o.AINativeSettingSectionsId.IntelligentCompletionsAlwaysVisible,({newValue:I})=>{I?w():T()}))}hide(){this.cancelToken(),this.aiNativeContextKey.codeEditsIsVisible.reset(),this.codeEditsPreviewer.hide()}trigger(A){const w=this.codeEditsSourceCollection.getSource(E.TriggerCodeEditsSource);w&&(this.hide(),w.triggerSignal.trigger(A))}registerFeature(A){this.featureDisposable.addDispose(this.monacoEditor.onDidChangeCursorPosition(w=>{const T=this.multiLineEditsIsVisibleObs.get(),D=this.codeEditsResult.get();if(T&&D){const I=w.position,R=D.items[0].range;(I.lineNumber<R.startLineNumber||I.lineNumber>R.endLineNumber)&&(0,o.runWhenIdle)(()=>{this.hide()})}})),this.featureDisposable.addDispose(o.Event.any(A.onDidChangeModel,A.onDidChangeModelContent)(()=>{(0,o.runWhenIdle)(()=>{this.hide()})})),this.featureDisposable.addDispose((0,l.autorunWithStoreHandleChanges)({createEmptyChangeSummary:()=>({}),handleChange:w=>w.didChange(this.codeEditsSourceCollection.codeEditsContextBean)?!this.aiNativeContextKey.codeEditsIsVisible.get():!1},async(w,T,D)=>{const I=this.codeEditsSourceCollection.codeEditsContextBean.read(w),R=this.intelligentCompletionsRegistry.getCodeEditsProvider();if(I&&R){D.add(o.Disposable.create(()=>I.cancelToken())),I.reporterStart();const M=await R(this.monacoEditor,I.position,I.bean,I.token);M&&M.items.length>0&&(0,l.transaction)(O=>{this.codeEditsResult.set(new b.CodeEditsResultValue(M),O)})}})),this.featureDisposable.addDispose((0,l.autorun)(w=>{const T=this.codeEditsResult.read(w);if(T)try{this.codeEditsPreviewer.render(T)}catch(D){this.logger.warn("IntelligentCompletionsController applyInlineDecorations error",D)}})),this.featureDisposable.addDispose(this.codeEditsSourceCollection)}}t.IntelligentCompletionsController=y,y.ID="editor.contrib.ai.intelligent.completions"},74292:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IntelligentCompletionsRegistry=void 0;const n=e(85608),r=e(76003),o=e(43718);let l=class extends o.Disposable{registerIntelligentCompletionProvider(v){this.inlineCompletionsProvider=v}registerInlineCompletionsProvider(v){this.inlineCompletionsProvider=v}registerInlineEditProvider(v){this.inlineEditProvider=v}registerCodeEditsProvider(v){this.codeEditsProvider=v}getInlineCompletionsProvider(){return this.inlineCompletionsProvider}getCodeEditsProvider(){return this.codeEditsProvider}getInlineEditProvider(){return this.inlineEditProvider}};t.IntelligentCompletionsRegistry=l,t.IntelligentCompletionsRegistry=l=n.__decorate([(0,r.Injectable)()],l)},78409:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CodeEditsSourceCollection=t.BaseCodeEditsSource=t.CodeEditsContextBean=void 0;const n=e(85608),r=e(76003),o=e(41869),l=e(43718),p=e(20868),v=e(28423);class m extends l.Disposable{constructor(a,h){super(),this.raw=a,this.source=h,this.uid=(0,l.uuid)(6)}get priority(){return this.source.priority}get bean(){return this.raw}get typing(){return this.raw.typing}get position(){return this.raw.position}get data(){return this.raw.data}get token(){return this.source.token}joinData(a){this.raw.data={...this.data,...a}}reporterStart(){return this.source.reporterStart()}cancelToken(){return this.source.cancelToken()}reporterEnd(a){return this.source.reporterEnd(a)}}t.CodeEditsContextBean=m;let _=class extends l.Disposable{get token(){return this.cancellationTokenSource.token}cancelToken(){this.cancellationTokenSource.cancel(),this.cancellationTokenSource=new p.CancellationTokenSource,this.reporterEnd({isValid:!1})}constructor(a){super(),this.monacoEditor=a,this.cancellationTokenSource=new p.CancellationTokenSource,this.relationID=(0,v.observableValue)(this,void 0),this.codeEditsContextBean=(0,v.disposableObservableValue)(this,void 0)}get model(){return this.monacoEditor.getModel()}resetBean(){(0,v.transaction)(a=>{this.cancelToken(),this.codeEditsContextBean.set(void 0,a)})}setBean(a){(0,v.transaction)(h=>{const u=new m({...a,position:this.monacoEditor.getPosition()},this);this.codeEditsContextBean.set(u,h)})}reporterStart(){const a=this.codeEditsContextBean.get();if(a){const h=this.aiReporter.start(l.AIServiceType.CodeEdits,{type:l.AIServiceType.CodeEdits,actionSource:a?.typing});(0,v.transaction)(u=>{this.relationID.set(h,u)})}}reporterEnd(a){const h=this.relationID.get();h&&this.aiReporter.end(h,a)}};t.BaseCodeEditsSource=_,n.__decorate([(0,r.Autowired)(l.IAIReporter),n.__metadata("design:type",Object)],_.prototype,"aiReporter",void 0),n.__decorate([(0,r.Autowired)(o.PreferenceService),n.__metadata("design:type",Object)],_.prototype,"preferenceService",void 0),t.BaseCodeEditsSource=_=n.__decorate([(0,r.Injectable)({multiple:!0}),n.__param(0,(0,r.Optional)()),n.__metadata("design:paramtypes",[Object])],_);let s=class extends l.Disposable{getSource(a){return this.sources.find(h=>h instanceof a)}constructor(a,h){super(),this.constructorSources=a,this.monacoEditor=h,this.sources=[],this.codeEditsContextBean=(0,v.disposableObservableValue)(this,void 0),this.sources=this.constructorSources.map(d=>this.injector.get(d,[this.monacoEditor])),this.sources.forEach(d=>this.addDispose(d.mount()));const u=(0,v.derived)(d=>({codeEditsContextBean:new Map(this.sources.map(E=>[E,E.codeEditsContextBean.read(d)]))}));this.addDispose((0,v.autorunDelta)((0,v.debouncedObservable2)(u,0),({lastValue:d,newValue:E})=>{const g=this.sources.filter(y=>{var S;const A=E?.codeEditsContextBean.get(y),w=(S=d?.codeEditsContextBean)===null||S===void 0?void 0:S.get(y);return A&&(!w||A.uid!==w.uid)});let c=0,b;for(const y of g){const S=y.codeEditsContextBean.get();if(!S)return;b||(b=S),S.priority>=c&&(c=S.priority,S.joinData(b.data),b=S),b.joinData(S.data)}(0,v.transaction)(y=>{this.codeEditsContextBean.set(b,y)})}))}};t.CodeEditsSourceCollection=s,n.__decorate([(0,r.Autowired)(r.INJECTOR_TOKEN),n.__metadata("design:type",r.Injector)],s.prototype,"injector",void 0),t.CodeEditsSourceCollection=s=n.__decorate([(0,r.Injectable)({multiple:!0}),n.__metadata("design:paramtypes",[Array,Object])],s)},36368:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LineChangeCodeEditsSource=void 0;const n=e(85608),r=e(76003),o=e(43718),l=e(28423),p=e(7511),v=e(78409),m=5,_=60*1e3;let s=class extends v.BaseCodeEditsSource{constructor(){super(...arguments),this.priority=1,this.deprecatedStore=new Map,this.positionChangeObs=(0,l.observableFromEvent)(this,this.monacoEditor.onDidChangeCursorPosition,a=>a),this.contentChangeObs=(0,l.observableFromEvent)(this,this.monacoEditor.onDidChangeModelContent,a=>a),this.latestContentChangeTimeObs=(0,l.derivedHandleChanges)({owner:this,createEmptyChangeSummary:()=>({latestContentChangeTime:0}),handleChange:(a,h)=>(a.didChange(this.contentChangeObs)&&(h.latestContentChangeTime=Date.now()),!0)},(a,h)=>(this.contentChangeObs.read(a),h.latestContentChangeTime)),this.isAllowTriggerObs=(0,l.derived)(a=>{var h;this.positionChangeObs.read(a);const u=this.latestContentChangeTimeObs.read(a);if(!this.preferenceService.getValid(o.AINativeSettingSectionsId.CodeEditsLineChange,!1))return!1;const E=this.deprecatedStore.get(((h=this.model)===null||h===void 0?void 0:h.id)||"");return!(E&&E>=m||u===0||u&&Date.now()-u>_)})}mount(){var a,h;this.addDispose((0,l.autorunDelta)(this.positionChangeObs,({lastValue:E,newValue:g},c)=>{if(!this.isAllowTriggerObs.read(c))return!1;const y=E?.position,S=g?.position;y&&y.lineNumber!==S?.lineNumber&&this.setBean({typing:o.ECodeEditsSourceTyping.LineChange,data:{[o.ECodeEditsSourceTyping.LineChange]:{preLineNumber:y.lineNumber,currentLineNumber:S.lineNumber}}})}));const u=(a=p.IntelligentCompletionsController.get(this.monacoEditor))===null||a===void 0?void 0:a.discard,d=(h=p.IntelligentCompletionsController.get(this.monacoEditor))===null||h===void 0?void 0:h.accept;return u&&this.addDispose((0,l.onObservableChange)(u,E=>{var g;const c=(g=this.model)===null||g===void 0?void 0:g.id;if(!c||!E)return;const b=this.deprecatedStore.get(c)||0;this.deprecatedStore.set(c,b+1)})),d&&this.addDispose((0,l.onObservableChange)(d,()=>{var E;const g=(E=this.model)===null||E===void 0?void 0:E.id;g&&this.deprecatedStore.delete(g)})),this}};t.LineChangeCodeEditsSource=s,t.LineChangeCodeEditsSource=s=n.__decorate([(0,r.Injectable)({multiple:!0})],s)},12979:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LintErrorCodeEditsSource=void 0;const n=e(85608),r=e(76003),o=e(43718),l=e(28423),p=e(16781),v=e(34835),m=e(78409);var _;(function(f){function a(h){return{message:h.message,range:{startPosition:{lineNumber:h.startLineNumber,column:h.startColumn},endPosition:{lineNumber:h.endLineNumber,column:h.endColumn}},source:h.resource,relatedInformation:h.relatedInformation,severity:v.MarkerSeverity.toString(h.severity)}}f.toData=a})(_||(_={}));let s=class extends m.BaseCodeEditsSource{constructor(){super(...arguments),this.priority=0}mount(){const a=(0,l.observableFromEvent)(this,this.monacoEditor.onDidChangeCursorPosition,h=>h);return this.addDispose((0,l.autorunDelta)(a,({lastValue:h,newValue:u})=>{const d=h?.position,E=u?.position,g=this.monacoEditor.getSelection();g?.isEmpty()&&d&&d.lineNumber!==E?.lineNumber&&this.doTrigger(E)})),this}doTrigger(a){if(!this.preferenceService.getValid(o.AINativeSettingSectionsId.CodeEditsLintErrors,!1)||!this.model)return;const u=p.StandaloneServices.get(v.IMarkerService),d=this.model.uri;let E=u.read({resource:d,severities:v.MarkerSeverity.Error});E=E.filter(g=>Math.abs(g.startLineNumber-a.lineNumber)<=1),E.length&&this.setBean({typing:o.ECodeEditsSourceTyping.LinterErrors,data:{[o.ECodeEditsSourceTyping.LinterErrors]:{errors:E.map(g=>_.toData(g))}}})}};t.LintErrorCodeEditsSource=s,t.LintErrorCodeEditsSource=s=n.__decorate([(0,r.Injectable)({multiple:!0})],s)},91267:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TriggerCodeEditsSource=void 0;const n=e(85608),r=e(76003),o=e(43718),l=e(28423),p=e(78409);let v=class extends p.BaseCodeEditsSource{constructor(){super(...arguments),this.priority=Number.MAX_SAFE_INTEGER,this.triggerSignal=(0,l.observableSignal)(this)}mount(){return this.addDispose((0,l.runOnChangeWithStore)((0,l.derived)(_=>(this.triggerSignal.read(_),{})),()=>{const _=this.monacoEditor.getPosition();this.setBean({typing:o.ECodeEditsSourceTyping.Trigger,data:{[o.ECodeEditsSourceTyping.Trigger]:{position:_}}})})),this}};t.TriggerCodeEditsSource=v,t.TriggerCodeEditsSource=v=n.__decorate([(0,r.Injectable)({multiple:!0})],v)},25576:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TypingCodeEditsSource=void 0;const n=e(85608),r=e(76003),o=e(43718),l=e(78409);let p=class extends l.BaseCodeEditsSource{constructor(){super(...arguments),this.priority=2}mount(){return this.addDispose(this.monacoEditor.onDidChangeModelContent(m=>{this.doTrigger(m)})),this}async doTrigger(m){!this.preferenceService.getValid(o.AINativeSettingSectionsId.CodeEditsTyping,!1)||!this.model||this.setBean({typing:o.ECodeEditsSourceTyping.Typing,data:{[o.ECodeEditsSourceTyping.Typing]:m}})}};t.TypingCodeEditsSource=p,t.TypingCodeEditsSource=p=n.__decorate([(0,r.Injectable)({multiple:!0})],p)},34809:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BaseCodeEditsView=void 0;const n=e(43718),r=e(52436);class o extends n.Disposable{constructor(p,v){super(),this.monacoEditor=p,this.injector=v,this.editorObs=(0,r.observableCodeEditor)(this.monacoEditor),this.mount(),this.addDispose({dispose:()=>this.hide()})}mount(){}}t.BaseCodeEditsView=o},19447:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CodeEditsPreviewer=void 0;const n=e(85608),r=e(76003),o=e(41869),l=e(43718),p=e(28423),v=e(77659),m=e(40650),_=e(19211),s=e(56059);let f=class extends l.Disposable{constructor(h,u){super(),this.monacoEditor=h,this.aiNativeContextKey=u,this.renderTypeObs=(0,p.observableFromEvent)(this,this.preferenceService.onPreferenceChanged,()=>this.preferenceService.getValid(l.AINativeSettingSectionsId.CodeEditsRenderType,m.CodeEditsRenderType.Default)),this.addDispose((0,p.autorun)(d=>{const E=this.renderTypeObs.read(d);this.view&&(this.view.dispose(),this.view=void 0),E===m.CodeEditsRenderType.Default?this.view=new _.DefaultCodeEditsView(this.monacoEditor,this.injector):this.view=new s.LegacyCodeEditsView(this.monacoEditor,this.injector)}))}render(h){var u;(u=this.view)===null||u===void 0||u.render(h),this.aiNativeContextKey.codeEditsIsVisible.set(!0)}hide(){var h;(h=this.view)===null||h===void 0||h.hide(),this.aiNativeContextKey.codeEditsIsVisible.set(!1)}accept(){var h;(h=this.view)===null||h===void 0||h.accept(),this.aiNativeContextKey.codeEditsIsVisible.set(!1)}discard(){var h;(h=this.view)===null||h===void 0||h.discard(),this.aiNativeContextKey.codeEditsIsVisible.set(!1)}};t.CodeEditsPreviewer=f,n.__decorate([(0,r.Autowired)(r.INJECTOR_TOKEN),n.__metadata("design:type",r.Injector)],f.prototype,"injector",void 0),n.__decorate([(0,r.Autowired)(o.PreferenceService),n.__metadata("design:type",Object)],f.prototype,"preferenceService",void 0),t.CodeEditsPreviewer=f=n.__decorate([(0,r.Injectable)(),n.__param(0,(0,r.Optional)()),n.__param(1,(0,r.Optional)()),n.__metadata("design:paramtypes",[Object,v.AINativeContextKey])],f)},19211:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DefaultCodeEditsView=void 0;const n=e(57925),r=e(43718),o=e(20868),l=e(28423),p=e(10897),v=e(22846),m=e(53511),_=e(99889),s=e(34809);class f{constructor(u,d,E){this.position=u,this.context=d,this.versionId=E}satisfies(u){return this.position.equals(u.position)&&(0,p.equalsIfDefined)(this.context.selectedSuggestionInfo,u.context.selectedSuggestionInfo,(0,p.itemEquals)())&&(u.context.triggerKind===o.InlineCompletionTriggerKind.Automatic||this.context.triggerKind===o.InlineCompletionTriggerKind.Explicit)&&this.versionId===u.versionId}get isExplicitRequest(){return this.context.triggerKind===o.InlineCompletionTriggerKind.Explicit}}class a extends s.BaseCodeEditsView{constructor(){super(...arguments),this.monacoCompletionsModel=(0,l.derived)(this,u=>{const d=v.InlineCompletionsController.get(this.monacoEditor);if(d)return d.model.read(u)}),this.monacoCompletionsSource=(0,l.derived)(this,u=>{const d=this.monacoCompletionsModel.read(u);return d?d._source:void 0})}render(u){var d;const E=this.monacoCompletionsSource.get();if(!E)return;const g=(d=this.editorObs.positions.get())===null||d===void 0?void 0:d[0];if(!g)return;const c=this.editorObs.model.get();!c||c.getValueInRange(u.firstRange)===u.firstText||(0,l.asyncTransaction)(async y=>{const S=this.editorObs.versionId.get(),A={triggerKind:o.InlineCompletionTriggerKind.Automatic,selectedSuggestionInfo:void 0,includeInlineCompletions:!1,includeInlineEdits:!0},w=new f(g,A,S),T=await(0,_.provideInlineCompletions)({all:()=>[{provideInlineCompletions:()=>{},provideInlineEditsForRange(I,R,M,O){return u},freeInlineCompletions:()=>[],handleRejection:(I,R)=>{this.injector.get(r.CommandService).executeCommand(n.AI_CODE_EDITS_COMMANDS.DISCARD.id)}}]},o.Range.lift(u.firstRange),c,A),D=new m.UpToDateInlineCompletions(T,w,c,this.editorObs.versionId,(0,l.constObservable)(4e3));E.inlineCompletions.set(D,y),E.loading.set(!1,y)})}accept(){const u=this.monacoCompletionsModel.get();u?.accept()}discard(){const u=this.monacoCompletionsModel.get();(0,l.transaction)(d=>{u?.stop("explicitCancel",d)})}hide(){var u,d;(d=(u=this.monacoCompletionsSource.get())===null||u===void 0?void 0:u.inlineCompletions)===null||d===void 0||d.set(void 0,void 0)}}t.DefaultCodeEditsView=a},56059:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LegacyCodeEditsView=void 0;const n=e(20868),r=e(70392),o=e(77714),l=e(8191),p=e(84176),v=e(591),m=e(59945),_=e(34809);class s extends _.BaseCodeEditsView{constructor(){super(...arguments),this.multiLineDecorationModel=new v.MultiLineDecorationModel(this.monacoEditor),this.additionsDeletionsDecorationModel=new p.AdditionsDeletionsDecorationModel(this.monacoEditor)}get model(){return this.monacoEditor.getModel()}mount(){this.addDispose(r.Event.any(this.monacoEditor.onDidChangeCursorPosition,this.monacoEditor.onDidChangeModelContent,this.monacoEditor.onDidBlurEditorWidget)(()=>{this.additionsDeletionsDecorationModel.clearAdditionsDecorations()}))}destroyRewriteWidget(){this.rewriteWidget&&(this.rewriteWidget.dispose(),this.rewriteWidget=null)}async renderRewriteWidget(a,h,u,d){this.destroyRewriteWidget();const E=this.monacoEditor.getPosition();if(!E)return;this.rewriteWidget=this.injector.get(l.RewriteWidget,[this.monacoEditor]);const g=this.model.getOffsetAt({lineNumber:u.startLineNumber,column:u.startColumn}),c=this.model.getOffsetAt({lineNumber:u.endLineNumber,column:u.endColumn}),b=this.model.getValue(),y=b.substring(0,g)+d+b.substring(c),S=(0,m.wordChangesToLineChangesMap)(a,u,h);await this.rewriteWidget.defered.promise;const A=Object.values(S).map(w=>({changes:w.map(T=>T.filter(D=>D.value.trim()!==o.empty)).filter(T=>T.length>0)}));this.rewriteWidget.setInsertText(d),this.rewriteWidget.show({position:E}),this.rewriteWidget.setEditArea(u),A.every(({changes:w})=>w.every(T=>T.every(({removed:D})=>D)))?this.rewriteWidget.renderTextLineThrough(A):this.rewriteWidget.renderVirtualEditor(y,a)}render(a){const{items:h}=a,{range:u,insertText:d}=h[0];if(!u)return;const E=this.monacoEditor.getPosition(),g=this.monacoEditor.getModel(),c=d.toString(),b=g?.getValueInRange(u),y=this.model.getEOL(),S=(0,m.computeMultiLineDiffChanges)(b,c,this.monacoEditor,u.startLineNumber,y);if(!S)return;const{singleLineCharChanges:A,charChanges:w,wordChanges:T,isOnlyAddingToEachWord:D}=S;if(u&&D&&w.length<=20&&T.length<=20){const M=this.multiLineDecorationModel.applyInlineDecorations(this.monacoEditor,(0,m.mergeMultiLineDiffChanges)(A,y),u.startLineNumber,E);this.multiLineDecorationModel.clearDecorations(),M?M&&M.inlineMods&&this.multiLineDecorationModel.updateLineModificationDecorations(M.inlineMods):this.renderRewriteWidget(T,g,u,c)}else this.additionsDeletionsDecorationModel.updateDeletionsDecoration(T,u,y),this.renderRewriteWidget(T,g,u,c)}accept(){if(this.multiLineDecorationModel.accept(),this.rewriteWidget){this.rewriteWidget.accept();const a=this.rewriteWidget.getVirtualEditor();if(a){const h=this.rewriteWidget.getEditArea(),u=a.getDecorationsInRange(n.Range.lift(h)),d=u?.filter(E=>E.options.description===l.REWRITE_DECORATION_INLINE_ADD);d&&this.additionsDeletionsDecorationModel.updateAdditionsDecoration(d.map(E=>E.range))}}}discard(){this.hide()}hide(){this.multiLineDecorationModel.clearDecorations(),this.additionsDeletionsDecorationModel.clearDeletionsDecorations(),this.destroyRewriteWidget()}}t.LegacyCodeEditsView=s},35363:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InterfaceNavigationContribution=t.InterfaceNavigationDecorationsContribution=void 0;const n=e(85608),r=n.__importDefault(e(12784)),o=n.__importDefault(e(13833)),l=e(76003),p=e(41869),v=e(43718),m=e(57517),_=n.__importStar(e(20868)),s=e(90052),f=e(52416),a=e(85679),h=e(53374),u=n.__importDefault(e(26754)),d="PCEtLSBDb3B5cmlnaHQgMjAwMC0yMDIyIEpldEJyYWlucyBzLnIuby4gYW5kIGNvbnRyaWJ1dG9ycy4gVXNlIG9mIHRoaXMgc291cmNlIGNvZGUgaXMgZ292ZXJuZWQgYnkgdGhlIEFwYWNoZSAyLjAgbGljZW5zZS4gLS0+Cjxzdmcgd2lkdGg9IjE2IiBoZWlnaHQ9IjE2IiB2aWV3Qm94PSIwIDAgMTYgMTYiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxjaXJjbGUgY3g9IjgiIGN5PSI4IiByPSI2LjUiIGZpbGw9IiMyNTM2MjciIHN0cm9rZT0iIzU3OTY1QyIvPgo8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTEwIDQuNVY1LjVMOC41IDUuNVYxMC41SDEwVjExLjVMOC41IDExLjVINy41TDYgMTEuNVYxMC41SDcuNVY1LjVMNiA1LjVWNC41SDcuNUg4LjVIMTBaIiBmaWxsPSIjNTc5NjVDIi8+Cjwvc3ZnPgo=",E="PCEtLSBDb3B5cmlnaHQgMjAwMC0yMDIyIEpldEJyYWlucyBzLnIuby4gYW5kIGNvbnRyaWJ1dG9ycy4gVXNlIG9mIHRoaXMgc291cmNlIGNvZGUgaXMgZ292ZXJuZWQgYnkgdGhlIEFwYWNoZSAyLjAgbGljZW5zZS4gLS0+Cjxzdmcgd2lkdGg9IjE2IiBoZWlnaHQ9IjE2IiB2aWV3Qm94PSIwIDAgMTYgMTYiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxjaXJjbGUgY3g9IjgiIGN5PSI4IiByPSI2LjUiIGZpbGw9IiNGMkZDRjMiIHN0cm9rZT0iIzVGQjg2NSIvPgo8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTEwIDQuNVY1LjVMOC41IDUuNVYxMC41SDEwVjExLjVMOC41IDExLjVINy41TDYgMTEuNVYxMC41SDcuNVY1LjVMNiA1LjVWNC41SDcuNUg4LjVIMTBaIiBmaWxsPSIjNUZCODY1Ii8+Cjwvc3ZnPgo=";let g=class extends p.Disposable{constructor(S,A){super(),this.interfaceNode=S,this.editor=A,this.id="";const w=this.themeService.getCurrentThemeSync().type==="dark"?d:E,D=`${this.iconService.fromIcon("",`data:image/svg+xml;base64,${w}`,f.IconType.Base64)} ${u.default["interface-navigation-icon"]} interface-navigation-glyph`;this.editorDecoration={range:(0,h.toMonacoRange)(S),options:{isWholeLine:!0,glyphMarginClassName:D,description:"interface-decoration",glyphMarginHoverMessage:{value:(0,p.localize)("preference.ai.native.interface.quick.navigation.hover")},stickiness:_.editor.TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges}}}get line(){return this.editorDecoration.range.startLineNumber}click(S){var A;return((A=S.target.position)===null||A===void 0?void 0:A.lineNumber)!==this.line||S.target.type!==s.MouseTargetType.GUTTER_GLYPH_MARGIN?!1:(this.editor.setPosition({lineNumber:this.interfaceNode.startPosition.row+1,column:this.interfaceNode.startPosition.column+1}),this.commandService.executeCommand("editor.action.goToImplementation"),!0)}};n.__decorate([(0,l.Autowired)(p.CommandService),n.__metadata("design:type",Object)],g.prototype,"commandService",void 0),n.__decorate([(0,l.Autowired)(f.IIconService),n.__metadata("design:type",Object)],g.prototype,"iconService",void 0),n.__decorate([(0,l.Autowired)(f.IThemeService),n.__metadata("design:type",Object)],g.prototype,"themeService",void 0),g=n.__decorate([(0,l.Injectable)({multiple:!0}),n.__metadata("design:paramtypes",[Object,Object])],g);let c=class{get currentUri(){return this.editor.currentUri}constructor(S){this.editor=S,this.disposer=new p.Disposable,this.lastDecorations=[],this.supportLanguages=["java","typescript","typescriptreact"]}getInterfaceQuickJumpEnabled(){return this.preferenceService.getValid(v.AINativeSettingSectionsId.InterfaceQuickNavigationEnabled,!0)}async parseJavaInterfaces(S){const A=[];function w(T){if(T.type==="interface_declaration"){const D=T.children.find(M=>M.type==="identifier"),I=T.children.find(M=>M.type==="interface_body"),R=I?.children.filter(M=>M.type==="field_declaration"||M.type==="method_declaration").map(M=>M.children.find(O=>O.type==="identifier")).filter(M=>!!M);A.push({interfaceNode:D,members:R})}T.children.forEach(D=>w(D))}return w(S),A}async parseTypeScriptInterfaces(S){const A=[];function w(T){if(T.type==="interface_declaration"){const D=T.children.find(I=>I.type==="type_identifier");A.push({interfaceNode:D,members:[]})}T.children.forEach(D=>w(D))}return w(S),A}async decorateEditor(){if(!this.getInterfaceQuickJumpEnabled())return;const S=this.editor.monacoEditor.getModel();if(!S)return;const A=S.getLanguageId();if(!this.supportLanguages.includes(A))return;const w=this.languageParserService.createParser(A);if(!w)return;const T=await w.parseAST(S);if(!T)return;let D=[];if(A==="typescript"||A==="typescriptreact")D=await this.parseTypeScriptInterfaces(T);else if(A==="java")D=await this.parseJavaInterfaces(T);else return;D=A==="java"?await this.parseJavaInterfaces(T):await this.parseTypeScriptInterfaces(T);const I=D.map(({interfaceNode:R,members:M})=>{if(!R||!M)return[];const O=[this.injector.get(g,[R,this.editor.monacoEditor])];return M.forEach(P=>{O.push(this.injector.get(g,[P,this.editor.monacoEditor]))}),O}).flat();this.editor.monacoEditor.changeDecorations(R=>{const M=I;R.deltaDecorations(this.lastDecorations.map(O=>O.id),M.map(O=>O.editorDecoration)).forEach((O,P)=>M[P].id=O),this.lastDecorations=M})}contribute(){if(!this.getInterfaceQuickJumpEnabled())return this.disposer;this.disposer.addDispose(this.editor.monacoEditor.onDidChangeModel(async()=>{await this.decorateEditor()}));const S=(0,r.default)(()=>{this.decorateEditor()},3e3);return this.disposer.addDispose(this.editor.monacoEditor.onDidChangeModelContent(S)),this.disposer.addDispose(this.editor.monacoEditor.onMouseDown(A=>{for(const w of this.lastDecorations)if(w.click(A)){A.event.stopPropagation();return}})),this.disposer}};t.InterfaceNavigationDecorationsContribution=c,n.__decorate([(0,l.Autowired)(l.INJECTOR_TOKEN),n.__metadata("design:type",l.Injector)],c.prototype,"injector",void 0),n.__decorate([(0,l.Autowired)(a.LanguageParserService),n.__metadata("design:type",a.LanguageParserService)],c.prototype,"languageParserService",void 0),n.__decorate([(0,l.Autowired)(p.PreferenceService),n.__metadata("design:type",Object)],c.prototype,"preferenceService",void 0),t.InterfaceNavigationDecorationsContribution=c=n.__decorate([(0,l.Injectable)({multiple:!0}),n.__param(0,(0,l.Optional)()),n.__metadata("design:paramtypes",[Object])],c);let b=class{registerEditorFeature(S){S.registerEditorFeatureContribution({contribute:A=>this.injector.get(c,[A]).contribute()})}};t.InterfaceNavigationContribution=b,n.__decorate([(0,l.Autowired)(l.INJECTOR_TOKEN),n.__metadata("design:type",l.Injector)],b.prototype,"injector",void 0),t.InterfaceNavigationContribution=b=n.__decorate([(0,p.Domain)(m.BrowserEditorContribution)],b)},44298:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MergeConflictContribution=void 0;const n=e(85608),r=n.__importDefault(e(12784)),o=e(76003),l=e(41869),p=e(38070),v=e(43718),m=e(27833),_=e(57517),s=e(31375),f=n.__importStar(e(20868)),a=e(75526),h=e(24093),u=n.__importDefault(e(89543)),d=e(67641),E=e(80922),g=e(52902),c=e(79865),b=e(28160),y="merge-conflict-codelens-style",S=`
|
|
30064
30064
|
.monaco-editor .codelens-decoration {
|
|
30065
30065
|
& > a[title*=AI] {
|
|
30066
30066
|
background-image: radial-gradient(circle at -21% -22%, #00f6ff, #9c03ff);
|
|
@@ -30122,8 +30122,8 @@ ${O}
|
|
|
30122
30122
|
\`\`\``:`\`\`\`diff
|
|
30123
30123
|
${(c=F.applyResult)===null||c===void 0?void 0:c.diff}
|
|
30124
30124
|
\`\`\``,hideInsert:!0})),F.applyResult&&F.applyResult.diagnosticInfos.length>0&&o.default.createElement("div",{className:h.default["edit-file-tool-diagnostic-errors"],key:"edit-file-tool-diagnostic-errors"},o.default.createElement("div",{className:h.default.title},"Found Lints:"),(b=F.applyResult)===null||b===void 0?void 0:b.diagnosticInfos.map(W=>o.default.createElement("div",{key:W.message,className:(0,r.default)({[h.default.error]:W.severity===p.MarkerSeverity.Error,[h.default.warning]:W.severity===p.MarkerSeverity.Warning})},o.default.createElement(l.Icon,{className:`codicon codicon-${W.severity===p.MarkerSeverity.Error?"error":"warning"}`}),W.message.split(`
|
|
30125
|
-
`)[0])))]};t.EditFileToolComponent=u;const d=E=>{switch(E.status){case"generating":return o.default.createElement(v.Loading,null);case"pending":return o.default.createElement(l.Popover,{title:"Pending",id:"edit-file-tool-status-pending"},o.default.createElement(l.Icon,{iconClass:"codicon codicon-circle-large"}));case"success":return o.default.createElement(l.Popover,{title:"Success",id:"edit-file-tool-status-success"},o.default.createElement(l.Icon,{iconClass:"codicon codicon-check-all"}));case"failed":return o.default.createElement(l.Popover,{title:"Failed",id:"edit-file-tool-status-failed"},o.default.createElement(l.Icon,{iconClass:"codicon codicon-error",style:{color:"var(--debugConsole-errorForeground)"}}));case"cancelled":return o.default.createElement(l.Popover,{title:"Cancelled",id:"edit-file-tool-status-cancelled"},o.default.createElement(l.Icon,{iconClass:"codicon codicon-close",style:{color:"var(--input-placeholderForeground)"}}));default:return null}}},47263:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GrepSearchToolComponent=t.FileSearchToolComponent=void 0;const n=e(85608),r=n.__importStar(e(14041)),o=e(41869),l=e(54414),p=e(51500),v=e(19413),m=n.__importDefault(e(51601)),_=({args:a,toolCallId:h,messageId:u})=>r.default.createElement(f,{args:a,toolCallId:h,messageId:u,toolName:"fileSearch"});t.FileSearchToolComponent=_;const s=({args:a,toolCallId:h,messageId:u})=>r.default.createElement(f,{args:a,toolCallId:h,messageId:u,toolName:"grepSearch"});t.GrepSearchToolComponent=s;const f=({args:a,toolCallId:h,toolName:u,messageId:d})=>{var E,g;const[c,b]=(0,r.useState)(!1),y=(0,o.useInjectable)(o.LabelService),S=(0,o.useInjectable)(l.WorkbenchEditorService),A=(0,o.useInjectable)(p.IWorkspaceService),w=(0,r.useMemo)(()=>{var O,P;return o.URI.parse((P=(O=A.tryGetRoots())===null||O===void 0?void 0:O[0])===null||P===void 0?void 0:P.uri)},[]),T=(0,o.useInjectable)(v.IChatInternalService),[D,I]=(0,r.useState)(((g=(E=T.sessionModel.history.getMessageAdditional(d))===null||E===void 0?void 0:E[h])===null||g===void 0?void 0:g.files)||[]);(0,r.useEffect)(()=>{const O=T.sessionModel.history.onMessageAdditionalChange(P=>{var k;I(((k=P[h])===null||k===void 0?void 0:k.files)||[])});return()=>{O.dispose()}},[]);const R=O=>{S.open(O)},M=(0,r.useMemo)(()=>D.map(O=>{const P=o.URI.parse(O);return{iconClass:y.getIcon(P),name:P.path.base,path:o.path.relative(w.codeUri.fsPath,P.path.dir.toString())}}),[D]);return r.default.createElement("div",{className:m.default.container},r.default.createElement("div",{className:m.default.header,onClick:()=>b(!c)},r.default.createElement("span",{style:{transform:`rotate(${c?"90deg":"0deg"})`}},"\u25B6"),r.default.createElement("span",null,u==="fileSearch"?`Searched files "${a.query}"`:`Grepped codebase "${a.query}"`," \xB7"," ",D.length," files")),c&&r.default.createElement("ul",{className:m.default.fileList},M.map((O,P)=>r.default.createElement("li",{key:P,className:m.default.fileItem,onClick:()=>R(o.URI.file(o.path.join(w.codeUri.fsPath,O.path,O.name)))},r.default.createElement("span",{className:O.iconClass}),r.default.createElement("span",{style:{flex:1}},O.name),r.default.createElement("span",{className:m.default.filePath},O.path)))))}},24706:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TerminalToolComponent=void 0;const n=e(85608),r=n.__importStar(e(14041)),o=e(41869),l=e(81878),p=e(43718),v=e(
|
|
30126
|
-
`)),
|
|
30125
|
+
`)[0])))]};t.EditFileToolComponent=u;const d=E=>{switch(E.status){case"generating":return o.default.createElement(v.Loading,null);case"pending":return o.default.createElement(l.Popover,{title:"Pending",id:"edit-file-tool-status-pending"},o.default.createElement(l.Icon,{iconClass:"codicon codicon-circle-large"}));case"success":return o.default.createElement(l.Popover,{title:"Success",id:"edit-file-tool-status-success"},o.default.createElement(l.Icon,{iconClass:"codicon codicon-check-all"}));case"failed":return o.default.createElement(l.Popover,{title:"Failed",id:"edit-file-tool-status-failed"},o.default.createElement(l.Icon,{iconClass:"codicon codicon-error",style:{color:"var(--debugConsole-errorForeground)"}}));case"cancelled":return o.default.createElement(l.Popover,{title:"Cancelled",id:"edit-file-tool-status-cancelled"},o.default.createElement(l.Icon,{iconClass:"codicon codicon-close",style:{color:"var(--input-placeholderForeground)"}}));default:return null}}},47263:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GrepSearchToolComponent=t.FileSearchToolComponent=void 0;const n=e(85608),r=n.__importStar(e(14041)),o=e(41869),l=e(54414),p=e(51500),v=e(19413),m=n.__importDefault(e(51601)),_=({args:a,toolCallId:h,messageId:u})=>r.default.createElement(f,{args:a,toolCallId:h,messageId:u,toolName:"fileSearch"});t.FileSearchToolComponent=_;const s=({args:a,toolCallId:h,messageId:u})=>r.default.createElement(f,{args:a,toolCallId:h,messageId:u,toolName:"grepSearch"});t.GrepSearchToolComponent=s;const f=({args:a,toolCallId:h,toolName:u,messageId:d})=>{var E,g;const[c,b]=(0,r.useState)(!1),y=(0,o.useInjectable)(o.LabelService),S=(0,o.useInjectable)(l.WorkbenchEditorService),A=(0,o.useInjectable)(p.IWorkspaceService),w=(0,r.useMemo)(()=>{var O,P;return o.URI.parse((P=(O=A.tryGetRoots())===null||O===void 0?void 0:O[0])===null||P===void 0?void 0:P.uri)},[]),T=(0,o.useInjectable)(v.IChatInternalService),[D,I]=(0,r.useState)(((g=(E=T.sessionModel.history.getMessageAdditional(d))===null||E===void 0?void 0:E[h])===null||g===void 0?void 0:g.files)||[]);(0,r.useEffect)(()=>{const O=T.sessionModel.history.onMessageAdditionalChange(P=>{var k;I(((k=P[h])===null||k===void 0?void 0:k.files)||[])});return()=>{O.dispose()}},[]);const R=O=>{S.open(O)},M=(0,r.useMemo)(()=>D.map(O=>{const P=o.URI.parse(O);return{iconClass:y.getIcon(P),name:P.path.base,path:o.path.relative(w.codeUri.fsPath,P.path.dir.toString())}}),[D]);return r.default.createElement("div",{className:m.default.container},r.default.createElement("div",{className:m.default.header,onClick:()=>b(!c)},r.default.createElement("span",{style:{transform:`rotate(${c?"90deg":"0deg"})`}},"\u25B6"),r.default.createElement("span",null,u==="fileSearch"?`Searched files "${a.query}"`:`Grepped codebase "${a.query}"`," \xB7"," ",D.length," files")),c&&r.default.createElement("ul",{className:m.default.fileList},M.map((O,P)=>r.default.createElement("li",{key:P,className:m.default.fileItem,onClick:()=>R(o.URI.file(o.path.join(w.codeUri.fsPath,O.path,O.name)))},r.default.createElement("span",{className:O.iconClass}),r.default.createElement("span",{style:{flex:1}},O.name),r.default.createElement("span",{className:m.default.filePath},O.path)))))}},24706:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TerminalToolComponent=void 0;const n=e(85608),r=n.__importStar(e(14041)),o=e(41869),l=e(81878),p=e(43718),v=e(90373),m=e(22559),_=n.__importDefault(e(51601));function s(f){const a={};try{const h=JSON.parse(f);return h.isError&&(a.isError=h.isError),h.content&&(a.text=h.content.map(u=>u.text).join(`
|
|
30126
|
+
`)),a}catch{return null}}t.TerminalToolComponent=(0,r.memo)(f=>{const{args:a,toolCallId:h}=f,u=(0,o.useInjectable)(m.RunCommandHandler),[d,E]=(0,r.useState)(!1),g=(0,r.useCallback)(b=>{h&&(u.handleApproval(h,b),E(!0))},[]),c=(0,r.useMemo)(()=>f.result?s(f.result):null,[f]);return r.default.createElement("div",{className:_.default.run_cmd_tool},f.state==="result"&&r.default.createElement("div",null,a&&r.default.createElement(r.default.Fragment,null,r.default.createElement("div",{className:_.default.command_title},r.default.createElement(l.Icon,{icon:"terminal"}),r.default.createElement("span",null,(0,p.localize)("ai.native.mcp.terminal.command"))),r.default.createElement("p",{className:_.default.command_content},r.default.createElement("code",null,"$ ",a.command))),r.default.createElement("div",{className:_.default.command_title},r.default.createElement("span",null,(0,p.localize)("ai.native.mcp.terminal.output"))),c?r.default.createElement("div",{className:_.default.command_content},r.default.createElement("code",null,(0,v.stripAnsi)(c.text))):""),f.state==="complete"&&a?.require_user_approval&&r.default.createElement("div",null,r.default.createElement("div",{className:_.default.command_title},r.default.createElement(l.Icon,{icon:"terminal"}),r.default.createElement("span",null,(0,p.localize)("ai.native.mcp.terminal.allow-question"))),r.default.createElement("p",{className:_.default.command_content},r.default.createElement("code",null,"$ ",a.command)),r.default.createElement("p",{className:_.default.comand_description},a.explanation),r.default.createElement("div",{className:_.default.cmmand_footer},r.default.createElement(l.Button,{type:"link",size:"small",disabled:d,onClick:()=>g(!0)},(0,p.localize)("ai.native.mcp.terminal.allow")),r.default.createElement(l.Button,{type:"link",size:"small",disabled:d,onClick:()=>g(!1)},(0,p.localize)("ai.native.mcp.terminal.deny")))))})},7228:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CreateNewFileWithTextTool=void 0;const n=e(85608),r=e(75995),o=e(76003),l=e(43718),p=e(14951),v=e(51500),m=e(77633),_=r.z.object({pathInProject:r.z.string().describe("The relative path where the file should be created"),text:r.z.string().describe("The content to write into the new file")});let s=class{registerMCPServer(a){a.registerMCPTool(this.getToolDefinition())}getToolDefinition(){return{name:"create_new_file_with_text",description:`Creates a new file at the specified path within the project directory and populates it with the provided text. Use this tool to generate new files in your project structure. Requires two parameters: - pathInProject: The relative path where the file should be created - text: The content to write into the new file Returns one of two possible responses: "ok" if the file was successfully created and populated, "can't find project dir" if the project directory cannot be determined. Note: Creates any necessary parent directories automatically.`,inputSchema:_,handler:this.handler.bind(this)}}async handler(a,h){try{const u=this.workspaceService.tryGetRoots();if(!u||u.length===0)return h.appendLine("Error: Cannot determine project directory"),{content:[{type:"text",text:"can't find project dir"}],isError:!0};const d=l.URI.parse(u[0].uri),E=l.path.join(d.codeUri.fsPath,a.pathInProject),g=l.URI.file(E),c=l.path.dirname(E),b=l.URI.file(c);return await this.fileService.createFolder(b.toString()),await this.fileService.createFile(g.toString(),{content:a.text}),h.appendLine(`Successfully created file at: ${a.pathInProject}`),{content:[{type:"text",text:"ok"}]}}catch(u){return h.appendLine(`Error during file creation: ${u}`),{content:[{type:"text",text:"unknown error"}],isError:!0}}}};t.CreateNewFileWithTextTool=s,n.__decorate([(0,o.Autowired)(v.IWorkspaceService),n.__metadata("design:type",Object)],s.prototype,"workspaceService",void 0),n.__decorate([(0,o.Autowired)(p.IFileServiceClient),n.__metadata("design:type",Object)],s.prototype,"fileService",void 0),t.CreateNewFileWithTextTool=s=n.__decorate([(0,l.Domain)(m.MCPServerContribution)],s)},90977:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EditFileTool=void 0;const n=e(85608),r=e(75995),o=e(76003),l=e(43718),p=e(77633),v=e(58260),m=e(9343),_=r.z.object({target_file:r.z.string().describe("The target file to modify. Always specify the target file as the first argument and use the relative path in the workspace of the file to edit"),instructions:r.z.string().optional().describe("A single sentence instruction describing what you are going to do for the sketched edit. This is used to assist the less intelligent model in applying the edit. Please use the first person to describe what you are going to do. Dont repeat what you have said previously in normal messages. And use it to disambiguate uncertainty in the edit."),code_edit:r.z.string().describe("Specify ONLY the precise lines of code that you wish to edit. **NEVER specify or write out unchanged code**. Instead, represent all unchanged code using the comment of the language you're editing in - example: `// ... existing code ...`")}).transform(f=>({targetFile:f.target_file,instructions:f.instructions,codeEdit:f.code_edit}));let s=class{registerMCPServer(a){a.registerMCPTool(this.getToolDefinition()),a.registerToolComponent("edit_file",v.EditFileToolComponent)}getToolDefinition(){return{name:"edit_file",label:"Edit File",description:`Use this tool to propose an edit to an existing file.
|
|
30127
30127
|
This will be read by a less intelligent model, which will quickly apply the edit. You should make it clear what the edit is, while also minimizing the unchanged code you write.
|
|
30128
30128
|
When writing the edit, you should specify each edit in sequence, with the special comment \`// ... existing code ...\` to represent unchanged code in between edited lines.
|
|
30129
30129
|
For example:
|
|
@@ -30255,7 +30255,7 @@ a {
|
|
|
30255
30255
|
}
|
|
30256
30256
|
`},73136:(x,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getMentionBoxStyle=void 0;const e=20,n=({maxRows:r=10,minRows:o=2})=>({control:{fontSize:12},highlighter:{overflow:"hidden"},input:{margin:0},"&multiLine":{control:{border:"none"},highlighter:{padding:9},input:{boxSizing:"content-box",padding:"8px 0",lineHeight:`${e}px`,minHeight:`${e*o}px`,maxHeight:`${e*r}px`,outline:0,border:0,overflowY:"auto"}},suggestions:{dataA:"aaa",list:{backgroundColor:"var(--kt-selectDropdown-background)",fontSize:12,maxHeight:200,overflowY:"auto"},item:{backgroundColor:"var(--kt-selectDropdown-background)",color:"var(--kt-selectDropdown-foreground)",padding:"4px 16px","&focused":{backgroundColor:"var(--kt-selectDropdown-selectionBackground)"}}}});t.getMentionBoxStyle=n},5167:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.COMMENT_TREE_NODE_HEIGHT=t.CommentNodeRendered=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importStar(e(14041)),l=e(41869),p=e(53711),v=n.__importDefault(e(65887)),m=({item:_,defaultLeftPadding:s=8,leftPadding:f=8,decorations:a,onClick:h,onTwistierClick:u})=>{const d=(0,l.useDesignStyles)(v.default.expansion_toggle,"expansion_toggle"),E=(0,o.useCallback)(I=>{_.onSelect?_.onSelect(_):h(I,_)},[h]),g=(0,o.useCallback)(I=>{u(I,_)},[u]),c=`${s+(_.depth||0)*(f||0)+(p.CommentContentNode.is(_)?16:p.CommentFileNode.is(_)?0:28)}px`,b={height:t.COMMENT_TREE_NODE_HEIGHT,lineHeight:`${t.COMMENT_TREE_NODE_HEIGHT}px`,paddingLeft:c},y=(0,o.useCallback)(I=>{if(p.CommentContentNode.is(I)||p.CommentFileNode.is(I))return o.default.createElement("div",{className:(0,r.default)(v.default.icon,I.icon),style:{height:t.COMMENT_TREE_NODE_HEIGHT,lineHeight:`${t.COMMENT_TREE_NODE_HEIGHT}px`}})},[]),S=(0,o.useCallback)(I=>p.CommentContentNode.is(I)?o.default.createElement("div",{className:(0,r.default)(v.default.segment,v.default.displayname)},I.renderedLabel?I.renderedLabel:o.default.createElement(o.default.Fragment,null,I.comment,o.default.createElement("span",{className:v.default.separator},"\xB7"),I.author.name)):o.default.createElement("div",{className:(0,r.default)(v.default.segment,v.default.displayname)},I.renderedLabel),[]),A=(0,o.useCallback)(I=>o.default.createElement("div",{className:(0,r.default)(v.default.segment_grow,v.default.description)},I.renderedDescription),[]),w=(0,o.useCallback)(I=>o.default.createElement("div",{onClick:g,className:(0,r.default)(v.default.segment,d,(0,l.getIcon)("arrow-right"),{[`${v.default.mod_collapsed}`]:!I.expanded})}),[g]),T=(0,o.useCallback)(I=>{if(p.CommentFileNode.is(I)||I?.isAllowToggle)return w(I)},[]),D=(0,o.useCallback)(()=>_.tooltip,[_]);return o.default.createElement("div",{key:_.id,onClick:E,title:D(),className:(0,r.default)(v.default.comment_node,a?a.classlist:null),style:b,"data-id":_.id},o.default.createElement("div",{className:v.default.content},T(_),y(_),o.default.createElement("div",{className:v.default.overflow_wrap},S(_),A(_))))};t.CommentNodeRendered=m,t.COMMENT_TREE_NODE_HEIGHT=22},47842:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CommentModelService=t.CommentTreeModel=void 0;const n=e(85608),r=e(76003),o=e(97267),l=e(41869),p=e(23418),v=e(69635),m=e(53711),_=n.__importDefault(e(65887));let s=class extends o.TreeModel{constructor(h){super(),this.init(h)}};t.CommentTreeModel=s,t.CommentTreeModel=s=n.__decorate([(0,r.Injectable)({multiple:!0}),n.__param(0,(0,r.Optional)()),n.__metadata("design:paramtypes",[m.CommentRoot])],s);let f=class extends l.Disposable{constructor(){super(),this.selectedDecoration=new o.Decoration(_.default.mod_selected),this.focusedDecoration=new o.Decoration(_.default.mod_focused),this._selectedNodes=[],this.onDidUpdateTreeModelEmitter=new l.Emitter,this.disposableCollection=new l.DisposableCollection,this.applyFocusedDecoration=(h,u=!0)=>{var d;if(h){for(const E of this._selectedNodes)this.selectedDecoration.removeTarget(E);this.focusedNode&&this.focusedDecoration.removeTarget(this.focusedNode),this.selectedDecoration.addTarget(h),this.focusedDecoration.addTarget(h),this._focusedNode=h,this._selectedNodes=[h],u&&((d=this.treeModel)===null||d===void 0||d.dispatchChange())}},this.removeFocusedDecoration=()=>{var h;this.focusedNode&&(this.focusedDecoration.removeTarget(this.focusedNode),(h=this.treeModel)===null||h===void 0||h.dispatchChange()),this._focusedNode=null},this.handleTreeBlur=()=>{this.removeFocusedDecoration()},this.handleTwistierClick=async(h,u)=>{(m.CommentFileNode.is(u)||u?.isAllowToggle)&&this.toggleDirectory(u)},this.handleItemClick=async(h,u)=>{this.applyFocusedDecoration(u),(m.CommentFileNode.is(u)||u?.isAllowToggle)&&this.toggleDirectory(u);let d,E;u instanceof m.CommentReplyNode||u instanceof m.CommentContentNode?(d=u.thread.uri,E=u.thread.range):d=u.resource,this.editorService.open(d,{range:E}).then(()=>{u.thread&&u.thread.show()})},this.toggleDirectory=h=>{h.expanded?this.commentTreeHandle.collapseNode(h):this.commentTreeHandle.expandNode(h)},this._whenReady=this.initTreeModel()}get onDidUpdateTreeModel(){return this.onDidUpdateTreeModelEmitter.event}get whenReady(){return this._whenReady}get commentTreeHandle(){return this._commentTreeHandle}get decorations(){return this._decorations}get treeModel(){return this._treeModel}get focusedNode(){return this._focusedNode}get selectedNodes(){return this._selectedNodes}async initTreeModel(){const h=await this.commentService.resolveChildren();if(!h)return;const u=h[0];u&&(this._treeModel=this.injector.get(s,[u]),await this._treeModel.ensureReady,this.initDecorations(u),this.disposables.push(l.Event.any(this.commentService.onThreadsCommentChange,this.commentService.onThreadsChanged,this.commentService.onThreadsCreated)(()=>{this.refresh()})),this.onDidUpdateTreeModelEmitter.fire(this._treeModel))}initDecorations(h){return this._decorations=new o.DecorationsManager(h),this._decorations.addDecoration(this.selectedDecoration),this._decorations.addDecoration(this.focusedDecoration),this._decorations}handleTreeHandler(h){this._commentTreeHandle=h}async refresh(){await this.whenReady,(0,l.runWhenIdle)(()=>{this.treeModel.root.refresh()})}async collapsedAll(){return await this.whenReady,this.treeModel.root.collapsedAll()}dispose(){this.disposableCollection.dispose()}};t.CommentModelService=f,n.__decorate([(0,r.Autowired)(v.ICommentsService),n.__metadata("design:type",Object)],f.prototype,"commentService",void 0),n.__decorate([(0,r.Autowired)(r.INJECTOR_TOKEN),n.__metadata("design:type",r.Injector)],f.prototype,"injector",void 0),n.__decorate([(0,r.Autowired)(p.WorkbenchEditorService),n.__metadata("design:type",p.WorkbenchEditorService)],f.prototype,"editorService",void 0),t.CommentModelService=f=n.__decorate([(0,r.Injectable)(),n.__metadata("design:paramtypes",[])],f)},53711:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CommentReplyNode=t.CommentContentNode=t.CommentFileNode=t.CommentRoot=void 0;const n=e(97267);class r extends n.CompositeTreeNode{static is(m){return!!m&&!m.parent}constructor(m){super(m,void 0)}get expanded(){return!0}}t.CommentRoot=r;class o extends n.CompositeTreeNode{static is(m){return n.CompositeTreeNode.is(m)&&"threads"in m}constructor(m,_,s="",f,a,h,u){super(m,u),this.threads=_,this.tooltip=f,this.icon=a,this.resource=h,this.isExpanded=!0,this._renderedLabel=this.resource.displayName,this._renderedDescription=s}set label(m){this._renderedLabel=m}set description(m){this._renderedDescription=m}get renderedLabel(){return this._renderedLabel}get renderedDescription(){return this._renderedDescription}set onSelect(m){this._onSelectHandler=m}get onSelect(){return this._onSelectHandler}}t.CommentFileNode=o;class l extends n.CompositeTreeNode{static is(m){return n.CompositeTreeNode.is(m)&&"author"in m}constructor(m,_,s,f="",a,h,u,d){super(m,d),this.thread=_,this.comment=s,this.icon=a,this.author=h,this.resource=u,this._renderedDescription=f,this.isExpanded=!0,this._isAllowToggle=!1}get isAllowToggle(){return this._isAllowToggle}setIsAllowToggle(m){this._isAllowToggle=m}set label(m){this._renderedLabel=m}set description(m){this._renderedDescription=m}get renderedLabel(){return this._renderedLabel}get renderedDescription(){return this._renderedDescription}set onSelect(m){this._onSelectHandler=m}get onSelect(){return this._onSelectHandler}}t.CommentContentNode=l;class p extends n.TreeNode{constructor(m,_,s,f="",a,h,u){super(m,u),this.thread=_,this.icon=a,this.resource=h,this._renderedLabel=s,this._renderedDescription=f}set label(m){this._renderedLabel=m}set description(m){this._renderedDescription=m}get renderedLabel(){return this._renderedLabel}get renderedDescription(){return this._renderedDescription}set onSelect(m){this._onSelectHandler=m}get onSelect(){return this._onSelectHandler}}t.CommentReplyNode=p},69635:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CommentReactionClick=t.CommentPanelCollapse=t.SwitchCommandReaction=t.CloseThreadId=t.CollapseId=t.ICommentsService=t.CommentsContribution=t.ICommentsFeatureRegistry=t.CommentPanelId=t.CommentGutterType=t.CommentThreadCollapsibleState=t.CommentMode=void 0;const n=e(41869);var r;(function(m){m[m.Editor=0]="Editor",m[m.Preview=1]="Preview"})(r||(t.CommentMode=r={}));var o;(function(m){m[m.Collapsed=0]="Collapsed",m[m.Expanded=1]="Expanded"})(o||(t.CommentThreadCollapsibleState=o={}));var l;(function(m){m.Thread="thread",m.Empty="empty"})(l||(t.CommentGutterType=l={})),t.CommentPanelId="CommentPanel",t.ICommentsFeatureRegistry=Symbol("ICommentsFeatureRegistry"),t.CommentsContribution=Symbol("CommentsContribution"),t.ICommentsService=Symbol("ICommentsService"),t.CollapseId="comments.panel.action.collapse",t.CloseThreadId="comments.thread.action.close",t.SwitchCommandReaction="comments.comment.action.switchCommand";class p extends n.BasicEvent{}t.CommentPanelCollapse=p;class v extends n.BasicEvent{}t.CommentReactionClick=v},86077:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),e(85608).__exportStar(e(69635),t)},79383:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Badge=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importDefault(e(14041));e(4418);const l=({className:p,children:v,...m})=>o.default.createElement("span",{className:(0,r.default)("kt-badge",p),...m},v);t.Badge=l},48412:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Button=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importDefault(e(14041)),l=e(99613),p=e(54713);e(71682);const v=()=>o.default.createElement("svg",{viewBox:"0 0 1024 1024",focusable:"false",className:"kt-button-anticon-spin","data-icon":"loading",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},o.default.createElement("path",{d:"M988 548c-19.9 0-36-16.1-36-36 0-59.4-11.6-117-34.6-171.3a440.45 440.45 0 0 0-94.3-139.9 437.71 437.71 0 0 0-139.9-94.3C629 83.6 571.4 72 512 72c-19.9 0-36-16.1-36-36s16.1-36 36-36c69.1 0 136.2 13.5 199.3 40.3C772.3 66 827 103 874 150c47 47 83.9 101.8 109.7 162.7 26.7 63.1 40.2 130.2 40.2 199.3.1 19.9-16 36-35.9 36z"}));function m(){}t.Button=o.default.memo(({children:_,loading:s,className:f,type:a="primary",htmlType:h,size:u,ghost:d=!1,onClick:E,disabled:g,block:c,iconClass:b,icon:y,more:S,moreIconClass:A,menu:w,moreVisible:T,placement:D,title:I,onVisibleChange:R,...M})=>{const O=(0,r.default)("kt-button",f,{[`kt-${a}-button-loading`]:s,[`ghost-${a}-button`]:d&&!s&&a!=="link",[`${a}-button`]:a,[`${u}-button-size`]:u,"ghost-button":d&&a!=="link","block-button":c}),P=(0,r.default)(f,{"kt-clickable-icon":!!E});if(a==="icon")return o.default.createElement(p.Icon,{tooltip:I,disabled:g,icon:y,onClick:s||g?m:E,className:P,iconClass:b,...M});const k=b?o.default.createElement(p.Icon,{iconClass:b,disabled:g}):null;return w?o.default.createElement(l.Dropdown,{visible:T,className:"kt-menu",overlay:w,trigger:["click"],onVisibleChange:R,placement:D},o.default.createElement("button",{...M,disabled:g,className:O,type:h,onClick:s||g?m:E},s&&a!=="link"&&o.default.createElement(v,null),k&&k,_,S&&o.default.createElement(p.Icon,{iconClass:A||(0,p.getIcon)("down"),className:"kt-button-secondary-more"}))):o.default.createElement("button",{...M,disabled:g,className:O,type:h,onClick:s||g?m:E},s&&a!=="link"&&o.default.createElement(v,null),k&&k,_)})},7273:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CheckBox=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importDefault(e(14041)),l=e(65973);e(6099);const p=()=>o.default.createElement("svg",{fill:"currentColor",width:"1em",height:"1em",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg"},o.default.createElement("path",{d:"M912 190h-69.9c-9.8 0-19.1 4.5-25.1 12.2L404.7 724.5 207 474c-6.1-7.7-15.3-12.2-25.1-12.2H112c-6.7 0-10.4 7.7-6.3 12.9l273.9 347c12.8 16.2 37.4 16.2 50.3 0l488.4-618.9c4.1-5.1.4-12.8-6.3-12.8z"})),v=({insertClass:m,className:_,label:s,size:f="default",disabled:a,checked:h,wrapTabIndex:u,...d})=>{(0,l.warning)(!m,"`insertClass` was deprecated, please use `className` instead");const E=d;return E.checked=h??!1,o.default.createElement("label",{className:(0,r.default)("kt-checkbox",m,_,{"kt-checkbox-large":f==="large","kt-checkbox-disabled":a}),tabIndex:u},o.default.createElement("span",{className:"kt-checkbox-lump"},o.default.createElement("input",{type:"checkbox",disabled:a,...E}),o.default.createElement("span",{className:"kt-checkbox-icon"},o.default.createElement(p,null))),s||" ")};t.CheckBox=v,t.CheckBox.displayName="OpenSumiCheckBox"},58998:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ClickOutside=void 0;const r=e(85608).__importDefault(e(14041)),o=({mouseEvents:l=["click"],onOutsideClick:p,children:v,...m})=>{const _=r.default.useRef(null),s=r.default.useCallback(f=>{_.current&&f.target&&!_.current.contains(f.target)&&p(f)},[p]);return r.default.useEffect(()=>(l.forEach(f=>{window.addEventListener(f,s,!0)}),()=>{l.forEach(f=>{window.removeEventListener(f,s,!0)})}),[l]),r.default.createElement("div",{...m,ref:_},v)};t.ClickOutside=o},50570:(x,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MessageType=void 0;var e;(function(n){n[n.Error=0]="Error",n[n.Warning=1]="Warning",n[n.Info=2]="Info",n[n.Empty=3]="Empty"})(e||(t.MessageType=e={}))},89832:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Dialog=t.DialogContent=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importDefault(e(14041)),l=e(43718),p=e(48412),v=e(50570),m=e(54713),_=e(79024);e(65773);const s=({onCancel:h,onOk:u,cancelText:d,okText:E})=>o.default.createElement(o.default.Fragment,null,o.default.createElement(p.Button,{onClick:h,type:"secondary"},d||(0,l.localize)("ButtonCancel")),o.default.createElement(p.Button,{onClick:u},E||(0,l.localize)("ButtonOK"))),f=({onClose:h,closable:u,type:d="confirm",messageType:E=v.MessageType.Info,icon:g,message:c,buttons:b,title:y,onOk:S,onCancel:A,okText:w,cancelText:T})=>{const{getIcon:D}=o.default.useContext(m.IconContext);return o.default.createElement(o.default.Fragment,null,o.default.createElement("div",{className:"kt-dialog-content"},g&&o.default.createElement("div",{style:{color:g.color},className:(0,r.default)("kt-dialog-icon",(0,m.getIcon)(g.className)||D(g.className))}),o.default.createElement("div",{className:"kt-dialog-content_area"},o.default.createElement("div",{className:"kt-dialog-content_title"},y),c&&o.default.createElement("span",{className:"kt-dialog-message"},c)),u&&d!=="basic"&&o.default.createElement("button",{className:(0,r.default)("kt-dialog-closex",(0,m.getIcon)("close")),onClick:h})),E!==v.MessageType.Empty&&d!=="basic"&&o.default.createElement("div",{className:"kt-dialog-buttonWrap"},d==="confirm"?b||o.default.createElement(s,{onCancel:A,onOk:S,okText:w,cancelText:T}):o.default.createElement(p.Button,{onClick:h},"OK")))};t.DialogContent=f;const a=({visible:h,onClose:u,closable:d,afterClose:E,messageType:g,icon:c,message:b,detail:y,buttons:S,type:A="confirm",title:w,onOk:T,onCancel:D,okText:I,cancelText:R,getContainer:M,keyboard:O,...P})=>o.default.createElement(_.Overlay,{visible:h,onClose:u,title:A==="basic"?w:null,closable:A==="basic",getContainer:M,keyboard:O,footer:A==="basic"?S||o.default.createElement(s,{onCancel:D,onOk:T,okText:I,cancelText:R}):void 0,afterClose:E,...P},o.default.createElement(t.DialogContent,{title:b,message:y,buttons:S,visible:h,icon:c,...P}));t.Dialog=a},99665:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(85608),r=n.__importDefault(e(62596)),o=n.__importDefault(e(53373)),l=n.__importStar(e(14041)),p=e(48412),v=n.__importDefault(e(35060)),m=_=>{var s;const{prefixCls:f,type:a="primary",size:h="default",danger:u,disabled:d,loading:E,onClick:g,htmlType:c,children:b,className:y,overlay:S,trigger:A,align:w,visible:T,onVisibleChange:D,placement:I,getPopupContainer:R,href:M,icon:O=l.createElement(r.default,null),title:P,buttonsRender:k=H=>H,mouseEnterDelay:F,mouseLeaveDelay:L,overlayClassName:B,overlayStyle:j,...W}=_,U=f||"kt-dropdown-button",X={align:w,overlay:S,disabled:d,trigger:d?[]:A,getPopupContainer:R,mouseEnterDelay:F,mouseLeaveDelay:L,overlayClassName:B,overlayStyle:j};X.placement=(s=_?.placement)!==null&&s!==void 0?s:"bottomRight";const V=l.createElement(p.Button,{size:h,type:a,disabled:d,loading:E,onClick:g,htmlType:c,title:P},b),$=l.createElement(p.Button,{size:h,type:a},O??l.createElement(r.default,null)),[Y,z]=k([V,$]);return l.createElement("div",{...W,className:(0,o.default)(U,y)},Y,l.createElement(v.default,{...X},z))};t.default=m},35060:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(85608),r=n.__importDefault(e(64797)),o=n.__importDefault(e(53373)),l=n.__importDefault(e(5147)),p=n.__importDefault(e(14041)),v=e(43953),m=e(65973),_=(0,v.tuple)("topLeft","topCenter","topRight","bottomLeft","bottomCenter","bottomRight");class s extends p.default.Component{constructor(){super(...arguments),this.renderOverlay=a=>{const{overlay:h}=this.props;let u;typeof h=="function"?u=h():u=h,u=p.default.Children.only(u);const d=u.props;(0,m.warning)(!d.mode||d.mode==="vertical",`[Dropdown] mode="${d.mode}" is not supported for Dropdown's Menu.`);const{selectable:E=!1,focusable:g=!0}=d,c=p.default.createElement("span",{className:`${a}-menu-submenu-arrow`},p.default.createElement(r.default,{className:`${a}-menu-submenu-arrow-icon`}));return typeof u.type=="string"?h:p.default.cloneElement(u,{mode:"vertical",selectable:E,focusable:g,expandIcon:c})},this.renderDropDown=()=>{const{prefixCls:a,children:h,trigger:u,disabled:d,getPopupContainer:E}=this.props,g=a||"kt-dropdown",c=p.default.Children.only(h),b=p.default.cloneElement(c,{className:(0,o.default)(c.props.className,`${g}-trigger`),disabled:d}),y=d?[]:u;let S;return y&&y.indexOf("contextMenu")!==-1&&(S=!0),p.default.createElement(l.default,{alignPoint:S,...this.props,prefixCls:g,getPopupContainer:E,transitionName:this.getTransitionName(),trigger:y,overlay:()=>this.renderOverlay(g)},b)}}getTransitionName(){const{placement:a="",transitionName:h}=this.props;return h!==void 0?h:a.indexOf("top")>=0?"slide-down":"slide-up"}render(){return this.renderDropDown()}}s.defaultProps={mouseEnterDelay:.15,mouseLeaveDelay:.1,placement:"bottomLeft"},t.default=s},99613:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DropdownButton=t.Dropdown=void 0;const n=e(85608),r=n.__importDefault(e(35060));t.Dropdown=r.default;const o=n.__importDefault(e(99665));t.DropdownButton=o.default,e(34643)},80564:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Icon=t._InternalIcon=t.IconContext=void 0,t.IconContextProvider=v;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importDefault(e(14041)),l=e(12122),p=e(76577);e(1914),t.IconContext=o.default.createContext({getIcon:(_,s)=>_});function v(_){return o.default.createElement(t.IconContext.Provider,{value:_.value},o.default.createElement(t.IconContext.Consumer,null,s=>_.value===s?_.children:null))}const m=function(_,s){const{size:f="small",loading:a,icon:h,iconClass:u,className:d,tooltip:E,rotate:g,anim:c,fill:b,disabled:y,onClick:S,children:A,resourceOptions:w,animate:T,style:D={},...I}=_,R={rotate:g,anim:c,fill:b};let M;if(h)if(l.defaultIconMap[h])M=(0,p.getIcon)(h,R);else{const{getIcon:O,getResourceIcon:P}=o.default.useContext(t.IconContext);w&&P?M=P(h,w):M=O(h,R)}else M=u;return T&&T==="spin"&&(D.animation="kt-icon-spin 1.5s steps(30) infinite"),o.default.createElement("span",{...I,title:E,onClick:S,ref:s,className:(0,r.default)("kt-icon",M,d,{"kt-icon-loading":a,"kt-icon-disabled":!!y,[`kt-icon-${f}`]:!!f,"kt-icon-clickable":!!S,"kt-icon-resource":!!w,expanded:!!w&&w.isOpenedDirectory}),style:D},A)};t._InternalIcon=o.default.memo(o.default.forwardRef(m)),t.Icon=o.default.memo(o.default.forwardRef(m))},10391:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createFromIconfontCN=f;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importDefault(e(14041)),l=e(80564),p=e(76577),v=new Set;function m(a){return!!(typeof a=="string"&&a.length&&!v.has(a))}function _(a,h=0){const u=a[h];if(m(u)){const d=document.createElement("script");d.setAttribute("src",u),d.setAttribute("data-namespace",u),a.length>h+1&&(d.onload=()=>{_(a,h+1)},d.onerror=()=>{_(a,h+1)}),v.add(u),document.body.appendChild(d)}}const s={width:"1em",height:"1em",fill:"currentColor"};function f(a={}){const{scriptUrl:h,extraCommonProps:u={}}=a;h&&typeof document<"u"&&typeof window<"u"&&typeof document.createElement=="function"&&(Array.isArray(h)?_(h.reverse()):_([h]));const d=o.default.forwardRef((E,g)=>{const{icon:c,children:b,rotate:y,anim:S,fill:A,className:w="",...T}=E,D={rotate:y,anim:S,fill:A};let I=null;c&&(I=o.default.createElement("svg",{...s,focusable:"false"},o.default.createElement("use",{xlinkHref:`#${c}`}))),b&&(I=b);const R=(0,p.getIconShapeClxList)(D);return o.default.createElement(l._InternalIcon,{...u,...T,className:(0,r.default)(w,R),ref:g},I)});return d.displayName="Iconfont",d}},12122:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.iconManager=t.defaultIconMap=t.defaultIconfont=void 0;const r=e(85608).__importDefault(e(65973)),o=e(81139);Object.defineProperty(t,"defaultIconfont",{enumerable:!0,get:function(){return o.defaultIconfont}});const l={"search-close":"close-square",fold:"collapse-all","setting-general":"setting","setting-file":"file-text","setting-extension":"extension","run-debug":"start","toggle-breakpoints":"deactivate-breakpoints",withdraw:"fallback",terminate1:"stop",stop1:"stop",add:"plus",rundebug:"start",terminate:"stop"},p=Object.assign({},o.defaultIconfont,l);t.defaultIconMap=new Proxy(p,{get(_,s){const f=l[s];return(0,r.default)(!f,`Icon '${s}' was a typo, please use '${f}' instead`),_[s]}});class v{constructor(){this._ktIconPrefixes=[],this._iconMap={}}update(s,f){this._iconMap[s]=f,this._ktIconPrefixes.push(s)}getIconClx(s){if(!s)return(0,r.default)(!1,"not a valid icon key:"+s),[];let f=this._ktIconPrefixes.length;for(;!this._iconMap[this._ktIconPrefixes[--f]][s]&&f!==0;);const a=this._iconMap[this._ktIconPrefixes[f]][s];return a?[`${this._ktIconPrefixes[f]}${a}`]:((0,r.default)(!1,"No icon found for "+s),[])}}t.iconManager=new v,t.iconManager.update("kaitian-icon kticon-",t.defaultIconMap)},81139:(x,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.defaultIconfont=void 0,t.defaultIconfont={"Gitlab-fill":"Gitlab-fill",PR:"PR",ab:"ab",abl:"abl","activate-breakpoints":"activate-breakpoints","add-comments":"add-comments",afresh:"afresh","arrow-down":"arrow-down","arrow-right":"arrow-right",arrowdown:"arrowdown",arrowleft:"arrowleft",arrowright:"arrowright",arrowup:"arrowup",bash:"bash",bell:"bell",branches:"branches","breakpoint-activate":"breakpoint-activate","breakpoint-deactivate":"breakpoint-deactivate","breakpoint-disabled":"breakpoint-disabled","breakpoint-enabled":"breakpoint-enabled","breakpoint-stop":"breakpoint-stop","breakpoint-stop-before":"breakpoint-stop-before",brew:"brew","browser-preview":"browser-preview","caret-right":"caret-right",check:"check","check-circle-fill":"check-circle-fill","check-close-circle-o":"check-close-circle-o","check-square-o":"check-square-o","circle-pause":"circle-pause",clear:"clear","clear-bold":"clear-bold",close:"close","close-all":"close-all","close-circle":"close-circle","close-circle-fill":"close-circle-fill",close1:"close1",close_square:"close_square","cloud-download":"cloud-download","cloud-server":"cloud-server",code:"code","collapse-all":"collapse-all",commit:"commit","content-search":"content-search",continue:"continue",control:"control",copy:"copy","create-pullrequest":"create-pullrequest","deactivate-breakpoints":"deactivate-breakpoints",debug:"debug","debug-alt-small":"debug-alt-small","debug-restart-frame":"debug-restart-frame","default-menu-icon":"default-menu-icon",delete:"delete",deploy:"deploy",detail:"detail",discard:"discard",disconnect:"disconnect","dock-down":"dock-down","dock-right":"dock-right",doubleleft:"doubleleft",doubleright:"doubleright",down:"down","down-arrow":"down-arrow",download:"download",drag:"drag",edit:"edit",editor:"editor",ellipsis:"ellipsis",embed:"embed",error:"error",expand:"expand","expand-all":"expand-all",experiment:"experiment",explorer:"explorer",extension:"extension",eye:"eye","eye-close":"eye-close","file-copy":"file-copy","file-default":"file-default","file-exclamation":"file-exclamation","file-text":"file-text",filter:"filter",focus:"focus",folder:"folder","folder-default":"folder-default","follow-cursor":"follow-cursor",fullescreen:"fullescreen",fullscreen:"fullscreen","fullscreen-exit":"fullscreen-exit",git:"git","github-fill":"github-fill",gitlab:"gitlab","global-search":"global-search",go:"go",hex:"hex","info-circle":"info-circle","info-circle-fill":"info-circle-fill",insert:"insert",java:"java",keyboard:"keyboard",kotlin:"kotlin",layout:"layout",layout1:"layout1",left:"left","left-nav-close":"left-nav-close","left-nav-open":"left-nav-open","left-right-subfield":"left-right-subfield",line:"line",link:"link",loading:"loading","magic-wand":"magic-wand",max:"max","menubar-dashboard-back":"menubar-dashboard-back","menubar-edit":"menubar-edit","menubar-file":"menubar-file","menubar-go":"menubar-go","menubar-selection":"menubar-selection","menubar-setting":"menubar-setting","menubar-tool":"menubar-tool","menubar-view":"menubar-view","menubar-workspace":"menubar-workspace",message:"message",min:"min",minus:"minus",mobile:"mobile","mobile-phone":"mobile-phone",more:"more","new-file":"new-file","new-folder":"new-folder",node:"node",open:"open","open-changes":"open-changes",openfile:"openfile","out-link":"out-link",pause:"pause",pin:"pin",pipeline:"pipeline",plus:"plus","project-information":"project-information",python:"python","question-circle":"question-circle","question-circle-o":"question-circle-o",receive:"receive",refresh:"refresh",regex:"regex",reload:"reload",replace:"replace",repository:"repository",retrieval:"retrieval",revoke:"revoke","revoke-white":"revoke-white",right:"right","right-arrow":"right-arrow",rollback:"rollback",run:"run",rust:"rust","save-all":"save-all",scm:"scm",search:"search",send:"send","send-hollow":"send-hollow","send-solid":"send-solid",setting:"setting",sever:"sever",share:"share",shrink:"shrink",smile:"smile",start:"start",step:"step","step-in":"step-in","step-out":"step-out",stop:"stop",swap:"swap",sync:"sync",team:"team",terminal:"terminal",test:"test",thumbs:"thumbs","thumbs-fill":"thumbs-fill",thumbsdown:"thumbsdown","thumbsdown-fill":"thumbsdown-fill","time-circle":"time-circle",toolkit:"toolkit",tree:"tree",undock:"undock",unfullscreen:"unfullscreen",unmax:"unmax",unorderedlist:"unorderedlist",unpin:"unpin",up:"up","up-down-subfield":"up-down-subfield",vim:"vim",wait:"wait","warning-circle":"warning-circle",window:"window","window-close":"window-close","window-maximize":"window-maximize",zsh:"zsh"}},54713:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createFromIconfontCN=void 0;const n=e(85608);n.__exportStar(e(80564),t),n.__exportStar(e(76577),t);var r=e(10391);Object.defineProperty(t,"createFromIconfontCN",{enumerable:!0,get:function(){return r.createFromIconfontCN}})},76577:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.updateKaitianIconMap=t.getKaitianIcon=t.ANIM_TYPE=t.ROTATE_TYPE=void 0,t.updateIconMap=v,t.getIconShapeClxList=m,t.getIcon=_;const n=e(12122);var r;(function(s){s[s.rotate_90=0]="rotate_90",s[s.rotate_180=1]="rotate_180",s[s.rotate_270=2]="rotate_270",s[s.flip_horizontal=3]="flip_horizontal",s[s.flip_vertical=4]="flip_vertical",s[s.flip_both=5]="flip_both"})(r||(t.ROTATE_TYPE=r={}));var o;(function(s){s[s.spin=0]="spin",s[s.pulse=1]="pulse"})(o||(t.ANIM_TYPE=o={}));const l=["rotate-90","rotate-180","rotate-270","flip-horizontal","flip-vertical","flip-both"],p=["spin","pulse"];function v(s,f){n.iconManager.update(s,f)}function m(s){const{rotate:f,anim:a,fill:h}=s||{},u=[];return f!==void 0&&u.push(`iconfont-${l[f]}`),a!==void 0&&u.push(`iconfont-anim-${p[a]}`),h&&u.push("toggled"),u}function _(s,f){const a=n.iconManager.getIconClx(s),h=m(f);return a.push(...h),a.join(" ")}t.getKaitianIcon=_,t.updateKaitianIconMap=v},97267:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(85608);e(39328),n.__exportStar(e(48412),t),n.__exportStar(e(79383),t),n.__exportStar(e(50708),t),n.__exportStar(e(7273),t),n.__exportStar(e(14640),t),n.__exportStar(e(54076),t),n.__exportStar(e(79024),t),n.__exportStar(e(89832),t),n.__exportStar(e(54713),t),n.__exportStar(e(18875),t),n.__exportStar(e(91397),t),n.__exportStar(e(31059),t),n.__exportStar(e(72871),t),n.__exportStar(e(91416),t),n.__exportStar(e(34128),t),n.__exportStar(e(50570),t),n.__exportStar(e(77011),t),n.__exportStar(e(3660),t),n.__exportStar(e(58998),t),n.__exportStar(e(4981),t),n.__exportStar(e(99613),t)},15857:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HistoryInputBox=void 0;const r=e(85608).__importDefault(e(14041)),o=e(54114),l=e(63924);class p extends r.default.Component{constructor(){super(...arguments),this.inputRef=r.default.createRef(),this.addToHistory=m=>{this.history&&m&&m!==this.getCurrentValue()&&this.history.add(m)},this.getHistory=()=>this.history&&this.history.getHistory()||[],this.showNextValue=()=>{const m=this.getCurrentValue()||"";this.history&&!this.history.has(m)&&this.addToHistory(m);let _=this.getNextValue();_&&(_=_===m?this.getNextValue():_),_&&this.onValueChange(_)},this.showPreviousValue=()=>{const m=this.getCurrentValue()||"";this.history&&!this.history.has(m)&&this.addToHistory(m);let _=this.getPreviousValue();_&&(_=_===m?this.getPreviousValue():_),_&&this.onValueChange(_)},this.clearHistory=()=>{this.history&&this.history.clear()},this.getCurrentValue=()=>{if(!this.history)return null;let m=this.history.current();return m||(m=this.history.last(),this.history.next()),m},this.getPreviousValue=()=>this.history&&(this.history.previous()||this.history.first())||null,this.getNextValue=()=>this.history&&(this.history.next()||this.history.last())||null,this.onValueChange=m=>{const{onValueChange:_}=this.props;this.setState({inputValue:m}),_&&_(m)},this.onKeyDown=m=>{const{onKeyDown:_}=this.props;_&&_(m)},this.focus=()=>{this.inputRef&&this.inputRef.current&&this.inputRef.current.focus()}}componentDidMount(){var m;const{history:_,onReady:s}=this.props;this.history=new o.HistoryNavigator(_||new Set([]),100),this.inputProps={...this.props},delete this.inputProps.onReady,this.setState({inputValue:((m=this.props.value)!==null&&m!==void 0?m:this.props.defaultValue)||""}),typeof s=="function"&&s({addToHistory:this.addToHistory,getHistory:this.getHistory,clearHistory:this.clearHistory,getCurrentValue:this.getCurrentValue,showNextValue:this.showNextValue,showPreviousValue:this.showPreviousValue,focus:this.focus})}render(){const m=this.state&&this.state.inputValue;return r.default.createElement(l.Input,{ref:this.inputRef,...this.inputProps,onValueChange:this.onValueChange,onKeyDown:this.onKeyDown,value:m})}}t.HistoryInputBox=p},63924:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Input=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importDefault(e(14041)),l=e(54713),p=n.__importDefault(e(65973));e(41065);function v(_){return typeof _>"u"}function m(_,s,f){if(typeof f=="function"){let a=s;if(s.type==="click"){a=Object.create(s),a.target=_,a.currentTarget=_;const h=_.value;_.value="",f(a),_.value=h;return}f(a)}}t.Input=o.default.forwardRef((_,s)=>{const{defaultValue:f,className:a,wrapperStyle:h,size:u="default",controls:d,onChange:E,selection:g,addonBefore:c,addonAfter:b,persistFocus:y=!0,hasClear:S,afterClear:A,value:w,onValueChange:T,onPressEnter:D,onKeyDown:I,as:R="input",...M}=_;(0,p.default)(!d,"[@opensumi/ide-components Input]: `controls` was deprecated, please use `addonAfter` instead");const O=o.default.useRef(null),[P,k]=o.default.useState(!1),[F,L]=o.default.useState(()=>(w??f)||""),[B,j]=o.default.useState(()=>(w??f)||"");o.default.useImperativeHandle(s,()=>O.current),o.default.useEffect(()=>{g&&!v(g.start)&&!P&&O.current.setSelectionRange(g.start,g.end)},[g,P]),o.default.useEffect(()=>{w===null||typeof w>"u"||(w!==B&&w!==F&&L(w),w!==B&&j(w))},[w]);const W=K=>{X(K.target.value),m(O.current,K,E)},U=K=>{K.preventDefault(),X(""),m(O.current,K,E),typeof A=="function"&&A()},X=K=>{L(K),typeof T=="function"&&T(K),P||k(!0)},V=K=>{K.keyCode===13&&typeof D=="function"&&D(K),typeof I=="function"&&I(K)},$=b||d,Y=y?{onMouseDown:K=>{K.preventDefault()}}:{},z=(K,Z)=>K?o.default.createElement("div",{className:(0,r.default)("kt-input-addon",Z),...Y},o.default.Children.map(K,Q=>o.default.isValidElement(Q)?o.default.cloneElement(Q,Y):null)):null,H=(0,r.default)("kt-input",a,{[`kt-input-${u}`]:u,"kt-input-disabled":_.disabled});return o.default.createElement("div",{className:H,style:h},z(c,"kt-input-addon-before"),o.default.createElement("div",{className:"kt-input-box"},o.default.createElement(R,{ref:O,type:"text",autoCapitalize:"off",autoCorrect:"off",autoComplete:"off",spellCheck:!1,...M,value:F,onChange:W,onKeyDown:V}),S&&F&&o.default.createElement(l.Icon,{className:"kt-input-clear",icon:"close-circle-fill",onClick:U,...Y})),z($,"kt-input-addon-after"))}),t.Input.displayName="OpenSumiInput"},64545:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InputNumber=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importDefault(e(32476)),l=n.__importDefault(e(14041));e(41065),e(17107);const p="kt-input-number",v=m=>{const{value:_,size:s="default",wrapperStyle:f,className:a,disabled:h,min:u,max:d,onChange:E,...g}=m,c=y=>{E&&E(y)},b=(0,r.default)("kt-input","kt-input-number",a,{[`kt-input-${s}`]:s,"kt-input-disabled":h});return l.default.createElement("div",{className:b,style:f},l.default.createElement("div",{className:"kt-input-box"},l.default.createElement(o.default,{prefixCls:p,min:u,max:d,value:_,type:"number",onChange:c,controls:!0,...g})))};t.InputNumber=v,t.InputNumber.displayName="OpenSumiInputNumber"},10413:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.bindInputElement=v;const r=e(85608).__importDefault(e(14041)),o=e(63924);class l extends r.default.Component{constructor(){super(...arguments),this.placeholderInputRef=r.default.createRef()}render(){const _={...this.props};return delete _.inputElement,delete _.innerRef,r.default.createElement(o.Input,{..._,type:"text",id:this.props.id,ref:this.placeholderInputRef})}componentDidMount(){const{innerRef:_,inputElement:s}=this.props;this.placeholderInputRef.current.parentElement.replaceChild(s,this.placeholderInputRef.current),this.applyAttributes(),s.focus(),typeof _=="function"?_(s):_!==null&&typeof _=="object"&&_.current===null&&(_.current=s)}UNSAFE_componentWillUnmount(){const{innerRef:_,inputElement:s}=this.props;s.parentElement.replaceChild(this.placeholderInputRef.current,s),_!==null&&typeof _=="object"&&_.current&&(_.current=null)}shouldComponentUpdate(_){return this.applyAttributes(_),!1}applyAttributes(_=this.props){const{className:s,id:f,inputElement:a,style:h}=_;if(typeof s=="string"&&(a.className=s),typeof f=="string"&&(a.id=f),h!==null&&typeof h=="object")for(const u in h)typeof h[u]=="string"&&a[u]&&(a[u]=h[u])}}const p=r.default.forwardRef((m,_)=>r.default.createElement(l,{...m,innerRef:_}));function v(m){return _=>r.default.createElement(p,{..._,inputElement:m})}},61172:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TextArea=void 0;const r=e(85608).__importDefault(e(14041)),o=e(63924);t.TextArea=r.default.forwardRef((l,p)=>r.default.createElement(o.Input,{...l,as:"textarea",ref:p})),t.TextArea.displayName="OpenSumiTextArea"},34390:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ValidateInput=t.VALIDATE_TYPE=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importDefault(e(14041)),l=e(63924);e(13254);var p;(function(v){v[v.INFO=1]="INFO",v[v.ERROR=2]="ERROR",v[v.WARNING=3]="WARNING",v[v.IGNORE=4]="IGNORE"})(p||(t.VALIDATE_TYPE=p={})),t.ValidateInput=o.default.forwardRef(({type:v,className:m,validate:_,onChange:s,onValueChange:f,validateMessage:a,popup:h=!0,...u},d)=>{const[E,g]=o.default.useState();o.default.useEffect(()=>{g(a)},[a]);const c=(0,r.default)({"validate-error":E&&E.type===p.ERROR,"validate-warning":E&&E.type===p.WARNING,"validate-info":E&&E.type===p.INFO}),b=()=>{if(E&&E.message)return o.default.createElement("div",{className:(0,r.default)("validate-message",c,{popup:h})},E.message)},y=S=>{const A=S.target;let w;if(A.type==="number"?w=S.target.valueAsNumber:w=S.target.value,typeof _=="function"){let T;v==="number"?/^[0-9]+$/.test(w)?T=_(Number(w)):T=_(String(w)):T=_(w),g(T)}typeof s=="function"&&s(S),typeof f=="function"&&f(w)};return o.default.createElement("div",{className:(0,r.default)("input-box",{popup:h})},o.default.createElement(l.Input,{type:v,ref:d,className:(0,r.default)(m,E,c),onChange:y,...u}),b())}),t.ValidateInput.displayName="ValidateInput"},50708:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(85608);n.__exportStar(e(61172),t),n.__exportStar(e(63924),t),n.__exportStar(e(34390),t),n.__exportStar(e(10413),t),n.__exportStar(e(64545),t)},3660:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),e(85608).__exportStar(e(3205),t)},3205:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Loading=void 0;const r=e(85608).__importDefault(e(14041));e(21221),t.Loading=r.default.memo(()=>r.default.createElement("div",{className:"loading_indicator"})),t.Loading.displayName="Loading"},4981:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LocalizeContext=void 0,t.LocalizeContextProvider=v,t.ComponentContextProvider=m;const r=e(85608).__importDefault(e(14041)),o=e(54713),l=e(65973),p=_=>((0,l.warning)(!1,"Using the default localize fn"),"");t.LocalizeContext=r.default.createContext({localize:p}),t.LocalizeContext.displayName="LocalizeContext";function v(_){return r.default.createElement(t.LocalizeContext.Provider,{value:_.value},r.default.createElement(t.LocalizeContext.Consumer,null,s=>_.value===s?_.children:null))}function m(_){return r.default.createElement(o.IconContextProvider,{value:_.value},r.default.createElement(v,{value:{localize:_.value.localize}},_.children))}},13719:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(85608);n.__exportStar(e(44547),t),n.__exportStar(e(32592),t)},32592:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MarkdownReactParser=void 0;const n=e(85608),r=e(33714),o=n.__importDefault(e(14041));class l extends r.marked.Renderer{constructor(v){super(),this.unescapeInfo=new Map([[""",'"'],[" "," "],["&","&"],["'","'"],["<","<"],[">",">"]]),this.renderer=v.renderer}parse(v){return v.map((m,_)=>{const s=(()=>{switch(m.type){case"html":return this.renderer.html(m.text);case"space":return null;case"heading":{const f=m.depth;return this.renderer.heading(this.parseInline(m.tokens),f)}case"paragraph":return this.renderer.paragraph(this.parseInline(m.tokens));case"text":{const f=m;return f.tokens?this.parseInline(f.tokens):m.text}case"blockquote":{const f=m,a=this.parse(f.tokens);return this.renderer.blockquote(a)}case"list":{const a=m.items.map((h,u)=>{var d;const E=[];return h.task&&E.push(this.renderer.checkbox((d=h.checked)!==null&&d!==void 0?d:!1)),E.push(this.parse(h.tokens)),o.default.cloneElement(this.renderer.listItem(E),{key:`list-item-${u}`})});return this.renderer.list(a,m.ordered)}case"code":return this.renderer.code(m.text,m.lang);case"table":{const f=m,a=f.header.map((g,c)=>o.default.cloneElement(this.renderer.tableCell(this.parseInline(g.tokens),{header:!0,align:m.align[c]}),{key:`header-cell-${c}`})),h=o.default.cloneElement(this.renderer.tableRow(a),{key:"header-row"}),u=this.renderer.tableHeader(h),d=f.rows.map((g,c)=>{const b=g.map((y,S)=>o.default.cloneElement(this.renderer.tableCell(this.parseInline(y.tokens),{header:!1,align:m.align[S]}),{key:`body-cell-${c}-${S}`}));return o.default.cloneElement(this.renderer.tableRow(b),{key:`body-row-${c}`})}),E=this.renderer.tableBody(d);return this.renderer.table([u,E])}case"hr":return this.renderer.hr();default:return console.warn(`Token with "${m.type}" type was not found`),null}})();return o.default.isValidElement(s)?o.default.cloneElement(s,{key:`token-${_}`}):s})}parseInline(v=[]){return v.map(m=>{switch(m.type){case"text":{const _=m.text.replace(/&(#\d+|[a-zA-Z]+);/g,s=>{var f;return(f=this.unescapeInfo.get(s))!==null&&f!==void 0?f:s});return this.renderer.text(_)}case"strong":return this.renderer.strong(this.parseInline(m.tokens));case"em":return this.renderer.em(this.parseInline(m.tokens));case"del":return this.renderer.del(this.parseInline(m.tokens));case"codespan":return this.renderer.codespan(unescape(m.text));case"link":return this.renderer.link(m.href,this.parseInline(m.tokens));case"image":return this.renderer.image(m.href,m.text,m.title);case"html":return this.renderer.html(m.text);case"br":return this.renderer.br();case"escape":return this.renderer.text(m.text);default:return console.warn(`Token with "${m.type}" type was not found`),null}})}}t.MarkdownReactParser=l},44547:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MarkdownReactRenderer=void 0;const r=e(85608).__importStar(e(14041));class o{constructor(p={}){this.uid=0,this.options=p}node(p,v=null,m={}){const _={key:`marked-react-${this.uid}`};return this.incrementUID(),(0,r.createElement)(p,{...m,..._},v)}incrementUID(){this.uid+=1}heading(p,v){return this.node(`h${v}`,p)}paragraph(p){return this.node("p",p)}joinBase(p,v){if(!v)return p;try{return new URL(p,v).href}catch{return p}}link(p,v){const m=this.joinBase(p,this.options.baseURL);return this.node("a",v,{href:m,target:"_blank",rel:"noopener noreferrer"})}image(p,v,m=null){const _=this.joinBase(p,this.options.baseURL);return this.node("img",null,{src:_,alt:v,title:m})}codespan(p,v=null){const m=v?`${this.options.langPrefix}${v}`:null;return this.node("code",p,{className:m})}code(p,v){return this.node("pre",this.codespan(p,v))}blockquote(p){return this.node("blockquote",p)}list(p,v){return this.node(v?"ol":"ul",p)}listItem(p){return this.node("li",p)}checkbox(p){return this.node("input",null,{type:"checkbox",disabled:!0,checked:p})}table(p){return this.node("table",p)}tableHeader(p){return this.node("thead",p)}tableBody(p){return this.node("tbody",p)}tableRow(p){return this.node("tr",p)}tableCell(p,v){const m=v.header?"th":"td";return this.node(m,p,{align:v.align})}strong(p){return this.node("strong",p)}em(p){return this.node("em",p)}del(p){return this.node("del",p)}text(p){return p}html(p){return r.default.createElement("div",{dangerouslySetInnerHTML:{__html:p}})}hr(){return this.node("hr")}br(){return this.node("br")}}t.MarkdownReactRenderer=o},56849:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DefaultMarkedRenderer=t.linkify=void 0,t.Markdown=m;const n=e(85608),r=e(33714),o=n.__importDefault(e(14041)),l=e(39777),p=(_,s,f)=>`<a rel="noopener" ${l.DATA_SET_COMMAND}="${_}" title="${s??_}">${f}</a>`;t.linkify=p;class v extends r.Renderer{link(s,f,a){return(0,t.linkify)(s,f,a)}}t.DefaultMarkedRenderer=v;function m(_){const s=(h,u)=>r.marked.parse(h,{renderer:u}),[f,a]=o.default.useState(s(_.value||"",_.renderer));return o.default.useEffect(()=>{a(s(_.value||"",_.renderer))},[_.renderer,_.value]),o.default.createElement(l.RenderWrapper,{opener:_.opener,html:f})}},39777:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RenderWrapper=t.DATA_SET_COMMAND=void 0;const r=e(85608).__importStar(e(14041));e(28566),t.DATA_SET_COMMAND="data-command";const o=l=>{const p=(0,r.useRef)(),{html:v,opener:m}=l;(0,r.useEffect)(()=>(p&&p.current&&p.current.addEventListener("click",_),()=>{p&&p.current&&p.current.removeEventListener("click",_)}),[]);const _=s=>{let f=s.target;if(f.className.includes("codicon")&&(f=f.parentNode),f.tagName.toLowerCase()==="a"&&f.hasAttribute(t.DATA_SET_COMMAND)){const a=f.getAttribute(t.DATA_SET_COMMAND);a&&m&&m.open(a)}};return r.default.createElement("div",{className:"kt-md-renderer-wrap",dangerouslySetInnerHTML:{__html:v},ref:p})};t.RenderWrapper=o},98113:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=(0,e(14041).createContext)({inlineCollapsed:!1});t.default=r},64063:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(85608),r=e(31363),o=n.__importDefault(e(14041)),l=n.__importDefault(e(98113));class p extends o.default.Component{constructor(){super(...arguments),this.renderItem=()=>{const{title:m,..._}=this.props;return o.default.createElement(l.default.Consumer,null,({inlineCollapsed:s})=>s?o.default.createElement(r.Item,{..._,title:m}):o.default.createElement(r.Item,{..._,title:m}))}}render(){return this.renderItem()}}p.isMenuItem=!0,t.default=p},91886:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(85608),r=n.__importDefault(e(39067)),o=e(31363),l=n.__importDefault(e(14041));class p extends l.default.Component{render(){const{popupClassName:m}=this.props;return l.default.createElement(o.SubMenu,{...this.props,popupClassName:m})}}p.contextTypes={antdMenuTheme:r.default.string},p.isSubMenu=1,t.default=p},45803:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Menu=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importStar(e(31363)),l=n.__importDefault(e(14041)),p=e(90146),v=e(2835),m=e(47768),_=e(65973),s=n.__importDefault(e(98113)),f=n.__importDefault(e(64063)),a=n.__importDefault(e(91886));e(42985);class h extends l.default.Component{static getDerivedStateFromProps(E,g){const{prevProps:c}=g,b={prevProps:E};return c.mode==="inline"&&E.mode!=="inline"&&(b.switchingModeFromInline=!0),"openKeys"in E?b.openKeys=E.openKeys:(E.inlineCollapsed&&!c.inlineCollapsed&&(b.switchingModeFromInline=!0,b.inlineOpenKeys=g.openKeys,b.openKeys=[]),!E.inlineCollapsed&&c.inlineCollapsed&&(b.openKeys=g.inlineOpenKeys,b.inlineOpenKeys=[])),b}constructor(E){super(E),this.handleMouseEnter=c=>{this.restoreModeVerticalFromInline();const{onMouseEnter:b}=this.props;b&&b(c)},this.handleTransitionEnd=c=>{const b=c.propertyName==="width"&&c.target===c.currentTarget,{className:y}=c.target,S=Object.prototype.toString.call(y)==="[object SVGAnimatedString]"?y.animVal:y,A=c.propertyName==="font-size"&&S.indexOf("anticon")>=0;(b||A)&&this.restoreModeVerticalFromInline()},this.handleClick=c=>{this.handleOpenChange([]);const{onClick:b}=this.props;b&&b(c)},this.handleOpenChange=c=>{this.setOpenKeys(c);const{onOpenChange:b}=this.props;b&&b(c)},this.renderMenu=()=>{const{prefixCls:c,className:b}=this.props,y=this.getRealMenuMode(),S=this.getOpenMotionProps(y),A=c||"kt-inner-menu",w=(0,r.default)(b,{[`${A}-inline-collapsed`]:this.getInlineCollapsed()}),T={openKeys:this.state.openKeys,onOpenChange:this.handleOpenChange,className:w,mode:y,...S};return y!=="inline"&&(T.onClick=this.handleClick),this.getInlineCollapsed()&&(T.openKeys=[]),l.default.createElement(o.default,{...this.props,...T,prefixCls:A,onTransitionEnd:this.handleTransitionEnd,onMouseEnter:this.handleMouseEnter})},(0,_.warning)(!("onOpen"in E||"onClose"in E),"[Menu] `onOpen` and `onClose` are removed, please use `onOpenChange` instead, see: https://u.ant.design/menu-on-open-change."),(0,_.warning)(!("inlineCollapsed"in E&&E.mode!=="inline"),"[Menu] `inlineCollapsed` should only be used when `mode` is inline.");let g;"openKeys"in E?g=E.openKeys:"defaultOpenKeys"in E&&(g=E.defaultOpenKeys),this.state={openKeys:g||[],switchingModeFromInline:!1,inlineOpenKeys:[],prevProps:E}}componentWillUnmount(){m.wrapperRaf.cancel(this.mountRafId)}setOpenKeys(E){"openKeys"in this.props||this.setState({openKeys:E})}getRealMenuMode(){const E=this.getInlineCollapsed();if(this.state.switchingModeFromInline&&E)return"inline";const{mode:g}=this.props;return E?"vertical":g}getInlineCollapsed(){const{inlineCollapsed:E}=this.props;return E}getOpenMotionProps(E){const{openTransitionName:g,openAnimation:c,motion:b}=this.props;return b?{motion:b}:c?((0,_.warning)(typeof c=="string","[Menu] `openAnimation` do not support object. Please use `motion` instead."),{openAnimation:c}):g?{openTransitionName:g}:E==="horizontal"?{motion:{motionName:"slide-up"}}:E==="inline"?{motion:v.collapseMotion}:{motion:{motionName:""}}}restoreModeVerticalFromInline(){const{switchingModeFromInline:E}=this.state;E&&this.setState({switchingModeFromInline:!1})}render(){return l.default.createElement(s.default.Provider,{value:{inlineCollapsed:this.getInlineCollapsed()||!1}},this.renderMenu())}}h.defaultProps={className:"",focusable:!1},(0,p.polyfill)(h);class u extends l.default.Component{render(){return l.default.createElement(h,{...this.props})}}t.Menu=u,u.Divider=o.Divider,u.Item=f.default,u.SubMenu=a.default,u.ItemGroup=o.ItemGroup},31059:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.message=void 0;const r=e(85608).__importDefault(e(71036));e(38663);function o(l){return(p,v)=>new Promise(m=>{r.default[l](p,v,m)})}t.message={success:o("success"),error:o("error"),info:o("info"),warning:o("warning"),loading:o("loading")}},71036:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(85608),r=n.__importDefault(e(29517)),o=n.__importDefault(e(96041)),l=n.__importDefault(e(63492)),p=n.__importDefault(e(36117)),v=n.__importDefault(e(59303)),m=n.__importDefault(e(10435)),_=n.__importDefault(e(14041));let s=3,f,a,h=1,u="kt-message",d="move-up",E,g;function c(w){if(a){w(a);return}m.default.newInstance({prefixCls:u,transitionName:d,style:{top:f},getContainer:E,maxCount:g},T=>{if(a){w(a);return}a=T,w(T)})}const b={info:p.default,success:r.default,error:o.default,warning:l.default,loading:v.default};function y(w){const T=w.duration!==void 0?w.duration:s,D=w.key||h++,I=new Promise(M=>{const O=()=>(typeof w.onClose=="function"&&w.onClose(),M(!0));c(P=>{const k=b[w.type];P.notice({key:D,duration:T,style:{},content:_.default.createElement("div",{className:`${u}-custom-content${w.type?` ${u}-${w.type}`:""}`},w.icon||k&&_.default.createElement(k,null),_.default.createElement("span",null,w.content)),onClose:O})})}),R=()=>{a&&a.removeNotice(D)};return R.then=(M,O)=>I.then(M,O),R.promise=I,R}function S(w){return Object.prototype.toString.call(w)==="[object Object]"&&!!w.content}const A={open:y,config(w){w.top!==void 0&&(f=w.top,a=null),w.duration!==void 0&&(s=w.duration),w.prefixCls!==void 0&&(u=w.prefixCls),w.getContainer!==void 0&&(E=w.getContainer),w.transitionName!==void 0&&(d=w.transitionName,a=null),w.maxCount!==void 0&&(g=w.maxCount,a=null)},destroy(){a&&(a.destroy(),a=null)}};["success","info","warning","error","loading"].forEach(w=>{A[w]=(T,D,I)=>S(T)?A.open({...T,type:w}):(typeof D=="function"&&(I=D,D=void 0),A.open({content:T,duration:D,type:w,onClose:I}))}),A.warn=A.warning,t.default=A},6656:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.destroyFns=void 0;const n=e(85608),r=n.__importDefault(e(22143)),o=n.__importDefault(e(53373)),l=n.__importDefault(e(39067)),p=n.__importDefault(e(91812)),v=n.__importDefault(e(25946)),m=n.__importDefault(e(14041)),_=e(48412),s=e(69587);let f;t.destroyFns=[];const a=u=>{f={x:u.pageX,y:u.pageY},setTimeout(()=>f=null,100)};typeof window<"u"&&window.document&&window.document.documentElement&&(0,v.default)(document.documentElement,"click",a);class h extends m.default.Component{constructor(){super(...arguments),this.handleCancel=d=>{const{onCancel:E}=this.props;E&&E(d)},this.handleOk=d=>{const{onOk:E}=this.props;E&&E(d)},this.renderFooter=d=>{const{okText:E,okType:g,cancelText:c,confirmLoading:b}=this.props;return m.default.createElement("div",null,m.default.createElement(_.Button,{onClick:this.handleCancel,...this.props.cancelButtonProps},c||d.cancelText),m.default.createElement(_.Button,{type:g,loading:b,onClick:this.handleOk,...this.props.okButtonProps},E||d.okText))},this.renderModal=()=>{const{prefixCls:d,footer:E,visible:g,wrapClassName:c,centered:b,getContainer:y,closeIcon:S,closable:A=!0,...w}=this.props,T=d||"kt-modal",D=this.renderFooter((0,s.getConfirmLocale)()),I=m.default.createElement("span",{className:`${T}-close-x`},S||m.default.createElement(r.default,{className:`${T}-close-icon`}));return m.default.createElement(p.default,{...w,animation:this.props.animation,getContainer:y,prefixCls:T,wrapClassName:(0,o.default)({[`${T}-centered`]:!!b},c),footer:E===void 0?D:E,visible:g,mousePosition:f,onClose:this.handleCancel,closeIcon:I})}}render(){return this.renderModal()}}h.defaultProps={width:520,confirmLoading:!1,visible:!1,okType:"primary"},h.propTypes={prefixCls:l.default.string,onOk:l.default.func,onCancel:l.default.func,okText:l.default.node,cancelText:l.default.node,centered:l.default.bool,width:l.default.oneOfType([l.default.number,l.default.string]),confirmLoading:l.default.bool,visible:l.default.bool,footer:l.default.node,title:l.default.node,closable:l.default.bool,closeIcon:l.default.node},t.default=h},53017:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Modal=void 0;const r=e(85608).__importDefault(e(6656));t.Modal=r.default,e(61349)},69587:(x,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.changeConfirmLocale=r,t.getConfirmLocale=o;const e={okText:"OK",cancelText:"Cancel",justOkText:"OK"};let n={...e};function r(l){l?n={...n,...l}:n={...e}}function o(){return n}},18875:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.notification=void 0,t.open=f,t.close=a,t.update=h;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importDefault(e(14041)),l=e(70392),p=e(48412),v=e(50570),m=n.__importDefault(e(70748));e(1477);const _={[v.MessageType.Info]:15,[v.MessageType.Warning]:18,[v.MessageType.Error]:20};m.default.config({placement:"bottomRight"}),t.notification=m.default;const s=new Map;function f(d,E,g=!0,c,b,y,S,A){return(0,l.createCancelablePromise)(w=>(w.onCancellationRequested(()=>{a(c)}),new Promise(T=>{const D={key:c,className:(0,r.default)("kt-notification-wrapper",{"kt-notification-info":E===v.MessageType.Info,"kt-notification-error":E===v.MessageType.Error,"kt-notification-warn":E===v.MessageType.Warning}),duration:(0,l.isUndefined)(S)?_[E]:S,onClose:()=>{A&&A(),s.delete(c),T(void 0)},btn:b?b.map((I,R)=>{const M=typeof I=="string",O={className:`${(0,r.default)("kt-notification-button")}${M?"":I.class}`,ghost:M?R===0:!I.primary,key:M?I:I.id,onClick:()=>{T(I),m.default.close(c),M||I.run()}},P=M?I:I.label;return o.default.createElement(p.Button,{size:"small",...O},P)}):null,message:d,description:y};s.set(c,[E,D]),g||(D.closeIcon=o.default.createElement("span",null)),u(E,D)})))}function a(d){t.notification.close(d)}function h(d,E){const g=s.get(d);u(g[0],{...g[1],key:d,message:E})}function u(d,E){switch(d){case v.MessageType.Info:t.notification.info(E);break;case v.MessageType.Warning:t.notification.warning(E);break;case v.MessageType.Error:t.notification.error(E);break;default:t.notification.open(E);break}}},70748:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(85608),r=n.__importDefault(e(55435)),o=n.__importDefault(e(31079)),l=n.__importDefault(e(22143)),p=n.__importDefault(e(5550)),v=n.__importDefault(e(74339)),m=n.__importDefault(e(10435)),_=n.__importDefault(e(14041)),s=e(70392),f={};let a=4.5,h=24,u=24,d="topRight",E,g;function c(T){const{duration:D,placement:I,bottom:R,top:M,getContainer:O,closeIcon:P}=T;D!==void 0&&(a=D),I!==void 0&&(d=I),R!==void 0&&(u=R),M!==void 0&&(h=M),O!==void 0&&(E=O),P!==void 0&&(g=P)}function b(T,D=h,I=u){let R;switch(T){case"topLeft":R={left:0,top:D,bottom:"auto"};break;case"topRight":R={right:0,top:D,bottom:"auto"};break;case"bottomLeft":R={left:0,top:"auto",bottom:I};break;default:R={right:0,top:"auto",bottom:I};break}return R}function y({prefixCls:T,placement:D=d,getContainer:I=E,top:R,bottom:M,closeIcon:O=g},P){const k=`${T}-${D}`;if(f[k]){P(f[k]);return}const F=_.default.createElement("span",{className:`${T}-close-x`},O||_.default.createElement(l.default,{className:`${T}-close-icon`}));m.default.newInstance({prefixCls:T,className:`${T}-${D}`,style:b(D,R,M),getContainer:I,closeIcon:F},L=>{f[k]=L,P(L)})}const S={success:r.default,info:v.default,error:o.default,warning:p.default};function A(T){const D=T.prefixCls||"kt-notification",I=`${D}-notice`,R=(0,s.isUndefined)(T.duration)?a:T.duration;let M=null;T.icon?M=_.default.createElement("span",{className:`${I}-icon`},T.icon):T.type&&(M=_.default.createElement(S[T.type]||null,{className:`${I}-icon ${I}-icon-${T.type}`}));const{placement:O,top:P,bottom:k,getContainer:F,closeIcon:L}=T;y({prefixCls:D,placement:O,top:P,bottom:k,getContainer:F,closeIcon:L},B=>{B.notice({content:_.default.createElement("div",{className:M?`${I}-with-icon`:""},M,_.default.createElement("div",{className:`${I}-message`},T.message),_.default.createElement("div",{className:`${I}-description`},T.description),T.btn?_.default.createElement("span",{className:`${I}-btn`},T.btn):null),duration:R,closable:!0,onClose:T.onClose,onClick:T.onClick,key:T.key,style:T.style||{},className:T.className})})}const w={open:A,close(T){Object.keys(f).forEach(D=>f[D].removeNotice(T))},config:c,destroy(){Object.keys(f).forEach(T=>{f[T].destroy(),delete f[T]})}};["success","info","warning","error"].forEach(T=>{w[T]=D=>w.open({...D,type:T})}),w.warn=w.warning,t.default=w},79024:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Overlay=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importDefault(e(14041)),l=e(53017);e(45531);const p=({maskClosable:v=!1,closable:m=!0,className:_,onClose:s,children:f,footer:a,title:h,getContainer:u,keyboard:d,...E})=>o.default.createElement(l.Modal,{footer:a||null,maskClosable:v,closable:m,onCancel:s,title:h,getContainer:u,className:(0,r.default)("kt-overlay",_),keyboard:d,...E},f);t.Overlay=p},91397:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Popover=t.PopoverPosition=t.PopoverTriggerType=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importDefault(e(6208)),l=n.__importStar(e(14041));e(14856);const p=e(48412);var v;(function(s){s.hover="hover",s.click="click",s.focus="focus"})(v||(t.PopoverTriggerType=v={}));var m;(function(s){s.top="top",s.bottom="bottom",s.left="left",s.right="right",s.topLeft="topLeft",s.topRight="topRight",s.bottomLeft="bottomLeft",s.bottomRight="bottomRight",s.leftTop="leftTop",s.leftBottom="leftBottom",s.rightTop="rightTop",s.rightBottom="rightBottom"})(m||(t.PopoverPosition=m={}));const _=({children:s,trigger:f=v.hover,visible:a,content:h,position:u=m.top,showArrow:d=!0,title:E,titleClassName:g,overlay:c,overlayClassName:b,overlayStyle:y,action:S,delay:A,zIndex:w=1e3,onClickAction:T,onVisibleChange:D,getTooltipContainer:I,...R})=>{const M=(0,l.useCallback)(P=>{T&&T(P)},[T]),O=(0,l.useMemo)(()=>c||(!E&&!h?null:l.default.createElement(l.default.Fragment,null,E&&l.default.createElement("p",{className:(0,r.default)("kt-popover-title",g)},E,S&&l.default.createElement(p.Button,{size:"small",type:"link",onClick:M},S)),h||"")),[c,h,S,M]);return O?l.default.createElement(o.default,{...R,visible:a,placement:u,mouseEnterDelay:A?A/1e3:void 0,trigger:f,showArrow:d,onVisibleChange:D,overlayClassName:b,prefixCls:"kt-popover",overlayStyle:y,getTooltipContainer:I,overlay:O,zIndex:w},l.default.createElement("div",{className:"kt-popover-trigger"},s)):s};t.Popover=_},8573:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RecycleList=t.RECYCLE_LIST_OVER_SCAN_COUNT=t.RECYCLE_LIST_STABILIZATION_TIME=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importStar(e(14041)),l=n.__importDefault(e(19686)),p=e(58723),v=e(77011);t.RECYCLE_LIST_STABILIZATION_TIME=500,t.RECYCLE_LIST_OVER_SCAN_COUNT=50;const m=({width:_,height:s,maxHeight:f,minHeight:a,className:h,style:u,data:d,onReady:E,onScroll:g,itemHeight:c,header:b,footer:y,template:S,paddingBottomSize:A,getSize:w,hiddenVerticalScrollbar:T,hiddenHorizontalScrollbar:D})=>{const I=(0,o.useRef)(),R=(0,o.useRef)(),M=(0,o.useRef)({}),O=(0,o.useRef)(0),P=(0,o.useRef)();(0,o.useEffect)(()=>{typeof E=="function"&&E({scrollTo:K=>{var Z;(Z=I.current)===null||Z===void 0||Z.scrollTo(K)},scrollToIndex:(K,Z="start")=>{var Q,oe;let ne=K;if(b&&ne++,typeof c=="number")(Q=I.current)===null||Q===void 0||Q.scrollToItem(ne,Z);else{P.current&&clearTimeout(P.current);const _e=(M.current?Object.keys(M.current):[]).slice(0,ne).reduce((q,Oe)=>q+F(Oe),0);(oe=I.current)===null||oe===void 0||oe.scrollToItem(K,Z),P.current=setTimeout(()=>{var q;(M.current?Object.keys(M.current):[]).slice(0,ne).reduce((ie,fe)=>ie+F(fe),0)!==_e&&((q=I.current)===null||q===void 0||q.scrollToItem(K,Z)),P.current=null},t.RECYCLE_LIST_STABILIZATION_TIME)}}})},[]);const k=(H,K)=>{var Z;M.current[H]!==K&&(M.current={...M.current,[H]:K},I.current&&((Z=I.current)===null||Z===void 0||Z.resetAfterIndex(0)))},F=(0,o.useCallback)(H=>w?w(Number(H)):(M?.current||[])[H]||c||100,[c,w]),L=(0,o.useCallback)(()=>{if(f){let H=0;for(let K=0;K<d.length;K++)H+=F(K);return H>f?f:H}},[f,d]),B=(0,o.useCallback)(()=>{if(a)return a},[a,d]),j=(0,o.useMemo)(()=>{let H=d.length;return b&&H++,y&&H++,H},[d,y,b]),W=({index:H,style:K})=>{let Z;if(H===0&&b)return o.default.createElement("div",{style:K},o.default.createElement(b,null));if(H+1===j&&y)return o.default.createElement("div",{style:K},o.default.createElement(y,null));if(b?Z=d[H-1]:Z=d[H],!Z)return o.default.createElement("div",{style:K});const Q={"aria-setsize":j,"aria-posinset":H};return o.default.createElement("div",{tabIndex:0,style:K,role:"listitem",...Q},o.default.createElement(S,{data:Z,index:H}))},U=({index:H,style:K})=>{const Z=(0,o.useRef)(null),Q=(0,o.useRef)(),oe=()=>{if(Z.current){let he=0;for(let _e=0;_e<Z.current.children.length;_e++)he+=Z.current.children[_e].getBoundingClientRect().height;k(H,he)}};(0,o.useEffect)(()=>{if(Z.current&&I.current){Q.current=new MutationObserver(()=>{oe()});const he={childList:!0,attributes:!0,characterData:!0,attributeFilter:["class","style"],attributeOldValue:!0,characterDataOldValue:!0};Q.current.observe(Z.current,he),oe()}return()=>{Q.current.disconnect()}},[Z.current]);let ne;return H===0&&b?o.default.createElement("div",{style:K},o.default.createElement(b,null)):H+1===j&&y?o.default.createElement("div",{style:K},o.default.createElement(y,null)):(b?ne=d[H-1]:ne=d[H],ne?o.default.createElement("div",{style:K,ref:Z},o.default.createElement(S,{data:ne,index:H})):o.default.createElement("div",{style:K}))},X=(0,o.useMemo)(()=>d.reduce((K,Z)=>K+F(Z),0)/d.length,[d]),V=(0,o.useCallback)(H=>{O.current=H.scrollOffset,g&&g(H)},[g]),$=(0,o.useMemo)(()=>(0,o.forwardRef)((H,K)=>{const{style:Z,...Q}=H;return o.default.createElement("div",{ref:K,style:{...Z,height:`${parseFloat(Z.height)+(A||0)}px`},...Q})}),[A]),Y=(0,o.useMemo)(()=>(0,o.forwardRef)((H,K)=>o.default.createElement(v.Scrollbars,{hiddenVertical:T,hiddenHorizontal:D,...H,thumbSize:10,forwardedRef:K})),[T,D]);return(()=>{const H=typeof c!="number",K=!_||!s;return(()=>{const Q=({width:oe,height:ne})=>{R.current&&(R.current.scrollTop=O.current);const he=L(),_e=B();let q=ne;return _e?q=Math.min(ne,_e):he&&(q=he),H?o.default.createElement(p.VariableSizeList,{onScroll:V,width:oe,height:q,itemData:[],itemSize:F,itemCount:j,overscanCount:t.RECYCLE_LIST_OVER_SCAN_COUNT,ref:I,style:{transform:"translate3d(0px, 0px, 0px)",...u},className:(0,r.default)(h,"kt-recycle-list"),innerElementType:$,outerElementType:Y,estimatedItemSize:X},U):o.default.createElement(p.FixedSizeList,{onScroll:V,width:oe,height:q,itemData:[],itemSize:c,itemCount:j,overscanCount:t.RECYCLE_LIST_OVER_SCAN_COUNT,ref:I,outerRef:R,style:{transform:"translate3d(0px, 0px, 0px)",...u},className:(0,r.default)(h,"recycle-list"),innerElementType:$,outerElementType:Y},W)};return K?o.default.createElement(l.default,null,Q):Q({width:_,height:s})})()})()};t.RecycleList=m},34128:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),e(85608).__exportStar(e(8573),t)},57621:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RecycleTree=t.RenderErrorType=void 0;const n=e(85608),r=n.__importDefault(e(39050)),o=n.__importStar(e(14041)),l=e(58723),p=e(70392),v=e(77011),m=e(48103),_=e(65601),s=e(43685),f=e(13429),a=e(34054);var h;(function(E){E[E.RENDER_ITEM=0]="RENDER_ITEM",E[E.GET_RENDED_KEY=1]="GET_RENDED_KEY",E[E.RENDER_ERROR=2]="RENDER_ERROR"})(h||(t.RenderErrorType=h={}));const u=o.default.forwardRef((E,g)=>{const{style:c,...b}=E;return o.default.createElement("div",{ref:g,style:{...c,height:`${parseFloat(c.height)+d.PADDING_BOTTOM_SIZE}px`},...b})});class d extends o.default.Component{constructor(){super(...arguments),this.idxToRendererPropsCache=new Map,this.dynamicSizeMap=new Map,this.listRef=o.default.createRef(),this.disposables=new p.DisposableCollection,this.onErrorEmitter=new p.Emitter,this.onDidUpdateEmitter=new p.Emitter,this.onDidModelChangeEmitter=new p.Emitter,this.newPromptInsertionIndex=-1,this.idToFilterRendererPropsCache=new Map,this.filterFlattenBranchChildrenCache=new Map,this.filterWatcherDisposeCollection=new p.DisposableCollection,this.queueUpdatePromise=null,this.updateCancelToken=new p.CancellationTokenSource,this.expandNodeCancelToken=new p.CancellationTokenSource,this.willUpdateTasks=0,this.queueUpdateThrottler=new p.Throttler,this.doBatchUpdate=(()=>{const g=(c,b)=>{if(this.disposables.disposed)return;const{root:y}=this.props.model;let S=-1;if(this.promptTargetID>-1&&this.promptHandle instanceof _.NewPromptHandle&&this.promptHandle.parent&&this.promptHandle.parent.expanded&&y.isItemVisibleAtSurface(this.promptHandle.parent)&&!this.promptHandle.destroyed){const A=y.getIndexAtTreeNodeId(this.promptTargetID);if(A>-1||this.promptHandle.parent===y)if(this.promptHandle.type===a.TreeNodeType.TreeNode){const w=this.promptHandle.parent;w?S=this.getNewPromptInsertIndex(A,w):S=A+1}else S=A+1;else this.promptTargetID=-1}if(S===-1&&this.promptHandle&&this.promptHandle.constructor===_.NewPromptHandle&&!this.promptHandle.destroyed&&this.promptHandle.destroy(),this.newPromptInsertionIndex=S,this.idxToRendererPropsCache.clear(),b.isCancellationRequested){c();return}this.forceUpdate(()=>{c(),this.props.filter&&this.props.filterProvider&&this.props.filterProvider.filterAlways&&this.filterItems(this.props.filter)})};return()=>{const c=(S,A)=>{const w=!!this.willUpdateTasks;if(this.willUpdateTasks=0,!w)A.resolve();else{this.updateCancelToken.cancel(),this.updateCancelToken=new p.CancellationTokenSource;const T=this.updateCancelToken.token;requestAnimationFrame(()=>{if(T.isCancellationRequested){A();return}g(A,T)})}return S};let b;const y=new Promise(S=>b=S);return y.then(()=>{this.onDidUpdateEmitter.fire()}),c(y,b),y}})(),this.batchUpdate=()=>(this.willUpdateTasks++,this.queueUpdatePromise=this.queueUpdateThrottler.queue(this.doBatchUpdate),this.queueUpdatePromise),this.promptNewTreeNode=g=>this.promptNew(g),this.promptNewCompositeTreeNode=g=>this.promptNew(g,a.TreeNodeType.CompositeTreeNode),this.promptRename=async(g,c)=>{var b,y;const{root:S}=this.props.model,A=typeof g=="string"?await S.getTreeNodeByPath(g):g;if(!s.TreeNode.is(A)||s.CompositeTreeNode.isRoot(A))throw new TypeError(`Cannot rename object of type ${typeof A}`);const w=new m.RenamePromptHandle(c||A.name,A);return this.promptHandle=w,this.promptTargetID=A.id,S.isItemVisibleAtSurface(A)?await this.batchUpdate():await A.parent.setExpanded(!0),(y=(b=this.listRef)===null||b===void 0?void 0:b.current)===null||y===void 0||y.scrollToItem(S.getIndexAtTreeNodeId(this.promptTargetID)),this.promptHandle},this.expandNode=async g=>{const{root:c}=this.props.model,b=typeof g=="string"?c.getTreeNodeByPath(g):g;if(this.expandNodeCancelToken.token.isCancellationRequested&&(this.expandNodeCancelToken=new p.CancellationTokenSource),b&&s.CompositeTreeNode.is(b)&&!b.disposed)return b.setExpanded(!1,!1,!0,this.expandNodeCancelToken.token)},this.collapseNode=async g=>{const{root:c}=this.props.model,b=typeof g=="string"?c.getTreeNodeByPath(g):g;if(b&&s.CompositeTreeNode.is(b)&&!b.disposed)return this.expandNodeCancelToken.cancel(),b.setCollapsed()},this._isEnsuring=!1,this.ensureVisible=async(g,c="smart",b=!1)=>{if(this._isEnsuring)return;this._isEnsuring=!0;const{root:y}=this.props.model,S=typeof g=="string"?y.getTreeNodeByPath(g)||await y.loadTreeNodeByPath(g):g;if(S&&!y.isItemVisibleAtSurface(S)&&await y.loadTreeNodeByPath(S.path),!s.TreeNode.is(S)||s.CompositeTreeNode.isRoot(S)){this._isEnsuring=!1;return}return b?this.tryScrollIntoViewWhileStable(S,c):this.tryScrollIntoView(S,c),this._isEnsuring=!1,S},this.getItemAtIndex=g=>{const{filter:c}=this.props;if(c&&this.filterFlattenBranch.length>0)return this.idToFilterRendererPropsCache.get(this.filterFlattenBranch[g]);let b=this.idxToRendererPropsCache.get(g);if(!b){const y=this.newPromptInsertionIndex,{root:S}=this.props.model;if(y>-1&&this.promptHandle&&this.promptHandle.constructor===_.NewPromptHandle&&!this.promptHandle.destroyed)if(g===y)b={itemType:a.TreeNodeType.NewPrompt,item:this.promptHandle};else{const A=S.getTreeNodeAtIndex(g-(g>=y?1:0));b={itemType:s.CompositeTreeNode.is(A)?a.TreeNodeType.CompositeTreeNode:a.TreeNodeType.TreeNode,item:A}}else{const A=S.getTreeNodeAtIndex(g);A&&A.id===this.promptTargetID&&this.promptHandle&&this.promptHandle.constructor===m.RenamePromptHandle&&!this.promptHandle.destroyed?b={itemType:a.TreeNodeType.RenamePrompt,item:this.promptHandle}:b={itemType:s.CompositeTreeNode.is(A)?a.TreeNodeType.CompositeTreeNode:a.TreeNodeType.TreeNode,item:A}}this.idxToRendererPropsCache.set(g,b)}return b},this.handleListScroll=({scrollOffset:g})=>{const{model:c,height:b,itemHeight:y}=this.props;if(c.state.saveScrollOffset(g),!this.promptHandle||!y)return;let S;this.promptHandle instanceof _.NewPromptHandle&&this.newPromptInsertionIndex>-1?S=this.newPromptInsertionIndex:S=c.root.getIndexAtTreeNodeId(this.promptHandle.id),(g+b<S*y||S*y<g)&&this.promptHandle.destroy()},this.getItemKey=g=>{const c=this.getItemAtIndex(g),{getItemKey:b}=this.props,y=b?b(c):void 0;return y??g},this.filterItems=g=>{const{model:{root:c},filterProvider:b}=this.props;if(this.filterWatcherDisposeCollection.dispose(),this.idToFilterRendererPropsCache.clear(),!g)return;const y=/\//.test(g),S=new Set,A=new Map,w=[];for(let T=0,D=c.branchSize;T<D;T++){const I=c.getTreeNodeAtIndex(T);w.push(I)}if(y)w.forEach(T=>{if(T&&T.path.indexOf(g)>-1){S.add(T.id);let D=T.parent;for(;D&&!s.CompositeTreeNode.isRoot(D);)S.add(D.id),D=D.parent}});else{let T=[];b?T=r.default.filter(g,w,b.fuzzyOptions()):T=r.default.filter(g,w,d.FILTER_FUZZY_OPTIONS);const D=I=>{const R=I.children||[];if(R.length>0)for(const M of R)S.add(M.id),s.CompositeTreeNode.is(M)&&M.expanded&&D(M)};T.forEach(I=>{const R=I.original;S.add(R.id);let M=R.parent;for(A.set(R.id,()=>o.default.createElement("div",{style:{flex:1,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},dangerouslySetInnerHTML:{__html:I.string||""}})),s.CompositeTreeNode.is(R)&&D(R);M&&!s.CompositeTreeNode.isRoot(M);)S.add(M.id),M=M.parent})}this.filterFlattenBranch=new Array(S.size);for(let T=0,D=0,I=c.branchSize;D<I;D++){const R=c.getTreeNodeAtIndex(D);R&&S.has(R.id)&&(this.filterFlattenBranch[T]=R.id,s.CompositeTreeNode.is(R)?this.idToFilterRendererPropsCache.set(R.id,{item:R,itemType:a.TreeNodeType.CompositeTreeNode,template:A.has(R.id)?A.get(R.id):void 0}):this.idToFilterRendererPropsCache.set(R.id,{item:R,itemType:a.TreeNodeType.TreeNode,template:A.has(R.id)?A.get(R.id):void 0}),T++)}this.filterWatcherDisposeCollection.push(c.watcher.on(a.TreeNodeEvent.DidChangeExpansionState,(T,D)=>{const I=this.filterFlattenBranch.indexOf(T.id);if(D){const R=this.filterFlattenBranchChildrenCache.get(T.id);R&&R.length>0&&(this.filterFlattenBranch=(0,s.spliceArray)(this.filterFlattenBranch,I+1,0,R),this.filterFlattenBranchChildrenCache.delete(T.id))}else{const R=[];for(let M=I+1;M<this.filterFlattenBranch.length;M++){const O=c.getTreeNodeById(this.filterFlattenBranch[M]);if(O&&O.depth>T.depth)R.push(O.id);else break}this.filterFlattenBranchChildrenCache.set(T.id,R),this.filterFlattenBranch=(0,s.spliceArray)(this.filterFlattenBranch,I+1,R.length)}})),this.filterWatcherDisposeCollection.push(p.Disposable.create(()=>{this.filterFlattenBranchChildrenCache.clear()}))},this.renderItem=({index:g,style:c})=>{var b,y,S,A,w,T,D;const{children:I,overflow:R="ellipsis",supportDynamicHeights:M}=this.props,O=this.getItemAtIndex(g),P=(0,o.useRef)(null),k=(0,o.useMemo)(()=>M?()=>{let U=0;if(P.current){const X=P.current;U=Array.from(X.children).reduce((V,$)=>V+$.getBoundingClientRect().height,0)}return U&&(this.dynamicSizeMap.set(g,U),this.layoutItem()),Math.max(U,d.DEFAULT_ITEM_HEIGHT)}:()=>{},[M]);if((0,o.useEffect)(()=>{P.current&&k()},[]),!O)return o.default.createElement(o.default.Fragment,null);const{item:F,itemType:L,template:B}=O;if(!F)return o.default.createElement("div",{style:c});let j;s.CompositeTreeNode.is(F)?j={"aria-label":(b=F.accessibilityInformation)===null||b===void 0?void 0:b.label,"aria-expanded":F.expanded,"aria-level":F.depth,"aria-setsize":(S=(y=F.parent)===null||y===void 0?void 0:y.children)===null||S===void 0?void 0:S.length,"aria-posinset":g}:s.TreeNode.is(F)&&(j={"aria-label":(A=F.accessibilityInformation)===null||A===void 0?void 0:A.label,"aria-level":F.depth,"aria-setsize":(T=(w=F.parent)===null||w===void 0?void 0:w.children)===null||T===void 0?void 0:T.length,"aria-posinset":g});const W=R==="ellipsis"?c:{...c,width:"auto",minWidth:"100%"};return o.default.createElement("div",{ref:P,style:W,role:((D=F.accessibilityInformation)===null||D===void 0?void 0:D.role)||"treeiem",...j},o.default.createElement(f.NodeRendererWrap,{item:F,depth:F.depth,itemType:L,template:B,hasPrompt:!!this.promptHandle&&!this.promptHandle.destroyed,expanded:s.CompositeTreeNode.is(F)?F.expanded:void 0},I))},this.layoutItem=()=>{var g,c,b,y;if(this.props.supportDynamicHeights&&this.listRef&&!((g=this.listRef)===null||g===void 0)&&g.current&&"_getRangeToRender"in((c=this.listRef)===null||c===void 0?void 0:c.current)){const S=(b=this.listRef)===null||b===void 0?void 0:b.current._getRangeToRender();if(S){const A=S[0];((y=this.listRef)===null||y===void 0?void 0:y.current).resetAfterIndex(A)}}}}getNewPromptInsertIndex(g,c){const{root:b}=this.props.model;let y=g+1;for(;y-g<=c.branchSize;y++){const S=b.getTreeNodeAtIndex(y);if(!S)return y;if(!s.CompositeTreeNode.is(S)){if(S?.depth>c.depth+1)continue;return y}}return y}UNSAFE_componentWillUpdate(g){this.props.filter!==g.filter&&this.filterItems(g.filter),this.props.model!==g.model&&(this.idxToRendererPropsCache.clear(),this.idToFilterRendererPropsCache.clear(),this.dynamicSizeMap.clear())}componentDidUpdate(g){var c,b;if(this.props.model!==g.model){this.disposables.dispose();const{model:y}=this.props;(b=(c=this.listRef)===null||c===void 0?void 0:c.current)===null||b===void 0||b.scrollTo(y.state.scrollOffset),this.disposables.push(y.onChange(this.batchUpdate.bind(this))),this.disposables.push(y.state.onDidLoadState(()=>{var S,A;(A=(S=this.listRef)===null||S===void 0?void 0:S.current)===null||A===void 0||A.scrollTo(y.state.scrollOffset)})),this.onDidModelChangeEmitter.fire({preModel:g.model,nextModel:y})}}async promptNew(g,c=a.TreeNodeType.TreeNode){var b,y;const{root:S}=this.props.model;let A=typeof g=="string"?await S.getTreeNodeByPath(g):g;if(c!==a.TreeNodeType.TreeNode&&c!==a.TreeNodeType.CompositeTreeNode)throw new TypeError(`Invalid type supplied. Expected 'TreeNodeType.TreeNode' or 'TreeNodeType.CompositeTreeNode', got ${c}`);if(A&&!s.CompositeTreeNode.is(A)&&(A=A.parent,!s.CompositeTreeNode.is(A)))throw new TypeError(`Cannot create new prompt at object of type ${typeof A}`);if(!A)throw new Error(`Cannot find node at ${g}`);const w=new _.NewPromptHandle(c,A);return this.promptHandle=w,this.promptTargetID=A.id,A!==S&&(!A.expanded||!S.isItemVisibleAtSurface(A))?await A.setExpanded(!0):await this.batchUpdate(),this.newPromptInsertionIndex>=0?(y=(b=this.listRef)===null||b===void 0?void 0:b.current)===null||y===void 0||y.scrollToItem(this.newPromptInsertionIndex):this.tryScrollIntoViewWhileStable(this.promptHandle),this.promptHandle}tryScrollIntoView(g,c="auto"){var b,y,S,A;const{root:w}=this.props.model;g.constructor===_.NewPromptHandle&&!g.destroyed?(y=(b=this.listRef)===null||b===void 0?void 0:b.current)===null||y===void 0||y.scrollToItem(this.newPromptInsertionIndex):w.isItemVisibleAtSurface(g)&&((A=(S=this.listRef)===null||S===void 0?void 0:S.current)===null||A===void 0||A.scrollToItem(w.getIndexAtTreeNode(g),c))}tryScrollIntoViewWhileStable(g,c="smart"){const{root:b}=this.props.model;if(this.tryEnsureVisibleTimes>d.TRY_ENSURE_VISIBLE_MAX_TIMES){this.tryEnsureVisibleTimes=0;return}p.Event.once(this.props.model.onChange)(async()=>{var y,S,A,w;await this.queueUpdatePromise,g.constructor===_.NewPromptHandle&&!g.destroyed?(S=(y=this.listRef)===null||y===void 0?void 0:y.current)===null||S===void 0||S.scrollToItem(this.newPromptInsertionIndex):b.isItemVisibleAtSurface(g)?((w=(A=this.listRef)===null||A===void 0?void 0:A.current)===null||w===void 0||w.scrollToItem(b.getIndexAtTreeNode(g),c),this.tryEnsureVisibleTimes=0):(this.tryEnsureVisibleTimes++,this.tryScrollIntoViewWhileStable(g,c))})}componentDidMount(){var g,c;const{model:b,onReady:y}=this.props;if((c=(g=this.listRef)===null||g===void 0?void 0:g.current)===null||c===void 0||c.scrollTo(b.state.scrollOffset),this.disposables.push(b.onChange(this.batchUpdate.bind(this))),this.disposables.push(b.state.onDidLoadState(()=>{var S,A;(A=(S=this.listRef)===null||S===void 0?void 0:S.current)===null||A===void 0||A.scrollTo(b.state.scrollOffset)})),typeof y=="function"){const S={promptNewTreeNode:this.promptNewTreeNode,promptNewCompositeTreeNode:this.promptNewCompositeTreeNode,promptRename:this.promptRename,expandNode:this.expandNode,collapseNode:this.collapseNode,ensureVisible:this.ensureVisible,getModel:()=>this.props.model,layoutItem:this.layoutItem,getCurrentSize:()=>({width:this.props.width,height:this.props.height}),onDidChangeModel:this.onDidModelChangeEmitter.event,onDidUpdate:this.onDidUpdateEmitter.event,onOnceDidUpdate:p.Event.once(this.onDidUpdateEmitter.event),onError:this.onErrorEmitter.event};y(S)}}componentWillUnmount(){this.disposables.dispose()}set promptHandle(g){this._promptHandle!==g&&(this._promptHandle instanceof m.PromptHandle&&!this._promptHandle.destroyed&&this._promptHandle.destroy(),g.onDestroy(this.batchUpdate),this._promptHandle=g)}get promptHandle(){return this._promptHandle}get adjustedRowCount(){const{root:g}=this.props.model,{filter:c}=this.props;return c?this.filterFlattenBranch.length:this.newPromptInsertionIndex>-1&&this.promptHandle&&this.promptHandle.constructor===_.NewPromptHandle&&!this.promptHandle.destroyed?g.branchSize+1:g.branchSize}getItemSize(g){return this.dynamicSizeMap.get(g)||this.props.itemHeight}render(){const{children:g,itemHeight:c,width:b="100%",height:y,style:S,className:A,placeholder:w,overScanCount:T,leaveBottomBlank:D,supportDynamicHeights:I}=this.props;if(w&&this.adjustedRowCount===0){const M=w;return o.default.createElement(M,null)}const R={children:g,height:y,width:b,itemData:[],itemCount:this.adjustedRowCount,itemKey:this.getItemKey,overscanCount:T||d.DEFAULT_OVER_SCAN_COUNT,onScroll:this.handleListScroll,style:{transform:"translate3d(0px, 0px, 0px)",...S},className:A,outerElementType:v.ScrollbarsVirtualList};return D&&(R.innerElementType=u),I?o.default.createElement(l.VariableSizeList,{ref:this.listRef,itemSize:this.getItemSize.bind(this),...R},this.renderItem):o.default.createElement(l.FixedSizeList,{ref:this.listRef,itemSize:c,...R},this.renderItem)}}t.RecycleTree=d,d.PADDING_BOTTOM_SIZE=22,d.DEFAULT_ITEM_HEIGHT=22,d.TRY_ENSURE_VISIBLE_MAX_TIMES=5,d.FILTER_FUZZY_OPTIONS={pre:"<match>",post:"</match>",extract:E=>E?.name||""},d.DEFAULT_OVER_SCAN_COUNT=50},13429:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NodeRendererWrap=void 0;const r=e(85608).__importDefault(e(14041));class o extends r.default.Component{render(){const{item:p,itemType:v,children:m,template:_,hasPrompt:s}=this.props;return r.default.createElement(m,{item:p,itemType:v,template:_,hasPrompt:s,key:p.id})}shouldComponentUpdate(p){return!0}}t.NodeRendererWrap=o},75821:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BasicRecycleTree=void 0;const n=e(85608),r=n.__importStar(e(14041)),o=n.__importDefault(e(26460)),l=e(58998),p=e(57621),v=e(64013),m=e(84225),_=e(17462),s=e(78569),f=e(45203);e(12794),e(34728),n.__exportStar(e(92532),t);const a=({width:h,height:u,itemHeight:d=22,itemClassname:E,indent:g,baseIndent:c,containerClassname:b,onClick:y,onContextMenu:S,onTwistierClick:A,onIconClick:w,onDbClick:T,resolveChildren:D,sortComparator:I,treeData:R,inlineMenus:M,inlineMenuActuator:O,onReady:P,contextMenus:k,contextMenuActuator:F,treeName:L,leaveBottomBlank:B=!0})=>{const[j,W]=(0,r.useState)({show:!1}),[U,X]=(0,r.useState)([]),[V,$]=(0,r.useState)(),Y=(0,r.useRef)(!1),z=(0,r.useRef)(),H=(0,r.useRef)(),K=(0,r.useRef)(null),Z=(0,r.useCallback)(Ae=>{var ve;return r.default.createElement(_.BasicTreeNodeRenderer,{item:Ae.item,itemType:Ae.itemType,itemHeight:d,indent:g,baseIndent:c,className:E,inlineMenus:M,inlineMenuActuator:O,onClick:he,onDbClick:q,onContextMenu:Oe,onTwistierClick:ie,onIconClick:_e,decorations:(ve=z.current)===null||ve===void 0?void 0:ve.decorations.getDecorations(Ae.item)})},[V]);(0,r.useEffect)(()=>{var Ae,ve;z.current=new f.BasicTreeService(R,D,I,{treeName:L});const ge=(Ae=z.current)===null||Ae===void 0?void 0:Ae.onDidUpdateTreeModel(Ie=>{Q(Ie)}),xe=()=>{var Ie;(Ie=z.current)===null||Ie===void 0||Ie.enactiveFocusedDecoration()};return(ve=K.current)===null||ve===void 0||ve.addEventListener("blur",xe,!0),()=>{var Ie,We;Y.current=!0,(Ie=K.current)===null||Ie===void 0||Ie.removeEventListener("blur",xe,!0),ge.dispose(),(We=z.current)===null||We===void 0||We.dispose()}},[]),(0,r.useEffect)(()=>{var Ae;(Ae=z.current)===null||Ae===void 0||Ae.updateTreeData(R)},[R]);const Q=async Ae=>{Ae&&await Ae.ensureReady,Y.current||$(Ae)},oe=async Ae=>{var ve;(ve=z.current)===null||ve===void 0||ve.activeFocusedDecoration(Ae),s.BasicCompositeTreeNode.is(Ae)&&ye(Ae)},ne=(0,r.useCallback)(Ae=>{P&&P({...Ae,selectItem:oe,focusItem:async ve=>{var ge;const xe=`/${L}/${ve}`;await V?.ensureReady;const Ie=await Ae.ensureVisible(xe,"auto",!0);Ie&&((ge=z.current)===null||ge===void 0||ge.activeFocusedDecoration(Ie))}}),H.current=Ae},[z.current]),he=(0,r.useCallback)((Ae,ve)=>{oe(ve),y&&y(Ae,ve)},[y]),_e=(0,r.useCallback)((Ae,ve)=>{w&&w(Ae,ve)},[w]),q=(0,r.useCallback)((Ae,ve)=>{T&&T(Ae,ve)},[T]),Oe=(0,r.useCallback)((Ae,ve)=>{var ge,xe;if(ve?(ge=z.current)===null||ge===void 0||ge.activeContextMenuDecoration(ve):(xe=z.current)===null||xe===void 0||xe.enactiveFocusedDecoration(),S)S(Ae,ve);else{let Ie=[];Array.isArray(k)?Ie=k:typeof k=="function"&&(Ie=k(ve));const We=new Set,pe={};for(const Fe of Ie)We.add(Fe.group||"-1"),pe[Fe.group||"-1"]||(pe[Fe.group||"-1"]=[]),pe[Fe.group||"-1"].push(Fe);const re=Array.from(We).sort((Fe,$e)=>Fe.localeCompare($e,"kn",{numeric:!0}));let le=[];for(const Fe of re)le=le.concat(pe[Fe].map($e=>({id:$e.id,label:$e.title,group:$e.group}))),le=le.concat([{id:`${Fe}_divider`,label:"",type:"divider"}]);le.pop(),JSON.stringify(le)!==JSON.stringify(U)&&X(le);const{x:Te,y:Se}=Ae.nativeEvent;W({show:!0,point:{pageX:Te,pageY:Se},activeNode:ve})}},[T]),ye=(0,r.useCallback)(Ae=>{var ve,ge;Ae.expanded?(ve=H.current)===null||ve===void 0||ve.collapseNode(Ae):(ge=H.current)===null||ge===void 0||ge.expandNode(Ae)},[]),ie=(0,r.useCallback)((Ae,ve)=>{s.BasicCompositeTreeNode.is(ve)&&ye(ve),A&&A(Ae,ve)},[A]),fe=(0,r.useCallback)(()=>{var Ae;(Ae=z.current)===null||Ae===void 0||Ae.enactiveFocusedDecoration()},[]),Me=(0,r.useCallback)((Ae,ve)=>{S&&S(Ae,ve)},[]),Le=(0,r.useCallback)(()=>{W({...j,show:!1})},[j]),Ce=(0,r.useCallback)(()=>k?r.default.createElement(o.default,{popupPlacement:"bottomLeft",popupVisible:j.show,action:["contextMenu"],popupAlign:{overflow:{adjustX:1,adjustY:1},offset:[window.scrollX,window.scrollY]},point:j.point||{},builtinPlacements:m.placements,popup:r.default.createElement(l.ClickOutside,{className:"basic_tree_menubars",mouseEvents:["click","contextmenu"],onOutsideClick:Le},U.map(({id:Ae,label:ve,type:ge})=>r.default.createElement(v.BasicMenuItem,{key:Ae,id:Ae,label:ve,type:ge,focusMode:j.show,onClick:xe=>{F&&F(j.activeNode,xe),W({show:!1})}}))),alignPoint:!0}):null,[U,F,j]);return r.default.createElement("div",{className:"basic_tree",tabIndex:-1,ref:K,onClick:fe,onContextMenu:Me},Ce(),V?r.default.createElement(p.RecycleTree,{height:u,width:h,itemHeight:d,model:V,onReady:ne,className:b,leaveBottomBlank:B},Z):null)};t.BasicRecycleTree=a},64013:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BasicMenuItem=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importDefault(e(14041)),l=({id:p,label:v,type:m,focusMode:_,onClick:s})=>{const[f,a]=o.default.useState(!1),h=o.default.useCallback(()=>{a(_?!0:d=>!d),s(p)},[p]),u=o.default.useCallback(()=>{},[p,_]);return m==="divider"?o.default.createElement("div",{className:"basic_menu_item_divider"}):o.default.createElement("div",{className:(0,r.default)("basic_menu_item",{"menu-open":f}),onMouseOver:u,onClick:h},v)};t.BasicMenuItem=l},84225:(x,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.placements=void 0;const e={adjustX:1,adjustY:1},n=[0,0];t.placements={bottomLeft:{points:["tl","bl"],overflow:e,offset:[0,4],targetOffset:n}}},78569:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BasicTreeNode=t.BasicCompositeTreeNode=t.BasicTreeRoot=void 0;const n=e(43685);class r extends n.CompositeTreeNode{constructor(v,m,_,s={}){super(v,m,void 0,{treeName:s.treeName}),this._raw=_}get name(){var v;return(v=this.getMetadata("treeName"))!==null&&v!==void 0?v:`BasicTreeRoot_${this.id}`}get raw(){return this._raw}get expanded(){return!0}}t.BasicTreeRoot=r;class o extends n.CompositeTreeNode{constructor(v,m,_,s){super(v,m,void 0,{name:_.label}),this.isExpanded=_.expanded||!1,this.id=s||this.id,this._displayName=_.label,this._raw=_}get displayName(){return this._displayName}get renderLabel(){return this.raw.renderLabel}get icon(){return this.raw.icon}get iconClassName(){return this.raw.iconClassName}get className(){return this.raw.className}get twisterClassName(){return this.raw.twisterClassName}get twisterPlaceholderClassName(){return this.raw.twisterPlaceholderClassName}get indentOffset(){return this.raw.indentOffset}get description(){return this.raw.description}get raw(){return this._raw}get expandable(){return!!this._raw.expandable}}t.BasicCompositeTreeNode=o;class l extends n.TreeNode{constructor(v,m,_,s){super(v,m,void 0,{name:_.label}),this.id=s||this.id,this._displayName=_.label,this._raw=_}get displayName(){return this._displayName}get renderLabel(){return this.raw.renderLabel}get description(){return this.raw.description}get icon(){return this.raw.icon}get iconClassName(){return this.raw.iconClassName}get className(){return this.raw.className}get twisterClassName(){return this.raw.twisterClassName}get indentOffset(){return this.raw.indentOffset}get twisterPlaceholderClassName(){return this.raw.twisterPlaceholderClassName}get raw(){return this._raw}}t.BasicTreeNode=l},17462:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BasicTreeNodeRenderer=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importStar(e(14041)),l=e(48412),p=e(54713),v=e(3660),m=e(78569),_=e(92532);e(12794);const s=({item:f,className:a,itemHeight:h=22,indent:u=8,baseIndent:d=8,onClick:E,onDbClick:g,onTwistierClick:c,onIconClick:b,onContextMenu:y,decorations:S,inlineMenus:A=[],inlineMenuActuator:w=()=>{}})=>{const T=(0,o.useCallback)(Y=>{E&&(Y.stopPropagation(),E(Y,f))},[E]),D=(0,o.useCallback)(Y=>{g&&(Y.stopPropagation(),g(Y,f))},[g]),I=(0,o.useCallback)(Y=>{y&&(Y.stopPropagation(),Y.preventDefault(),y(Y,f))},[y]),R=(0,o.useCallback)(Y=>{Y.stopPropagation(),c?c(Y,f):E&&E(Y,f)},[E,c]),M=(0,o.useCallback)(Y=>{Y.stopPropagation(),b?b(Y,f):E&&E(Y,f)},[E,b]);let P=(f.depth>0?f.depth-1:0)*u;d&&(P+=d),f.indentOffset&&(P+=f.indentOffset);const k={height:h,lineHeight:`${h}px`,paddingLeft:`${P}px`},F=(0,o.useCallback)(Y=>o.default.createElement(p.Icon,{onClick:M,icon:Y.icon,className:(0,r.default)("icon",Y.iconClassName)}),[]),L=(0,o.useCallback)(Y=>Y.displayName.replace(/\n/g,"\u21B5"),[]),B=(0,o.useCallback)(Y=>Y.displayName&&o.default.createElement("div",{className:(0,r.default)("segment","display_name")},L(Y)),[]),j=(0,o.useCallback)(Y=>Y.renderLabel,[]),W=(0,o.useCallback)(Y=>Y.description?typeof Y.description=="string"?o.default.createElement("div",{className:(0,r.default)("segment_grow","description")},Y.description):Y.description:null,[]),U=(0,o.useCallback)(Y=>{if(Array.isArray(A))return A;if(typeof A=="function")return A(Y)},[A]),X=()=>{var Y;const z=m.BasicCompositeTreeNode.is(f),H=(Y=U(f))===null||Y===void 0?void 0:Y.filter(Z=>z?Z.position===_.IBasicInlineMenuPosition.TREE_CONTAINER:Z.position===_.IBasicInlineMenuPosition.TREE_NODE);if(!H?.length)return null;const K=(0,o.useCallback)((Z,Q)=>{Z.stopPropagation(),w(f,Q)},[]);return o.default.createElement("div",{className:(0,r.default)("segment","tail")},H.map(Z=>o.default.createElement(l.Button,{style:{marginRight:"5px"},type:"icon",key:`${f.id}-${Z.icon}`,icon:Z.icon,title:Z.title,onClick:Q=>K(Q,Z)})))},V=(Y,z)=>S&&S?.classlist.indexOf(_.DECORATIONS.LOADING)>-1?o.default.createElement(v.Loading,null):o.default.createElement(p.Icon,{className:(0,r.default)("segment","expansion_toggle",Y.twisterClassName,{mod_collapsed:!Y.expanded}),onClick:z,icon:"arrow-right"}),$=Y=>{if(!Y.expandable)return o.default.createElement("div",{className:(0,r.default)("segment","expansion_toggle",Y.twisterPlaceholderClassName)});if(m.BasicCompositeTreeNode.is(Y))return V(Y,R)};return o.default.createElement("div",{key:f.id,onClick:T,onDoubleClick:D,onContextMenu:I,className:(0,r.default)("tree_node",a,S?S.classlist:null,f.className),style:k,"data-id":f.id},o.default.createElement("div",{className:"content"},$(f),F(f),o.default.createElement("div",{className:"overflow_wrap"},j(f)||B(f),W(f)),X()))};t.BasicTreeNodeRenderer=s},45203:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BasicTreeModel=t.BasicTreeService=void 0;const n=e(70392),r=e(43685),o=e(34054),l=e(78569),p=e(92532);class v extends r.Tree{constructor(s,f,a,h={}){super(),this._treeData=s,this._resolveChildren=f,this._sortComparator=a,this.treeOptions=h,this.selectedDecoration=new r.Decoration(p.DECORATIONS.SELECTED),this.focusedDecoration=new r.Decoration(p.DECORATIONS.FOCUSED),this.contextMenuDecoration=new r.Decoration(p.DECORATIONS.ACTIVED),this.loadingDecoration=new r.Decoration(p.DECORATIONS.LOADING),this._selectedNodes=[],this.disposableCollection=new n.DisposableCollection,this.decorationDisposableCollection=new n.DisposableCollection,this.onDidUpdateTreeModelEmitter=new n.Emitter,this.sortComparator=(u,d)=>{if(this._sortComparator){const E=this._sortComparator(u.raw,d.raw);if(typeof E<"u")return E}return super.sortComparator(u,d)},this.activeFocusedDecoration=u=>{var d;this._contextMenuNode&&(this.clearDecoration(this.contextMenuDecoration),this.clearDecoration(this.focusedDecoration),this.clearDecoration(this.selectedDecoration),this._contextMenuNode=void 0),u&&(this.selectedNodes.length>0&&this.clearDecoration(this.selectedDecoration),this.focusedNode&&(this.clearDecoration(this.focusedDecoration),this._focusedNode=void 0),this.selectedDecoration.addTarget(u),this.focusedDecoration.addTarget(u),this._focusedNode=u,this._selectedNodes=[u],(d=this.model)===null||d===void 0||d.dispatchChange())},this.activeContextMenuDecoration=u=>{var d;this._contextMenuNode&&(this.clearDecoration(this.contextMenuDecoration),this._contextMenuNode=void 0),this.focusedNode&&(this.clearDecoration(this.focusedDecoration),this._focusedNode=void 0),this.contextMenuDecoration.addTarget(u),this._contextMenuNode=u,(d=this.model)===null||d===void 0||d.dispatchChange()},this.enactiveFocusedDecoration=()=>{var u;this.focusedNode&&(this.clearDecoration(this.focusedDecoration),this._focusedNode=void 0,(u=this.model)===null||u===void 0||u.dispatchChange())},this.disposableCollection.push(this.onDidUpdateTreeModelEmitter)}setUpTreeModel(){this._root=new l.BasicTreeRoot(this,void 0,{children:this._treeData,label:"",command:"",icon:""},{treeName:this.treeOptions.treeName}),this._model=new m,this._model.init(this._root),this.initDecorations(this._root),this.onDidUpdateTreeModelEmitter.fire(this._model)}resetState(){this._selectedNodes=[],this._contextMenuNode=void 0,this._focusedNode=void 0}get onDidUpdateTreeModel(){return this.onDidUpdateTreeModelEmitter.event}get model(){return this._model}get root(){return this._root}get decorations(){return this._decorations}initDecorations(s){this.decorationDisposableCollection.dispose(),this._decorations=new r.DecorationsManager(s),this._decorations.addDecoration(this.selectedDecoration),this._decorations.addDecoration(this.focusedDecoration),this._decorations.addDecoration(this.contextMenuDecoration),this._decorations.addDecoration(this.loadingDecoration),this.decorationDisposableCollection.push(s.watcher.on(o.TreeNodeEvent.WillResolveChildren,f=>{this.loadingDecoration.addTarget(f)})),this.decorationDisposableCollection.push(s.watcher.on(o.TreeNodeEvent.DidResolveChildren,f=>{this.loadingDecoration.removeTarget(f)})),this.decorationDisposableCollection.push(this._decorations)}updateTreeData(s){this._treeData=s,this.resetState(),this.setUpTreeModel()}async resolveChildren(s){return this._resolveChildren?this.transformTreeNode(s,this._resolveChildren(s?.raw)||[]):this.transformTreeNode(s,s?.raw.children||[])}transformTreeNode(s,f){if(!f)return[];const a=[];for(const h of f)h.children?a.push(new l.BasicCompositeTreeNode(this,s,h)):a.push(new l.BasicTreeNode(this,s,h));return a}get selectedNodes(){return this._selectedNodes}get focusedNode(){return this._focusedNode}get contextMenuNode(){return this._contextMenuNode}clearDecoration(s){for(const f of s.appliedTargets.keys())s.removeTarget(f)}dispose(){super.dispose(),this.disposableCollection.dispose(),this.decorationDisposableCollection.dispose()}}t.BasicTreeService=v;class m extends r.TreeModel{}t.BasicTreeModel=m},92532:(x,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DECORATIONS=t.IBasicInlineMenuPosition=void 0;var e;(function(n){n[n.TREE_NODE=1]="TREE_NODE",n[n.TREE_CONTAINER=2]="TREE_CONTAINER"})(e||(t.IBasicInlineMenuPosition=e={})),t.DECORATIONS={SELECTED:"mod_selected",FOCUSED:"mod_focused",ACTIVED:"mod_actived",LOADING:"mod_loading"}},24786:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RecycleTreeAdaptiveDecorator=void 0;const r=e(85608).__importDefault(e(14041)),o=e(34054),l=p=>v=>{const{model:m,itemHeight:_,onReady:s}=v,f=r.default.useRef(),a=r.default.useRef(!1),[h,u]=r.default.useState(0),d=()=>{u(m.root.branchSize*_)},E=g=>{s&&s({...g,promptNewTreeNode:async c=>{var b;const y=await g.promptNewTreeNode(c);return!((b=f.current)===null||b===void 0)&&b.root.branchSize?u(f.current.root.branchSize*_+_):u(_),a.current=!1,y.onDestroy(()=>{var S;!((S=f.current)===null||S===void 0)&&S.root.branchSize&&u(f.current.root.branchSize*_)}),y.onCancel(()=>{f.current&&u(f.current.root.branchSize*_)}),y.onBlur(()=>a.current),y},promptNewCompositeTreeNode:async c=>{var b;const y=await g.promptNewCompositeTreeNode(c);return!((b=f.current)===null||b===void 0)&&b.root.branchSize?u(f.current.root.branchSize*_+_):u(_),y.onDestroy(()=>{var S;!((S=f.current)===null||S===void 0)&&S.root.branchSize&&u(f.current.root.branchSize*_)}),y.onCancel(()=>{var S;!((S=f.current)===null||S===void 0)&&S.root.branchSize&&u(f.current.root.branchSize*_)}),y.onBlur(()=>a.current),y}})};return r.default.useEffect(()=>{f.current=m,f.current.root&&(u(f.current.root.branchSize*_),f.current.root.watcher.on(o.TreeNodeEvent.DidChangeExpansionState,d))},[m]),r.default.useEffect(()=>{setTimeout(()=>{a.current=!0},100)},[h]),r.default.createElement(r.default.Fragment,null,r.default.createElement(p,{...v,height:h,onReady:E}))};t.RecycleTreeAdaptiveDecorator=l},326:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RecycleTreeFilterDecorator=void 0;const n=e(85608),r=n.__importDefault(e(97331)),o=n.__importStar(e(14041)),l=e(54713),p=e(50708),v=e(4981);e(69715);const m=30,_=500,s=a=>{const{localize:h}=o.default.useContext(v.LocalizeContext);return o.default.createElement("div",{className:"kt-recycle-tree-filter-wrapper"},o.default.createElement(p.Input,{hasClear:!0,autoFocus:!0,className:"kt-recycle-tree-filter-input",size:"small",...a,placeholder:a.placeholder||h("tree.filter.placeholder"),addonBefore:o.default.createElement(l.Icon,{className:"kt-recycle-tree-filter-icon",icon:"retrieval"})}))},f=a=>h=>{const[u,d]=o.default.useState(""),[E,g]=o.default.useState(""),{beforeFilterValueChange:c,filterEnabled:b,height:y,filterPlaceholder:S,filterAfterClear:A,onReady:w,onFilterBlur:T,filterAutoFocus:D,...I}=h,R=(0,r.default)(async P=>{c&&await c(P),g(P)},_),M=(0,o.useCallback)(P=>{d(P),R(P)},[u]),O=(0,o.useCallback)(P=>{w&&w({...P,clearFilter:()=>{g(""),d("")}})},[w]);return o.default.createElement(o.default.Fragment,null,b&&o.default.createElement(s,{afterClear:A,placeholder:S,value:u,autoFocus:D,onBlur:T,onValueChange:M}),o.default.createElement(a,{...I,height:y-(b?m:0),onReady:O,filter:E}))};t.RecycleTreeFilterDecorator=f},72731:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(85608);n.__exportStar(e(326),t),n.__exportStar(e(24786),t)},91416:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(85608);n.__exportStar(e(57621),t),n.__exportStar(e(13429),t),n.__exportStar(e(48103),t),n.__exportStar(e(43685),t),n.__exportStar(e(34054),t),n.__exportStar(e(72731),t),n.__exportStar(e(75821),t)},65601:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NewPromptHandle=void 0;const n=e(43685),r=e(65747);class o extends r.PromptHandle{constructor(p,v){super(),this.type=p,this.parent=v,this._id=n.TreeNode.nextId()}get id(){return this._id}get depth(){return this.parent.depth+1}}t.NewPromptHandle=o},65747:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PromptHandle=t.VALIDATE_CLASS_NAME=t.PROMPT_VALIDATE_TYPE=void 0;const n=e(70392),r=e(50708),o=e(84605),l=_=>new Promise(s=>setTimeout(s,_));var p;(function(_){_[_.INFO=1]="INFO",_[_.ERROR=2]="ERROR",_[_.WARNING=3]="WARNING"})(p||(t.PROMPT_VALIDATE_TYPE=p={}));var v;(function(_){_.INFO="validate-info",_.ERROR="validate-error",_.WARNING="validate-warning"})(v||(t.VALIDATE_CLASS_NAME=v={}));class m{constructor(){this.disposables=new n.DisposableCollection,this.isInPendingCommitState=!1,this._destroyed=!1,this._hasValidateElement=!1,this._hasAddonAfter=!1,this._inComposition=!1,this.onChangeEmitter=new n.Emitter,this.onCommitEmitter=new n.Emitter,this.onCancelEmitter=new n.Emitter,this.onFocusEmitter=new n.Emitter,this.onBlurEmitter=new n.Emitter,this.onDestroyEmitter=new n.Emitter,this.markdownRenderer=(0,o.createMarkedRenderer)(),this.handleClick=s=>{s.stopPropagation()},this.handleDBClick=s=>{s.stopPropagation()},this.handleCompositionstart=()=>{this._inComposition=!0},this.handleCompositionend=()=>{this._inComposition=!1},this.handleKeyup=()=>{this._inComposition||this.onChangeEmitter.fire(this.$.value)},this.handleKeydown=async s=>{if(!this._inComposition){if(s.key==="Escape"){if((await this.onCancelEmitter.fireAndAwait(this.$.value)).some(a=>a.result===!1||!!a.err))return;this.destroy()}if(s.key==="Enter"){if(this.isInPendingCommitState=!0,this.$.disabled=!0,(await this.onCommitEmitter.fireAndAwait(this.$.value)).some(a=>a.result===!1||!!a.err)){this.isInPendingCommitState=!1,this.$.disabled=!1,this.$.focus();return}this.isInPendingCommitState=!1,this.$.disabled=!1,this.destroy()}}},this.handleFocus=()=>{this.onFocusEmitter.fire(this.$.value)},this.handleBlur=async s=>{await l(0),!(!this.$.isConnected&&!this.destroyed||(await this.onBlurEmitter.fireAndAwait(this.$.value)).some(a=>a.result===!1||!!a.err))&&(this.isInPendingCommitState||this.destroy())},this.$=document.createElement("input"),this.$.setAttribute("type","text"),this.$.setAttribute("name","no_keybinding"),this.$.setAttribute("spellcheck","false"),this.$.setAttribute("autoCapitalize","off"),this.$.setAttribute("autoCorrect","off"),this.$.setAttribute("autoComplete","off"),this.ProxiedInput=(0,r.bindInputElement)(this.$),this.$.addEventListener("click",this.handleClick),this.$.addEventListener("dblclick",this.handleDBClick),this.$.addEventListener("keyup",this.handleKeyup),this.$.addEventListener("keydown",this.handleKeydown),this.$.addEventListener("focus",this.handleFocus),this.$.addEventListener("blur",this.handleBlur),this.$.addEventListener("compositionstart",this.handleCompositionstart),this.$.addEventListener("compositionend",this.handleCompositionend),this.$validate=document.createElement("div"),this.$validate.setAttribute("style","top: 100%;"),this.$addonAfter=document.createElement("div"),this.$addonAfter.setAttribute("class","kt-input-addon-after")}get destroyed(){return this._destroyed}get onChange(){return this.onChangeEmitter.event}get onCommit(){return this.onCommitEmitter.event}get onCancel(){return this.onCancelEmitter.event}get onFocus(){return this.onFocusEmitter.event}get onBlur(){return this.onBlurEmitter.event}get onDestroy(){return this.onDestroyEmitter.event}focus(){this.$.focus()}setSelectionRange(s,f){this.$.setSelectionRange(s,f)}addClassName(s){this.$.classList.add(s)}removeClassName(s){this.$.classList.remove(s)}addAddonAfter(s){var f,a;!this._hasAddonAfter&&!this._destroyed&&((a=(f=this.$.parentElement)===null||f===void 0?void 0:f.parentElement)===null||a===void 0||a.appendChild(this.$addonAfter),this._hasAddonAfter=!0);const h=document.createElement("div");h.setAttribute("class",s),this.$addonAfter.appendChild(h)}removeAddonAfter(){var s,f,a;this._hasAddonAfter&&((s=this.$addonAfter.firstChild)===null||s===void 0||s.remove(),(a=(f=this.$.parentElement)===null||f===void 0?void 0:f.parentElement)===null||a===void 0||a.removeChild(this.$addonAfter),this._hasAddonAfter=!1)}addValidateMessage(s){var f,a,h,u,d,E,g;!this._hasValidateElement&&!this._destroyed&&((h=(a=(f=this.$.parentElement)===null||f===void 0?void 0:f.parentElement)===null||a===void 0?void 0:a.parentElement)===null||h===void 0||h.appendChild(this.$validate),this._hasValidateElement=!0);let c="validate-message popup ";s&&s.type===p.ERROR?this._validateClassName=v.ERROR:s&&s.type===p.WARNING?this._validateClassName=v.WARNING:this._validateClassName=v.INFO,c+=this._validateClassName,this.$validate.classList.value=c,this.$validate.innerHTML=(0,o.toMarkdownHtml)(s.message||"",{renderer:this.markdownRenderer}),(d=(u=this.$.parentElement)===null||u===void 0?void 0:u.parentElement)===null||d===void 0||d.classList.remove(v.INFO,v.ERROR,v.WARNING),(g=(E=this.$.parentElement)===null||E===void 0?void 0:E.parentElement)===null||g===void 0||g.classList.add(this._validateClassName)}removeValidateMessage(){var s,f,a,h,u;this._hasValidateElement&&((a=(f=(s=this.$.parentElement)===null||s===void 0?void 0:s.parentElement)===null||f===void 0?void 0:f.parentElement)===null||a===void 0||a.removeChild(this.$validate),this._hasValidateElement=!1,(u=(h=this.$.parentElement)===null||h===void 0?void 0:h.parentElement)===null||u===void 0||u.classList.remove(this._validateClassName))}destroy(){if(this._destroyed)return;const s=this.focusPrevActiveElement();this._destroyed=!0,this.$.removeEventListener("click",this.handleClick),this.$.removeEventListener("keyup",this.handleKeyup),this.$.removeEventListener("keydown",this.handleKeydown),this.$.removeEventListener("focus",this.handleFocus),this.$.removeEventListener("blur",this.handleBlur),this.removeValidateMessage(),this.removeAddonAfter(),this.$.disabled=!1,this.onDestroyEmitter.fire(this.$.value),this.disposables.dispose(),requestAnimationFrame(()=>{s?.focus()})}focusPrevActiveElement(){let s=this.$.parentElement;for(;s&&!(typeof s.attributes.tabindex<"u");)s=s?.parentElement;return s}}t.PromptHandle=m},58357:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RenamePromptHandle=void 0;const n=e(65747);class r extends n.PromptHandle{constructor(l,p){super(),this.originalFileName=l,this.target=p,this.$.value=l,this.setSelectionRange(0,l.lastIndexOf("."))}get id(){return this.target.id}get depth(){return this.target.depth}}t.RenamePromptHandle=r},48103:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(85608);n.__exportStar(e(65747),t),n.__exportStar(e(58357),t),n.__exportStar(e(65601),t)},29805:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Tree=void 0;const n=e(70392),r=e(26353);class o{constructor(){this.onChangedEmitter=new n.Emitter,this.toDispose=new n.DisposableCollection,this.nodes={}}dispose(){var p;this.toDispose.dispose(),(p=this._root)===null||p===void 0||p.dispose()}get root(){return this._root}set root(p){var v;p!==this._root&&((v=this._root)===null||v===void 0||v.dispose(),this._root=p)}fireChanged(){this.onChangedEmitter.fire(void 0)}sortComparator(p,v){return p.constructor===v.constructor?p.name>v.name?1:p.name<v.name?-1:0:r.CompositeTreeNode.is(p)?-1:r.CompositeTreeNode.is(v)?1:0}}t.Tree=o},26353:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CompositeTreeNode=t.TreeNode=t.BranchOperatorStatus=void 0,t.spliceArray=l;const n=e(70392),r=e(34054),{Path:o}=n.path;function l(_,s,f=0,a){if(f===0&&(!a||a.length===0))return _;const h=_.slice(0,s),u=_.slice(s+f);return h.concat(a||[]).concat(u)}var p;(function(_){_[_.EXPANDED=1]="EXPANDED",_[_.SHRINKED=2]="SHRINKED"})(p||(t.BranchOperatorStatus=p={}));class v{static is(s){return!!s&&"depth"in s&&"name"in s&&"path"in s&&"id"in s}static getTreeNodeById(s){return v.idToTreeNode.get(s)}static getTreeNodeByPath(s){return v.pathToTreeNode.get(s)}static setTreeNode(s,f,a){v.idToTreeNode.set(s,a),v.pathToTreeNode.set(f,a)}static removeTreeNode(s,f){v.idToTreeNode.delete(s),v.pathToTreeNode.delete(f)}static getIdByPath(s){return v.pathToId.get(s)}static setIdByPath(s,f){return v.pathToId.set(s,f)}static getGlobalTreeState(s){let f=v.pathToGlobalTreeState.get(s);return f||(f={isExpanding:!1,isLoadingPath:!1,isRefreshing:!1,refreshCancelToken:new n.CancellationTokenSource,loadPathCancelToken:new n.CancellationTokenSource}),f}static setGlobalTreeState(s,f){let a=v.pathToGlobalTreeState.get(s);return a||(a={isExpanding:!1,isLoadingPath:!1,isRefreshing:!1,refreshCancelToken:new n.CancellationTokenSource,loadPathCancelToken:new n.CancellationTokenSource}),a={...a,...f},v.pathToGlobalTreeState.set(s,a),a}constructor(s,f,a,h){this._uid=v.nextId(),this._parent=f,this._tree=s,this._disposed=!1,this._visible=!0,this._metadata={...h||{}},this._depth=f?f.depth+1:0,a?this._watcher=a:f&&(this._watcher=f.watcher)}get disposed(){return this._disposed}get depth(){return this._depth}get parent(){return this._parent}set parent(s){this._parent=s,this._path=""}get type(){return r.TreeNodeType.TreeNode}get id(){return this._uid}set id(s){this._uid=s}get displayName(){return this.name}get name(){return this.parent?this.getMetadata("name")||String(this.id):`root_${this.id}`}set name(s){this.addMetadata("name",s),this._path=""}get path(){return this._path||(this.parent?this._path=this.name.startsWith(o.separator)?`${this.parent.path}${this.name}`:`${this.parent.path}${o.separator}${this.name}`:this._path=this.name.startsWith(o.separator)?this.name:`${o.separator}${this.name}`),this._path}get checkboxInfo(){return{checked:!1,tooltip:"",accessibilityInformation:this.accessibilityInformation}}get accessibilityInformation(){return{label:this.name,role:"treeitem"}}getMetadata(s){return s==="name"&&!this._metadata[s]&&(this._metadata[s]=String(v.nextId())),this._metadata[s]}addMetadata(s,f){if(!(s in this._metadata))this._metadata[s]=f,this._watcher.notifyDidChangeMetadata(this,{type:r.MetadataChangeType.Added,key:s,prevValue:void 0,value:f});else{const a=this._metadata[s];this._metadata[s]=f,this._watcher.notifyDidChangeMetadata(this,{type:r.MetadataChangeType.Updated,key:s,prevValue:a,value:f})}}removeMetadata(s){if(s in this._metadata){const f=this._metadata[s];delete this._metadata[s],this._watcher.notifyDidChangeMetadata(this,{type:r.MetadataChangeType.Removed,key:s,prevValue:f,value:void 0})}}mv(s,f=this.name){const a=this._parent;if(s===null||!m.is(s)){this.parent=void 0,this.dispose();return}const h=a!==s,u=this.path;this._depth=s.depth+1,(h||f!==this.name)&&(this.name=f,h&&this._watcher.notifyWillChangeParent(this,a,s),this.parent&&(this.parent.unlinkItem(this,!0),this.parent=s,this.parent.insertItem(this)),h&&this._watcher.notifyDidChangeParent(this,a,s)),this.path!==u&&this._watcher.notifyDidChangePath(this)}get visible(){return this._visible}setVisible(s){return this._visible=s,this}dispose(){this._disposed||(v.removeTreeNode(this.id,this.path),this._disposed=!0,this._watcher.notifyDidDispose(this))}}t.TreeNode=v,v.nextId=(()=>{let _=0;return()=>_++})(),v.idToTreeNode=new Map,v.pathToTreeNode=new Map,v.pathToId=new Map,v.pathToGlobalTreeState=new Map;class m extends v{static defaultSortComparator(s,f){return s.constructor===f.constructor?s.name>f.name?1:s.name<f.name?-1:0:m.is(s)?-1:m.is(f)?1:0}static is(s){return!!s&&"children"in s}static isRoot(s){return m.is(s)&&!s.parent}generatorWatcher(){const s=new n.Emitter,f=s.event,a=new n.DisposableCollection,h=d=>{this.watchEvents.delete(d)};return{notifyWillProcessWatchEvent:(d,E)=>{s.fire({type:r.TreeNodeEvent.WillProcessWatchEvent,args:[d,E]})},notifyWillChangeParent:(d,E,g)=>{s.fire({type:r.TreeNodeEvent.WillChangeParent,args:[d,E,g]})},notifyDidChangeParent:(d,E,g)=>{s.fire({type:r.TreeNodeEvent.DidChangeParent,args:[d,E,g]})},notifyDidDispose:d=>{s.fire({type:r.TreeNodeEvent.DidDispose,args:[d]})},notifyDidProcessWatchEvent:(d,E)=>{s.fire({type:r.TreeNodeEvent.DidProcessWatchEvent,args:[d,E]})},notifyDidChangePath:d=>{s.fire({type:r.TreeNodeEvent.DidChangePath,args:[d]})},notifyWillChangeExpansionState:(d,E)=>{const g=this.isItemVisibleAtSurface(d);s.fire({type:r.TreeNodeEvent.WillChangeExpansionState,args:[d,E,g]})},notifyDidChangeExpansionState:(d,E)=>{const g=this.isItemVisibleAtSurface(d);s.fire({type:r.TreeNodeEvent.DidChangeExpansionState,args:[d,E,g]})},notifyDidChangeMetadata:(d,E)=>{s.fire({type:r.TreeNodeEvent.DidChangeMetadata,args:[d,E]})},notifyDidUpdateBranch:()=>{s.fire({type:r.TreeNodeEvent.BranchDidUpdate,args:[]})},notifyWillResolveChildren:(d,E)=>{s.fire({type:r.TreeNodeEvent.WillResolveChildren,args:[d,E]})},notifyDidResolveChildren:(d,E)=>{s.fire({type:r.TreeNodeEvent.DidResolveChildren,args:[d,E]})},on:(d,E)=>{const g=f(c=>{c.type===d&&E(...c.args)});return a.push(g),g},onWatchEvent:(d,E)=>{const g=h;return this.watchEvents.set(d,{terminator:g,callback:E}),g},dispose:a}}constructor(s,f,a,h){super(s,f,a,h),this._children=null,this._lock=!1,this.refreshThrottler=new n.ThrottledDelayer(m.REFRESH_DELAY),this.toRefreshPathQueue=new Set,this.handleWatchEvent=async u=>{switch(this.watcher.notifyWillProcessWatchEvent(this,u),u.type){case r.WatchEvent.Moved:{const{oldPath:d,newPath:E}=u;if(typeof d!="string")throw new TypeError("Expected oldPath to be a string");if(typeof E!="string")throw new TypeError("Expected newPath to be a string");if(o.isRelative(d))throw new TypeError("oldPath must be absolute");if(o.isRelative(E))throw new TypeError("newPath must be absolute");this.transferItem(d,E);break}case r.WatchEvent.Added:{const{node:d}=u;if(!v.is(d))throw new TypeError("Expected node to be a TreeNode");this.insertItem(d);break}case r.WatchEvent.Removed:{const{path:d}=u,E=new o(d),g=E.dir.toString(),c=E.base.toString();if(g===this.path&&this.children){const b=this.children.find(y=>y.name===c);b&&this.unlinkItem(b)}break}default:this.isItemVisibleAtRootSurface(this)?await this.refresh():(this.isExpanded=!1,this._children=null);break}this.watcher.notifyDidProcessWatchEvent(this,u)},this.isExpanded=!f,this._branchSize=0,f?this._watcher=f.watcher:(this.watchEvents=new Map,this._watcher=this.generatorWatcher(),this._root=this,v.setTreeNode(this.id,this.path,this))}set name(s){const f=this.path;!m.isRoot(this)&&typeof this.watchTerminator=="function"?(this.watchTerminator(f),this.addMetadata("name",s),this.watchTerminator=this.watcher.onWatchEvent(this.path,this.handleWatchEvent)):this.addMetadata("name",s),this._path=""}get name(){return this.parent?this.getMetadata("name"):`root_${this.id}`}get watcher(){return this._watcher}get type(){return r.TreeNodeType.CompositeTreeNode}get children(){return this._children}get expanded(){return this.isExpanded}get branchSize(){return this._branchSize}get flattenedBranch(){return this._flattenedBranch}get lock(){return this._lock}get root(){return(0,n.isUndefined)(this._root)&&(this._root=this.getRoot()||null),this._root}getRoot(){let s=this.parent;for(;s&&s.parent;)s=s.parent;return s}async ensureLoaded(s){if(!this._children)return await this.hardReloadChildren(s)}async setExpanded(s=!0,f=!1,a=!0,h){if(!this.disposed&&!m.isRoot(this)&&!this.isExpanded){if(a){const u=v.getGlobalTreeState(this.path);u.loadPathCancelToken.cancel(),u.refreshCancelToken.cancel(),v.setGlobalTreeState(this.path,{isExpanding:!0})}if(this.isExpanded=!0,this._children===null&&(this._watcher.notifyWillResolveChildren(this,this.isExpanded),await this.hardReloadChildren(h),this._watcher.notifyDidResolveChildren(this,this.isExpanded),!this.isExpanded||h?.isCancellationRequested)){a&&v.setGlobalTreeState(this.path,{isExpanding:!1});return}if(s&&this.parent&&m.is(this.parent)&&await this.parent.setExpanded(!0,!f,!1,h),h?.isCancellationRequested){a&&v.setGlobalTreeState(this.path,{isExpanding:!1});return}this.isExpanded&&(this._watcher.notifyWillChangeExpansionState(this,!0),this.expandBranch(this,f),this._watcher.notifyDidChangeExpansionState(this,!0)),a&&(v.setGlobalTreeState(this.path,{isExpanding:!1}),v.setTreeNode(this.id,this.path,this))}}getAllExpandedNodePath(){var s,f;const a=[];let h=0;m.isRoot(this)||(h=((s=this.root)===null||s===void 0?void 0:s.getIndexAtTreeNodeId(this.id))+1);const u=h+this.branchSize;for(let d=h;d<u;d++){const E=(f=this.root)===null||f===void 0?void 0:f.getTreeNodeAtIndex(d);m.is(E)&&E.expanded&&a.push(E.path)}return a}getAllCollapsedNodePath(){let s=[];if(this.children){for(let f=0;f<this.children.length;f++){const a=this.children[f];m.is(a)&&(a.isExpanded?s=s.concat(a.getAllCollapsedNodePath()):s.push(a.path))}return s}else return s}async resolveChildrens(s){var f,a,h;let u=this.children,d=[];try{u=await this._tree.resolveChildren(this)||[]}catch{u=[]}if(s?.isCancellationRequested)return!1;const E=new Array(u.length);this._children=Array(u.length);for(let c=0;c<u.length;c++){const b=u[c];b.id=v.getIdByPath(b.path)||b.id,this._children[c]=b,v.setIdByPath(b.path,b.id)}(f=this._children)===null||f===void 0||f.sort(this._tree.sortComparator||m.defaultSortComparator);for(let c=0;c<u.length;c++)E[c]=this._children[c].id;const g=[];for(let c=0,b=((a=this.children)===null||a===void 0?void 0:a.length)||0;c<b;c++){const y=(h=this.children)===null||h===void 0?void 0:h[c];if(m.is(y)&&y.expanded){const S=await y.resolveChildrens(s);if(S&&(d=d.concat(S)),s?.isCancellationRequested)return;g.push(y)}}this._branchSize=E.length,this.setFlattenedBranch(E);for(let c=0;c<g.length;c++){const b=g[c];b.expandBranch(b,!0)}return d.concat(g.map(c=>c.path.toString()))}updateTreeNodeCache(s){var f;if(v.setTreeNode(s.id,s.path,s),m.is(s)&&s.expanded&&(!((f=s.children)===null||f===void 0)&&f.length))for(let a=0;a<s.children.length;a++){const h=s.children[a];this.updateTreeNodeCache(h)}}async refreshTreeNodeByPaths(s=this.getAllExpandedNodePath(),f,a){if(!m.is(this))return;let h;const u=this.children;let d=this.children||[];if(this.expanded){if(this===a){try{d=await this._tree.resolveChildren(this)||[]}catch{d=[]}if(f?.isCancellationRequested)return;if(!this.expanded){if(this.children&&this.children&&this.parent){for(let E=0;E<this.children.length;E++)this.children[E].dispose();this._children=null}return}}for(;h=s.shift();){if(!(h.indexOf(`${this.path}${o.separator}`)>-1)){h===this.path&&(h=void 0);break}const g=d?.find(c=>c.path===h);if(g){if(m.is(g)&&!g.expanded){g.isExpanded=!0;const c=await g.resolveChildrens(f);if(f?.isCancellationRequested||(c&&(s=s.filter(b=>!c.find(y=>y.includes(b)))),s.length>0&&!f?.isCancellationRequested&&(s=await g.refreshTreeNodeByPaths([...s],f,a)||[],f?.isCancellationRequested)))return}}else{if(!d||d.length===0)break;for(let c=0;c<d.length;c++){const b=d[c];if(h.indexOf(`${b.path}${o.separator}`)===0&&m.is(b)){if(!m.is(b))continue;b.isExpanded=!0;const S=await b.resolveChildrens(f);if(f?.isCancellationRequested||(S&&(s=s.filter(A=>!S.find(w=>w===A))),b.path!==h&&!s.includes(b.path)&&s.unshift(h),s.length>0&&(s=await b.refreshTreeNodeByPaths([...s],f,a)||[],f?.isCancellationRequested)))return;break}}}}if(h){if(s.unshift(h),this===a){if(u){this.shrinkBranch(this,!0);for(let c=0;c<u.length;c++){const b=u[c];b?.dispose()}}const E=[],g=new Array(d.length);this._children=Array(d.length);for(let c=0;c<d.length;c++){const b=d[c];b.id=v.getIdByPath(b.path)||b.id,this._children[c]=b,v.setIdByPath(b.path,b.id),m.is(b)&&b.expanded&&E.push(b)}this._children.sort(this._tree.sortComparator||m.defaultSortComparator);for(let c=0;c<d.length;c++)g[c]=this._children[c].id;this._branchSize=g.length,this.setFlattenedBranch(g,!0),this.watcher.notifyDidUpdateBranch()}return this.parent!==a&&this.expandBranch(this,!0),s}else if(m.isRoot(this)){if(this.children){this.shrinkBranch(this,!0);for(let b=0;b<this.children.length;b++){const y=this.children[b];y?.dispose()}}const E=[],g=[],c=new Array(d.length);this._children=Array(d.length);for(let b=0;b<d.length;b++){const y=d[b];if(y.id=v.getIdByPath(y.path)||y.id,this._children[b]=y,v.setIdByPath(y.path,y.id),m.is(y)&&y.expanded){if(!y.children&&(await y.resolveChildrens(f),f?.isCancellationRequested))return;E.push(y)}else g.push(y)}this._children.sort(this._tree.sortComparator||m.defaultSortComparator);for(let b=0;b<d.length;b++)c[b]=this._children[b].id;this._branchSize=c.length,this.setFlattenedBranch(c,!0);for(let b=0;b<E.length;b++){const y=E[b];y.expandBranch(y,!0),this.updateTreeNodeCache(y)}for(let b=0;b<g.length;b++){const y=g[b];this.updateTreeNodeCache(y)}typeof this.watchTerminator=="function"&&this.watchTerminator(this.path),this.watchTerminator=this.watcher.onWatchEvent(this.path,this.handleWatchEvent),this.watcher.notifyDidUpdateBranch()}else{const E=[];if(this===a){if(this.children&&this.shrinkBranch(this,!0),this.children)for(let c=0,b=this.children.length;c<b;c++)this.children[c].dispose();const g=new Array(d.length);this._children=Array(d.length);for(let c=0,b=d.length;c<b;c++){const y=d[c];y.id=v.getIdByPath(y.path)||y.id,this._children[c]=y,v.setIdByPath(y.path,y.id),m.is(y)&&y.expanded&&E.push(y),this.updateTreeNodeCache(y)}this._children.sort(this._tree.sortComparator||m.defaultSortComparator);for(let c=0;c<d.length;c++)g[c]=this._children[c].id;this._branchSize=g.length,this.setFlattenedBranch(g);for(let c=0;c<E.length;c++){const b=E[c];b.expandBranch(b,!0)}}else for(let g=0;g<d.length;g++){const c=d[g];c.expanded&&E.push(c)}for(let g=0;g<E.length;g++){const c=E[g];c.expandBranch(c,!0)}typeof this.watchTerminator=="function"&&this.watchTerminator(this.path),this.watchTerminator=this.watcher.onWatchEvent(this.path,this.handleWatchEvent),this===a&&this.expandBranch(this)}}else{if(this.children&&this.children&&this.parent){for(let E=0,g=this.children.length;E<g;E++)this.children[E].dispose();this._children=null}return}}async expandedAll(s=this.getAllCollapsedNodePath()){if(!m.isRoot(this))return;s=s.sort((a,h)=>o.pathDepth(a)-o.pathDepth(h));let f;for(;s.length>0;){f=s.pop();const a=v.getTreeNodeByPath(f);m.is(a)&&await a.setExpanded(!1,!0)}this.watcher.notifyDidUpdateBranch()}async collapsedAll(s=this.getAllExpandedNodePath()){if(!m.isRoot(this))return;s=s.sort((a,h)=>o.pathDepth(a)-o.pathDepth(h));let f;for(;s.length>0;){f=s.pop();const a=v.getTreeNodeByPath(f);m.is(a)&&a.setCollapsed(!0)}this.watcher.notifyDidUpdateBranch()}setCollapsed(s=!1){if(m.isRoot(this)||this.disposed||!this.isExpanded)return;const f=v.getGlobalTreeState(this.path);f.isExpanding||(f.loadPathCancelToken.cancel(),f.refreshCancelToken.cancel(),this._watcher.notifyWillChangeExpansionState(this,!1),this._children&&this.parent&&this.shrinkBranch(this,s),this.isExpanded=!1,v.setTreeNode(this.id,this.path,this),this._watcher.notifyDidChangeExpansionState(this,!1))}mv(s,f=this.name){const a=this.path;if(super.mv(s,f),typeof this.watchTerminator=="function"&&(this.watchTerminator(a),this.watchTerminator=this.watcher.onWatchEvent(this.path,this.handleWatchEvent)),this.children)for(let h=0;h<this.children.length;h++){const u=this.children[h];u.mv(u.parent,u.name)}}insertItem(s){if(s.parent!==this){s.mv(this,s.name);return}if(this.children){for(let g=0;g<this.children.length;g++)if(this.children[g].path===s.path){this.children[g]=s;return}}const f=1+(s instanceof m&&s.expanded?s._branchSize:0);this._children&&(this._children.push(s),this._children.sort(this._tree.sortComparator||m.defaultSortComparator)),this._branchSize+=f;let a=this;for(;!a._flattenedBranch;)a.parent&&(a=a.parent,a._branchSize+=f);if(!this._children)return;let h=this._children.indexOf(s),u;const d=this._children[h-1];d?h=a._flattenedBranch.indexOf(d.id)+(d instanceof m&&d.expanded?d._branchSize:0):h=a._flattenedBranch.indexOf(this.id),h===-1&&this._branchSize===1&&(h=0),u=h+1,a._flattenedBranch.length===0&&(u=0);let E=[s.id];return s instanceof m&&s.expanded&&s._flattenedBranch&&(E=E.concat(s._flattenedBranch),s.setFlattenedBranch(null)),a.setFlattenedBranch(l(a._flattenedBranch,u,0,E)),v.setTreeNode(s.id,s.path,s),s}unlinkItem(s,f){var a;if(!this._children)return;const h=this._children.indexOf(s);if(h===-1||!this.isItemVisibleAtRootSurface(this))return;(a=this._children)===null||a===void 0||a.splice(h,1);const u=1+(s instanceof m&&s.expanded?s._branchSize:0);this._branchSize-=u;let d=this;for(;!d._flattenedBranch;)d.parent&&(d=d.parent,d._branchSize-=u);const E=d._flattenedBranch.indexOf(s.id);E!==-1&&(s instanceof m&&s.expanded&&s.setFlattenedBranch(d._flattenedBranch.slice(E+1,E+u)),d.setFlattenedBranch(l(d._flattenedBranch,E,u)),!f&&s.parent===this&&s.mv(null))}transferItem(s,f){var a;const h=new o(s),u=h.dir.toString();if(u!==this.path)return;const d=h.base.toString(),E=(a=this._children)===null||a===void 0?void 0:a.find(y=>y.name===d);if(!E)return;const g=new o(f),c=g.dir.toString(),b=c===u?this:v.getTreeNodeByPath(c);if(!m.is(b)){this.unlinkItem(E);return}return E.mv(b,g.base.toString()),E}dispose(){if(this.watchEvents){const s=this.watchEvents.get(this.path);s&&s.terminator(),this.watchEvents.clear()}this._children&&(this.isExpanded=!1,this._children.forEach(s=>{s.dispose()}),this._children=null,this._flattenedBranch=null),super.dispose()}setFlattenedBranch(s,f){this._flattenedBranch=s,m.isRoot(this)&&!f&&this.watcher.notifyDidUpdateBranch()}expandBranch(s,f){if(this!==s&&s._flattenedBranch&&(this._branchSize+=s._branchSize),this!==s&&this._flattenedBranch){const a=this._flattenedBranch.indexOf(s.id)+1;if(a===0)return;this.setFlattenedBranch(l(this._flattenedBranch,a,0,s._flattenedBranch),f),s.setFlattenedBranch(null,f)}else this.parent&&this.parent.expandBranch(s,f)}shrinkBranch(s,f){if(this!==s&&(this._branchSize-=s._branchSize),this!==s&&this._flattenedBranch){const a=this._flattenedBranch.indexOf(s.id)+1;if(a===0)return;s.setFlattenedBranch(this._flattenedBranch.slice(a,a+s._branchSize),f),this.setFlattenedBranch(l(this._flattenedBranch,a,s._flattenedBranch?s._flattenedBranch.length:0),f)}else this.parent&&this.parent.shrinkBranch(s,f)}async hardReloadChildren(s){let f;const a=this.path;try{f=await this._tree.resolveChildren(this)||[]}catch{f=[]}if(!this.expanded||s?.isCancellationRequested)return!1;this.path!==a&&v.setGlobalTreeState(a,{isExpanding:!1,isLoadingPath:!1,isRefreshing:!1});const h=[],u=new Array(f.length),d=new Array(f.length);for(let E=0;E<f.length;E++){const g=f[E];if(g.id=v.getIdByPath(g.path)||g.id,d[E]=g,v.setIdByPath(g.path,g.id),m.is(g)&&g.expanded){if(g.children||await g.resolveChildrens(s),s?.isCancellationRequested)return!1;h.push(g)}}d.sort(this._tree.sortComparator||m.defaultSortComparator);for(let E=0;E<f.length;E++)u[E]=d[E].id;if(this.children&&this.shrinkBranch(this),this.children)for(let E=0;E<this.children.length;E++){const g=this.children[E];g?.dispose()}for(let E=0;E<d.length;E++)this.updateTreeNodeCache(d[E]);this._children=d,this._branchSize=u.length,this.setFlattenedBranch(u);for(let E=0;E<h.length;E++){const g=h[E];g.expandBranch(g,!0)}return typeof this.watchTerminator=="function"&&this.watchTerminator(this.path),this.watchTerminator=this.watcher.onWatchEvent(this.path,this.handleWatchEvent),!0}moveNode(s,f){if(typeof s!="string")throw new TypeError("Expected oldPath to be a string");if(typeof f!="string")throw new TypeError("Expected newPath to be a string");if(o.isRelative(s))throw new TypeError("oldPath must be absolute");if(o.isRelative(f))throw new TypeError("newPath must be absolute");return this.transferItem(s,f)}addNode(s){if(!v.is(s))throw new TypeError("Expected node to be a TreeNode");return this.insertItem(s)}removeNode(s){const f=new o(s),a=f.dir.toString(),h=f.base.toString();if(a===this.path&&this.children){const u=this.children.find(d=>d.name===h);u&&this.unlinkItem(u)}}async refresh(s,f){if(!m.isRoot(this))return await this.root.refresh(s,this);const a=v.getGlobalTreeState(this.path);if(a.isLoadingPath||a.isExpanding)return;let h;if(s&&!s.token.isCancellationRequested)v.setGlobalTreeState(this.path,{isRefreshing:!0,refreshCancelToken:s}),h=s.token;else if(a.refreshCancelToken.token.isCancellationRequested){const u=new n.CancellationTokenSource;v.setGlobalTreeState(this.path,{isRefreshing:!0,refreshCancelToken:u}),h=u.token}else h=a.refreshCancelToken.token;this.toRefreshPathQueue.add((f||this).path),await this.refreshThrottler.trigger(()=>this.doRefresh(h)),v.setGlobalTreeState(this.path,{isRefreshing:!1})}async doRefresh(s){const f=this.getRefreshNode()||this;if(!m.is(f))return;const a=f.getAllExpandedNodePath();await f.refreshTreeNodeByPaths(a,s,f)}getRefreshNode(){let s=Array.from(this.toRefreshPathQueue);if(this.toRefreshPathQueue.clear(),!s.length)return this.root;if(s=s.sort((h,u)=>{const d=o.pathDepth(h),E=o.pathDepth(u);return d-E}),s.length===1||o.pathDepth(s[0])===1)return v.getTreeNodeByPath(s[0]);const f=s.map(h=>new o(h));let a=f[0];for(let h=1,u=f.length;h<u;h++)if(!a.isEqualOrParent(f[h]))for(;!a.isRoot&&(a=a.dir,!(!a||a.isEqualOrParent(f[h]))););return a?v.getTreeNodeByPath(a.toString()):this.root}isItemVisibleAtRootSurface(s){let f=s;for(;f.parent;)f=f.parent;return f.isItemVisibleAtSurface(s)}isItemVisibleAtSurface(s){return s===this?!0:!!this._flattenedBranch&&this._flattenedBranch.indexOf(s.id)>-1}transformToRelativePath(s){const{splitPath:f}=o,a=f(s);return a.shift(),a}async loadTreeNodeByPath(s,f=!1){if(!m.isRoot(this))return;const a=v.getGlobalTreeState(this.path);if(a.isExpanding)return;a.refreshCancelToken.cancel(),a.loadPathCancelToken.cancel();const h=new n.CancellationTokenSource;v.setGlobalTreeState(this.path,{isLoadingPath:!0,loadPathCancelToken:h});const u=h.token,d=[],{splitPath:E,isRelative:g}=o,c=g(s)?E(s):this.transformToRelativePath(s);if(c.length===0)return v.setGlobalTreeState(this.path,{isLoadingPath:!1}),this;if(this.children||await this.ensureLoaded(u),u.isCancellationRequested){v.setGlobalTreeState(this.path,{isLoadingPath:!1});return}let b=this._children,y,S="",A;for(;b&&(A=c.shift());){let w=b.find(T=>T.name.indexOf(A)===0);if(w){if(m.is(w)){if(w._watcher.notifyWillChangeExpansionState(w,!0),w.isExpanded=!0,!w.children&&(await w.resolveChildrens(u),u.isCancellationRequested)){v.setGlobalTreeState(this.path,{isLoadingPath:!1});return}d.push(w),w._watcher.notifyDidChangeExpansionState(w,!0)}if(c.length===0){y=w;break}}if(!w&&y){const T=E(y.name).slice(1);if(T[0]===A){for(T.shift();T.length>0&&T[0]===c[0];)T.shift(),c.shift();A=c.shift(),w=b.find(D=>D.name.indexOf(A)===0)}}if(!w||!m.is(w)&&c.length>0)break;if(m.is(w)){if(w.name.indexOf(o.separator)>0){const D=E(w.name).slice(1);for(;D.length>0&&D[0]===c[0];)D.shift(),c.shift()}if(!w._children&&(S=w.path,m.is(w))){if(w.isExpanded=!0,!w.children&&(await w.resolveChildrens(u),u.isCancellationRequested)){v.setGlobalTreeState(this.path,{isLoadingPath:!1});return}d.push(w)}if(w&&c.length===0){y=w;break}else{if(S&&S!==w.path){const D=E(S),I=E(w.path);I.length>D.length&&c.splice(0,I.length-D.length)}b=w._children,y=w}}}if(y){let w;if(y.disposed){v.setGlobalTreeState(this.path,{isLoadingPath:!1});return}for(;w=d.pop();)w.expandBranch(w,!0),d.length===0&&this.updateTreeNodeCache(w);return f||this.watcher.notifyDidUpdateBranch(),v.setGlobalTreeState(this.path,{isLoadingPath:!1}),y}v.setGlobalTreeState(this.path,{isLoadingPath:!1})}getIndexAtTreeNodeId(s){return this._flattenedBranch?this._flattenedBranch.indexOf(s):-1}getIndexAtTreeNode(s){return this._flattenedBranch?this._flattenedBranch.indexOf(s.id):-1}getTreeNodeAtIndex(s){var f;const a=(f=this._flattenedBranch)===null||f===void 0?void 0:f[s];if(a)return v.getTreeNodeById(a)}getTreeNodeById(s){return v.getTreeNodeById(s)}getTreeNodeByPath(s){return v.getTreeNodeByPath(s)}}t.CompositeTreeNode=m,m.REFRESH_DELAY=200},58781:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CompositeDecoration=t.ChangeReason=t.CompositeDecorationType=t.ClasslistComposite=void 0;const n=e(70392),r=e(96336);class o{constructor(_,s){this.addChangeListener=_,this.removeChangeListener=s}}t.ClasslistComposite=o;var l;(function(m){m[m.Applicable=1]="Applicable",m[m.Inheritable=2]="Inheritable"})(l||(t.CompositeDecorationType=l={}));var p;(function(m){m[m.UnTargetDecoration=1]="UnTargetDecoration",m[m.TargetDecoration=2]="TargetDecoration"})(p||(t.ChangeReason=p={}));class v{constructor(_,s,f){this.handleDecorationDidAddClassname=a=>{const{classname:h}=a;!this.selfOwned||!h||(this.compositeCssClasslist.classlist.push(h),this.notifyClasslistChange())},this.handleDecorationDidRemoveClassname=a=>{const{classname:h}=a;if(!this.selfOwned||!h)return;const u=this.compositeCssClasslist.classlist.indexOf(h);u>-1&&(this.compositeCssClasslist.classlist.splice(u,1),this.notifyClasslistChange())},this.mergeDecorationClasslist=a=>{const{decoration:h}=a;this.selfOwned&&(this.compositeCssClasslist.classlist.push(...h.cssClassList),this.notifyClasslistChange())},this.handleDecorationDisable=a=>{const{decoration:h}=a;this.removeDecorationClasslist(h)},this.target=_,this.type=s,this.linkedComposites=new Set,this.classlistChangeCallbacks=new Set,this.compositeCssClasslist=new o(this.classlistChangeCallbacks.add.bind(this.classlistChangeCallbacks),this.classlistChangeCallbacks.delete.bind(this.classlistChangeCallbacks)),f?(this.selfOwned=!1,this.parent=f,this.renderedDecorations=f.renderedDecorations,this.compositeCssClasslist.classlist=f.compositeCssClasslist.classlist,f.linkedComposites.add(this)):(this.renderedDecorations=new Map,this.targetedDecorations=new Set,this.negatedDecorations=new Set,this.compositeCssClasslist.classlist=[],this.selfOwned=!0)}changeParent(_){if(_){if(!this.selfOwned)return this.parentOwn(_);for(const[s]of this.renderedDecorations)this.recursiveRefresh(this,!1,p.UnTargetDecoration,s,!1);this.parent!==_&&(this.parent.linkedComposites.delete(this),this.parent=_,_.linkedComposites.add(this));for(const[s]of _.renderedDecorations)this.recursiveRefresh(this,!1,p.TargetDecoration,s,!1)}}add(_){const s=_.appliedTargets.get(this.target),f=s&&(s===r.TargetMatchMode.Self||s===r.TargetMatchMode.SelfAndChildren),a=s&&(s===r.TargetMatchMode.Children||s===r.TargetMatchMode.SelfAndChildren);if(!(this.type===l.Applicable&&!f)&&!(this.type===l.Inheritable&&!a)){if(!this.selfOwned){this.selfOwn(p.TargetDecoration,_),this.targetedDecorations.add(_);return}this.targetedDecorations.has(_)||(this.targetedDecorations.add(_),this.recursiveRefresh(this,!1,p.TargetDecoration,_))}}remove(_){if(this.selfOwned&&this.targetedDecorations.delete(_)){if(this.negatedDecorations.size===0&&this.targetedDecorations.size===0&&this.parent)return this.parentOwn(void 0,p.UnTargetDecoration,_);this.recursiveRefresh(this,!1,p.UnTargetDecoration,_)}}negate(_){const s=_.negatedTargets.get(this.target),f=s&&(s===r.TargetMatchMode.Self||s===r.TargetMatchMode.SelfAndChildren),a=s&&(s===r.TargetMatchMode.Children||s===r.TargetMatchMode.SelfAndChildren);if(!(this.type===l.Applicable&&!f)&&!(this.type===l.Inheritable&&!a)){if(!this.selfOwned){this.selfOwn(p.UnTargetDecoration,_),this.negatedDecorations.add(_);return}this.negatedDecorations.has(_)||(this.negatedDecorations.add(_),this.renderedDecorations.has(_)&&this.removeDecorationClasslist(_))}}unNegate(_){if(this.selfOwned&&this.negatedDecorations.delete(_)){if(this.negatedDecorations.size===0&&this.targetedDecorations.size===0&&this.parent)return this.parentOwn();!this.renderedDecorations.has(_)&&(this.parent.renderedDecorations.has(_)||_.appliedTargets.has(this.target))&&this.recursiveRefresh(this,!1,p.TargetDecoration,_)}}selfOwn(_,s){if(this.selfOwned)throw new Error("CompositeDecoration is already self owned");const f=this.parent;this.selfOwned=!0,this.compositeCssClasslist.classlist=[],this.renderedDecorations=new Map,this.targetedDecorations=new Set,this.negatedDecorations=new Set;for(const[a]of f.renderedDecorations)a!==s&&this.processCompositeAlteration(p.TargetDecoration,a);_===p.UnTargetDecoration&&this.parent.renderedDecorations.has(s)&&!this.renderedDecorations.has(s)&&this.notifyClasslistChange(!1),this.recursiveRefresh(this,!0,_,s)}parentOwn(_,s,f){this.selfOwned=!1,this.targetedDecorations&&this.targetedDecorations.clear(),this.negatedDecorations&&this.negatedDecorations.clear(),_&&this.parent!==_&&(this.parent&&this.parent.linkedComposites.delete(this),_.linkedComposites.add(this),this.parent=_),this.recursiveRefresh(this,!0,s,f)}processCompositeAlteration(_,s){if(!this.selfOwned)throw new Error("CompositeDecoration is not self owned");if(_===p.UnTargetDecoration){const f=this.renderedDecorations.get(s);if(f){const a=s.appliedTargets.get(this.target),h=a&&(a===r.TargetMatchMode.Self||a===r.TargetMatchMode.SelfAndChildren),u=a&&(a===r.TargetMatchMode.Children||a===r.TargetMatchMode.SelfAndChildren);return h&&this.type===l.Applicable||u&&this.type===l.Inheritable?!1:(this.removeDecorationClasslist(s,!1),f&&f.dispose(),this.renderedDecorations.delete(s))}return!1}if(_===p.TargetDecoration){const f=s.negatedTargets.get(this.target),a=f&&(f===r.TargetMatchMode.Self||f===r.TargetMatchMode.SelfAndChildren),h=f&&(f===r.TargetMatchMode.Children||f===r.TargetMatchMode.SelfAndChildren);if(a&&this.type===l.Applicable||h&&this.type===l.Inheritable)return!1;if(!this.renderedDecorations.has(s)){const u=new n.DisposableCollection;return u.push(s.onDidAddCSSClassname(this.handleDecorationDidAddClassname)),u.push(s.onDidRemoveCSSClassname(this.handleDecorationDidRemoveClassname)),u.push(s.onDidDisableDecoration(this.handleDecorationDisable)),u.push(s.onDidEnableDecoration(this.mergeDecorationClasslist)),this.renderedDecorations.set(s,u),s.disabled?!1:(this.compositeCssClasslist.classlist.push(...s.cssClassList),!0)}}return!1}recursiveRefresh(_,s,f,a,h=!0){if(!this.selfOwned&&s&&(this.renderedDecorations=this.parent.renderedDecorations,this.compositeCssClasslist.classlist=this.parent.compositeCssClasslist.classlist),this.selfOwned&&s&&_!==this){for(const[u]of this.renderedDecorations)this.processCompositeAlteration(p.UnTargetDecoration,u);for(const[u]of this.parent.renderedDecorations)this.processCompositeAlteration(p.TargetDecoration,u);h&&this.notifyClasslistChange(!1)}else this.selfOwned&&f===p.UnTargetDecoration&&a&&this.renderedDecorations.has(a)?(this.processCompositeAlteration(f,a),h&&this.notifyClasslistChange(!1)):this.selfOwned&&f===p.TargetDecoration&&a&&this.processCompositeAlteration(f,a)&&h?this.notifyClasslistChange(!1):!this.selfOwned&&h&&this.notifyClasslistChange(!1);for(const u of this.linkedComposites)u.recursiveRefresh(_,s,f,a,h)}removeDecorationClasslist(_,s=!0){if(this.selfOwned){for(const f of _.cssClassList){const a=this.compositeCssClasslist.classlist.indexOf(f);a>-1&&this.compositeCssClasslist.classlist.splice(a,1)}s&&this.notifyClasslistChange()}}notifyClasslistChange(_=!0){for(const s of[...this.classlistChangeCallbacks])s();if(_)for(const s of this.linkedComposites)s.selfOwned||s.notifyClasslistChange()}}t.CompositeDecoration=v},96336:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Decoration=t.TargetMatchMode=void 0;const n=e(70392),r=e(26353);var o;(function(p){p[p.None=1]="None",p[p.Self=2]="Self",p[p.Children=3]="Children",p[p.SelfAndChildren=4]="SelfAndChildren"})(o||(t.TargetMatchMode=o={}));class l{constructor(...v){if(this._appliedTargets=new Map,this._negatedTargets=new Map,this._disabled=!1,this.appliedTargetsDisposables=new WeakMap,this.negatedTargetsDisposables=new WeakMap,this.onDidAddCSSClassnameEmitter=new n.Emitter,this.onDidRemoveCSSClassnameEmitter=new n.Emitter,this.onDidDisableDecorationEmitter=new n.Emitter,this.onDidEnableDecorationEmitter=new n.Emitter,this.onDidAddTargetEmitter=new n.Emitter,this.onDidRemoveTargetEmitter=new n.Emitter,this.onDidNegateTargetEmitter=new n.Emitter,this.onDidUnNegateTargetEmitter=new n.Emitter,Array.isArray(v))if(v.every(m=>typeof m=="string"))this._cssClassList=new Set(v);else throw new TypeError("classlist must be of type `Array<string>`");else this._cssClassList=new Set}get disabled(){return this._disabled}set disabled(v){this._disabled=v,v?this.onDidDisableDecorationEmitter.fire({decoration:this}):this.onDidEnableDecorationEmitter.fire({decoration:this})}get appliedTargets(){return this._appliedTargets}get negatedTargets(){return this._negatedTargets}get cssClassList(){return this._cssClassList}get onDidAddCSSClassname(){return this.onDidAddCSSClassnameEmitter.event}get onDidRemoveCSSClassname(){return this.onDidRemoveCSSClassnameEmitter.event}get onDidDisableDecoration(){return this.onDidDisableDecorationEmitter.event}get onDidEnableDecoration(){return this.onDidEnableDecorationEmitter.event}get onDidAddTarget(){return this.onDidAddTargetEmitter.event}get onDidRemoveTarget(){return this.onDidRemoveTargetEmitter.event}get onDidNegateTarget(){return this.onDidNegateTargetEmitter.event}get onDidUnNegateTarget(){return this.onDidUnNegateTargetEmitter.event}addCSSClass(v){this._cssClassList.has(v)||(this._cssClassList.add(v),this.onDidAddCSSClassnameEmitter.fire({decoration:this,classname:v}))}removeCSSClass(v){this._cssClassList.has(v)&&(this._cssClassList.delete(v),this.onDidRemoveCSSClassnameEmitter.fire({decoration:this,classname:v}))}hasTarget(v){return!!this._appliedTargets.get(v)}addTarget(v,m=o.Self){if(this._appliedTargets.get(v)===m||!r.TreeNode.is(v))return;this._appliedTargets.set(v,m);const s=n.Disposable.create(()=>{this.removeTarget(v)});return this.appliedTargetsDisposables.set(v,s),this.onDidAddTargetEmitter.fire({decoration:this,target:v}),s}removeTarget(v){if(this._appliedTargets.delete(v)){const m=this.appliedTargetsDisposables.get(v);m&&m.dispose(),this.onDidRemoveTargetEmitter.fire({decoration:this,target:v})}}clearAppliedTarget(){const v=Array.from(this._appliedTargets.keys());for(const m of v)this.removeTarget(m)}clearNegateTarget(){const v=Array.from(this._negatedTargets.keys());for(const m of v)this.unNegateTarget(m)}negateTarget(v,m=o.Self){if(this._negatedTargets.get(v)===m||!r.TreeNode.is(v))return;this._negatedTargets.set(v,m);const s=n.Disposable.create(()=>{this.unNegateTarget(v)});return this.negatedTargetsDisposables.set(v,s),this.onDidNegateTargetEmitter.fire({decoration:this,target:v}),s}unNegateTarget(v){if(this._negatedTargets.delete(v)){const m=this.negatedTargetsDisposables.get(v);m&&m.dispose(),this.onDidUnNegateTargetEmitter.fire({decoration:this,target:v})}}}t.Decoration=l},29701:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DecorationsManager=void 0;const n=e(70392),r=e(34054),o=e(26353),l=e(58781);class p{constructor(m){this.root=m,this.decorations=new Map,this.decorationsMeta=new WeakMap,this.disposables=new n.DisposableCollection,this.disposed=!1,this.targetDecoration=_=>{const{decoration:s,target:f}=_,a=this.getDecorationData(f);if(a){const{applicable:h,inheritable:u}=a;h.add(s),u&&u.add(s)}},this.updateTarget=()=>{for(const[_]of this.decorations)for(const[s,f]of Array.from(_.appliedTargets)){_.removeTarget(s);const a=this.root.getTreeNodeByPath(s.path);a&&_.addTarget(a,f)}},this.unTargetDecoration=_=>{const{decoration:s,target:f}=_,a=this.getDecorationData(f);if(a){const{applicable:h,inheritable:u}=a;h.remove(s),u&&u.remove(s)}},this.negateDecoration=_=>{const{decoration:s,target:f}=_,a=this.getDecorationData(f);if(a){const{applicable:h,inheritable:u}=a;h.negate(s),u&&u.negate(s)}},this.unNegateDecoration=_=>{const{decoration:s,target:f}=_,a=this.getDecorationData(f);if(a){const{applicable:h,inheritable:u}=a;h.unNegate(s),u&&u.unNegate(s)}},this.switchParent=(_,s,f)=>{const a=this.decorationsMeta.get(_);if(!a)return;const h=this.getDecorationData(f);h&&(a.applicable.changeParent(h.inheritable),a.inheritable&&a.inheritable.changeParent(h.inheritable))},this.decorationsMeta.set(m,{applicable:new l.CompositeDecoration(m,l.CompositeDecorationType.Applicable),inheritable:new l.CompositeDecoration(m,l.CompositeDecorationType.Inheritable)}),this.disposables.push(m.watcher.on(r.TreeNodeEvent.DidChangeParent,this.switchParent)),this.disposables.push(m.watcher.on(r.TreeNodeEvent.DidDispose,_=>this.decorationsMeta.delete(_))),this.disposables.push(m.watcher.on(r.TreeNodeEvent.BranchDidUpdate,this.updateTarget))}dispose(){for(const[m]of this.decorations)this.removeDecoration(m);this.disposables.dispose(),this.disposed=!0}addDecoration(m){if(this.disposed)throw new Error("DecorationManager disposed");if(this.decorations.has(m))return;const _=new n.DisposableCollection;_.push(m.onDidAddTarget(this.targetDecoration)),_.push(m.onDidRemoveTarget(this.unTargetDecoration)),_.push(m.onDidNegateTarget(this.negateDecoration)),_.push(m.onDidUnNegateTarget(this.unNegateDecoration)),this.decorations.set(m,_);for(const[s]of m.appliedTargets)this.targetDecoration({decoration:m,target:s});for(const[s]of m.negatedTargets)this.negateDecoration({decoration:m,target:s})}removeDecoration(m){const _=this.decorations.get(m);if(_){for(const[s]of m.appliedTargets){const f=this.decorationsMeta.get(s);f&&(f.applicable.remove(m),f.inheritable&&f.inheritable.remove(m))}for(const[s]of m.negatedTargets){const f=this.decorationsMeta.get(s);f&&(f.applicable.unNegate(m),f.inheritable&&f.inheritable.unNegate(m))}_.dispose(),this.decorations.delete(m)}}getDecorations(m){if(!m||!o.TreeNode.is(m))return;const _=this.getDecorationData(m);if(_)return _.applicable.compositeCssClasslist}getDecorationData(m){if(this.disposed)return;const _=this.decorationsMeta.get(m);if(_)return _;if(!m||!m.parent)return;const s=this.getDecorationData(m.parent);if(s){const f={applicable:new l.CompositeDecoration(m,l.CompositeDecorationType.Applicable,s.inheritable),inheritable:o.CompositeTreeNode.is(m)?new l.CompositeDecoration(m,l.CompositeDecorationType.Inheritable,s.inheritable):void 0};return this.decorationsMeta.set(m,f),f}}}t.DecorationsManager=p},24936:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(85608);n.__exportStar(e(96336),t),n.__exportStar(e(29701),t),n.__exportStar(e(58781),t)},43685:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(85608);n.__exportStar(e(29805),t),n.__exportStar(e(26353),t),n.__exportStar(e(58615),t),n.__exportStar(e(24936),t)},13674:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TreeModel=void 0;const n=e(70392),r=e(34054),o=e(70609);class l{constructor(){this.onChangeEmitter=new n.Emitter,this.dispatchChange=()=>{this.onChangeEmitter.fire()}}get onChange(){return this.onChangeEmitter.event}get ensureReady(){return this._ensureReady}get root(){return this._root}set root(v){this._root=v,this.initState(v),this.root&&(this._ensureReady=this.root.ensureLoaded())}get state(){return this._state}set state(v){this._state=v}init(v){this.root=v,this.root.watcher.on(r.TreeNodeEvent.BranchDidUpdate,this.dispatchChange)}initState(v){this.state=new o.TreeStateManager(v)}loadTreeState(v){return typeof v=="string"&&(v=JSON.parse(v)),this.state.loadTreeState(v)}getTreeStateWatcher(v=!1){return new o.TreeStateWatcher(this.state,v)}resolveChildren(v){return Promise.resolve(Array.from(v.children))}}t.TreeModel=l},58615:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),e(85608).__exportStar(e(13674),t)},12165:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TreeStateManager=t.Operation=void 0;const n=e(70392),r=e(34054),o=e(26353),{Path:l}=n.path;var p;(function(_){_[_.SetExpanded=1]="SetExpanded",_[_.SetCollapsed=2]="SetCollapsed",_[_.SetActive=3]="SetActive"})(p||(t.Operation=p={}));var v;(function(_){_[_.Expanded=1]="Expanded",_[_.Collapsed=2]="Collapsed",_[_.Disabled=4]="Disabled"})(v||(v={}));class m{constructor(s){this.expandedDirectories=new Map,this._scrollOffset=0,this.stashing=!1,this.stashLockingItems=new Set,this.onDidLoadStateEmitter=new n.Emitter,this.onChangeScrollOffsetEmitter=new n.Emitter,this.onDidChangeExpansionStateEmitter=new n.Emitter,this.onDidChangeRelativePathEmitter=new n.Emitter,this.handleExpansionChange=(f,a,h)=>{var u;if(this.stashing&&this.stashKeyframes&&this.stashKeyframes.set(f.id,a?v.Expanded:v.Collapsed),this.stashKeyframes&&!this.stashing){if(a){let E=f;for(;E;){if(this.stashKeyframes.has(E.id)){let g=this.stashKeyframes.get(E.id);g=g|v.Disabled,this.stashKeyframes.set(E.id,g)}E=E.parent}this.stashLockingItems.add(f)}if(this.stashLockingItems&&this.stashLockingItems.has(f)&&!a){let E=f;for(;E;){if(this.stashKeyframes.has(E.id)){let g=this.stashKeyframes.get(E.id);g&=~v.Disabled,this.stashKeyframes.set(E.id,g)}E=E.parent}this.stashLockingItems.delete(f)}}let d=this.expandedDirectories.get(f);a&&!d?(d=(u=new l(this.root.path).relative(new l(f.path)))===null||u===void 0?void 0:u.toString(),this.expandedDirectories.set(f,d),this.onDidChangeExpansionStateEmitter.fire({relativePath:d,isExpanded:a,isVisibleAtSurface:h})):!a&&d&&(this.expandedDirectories.delete(f),this.onDidChangeExpansionStateEmitter.fire({relativePath:d,isExpanded:a,isVisibleAtSurface:h}))},this.handleDidChangePath=f=>{var a;if(this.expandedDirectories.has(f)){const h=this.expandedDirectories.get(f),u=(a=new l(this.root.path).relative(new l(f.path)))===null||a===void 0?void 0:a.toString();this.expandedDirectories.set(f,u),this.onDidChangeRelativePathEmitter.fire({prevPath:h,newPath:u})}},this.root=s,this.root.watcher.on(r.TreeNodeEvent.DidChangeExpansionState,this.handleExpansionChange),this.root.watcher.on(r.TreeNodeEvent.DidChangePath,this.handleDidChangePath)}get scrollOffset(){return this._scrollOffset}saveScrollOffset(s){this._scrollOffset=s,this.onChangeScrollOffsetEmitter.fire(s)}get onDidLoadState(){return this.onDidLoadStateEmitter.event}get onChangeScrollOffset(){return this.onChangeScrollOffsetEmitter.event}get onDidChangeExpansionState(){return this.onDidChangeExpansionStateEmitter.event}get onDidChangeRelativePath(){return this.onDidChangeRelativePathEmitter.event}async loadTreeState(s){if(s){for(const f of s.expandedDirectories.buried)try{const a=await this.root.loadTreeNodeByPath(f);if(!a)break;a&&o.CompositeTreeNode.is(a)&&a.setCollapsed()}catch{}for(const f of s.expandedDirectories.atSurface)try{if(!await this.root.loadTreeNodeByPath(f,!0))break}catch{}this._scrollOffset=typeof s.scrollPosition=="number"&&s.scrollPosition>-1?s.scrollPosition:this._scrollOffset,this.root.watcher.notifyDidUpdateBranch(),this.onDidLoadStateEmitter.fire()}}excludeFromStash(s){this.stashKeyframes&&!this.stashing&&this.handleExpansionChange(o.CompositeTreeNode.is(s)?s:s.parent,!0,this.root.isItemVisibleAtSurface(s))}beginStashing(){this.stashing=!0,this.stashKeyframes=new Map}endStashing(){this.stashing=!1,this.stashLockingItems.clear()}async reverseStash(){if(!this.stashKeyframes)return;this.endStashing();const s=Array.from(this.stashKeyframes);this.stashKeyframes=null;for(const[f,a]of s){const h=(a&v.Disabled)===v.Disabled,u=o.TreeNode.getTreeNodeById(f);!u||h||((a&v.Expanded)===v.Expanded?u.setCollapsed():(a&v.Collapsed)===v.Collapsed&&await u.setExpanded())}}}t.TreeStateManager=m},72782:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TreeStateWatcher=void 0;const n=e(70392),r=e(13440);class o{constructor(p,v=!1){this._disposed=!1,this.disposables=new n.DisposableCollection,this.onDidTreeStateChangeEmitter=new n.Emitter,this.currentState={specVersion:1,scrollPosition:0,expandedDirectories:{atSurface:[],buried:[]}},this.disposables.push(p.onChangeScrollOffset(m=>{this.currentState.scrollPosition=m,this.onDidTreeStateChangeEmitter.fire(r.TreeStateWatcherChangeType.ScrollOffset)})),this.disposables.push(p.onDidChangeRelativePath(({prevPath:m,newPath:_})=>{let s=!1;const f=new Set(this.currentState.expandedDirectories.atSurface);if(f.has(m)&&(f.delete(m),f.add(_),s=!0),this.currentState.expandedDirectories.atSurface=Array.from(f),v){const a=new Set(this.currentState.expandedDirectories.buried);a.has(m)&&(f.delete(m),f.add(_),s=!0),this.currentState.expandedDirectories.buried=Array.from(a)}s&&this.onDidTreeStateChangeEmitter.fire(r.TreeStateWatcherChangeType.PathsUpdated)})),this.disposables.push(p.onDidChangeExpansionState(({relativePath:m,isExpanded:_,isVisibleAtSurface:s})=>{let f=!1;const a=new Set(this.currentState.expandedDirectories.atSurface),h=new Set(this.currentState.expandedDirectories.buried);if(a.has(m)&&(!_||!s)){a.delete(m);const d=Array.from(a).filter(E=>E.indexOf(m)>=0);for(const E of d)a.delete(E),h.has(E)||h.add(E);f=!0}else _&&s&&(a.add(m),f=!0);this.currentState.expandedDirectories.atSurface=Array.from(a),v||(h.has(m)&&(!_||s)?(h.delete(m),f=!0):_&&!s&&(h.add(m),f=!0),this.currentState.expandedDirectories.buried=Array.from(h)),f&&this.onDidTreeStateChangeEmitter.fire(r.TreeStateWatcherChangeType.DirExpansionState)}))}get onDidChange(){return this.onDidTreeStateChangeEmitter.event}dispose(){this._disposed||(this._disposed=!0,this.disposables.dispose())}snapshot(){return{...this.currentState,expandedDirectories:{atSurface:this.currentState.expandedDirectories.atSurface.slice(),buried:this.currentState.expandedDirectories.buried.slice()}}}toString(){return JSON.stringify(this.currentState)}}t.TreeStateWatcher=o},70609:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TreeStateWatcher=t.TreeStateManager=void 0;var n=e(12165);Object.defineProperty(t,"TreeStateManager",{enumerable:!0,get:function(){return n.TreeStateManager}});var r=e(72782);Object.defineProperty(t,"TreeStateWatcher",{enumerable:!0,get:function(){return r.TreeStateWatcher}})},13440:(x,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TreeStateWatcherChangeType=t.TreeStateEvent=void 0;var e;(function(r){r[r.DidChangeScrollOffset=1]="DidChangeScrollOffset",r[r.DidChangeDirExpansionState=2]="DidChangeDirExpansionState",r[r.DidChangeRelativePath=3]="DidChangeRelativePath",r[r.DidChange=4]="DidChange",r[r.DidLoadState=5]="DidLoadState"})(e||(t.TreeStateEvent=e={}));var n;(function(r){r[r.ScrollOffset=1]="ScrollOffset",r[r.DirExpansionState=2]="DirExpansionState",r[r.PathsUpdated=3]="PathsUpdated"})(n||(t.TreeStateWatcherChangeType=n={}))},34054:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(85608);n.__exportStar(e(79632),t),n.__exportStar(e(32281),t),n.__exportStar(e(3754),t)},32281:(x,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TreeNodeType=void 0;var e;(function(n){n[n.TreeNode=1]="TreeNode",n[n.CompositeTreeNode=2]="CompositeTreeNode",n[n.NewPrompt=3]="NewPrompt",n[n.RenamePrompt=4]="RenamePrompt"})(e||(t.TreeNodeType=e={}))},79632:(x,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},3754:(x,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MetadataChangeType=t.WatchEvent=t.TreeNodeEvent=void 0;var e;(function(o){o[o.WillChangeExpansionState=1]="WillChangeExpansionState",o[o.DidChangeExpansionState=2]="DidChangeExpansionState",o[o.WillChangeParent=3]="WillChangeParent",o[o.DidChangeParent=4]="DidChangeParent",o[o.DidDispose=5]="DidDispose",o[o.BranchDidUpdate=6]="BranchDidUpdate",o[o.DidChangePath=7]="DidChangePath",o[o.DidProcessWatchEvent=8]="DidProcessWatchEvent",o[o.WillProcessWatchEvent=9]="WillProcessWatchEvent",o[o.DidChangeMetadata=10]="DidChangeMetadata",o[o.DidResolveChildren=11]="DidResolveChildren",o[o.WillResolveChildren=12]="WillResolveChildren"})(e||(t.TreeNodeEvent=e={}));var n;(function(o){o[o.Added=1]="Added",o[o.Removed=2]="Removed",o[o.Changed=3]="Changed",o[o.Moved=4]="Moved"})(n||(t.WatchEvent=n={}));var r;(function(o){o[o.Added=1]="Added",o[o.Updated=2]="Updated",o[o.Removed=3]="Removed"})(r||(t.MetadataChangeType=r={}))},77011:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ScrollbarsVirtualList=t.Scrollbars=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importDefault(e(97331)),l=n.__importStar(e(14041)),p=e(70392),v=e(56875);e(93324);const m=({onScroll:_,onUpdate:s,forwardedRef:f,style:a,children:h,className:u,onReachBottom:d,tabBarMode:E,thumbSize:g=5,hiddenVertical:c,hiddenHorizontal:b,universal:y=!1})=>{const S=(0,l.useRef)(new p.DisposableCollection),A=(0,l.useRef)(),w=(0,l.useCallback)(M=>{M?(A.current=M.view,f&&(typeof f=="function"?f(M.view):f.current=M.view)):f&&typeof f=="function"&&f(null)},[]),T=(0,l.useRef)(),D=(0,l.useRef)(),I=(0,l.useCallback)(M=>{if(!M)return;const{scrollTop:O,scrollHeight:P,clientHeight:k}=M;if(P===0&&k===0)return;(O+100)/(P-k)>1&&d&&d()},[d]),R=(0,l.useCallback)((0,o.default)(M=>{if(!M)return;const{scrollTop:O,scrollLeft:P}=M,k=1/20*Math.min(O,20),F=1/20*Math.min(P,20);T.current&&(T.current.style.opacity=String(k)),D.current&&(D.current.style.opacity=String(F)),I(M),s&&s(M)},100),[s,I,T.current,D.current]);return(0,l.useEffect)(()=>{const M=O=>{A.current&&(O.preventDefault(),O.stopPropagation(),A.current.clientHeight>=A.current.scrollHeight&&(O.deltaY!==0&&(A.current.scrollLeft+=O.deltaY),O.deltaX!==0&&(A.current.scrollLeft+=O.deltaX)))};return E&&A.current&&A.current.addEventListener("wheel",M),()=>{var O;(O=A.current)===null||O===void 0||O.removeEventListener("wheel",M)}},[A.current,E]),(0,l.useEffect)(()=>()=>S.current.dispose(),[]),l.default.createElement(v.Scrollbars,{ref:w,style:{...a,overflow:"hidden"},className:(0,r.default)(u,"kt-scrollbar"),onUpdate:R,onScroll:_,universal:y,renderTrackHorizontal:({style:M,...O})=>{const P={...M,height:g,left:0,right:0,bottom:1};return b&&(P.display="none"),l.default.createElement("div",{...O,style:P})},renderTrackVertical:({style:M,...O})=>{const P={...M,width:g,top:0,right:1,bottom:0};return c&&(P.display="none"),l.default.createElement("div",{...O,style:P})},renderThumbVertical:({style:M,className:O,...P})=>{const k={...M,width:g};return c&&(k.display="none"),l.default.createElement("div",{...P,style:k,className:(0,r.default)(O,"scrollbar-thumb-vertical")})},renderThumbHorizontal:({style:M,className:O,...P})=>{const k={...M,height:g,display:"none"};return b&&(k.display="none"),l.default.createElement("div",{...P,style:k,className:(0,r.default)(O,"scrollbar-thumb-horizontal")})}},l.default.createElement("div",{ref:M=>{T.current=M},className:"scrollbar-decoration-vertical"}),l.default.createElement("div",{ref:M=>{D.current=M},className:"scrollbar-decoration-horizontal"}),h)};t.Scrollbars=m,t.Scrollbars.displayName="CustomScrollbars",t.ScrollbarsVirtualList=l.default.forwardRef((_,s)=>l.default.createElement(t.Scrollbars,{..._,thumbSize:10,forwardedRef:s})),t.ScrollbarsVirtualList.displayName="ScrollbarsVirtualList"},14640:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SelectOptionsList=t.Option=void 0,t.isDataOptions=a,t.isDataOptionGroups=h,t.Select=S;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importStar(e(14041)),l=e(54713),p=e(50708);e(11110);const v=({value:w,children:T,disabled:D,onClick:I,className:R,...M})=>o.default.createElement("span",{...M,className:(0,r.default)(R,{"kt-option-disabled":D}),onClick:()=>I&&!D&&I(w)},T);t.Option=v;function m(...w){}function _(w,T){return T?w.props[T]:w.props.value}function s(w,T){let D=[];return Array.isArray(w)?D=o.default.Children.toArray(w).map(T):D=[T(w)],D}function f(w,T,D=(I,R)=>I===R){const R=o.default.Children.toArray(T).filter(M=>o.default.isValidElement(M)).find(M=>{var O;return M.props&&D((O=M.props)===null||O===void 0?void 0:O.value,w)?M:null});return R?.props}function a(w){return w?w.length===0?!0:u(w[0]):!1}function h(w){return w?w.length===0?!0:d(w[0]):!1}function u(w){return w.value!==void 0}function d(w){return w.groupName!==void 0&&a(w.options)}function E(w){return o.default.createElement(o.default.Fragment,null,w.data.iconClass?o.default.createElement("div",{className:(0,r.default)(w.data.iconClass,"kt-select-option-icon")}):void 0,w.data.label)}function g({group:w,index:T}){return o.default.createElement("div",{key:"header_"+T,className:"kt-select-group-header"},w.iconClass?o.default.createElement("div",{className:(0,r.default)(w.iconClass,"kt-select-option-icon")}):void 0,o.default.createElement("div",null,w.groupName))}function c(w,T){let D=T.label;if(D===void 0)try{D=T.value.toString()}catch{D=void 0}return typeof D=="string"?D.indexOf(w)!==-1:!1}const b=o.default.memo(({selected:w,selectedRenderer:T})=>T?o.default.createElement(T,{data:w}):o.default.createElement(o.default.Fragment,null,w.iconClass&&o.default.createElement("div",{className:(0,r.default)(w.iconClass,"kt-select-option-icon")}),o.default.createElement("span",{className:"kt-select-option"},w.label))),y=o.default.memo(({value:w,onChange:T,placeholder:D,size:I="default"})=>o.default.createElement(p.Input,{className:"kt-select-search",value:w,size:I,onChange:R=>T(R.target.value),autoFocus:!0,placeholder:D||""}));function S({disabled:w,options:T,size:D="default",children:I,value:R,onChange:M,onMouseEnter:O,optionLabelProp:P,style:k,optionStyle:F,className:L,maxHeight:B,equals:j=(q,Oe)=>q===Oe,optionRenderer:W=E,groupTitleRenderer:U,footerComponent:X,headerComponent:V,showSearch:$=!1,filterOption:Y=c,searchPlaceholder:z="",emptyComponent:H,selectedRenderer:K,onBeforeShowOptions:Z,allowOptionsOverflow:Q,dropdownRenderType:oe="fixed",description:ne,notMatchWarning:he,onSearchChange:_e}){const[q,Oe]=(0,o.useState)(!1),[ye,ie]=(0,o.useState)(""),fe=o.default.useRef(null),Me=o.default.useRef(null),Le=(0,o.useCallback)(Se=>{Se.preventDefault(),Se.stopPropagation(),!(!q&&Z?.())&&Oe(!q)},[q,Z]),Ae=(0,o.useCallback)(()=>{var Se,Fe,$e,Ve,mt,it,xt,lt,Dt;if(T&&a(T)){for(const ot of T)if(j(R,ot.value))return{iconClass:ot.iconClass,label:ot.label,value:ot.value};return{iconClass:(Se=T[0])===null||Se===void 0?void 0:Se.iconClass,label:(Fe=T[0])===null||Fe===void 0?void 0:Fe.label,value:($e=T[0])===null||$e===void 0?void 0:$e.value}}else if(T&&h(T)){for(const ot of T)for(const ut of ot.options)if(j(R,ut.value))return{iconClass:ut.iconClass,label:ut.label,value:ut.value};return{iconClass:(mt=(Ve=T[0])===null||Ve===void 0?void 0:Ve.options[0])===null||mt===void 0?void 0:mt.iconClass,label:(xt=(it=T[0])===null||it===void 0?void 0:it.options[0])===null||xt===void 0?void 0:xt.label,value:(Dt=(lt=T[0])===null||lt===void 0?void 0:lt.options[0])===null||Dt===void 0?void 0:Dt.value}}else{const ot=I&&f(R,I);if(ot)return{label:ot.label||ot.value,value:ot.value}}return{label:R,value:R,notMatch:!0}},[T,R,I])(),ve=(0,r.default)("kt-select-options",{"kt-select-options-visible":q,[`kt-select-options-${D}`]:D}),ge=he&&Ae.notMatch,xe=(0,r.default)("kt-select-value",{"kt-select-warning":ge,"kt-select-disabled":w,"kt-select-value-active":q,[`kt-select-value-${D}`]:D});function Ie(Se,Fe){var $e;if(!Se)return null;(typeof Se=="string"||typeof Se=="number")&&(Se=o.default.createElement(t.Option,{value:Se,label:String(Se),key:`${Se}_${Fe}`},Se));const Ve=Se,mt=(($e=Ve.props)===null||$e===void 0?void 0:$e.disabled)||!1;return o.default.createElement("div",{key:`${Ve.props.value}_${Fe}`,className:(0,r.default)({"kt-select-option-select":R===Ve.props.value}),onMouseEnter:()=>O?.(Ve.props.value,Fe),onClick:mt?m:()=>{Oe(!1),M&&M(_(Se,P))}},Se)}(0,o.useEffect)(()=>{!q&&ye&&ie("")},[]),(0,o.useEffect)(()=>{if(!q)return;const Se=Fe=>{fe.current&&!fe.current.contains(Fe.target)&&Oe(!1)};return document.addEventListener("click",Se),()=>document.removeEventListener("click",Se)},[q]);const We=(0,o.useCallback)(()=>{if(!fe.current||!Me.current)return;const Se=fe.current.getBoundingClientRect(),Fe=Me.current;Q?(Fe.style.minWidth=`${Se.width}px`,Fe.style.maxWidth=`${window.innerWidth-Se.left-4}px`):Fe.style.width=`${Se.width}px`;const $e=window.innerHeight-Se.bottom-50,Ve=Fe.clientHeight;$e<Ve?Fe.style.bottom=`${Se.height+4}px`:(Fe.style.maxHeight=`${$e}px`,Fe.style.bottom="auto"),Fe.style.position=oe},[Q,oe]);(0,o.useEffect)(()=>{if(q)return We(),window.addEventListener("resize",We),()=>window.removeEventListener("resize",We)},[q,We]);const pe=(0,o.useMemo)(()=>ye?a(T)?T.filter(Se=>Y(ye,Se)):h(T)?T.reduce((Se,Fe)=>{const $e=Fe.options.filter(Ve=>Y(ye,Ve,Fe));return $e.length&&Se.push({...Fe,options:$e}),Se},[]):T:T,[T,ye,Y]),re=()=>o.default.createElement(o.default.Fragment,null,o.default.createElement(b,{selected:Ae,selectedRenderer:K}),o.default.createElement(l.Icon,{iconClass:(0,r.default)((0,l.getIcon)("down"),"kt-select-value-default-icon")})),le=(0,o.useCallback)(Se=>{ie(Se),_e?.(Se)},[ye,_e]),Te=()=>o.default.createElement(y,{value:ye,onChange:le,placeholder:z});return o.default.createElement("div",{className:(0,r.default)("kt-select-container",L),ref:fe},o.default.createElement("div",{className:xe,onClick:Le,style:k},$&&q?Te():re()),ge&&o.default.createElement("div",{className:"kt-select-warning-text"},he),q&&!ye&&(a(pe)||h(pe)?o.default.createElement(t.SelectOptionsList,{optionRenderer:W,options:pe,equals:j,optionStyle:F,currentValue:R,size:D,onSelect:Se=>{M&&M(Se),Oe(!1)},groupTitleRenderer:U,className:ve,style:{maxHeight:`${B}px`},ref:Me,footerComponent:X,headerComponent:V,emptyComponent:H}):o.default.createElement("div",{className:ve,style:{maxHeight:`${B}px`},ref:Me},T&&T.map((Se,Fe)=>Ie(Se,Fe)),I&&s(I,Ie),ne&&o.default.createElement(A,{text:ne}),o.default.createElement("div",{className:"kt-select-overlay",onClick:Le}))))}function A({text:w}){return o.default.createElement(o.default.Fragment,null,o.default.createElement("div",{className:"kt-option-divider"}),o.default.createElement("div",{className:"kt-option-description"},w))}t.SelectOptionsList=o.default.forwardRef((w,T)=>{const{options:D,optionRenderer:I=E,equals:R=(H,K)=>H===K,onSelect:M,currentValue:O,optionStyle:P,size:k,className:F,style:L,groupTitleRenderer:B=g,renderCheck:j,headerComponent:W,footerComponent:U,emptyComponent:X}=w,V=(0,r.default)("kt-select-options",{[`kt-select-options-${k}`]:!0},F);function $(H){return H.map((K,Z)=>{const Q=o.default.createElement(B,{group:K,index:Z});return o.default.createElement(o.default.Fragment,{key:"group_"+Z},Q,Y(K.options))})}function Y(H){return H&&H.map((K,Z)=>{const Q=R(O,K.value);return o.default.createElement(t.Option,{value:Z,key:Z,className:(0,r.default)({"kt-select-option-select":Q,"kt-select-option-default":!0,"kt-option-with-check":j}),onClick:()=>M(K.value),style:P},j&&R(O,K.value)?o.default.createElement("div",{className:"kt-option-check"},o.default.createElement(l.Icon,{icon:"check"})):void 0,o.default.createElement(I,{data:K,isCurrent:Q}))})}let z;return h(D)?z=D.filter(H=>H.options.length>0).length===0:z=D.length===0,o.default.createElement("div",{className:V,style:L,ref:T,onClick:H=>{H.stopPropagation()}},W?o.default.createElement(W,null):null,z&&X?o.default.createElement(X,null):(h(D)?$(D):Y(D))||X&&o.default.createElement(X,null),U?o.default.createElement(U,null):null)})},54076:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Tabs=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importDefault(e(14041));e(1030);const l=p=>{const{tabs:v,className:m,value:_,onChange:s,mini:f,style:a,...h}=p,u=o.default.useCallback(d=>{typeof s=="function"&&s(d)},[]);return o.default.createElement("div",{...h,style:a,className:(0,r.default)("kt-tabs",m,{"kt-tabs-mini":f})},v.map((d,E)=>{const g=E===_?"kt-tab-selected":"";return typeof d=="string"?o.default.createElement("div",{key:E,className:(0,r.default)("kt-tab",g,{"kt-mini-tab":f}),onClick:u.bind(null,E)},d):o.default.createElement("div",{key:E,className:(0,r.default)("kt-custom-tab",g,{"kt-mini-tab":f}),onClick:u.bind(null,E)},d)}))};t.Tabs=l},72871:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Tooltip=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importStar(e(14041));e(24571);const l=({title:p,children:v,delay:m})=>{const[_,s]=(0,o.useState)(!1),f=(0,o.useRef)(null),a=(0,o.useRef)(null),h=(0,o.useRef)(null),u=(0,o.useRef)(null);(0,o.useEffect)(()=>()=>clearTimeout(u.current),[]);function d(){if(_){u.current&&clearTimeout(u.current);return}u.current=setTimeout(()=>{if(s(!0),a.current&&f.current&&h.current){const{x:g,y:c,width:b,height:y}=f.current.getBoundingClientRect(),S=a.current.getBoundingClientRect();c<S.height*1.5?(h.current.className+=" kt-tooltip-reverse-arrow",a.current.style.top=`${c+y+S.height/2}px`):a.current.style.top=`${c-S.height*1.5}px`,g+S.width/2>=document.body.offsetWidth?(h.current.style.right=`${b/2-7}px`,a.current.style.left=`${g+b-S.width}px`):g-S.width/2<=0?(h.current.style.left=`${b/2-7}px`,a.current.style.left=`${g}px`):(h.current.style.left=`${S.width/2-7}px`,a.current.style.left=`${g+b/2-S.width/2}px`)}clearTimeout(u.current)},m||500)}function E(){u.current&&clearTimeout(u.current),s(!1)}return o.default.createElement("p",{ref:f,className:"kt-tooltip-wrapper",onMouseEnter:d,onMouseLeave:E},v,_&&o.default.createElement("span",{ref:a,className:(0,r.default)("kt-tooltip-content")},p,o.default.createElement("span",{ref:h,className:"kt-tooltip-arrow-placeholder"})))};t.Tooltip=l},40604:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Deprecated=l;const n=e(85608),r=n.__importDefault(e(14041)),o=n.__importDefault(e(65973));function l(p,v){return m=>(r.default.useEffect(()=>{(0,o.default)(!1,`${p.displayName||p.name} is deprecated: ${v}`)},[]),r.default.createElement(p,m))}},84605:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(85608);n.__exportStar(e(40604),t),n.__exportStar(e(65973),t),n.__exportStar(e(43953),t),n.__exportStar(e(2835),t),n.__exportStar(e(47768),t),n.__exportStar(e(26809),t)},26809:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parseWithoutEscape=t.toMarkdownHtml=t.parseMarkdown=t.createMarkedRenderer=t.marked=void 0;const n=e(33714);Object.defineProperty(t,"marked",{enumerable:!0,get:function(){return n.marked}});const r=()=>new n.Renderer;t.createMarkedRenderer=r;const o=(v,m,_)=>{if(!_)return n.marked.parse(v,m);m?n.marked.parse(v,m,_):n.marked.parse(v,_)};t.parseMarkdown=o;const l=(v,m)=>(0,n.marked)(v,m);t.toMarkdownHtml=l;const p=v=>(v.type==="escape"&&(v.text=v.raw),v);t.parseWithoutEscape=p},2835:(x,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.collapseMotion=void 0;const e=()=>({height:0,opacity:0}),n=o=>({height:o.scrollHeight,opacity:1}),r=o=>({height:o.offsetHeight});t.collapseMotion={motionName:"kt-motion-collapse",onAppearStart:e,onEnterStart:e,onAppearActive:n,onEnterActive:n,onLeaveStart:r,onLeaveActive:e}},47768:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.wrapperRaf=p;const r=e(85608).__importDefault(e(10719));let o=0;const l={};function p(v,m=1){const _=o++;let s=m;function f(){s-=1,s<=0?(v(),delete l[_]):l[_]=(0,r.default)(f)}return l[_]=(0,r.default)(f),_}p.cancel=function(m){m!==void 0&&(r.default.cancel(l[m]),delete l[m])},p.ids=l},43953:(x,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.tupleNum=t.tuple=void 0;const e=(...r)=>r;t.tuple=e;const n=(...r)=>r;t.tupleNum=n},65973:(x,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.warning=n,t.note=r,t.resetWarned=o,t.call=l,t.warningOnce=p,t.noteOnce=v;let e={};function n(m,_){}function r(m,_){}function o(){e={}}function l(m,_,s){!_&&!e[s]&&(m(!1,s),e[s]=!0)}function p(m,_){l(n,m,_)}function v(m,_){l(r,m,_)}t.default=p},91802:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.VirtualList=void 0;const r=e(85608).__importStar(e(14041)),o=e(24241),l=e(77011),p=({data:v,className:m,template:_,refSetter:s,onRangeChanged:f})=>{const a=(0,r.useRef)(null);return(0,r.useEffect)(()=>{s?.(a.current)},[a.current]),r.default.createElement(l.Scrollbars,{thumbSize:0},r.default.createElement(o.Virtuoso,{rangeChanged:h=>{f?.(h)},overscan:20,ref:a,style:{height:"100%"},className:m,data:v,itemContent:(h,u)=>r.default.createElement(_,{index:h,data:u})}))};t.VirtualList=p},18740:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),e(85608).__exportStar(e(59019),t)},59019:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WSChannelHandler=void 0;const n=e(40396),r=e(43718),o=e(54558),l=e(47561);class p{onChannelCreated(m,_){return this._onChannelCreatedEmitter.on(m,_)}constructor(m,_,s={}){this.connection=m,this._disposables=new r.DisposableStore,this._onChannelCreatedEmitter=this._disposables.add(new n.EventEmitter),this.channelMap=new Map,this.channelCloseEventMap=new r.MultiMap,this.logger=console,this.openingBarrier=new r.Barrier,this.logger=s.logger||this.logger,this.clientId=_,this.LOG_TAG=`[WSChannelHandler] [client-id:${this.clientId}]`;const f=s.serializer||o.furySerializer;this.wrappedConnection=(0,o.wrapSerializer)(this.connection,f)}replaceLogger(m){m&&(this.logger=m)}setReporter(m){this.reporterService=m}heartbeatMessage(){this.heartbeatMessageTimer&&clearTimeout(this.heartbeatMessageTimer),this.heartbeatMessageTimer=setTimeout(()=>{this.channelMap.forEach(m=>{m.ping()}),this.heartbeatMessage()},1e4)}async initHandler(){this.wrappedConnection.onMessage(_=>{switch(this.heartbeatMessage(),_.kind){case"pong":break;default:{const s=this.channelMap.get(_.id);s?s.dispatch(_):this.logger.warn(this.LOG_TAG,`channel ${_.id} not found`)}}});const m=()=>{this.channelMap.size>0&&this.channelMap.forEach(_=>{_.open(_.channelPath,this.clientId)})};this.connection.onClose((_,s)=>{this.channelMap.forEach(f=>{f.close(_,s)})}),this.connection.isOpen()&&(this.heartbeatMessage(),this.openingBarrier.open()),this.connection.onOpen(()=>{this.heartbeatMessage(),this.openingBarrier.isOpen()?m():this.openingBarrier.open()}),await this.openingBarrier.wait()}fillKey(m){return`${this.clientId}:${m}`}getChannel(m){return this.channelMap.get(this.fillKey(m))}async openChannel(m){const _=this.fillKey(m);this.channelMap.has(_)&&(this.channelMap.get(_).dispose(),this.logger.log(this.LOG_TAG,`channel ${_} already exists, dispose it`));const s=new l.WSChannel(this.wrappedConnection,{id:_,logger:this.logger,ensureServerReady:!0});this.channelMap.set(s.id,s),this._onChannelCreatedEmitter.emit(m,s);let f=0;s.onOpen(()=>{f++,f>1?(s.fireReopen(),this.logger.log(this.LOG_TAG,`channel reconnect ${this.clientId}:${s.channelPath}, count: ${f}`)):this.logger.log(this.LOG_TAG,`channel open ${this.clientId}:${s.channelPath}`);const u=this.channelCloseEventMap.get(s.id);u&&(u.forEach(d=>{this.reporterService&&this.reporterService.point(r.REPORT_NAME.CHANNEL_RECONNECT,r.REPORT_NAME.CHANNEL_RECONNECT,d)}),this.channelCloseEventMap.delete(s.id))}),s.onClose((u,d)=>{this.channelCloseEventMap.set(s.id,{channelPath:m,closeEvent:{code:u,reason:d},connectInfo:navigator.connection}),this.logger.log(this.LOG_TAG,`channel ${m} closed, code: ${u}, reason: ${d}`)});const a=new r.Deferred,h=s.onOpen(()=>{a.resolve(),h.dispose()});return s.open(m,this.clientId),await a.promise,s}dispose(){this.heartbeatMessageTimer&&clearTimeout(this.heartbeatMessageTimer),this._disposables.dispose()}awaitChannelReady(m){const _=this.getChannel(m),s=new r.Deferred;if(_)_.onServerReady(()=>{s.resolve()});else{const f=this.onChannelCreated(m,a=>{a.onServerReady(()=>{s.resolve()}),f.dispose()})}return s.promise}}t.WSChannelHandler=p},98710:(x,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Cursor=t.Buffers=t.buffer4Capacity=t.emptyBuffer=void 0,t.copy=e,t.emptyBuffer=new Uint8Array(0),t.buffer4Capacity=new Uint8Array(4);function e(o,l,p,v,m){l.set(o.subarray(v,m),p)}class n{constructor(){this.buffers=[],this.size=0}get byteLength(){return this.size}push(l){this.buffers.push(l),this.size+=l.length}unshift(l){this.buffers.unshift(l),this.size+=l.length}slice(l,p){const v=this.buffers;if(p===void 0&&(p=this.size),l===void 0&&(l=0),p>this.size&&(p=this.size),l>=p)return t.emptyBuffer;let m=0,_=0;for(;_<v.length&&m+v[_].length<=l;_++)m+=v[_].length;const s=new Uint8Array(p-l);let f=0;for(let a=_;f<p-l&&a<v.length;a++){const h=v[a].length,u=f===0?l-m:0,d=f+h>=p-l?Math.min(u+(p-l)-f,h):h;e(v[a],s,f,u,d),f+=d-u}return s}slice4(l){let p=l+4;const v=this.buffers;if(p>this.size&&(p=this.size),l>=p)return t.emptyBuffer;let m=0,_=0;for(;_<v.length&&m+v[_].length<=l;_++)m+=v[_].length;const s=t.buffer4Capacity;let f=0;for(let a=_;f<p-l&&a<v.length;a++){const h=v[a].length,u=f===0?l-m:0,d=f+h>=p-l?Math.min(u+(p-l)-f,h):h;e(v[a],s,f,u,d),f+=d-u}return s}pos(l){if(l<0||l>=this.size)throw new Error(`out of range, ${l} not in [0, ${this.size})`);let p=l,v=0,m=null;for(;;){if(m=this.buffers[v],p<m.length)return{buf:v,offset:p};p-=m.length,v++}}copy(l,p=0,v=0,m=this.size){return e(this.slice(v,m),l,p,0,m-v)}splice(l,p,...v){const m=this.buffers,_=l>=0?l:this.size-l;p===void 0?p=this.size-_:p>this.size-_&&(p=this.size-_);for(const h of v)this.size+=h.length;const s=new n;let f=0,a=0;for(;a<m.length&&f+m[a].length<_;a++)f+=m[a].length;if(_-f>0){const h=_-f;if(h+p<m[a].length){s.push(m[a].slice(h,h+p));const u=m[a],d=new Uint8Array(h);for(let g=0;g<h;g++)d[g]=u[g];const E=new Uint8Array(u.length-h-p);for(let g=h+p;g<u.length;g++)E[g-p-h]=u[g];if(v.length>0){const g=v.slice();g.unshift(d),g.push(E),m.splice.apply(m,[a,1,...g]),a+=g.length,v=[]}else m.splice(a,1,d,E),a+=2}else s.push(m[a].slice(h)),m[a]=m[a].slice(0,h),a++}for(v.length>0&&(m.splice.apply(m,[a,0,...v]),a+=v.length);s.byteLength<p;){const h=m[a],u=h.length,d=Math.min(u,p-s.byteLength);d===u?(s.push(h),m.splice(a,1)):(s.push(h.slice(0,d)),m[a]=m[a].slice(d))}return this.size-=s.byteLength,s}get(l){const{buf:p,offset:v}=this.pos(l);return this.buffers[p][v]}set(l,p){const{buf:v,offset:m}=this.pos(l);this.buffers[v][m]=p}cursor(l=0){return new r(this,l)}dispose(){this.buffers=[],this.size=0}}t.Buffers=n;class r{constructor(l,p=0){this.buffers=l,this.offset=p,this.chunkIndex=0,this.chunkOffset=0,this.updatePosition()}updatePosition(){if(this.offset===0){this.chunkIndex=0,this.chunkOffset=0;return}const{buf:l,offset:p}=this.buffers.pos(this.offset);this.chunkIndex=l,this.chunkOffset=p}get line(){return this.chunkIndex}get lineWidth(){return this.buffers.buffers[this.chunkIndex].byteLength}get value(){return this.buffers.buffers[this.chunkIndex][this.chunkOffset]}get lineOffset(){return this.chunkOffset}*iterator(){for(;this.chunkIndex<this.buffers.buffers.length;){const l=this.buffers.buffers[this.chunkIndex],p=l.byteLength;for(;this.chunkOffset<p;){const v=l[this.chunkOffset];this.chunkOffset++,this.offset++,yield v}this.chunkOffset=0,this.chunkIndex++}}read(l){const p=this.offset+l,v=this.buffers.slice(this.offset,p);return this.skip(l),v}read4(){const l=this.buffers.slice4(this.offset);return this.skip(4),l}skip(l){let p=0;for(;this.chunkIndex<this.buffers.buffers.length;){const m=this.buffers.buffers[this.chunkIndex].byteLength;for(;this.chunkOffset<m;)if(this.chunkOffset++,this.offset++,++p===l)return;this.chunkOffset=0,this.chunkIndex++}}moveTo(l){this.offset=l,this.updatePosition()}dispose(){this.buffers=null,this.offset=0}reset(){this.offset=0,this.chunkIndex=0,this.chunkOffset=0}}t.Cursor=r},30613:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Capturer=t.ResponseStatus=t.MessageType=void 0,t.getCapturer=v;const n=e(43718),r=e(65265);var o;(function(_){_.SendNotification="sendNotification",_.SendRequest="sendRequest",_.RequestResult="requestResult",_.OnNotification="onNotification",_.OnRequest="onRequest",_.OnRequestResult="onRequestResult"})(o||(t.MessageType=o={}));var l;(function(_){_.Success="success",_.Fail="fail"})(l||(t.ResponseStatus=l={}));const p=typeof e.g>"u"?typeof window>"u"?{__OPENSUMI_DEVTOOLS_GLOBAL_HOOK__:void 0}:window:e.g;function v(){const _=p.__OPENSUMI_DEVTOOLS_GLOBAL_HOOK__;if(_)return _.captureRPC}class m{constructor(s){this.source=s,this._disposables=new n.DisposableStore,this.capturer=null,this.setupListener=f=>{const{command:a}=f.detail;a===r.DevtoolsLantencyCommand.Start?this.capturer=v():a===r.DevtoolsLantencyCommand.Stop&&(this.capturer=null)},this.prefix=(0,n.randomString)(6),this.capturer=v(),typeof p.addEventListener=="function"&&(p.addEventListener(r.EDevtoolsEvent.Latency,this.setupListener),this._disposables.add({dispose:()=>{p.removeEventListener(r.EDevtoolsEvent.Latency,this.setupListener)}}))}capture(s){if(!this.capturer)return;const f={...s,source:this.source};f.data&&(0,n.isUint8Array)(f.data)&&(f.data="<Uint8Array>"),s.requestId&&(f.requestId=`${this.prefix}-${s.requestId}`),s.error&&(f.error=(0,n.transformErrorForSerialization)(s.error)),this.capturer(f)}captureOnRequest(s,f,a){this.capturer&&this.capture({type:o.OnRequest,requestId:`\u2193${s}`,serviceMethod:f,arguments:a})}captureOnRequestResult(s,f,a){this.capturer&&this.capture({type:o.OnRequestResult,status:l.Success,requestId:`\u2193${s}`,serviceMethod:f,data:a})}captureOnRequestFail(s,f,a){this.capturer&&this.capture({type:o.OnRequestResult,status:l.Fail,requestId:`\u2193${s}`,serviceMethod:f,error:a})}captureSendRequest(s,f,a){this.capturer&&this.capture({type:o.SendRequest,requestId:s,serviceMethod:f,arguments:a})}captureSendRequestResult(s,f,a){this.capturer&&this.capture({type:o.RequestResult,status:l.Success,requestId:s,serviceMethod:f,data:a})}captureSendRequestFail(s,f,a){this.capturer&&this.capture({type:o.RequestResult,status:l.Fail,requestId:s,serviceMethod:f,error:a})}captureSendNotification(s,f,a){this.capturer&&this.capture({type:o.SendNotification,serviceMethod:f,arguments:a,requestId:s})}captureOnNotification(s,f,a){this.capturer&&this.capture({type:o.OnNotification,serviceMethod:f,arguments:a,requestId:`\u2193${s}`})}dispose(){this._disposables.dispose()}}t.Capturer=m},29433:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),e(85608).__exportStar(e(39048),t)},39048:(x,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ErrorMessageCode=void 0;var e;(function(n){n[n.ChannelNotFound=1]="ChannelNotFound"})(e||(t.ErrorMessageCode=e={}))},9811:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.initRPCService=l,t.createRPCService=p,t.getRPCService=v;const n=e(85608),r=e(62199),o=e(8140);function l(m){return{createRPCService:(_,s)=>{const f=p(_,m);return s&&f.onRequestService(s),f},getRPCService:_=>v(_,m)}}function p(m,_){return new r.RPCServiceStub(m,_,o.ServiceType.Service).getProxy()}function v(m,_){return new r.RPCServiceStub(m,_,o.ServiceType.Stub).getProxy()}n.__exportStar(e(62199),t)},35821:(x,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BaseConnection=void 0;class e{}t.BaseConnection=e},57358:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LengthFieldBasedFrameDecoder=t.indicator=void 0;const n=e(89212),r=e(43718),o=e(98710);t.indicator=new Uint8Array([13,10,13,10]);const l=4;class p{constructor(){this.buffers=new o.Buffers,this.cursor=this.buffers.cursor(),this.processingPromise=null,this.contentLength=-1,this.state=0}onData(m){return this._onDataListener=m,{dispose:()=>{this._onDataListener=null}}}reset(){this.contentLength=-1,this.state=0,this.cursor.reset()}push(m){this.buffers.push(m),this.processingPromise||(this.processingPromise=this.processBuffers().finally(()=>{this.processingPromise=null}))}async processBuffers(){let m=0,_=!1;do{for(_=!1;m<p.MAX_ITERATIONS&&!(this.buffers.byteLength===0||await this.readFrame()===!0);)m++,m%10===0&&await new Promise(f=>setTimeout(f,0));this.buffers.byteLength>0&&(_=!0,await new Promise(s=>setImmediate(s)),m=0)}while(_)}async readFrame(){try{if(!this.readLengthField())return!0;const _=this.cursor.offset,s=_+this.contentLength;if(s>this.buffers.byteLength)return!0;const f=this.buffers.slice(_,s);if(this.buffers.splice(0,s),this.reset(),this._onDataListener)try{await Promise.resolve().then(()=>{var a;return(a=this._onDataListener)===null||a===void 0?void 0:a.call(this,f)})}catch(a){console.error("[Frame Decoder] Error in data listener:",a)}return!1}catch(m){return console.error("[Frame Decoder] Error processing frame:",m),this.reset(),!0}}readLengthField(){const m=this.buffers.byteLength;if(this.state!==4){if(this.cursor.offset+t.indicator.length>m)return!1;this.readIndicator()}if(this.state!==4)return!1;if(this.contentLength===-1){if(this.cursor.offset+l>m)return!1;const _=this.cursor.read4();this.contentLength=(0,r.readUInt32LE)(_,0)}return!(this.cursor.offset+this.contentLength>m)}readIndicator(){const m=this.cursor.iterator();let _=m.next();for(;!_.done;){switch(_.value){case 13:switch(this.state){case 0:this.state=1;break;case 2:this.state=3;break;default:this.state=0;break}break;case 10:switch(this.state){case 1:this.state=2;break;case 3:this.state=4,m.return();break;default:this.state=0;break}break;default:this.state=0;break}_=m.next()}}dispose(){this._onDataListener=null,this.buffers.dispose(),this.reset()}static construct(m){const _=(0,n.BinaryWriter)({});try{return _.buffer(t.indicator),_.uint32(m.byteLength),_.buffer(m),_}catch(s){throw console.warn("[Frame Decoder] Error constructing frame:",s),s}}}t.LengthFieldBasedFrameDecoder=p,p.MAX_ITERATIONS=50},34982:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(85608);n.__exportStar(e(35821),t),n.__exportStar(e(71056),t),n.__exportStar(e(57625),t),n.__exportStar(e(15272),t)},92917:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MessagePortConnection=void 0;const n=e(35821);class r extends n.BaseConnection{constructor(l){super(),this.port=l,l.start()}send(l){this.port.postMessage(l)}onMessage(l){const p=v=>{l(v.data)};return this.port.addEventListener("message",p),{dispose:()=>{this.port.removeEventListener("message",p)}}}onceClose(l){return this.port.addEventListener("close",l),{dispose:()=>{this.port.addEventListener("close",l)}}}dispose(){}}t.MessagePortConnection=r},71056:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NodeMessagePortConnection=void 0;const n=e(35821);class r extends n.BaseConnection{constructor(l){super(),this.port=l}send(l){this.port.postMessage(l)}onMessage(l){return this.port.on("message",l),{dispose:()=>{this.port.off("message",l)}}}onceClose(l){return this.port.once("close",l),{dispose:()=>{this.port.off("close",l)}}}dispose(){this.port.removeAllListeners()}}t.NodeMessagePortConnection=r},91493:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ReconnectingWebSocketConnection=void 0;const r=e(85608).__importDefault(e(31133)),o=e(91676),l=e(35821),p=e(57358);class v extends l.BaseConnection{constructor(_){if(super(),this.socket=_,this.decoder=new p.LengthFieldBasedFrameDecoder,this.sendQueue=[],this.sending=!1,this.arrayBufferHandler=s=>{const f=s.data;this.decoder.push(new Uint8Array(f,0,f.byteLength))},_.binaryType==="arraybuffer")this.socket.addEventListener("message",this.arrayBufferHandler);else if(_.binaryType==="blob")throw new Error("blob is not implemented")}async processSendQueue(){if(!this.sending){for(this.sending=!0;this.sendQueue.length>0;){const{data:_,resolve:s,reject:f}=this.sendQueue[0];let a=null;try{a=p.LengthFieldBasedFrameDecoder.construct(_).dumpAndOwn();const h=a.get();for(let u=0;u<h.byteLength;u+=o.chunkSize)await new Promise(d=>{const E=h.subarray(u,Math.min(u+o.chunkSize,h.byteLength));this.socket.send(E),d()});s()}catch(h){console.error("[ReconnectingWebSocket] Error sending data:",h),f(h)}finally{a&&a.dispose()}this.sendQueue.shift()}this.sending=!1}}send(_){return new Promise((s,f)=>{this.sendQueue.push({data:_,resolve:s,reject:f}),this.processSendQueue()})}isOpen(){return this.socket.readyState===this.socket.OPEN}onOpen(_){return this.socket.addEventListener("open",_),{dispose:()=>{this.socket.removeEventListener("open",_)}}}onMessage(_){return this.decoder.onData(_)}onceClose(_){const s=this.onClose(f);return{dispose:()=>{s.dispose()}};function f(a,h){_(a,h),s.dispose()}}onClose(_){const s=f=>{_(f.code,f.reason)};return this.socket.addEventListener("close",s),{dispose:()=>{this.socket.removeEventListener("close",s)}}}onError(_){const s=f=>{_(f.error)};return this.socket.addEventListener("error",s),{dispose:()=>{this.socket.removeEventListener("error",s)}}}dispose(){this.socket.removeEventListener("message",this.arrayBufferHandler),this.sendQueue=[],this.sending=!1}static forURL(_,s,f){const a=new r.default(_,s,f);return a.binaryType="arraybuffer",new v(a)}}t.ReconnectingWebSocketConnection=v},57625:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NetSocketConnection=void 0;const n=e(36932);class r extends n.StreamConnection{constructor(l){super(l,l),this.socket=l}isOpen(){return this.socket.readyState==="open"}onOpen(l){return this.socket.on("connect",l),{dispose:()=>{this.socket.off("connect",l)}}}destroy(){this.socket.destroy()}}t.NetSocketConnection=r},36932:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StreamConnection=void 0;const n=e(35821),r=e(57358);class o extends n.BaseConnection{constructor(p,v){super(),this.readable=p,this.writable=v,this.decoder=new r.LengthFieldBasedFrameDecoder;const m=_=>{this.decoder.push(_)};this.readable.on("data",m),this.readable.once("close",()=>{this.decoder.dispose(),this.readable.off("data",m)})}send(p){const v=r.LengthFieldBasedFrameDecoder.construct(p).dumpAndOwn();try{this.writable.write(v.get(),m=>{m&&console.error("Failed to write data:",m)})}finally{v.dispose()}}onMessage(p){return this.decoder.onData(p)}onceClose(p){const v=this.onClose(m);return{dispose:()=>{v.dispose()}};function m(_,s){p(_,s),v.dispose()}}onClose(p){const v=m=>{p(m?1:0,m?"had error":"")};return this.readable.on("close",v),this.writable!==this.readable&&this.writable.on("close",v),{dispose:()=>{this.readable.off("close",v),this.writable!==this.readable&&this.writable.off("close",v)}}}onError(p){return this.readable.on("error",p),this.writable!==this.readable&&this.writable.on("error",p),{dispose:()=>{this.readable.off("error",p),this.writable!==this.readable&&this.writable.off("error",p)}}}dispose(){this.decoder.dispose()}}t.StreamConnection=o},15272:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WSWebSocketConnection=void 0;const n=e(91676),r=e(35821),o=e(57358);class l extends r.BaseConnection{constructor(v){super(),this.socket=v,this.decoder=new o.LengthFieldBasedFrameDecoder,this.sendQueue=[],this.pendingSize=0,this.sending=!1,this.socket.on("message",m=>{this.decoder.push(m)})}async processSendQueue(){if(!this.sending){for(this.sending=!0;this.sendQueue.length>0;){const{data:v,resolve:m,reject:_}=this.sendQueue[0];let s=null;try{s=o.LengthFieldBasedFrameDecoder.construct(v).dumpAndOwn();const f=s.get();for(let a=0;a<f.byteLength;a+=n.chunkSize){if(!this.isOpen())throw new Error("Connection closed while sending");await new Promise((h,u)=>{const d=f.subarray(a,Math.min(a+n.chunkSize,f.byteLength));this.socket.send(d,{binary:!0},E=>{E?u(E):h()})})}m()}catch(f){_(f instanceof Error?f:new Error(String(f)))}finally{if(s)try{s.dispose()}catch(f){console.warn("[WSWebSocket] Error disposing handle:",f)}this.pendingSize-=this.sendQueue[0].data.byteLength,this.sendQueue.shift()}}this.sending=!1}}send(v){return new Promise((m,_)=>{if(this.sendQueue.length>=l.MAX_QUEUE_SIZE){_(new Error("Send queue full"));return}this.pendingSize+=v.byteLength,this.sendQueue.push({data:v,resolve:m,reject:_}),this.processSendQueue().catch(s=>{console.error("[WSWebSocket] Error processing queue:",s)})})}onMessage(v){return this.decoder.onData(v)}onceClose(v){return this.socket.once("close",v),{dispose:()=>{this.socket.off("close",v)}}}isOpen(){return this.socket.readyState===this.socket.OPEN}dispose(){for(this.socket.removeAllListeners();this.sendQueue.length>0;){const{reject:v}=this.sendQueue.shift();v(new Error("Connection disposed"))}this.pendingSize=0,this.sending=!1}}t.WSWebSocketConnection=l,l.MAX_QUEUE_SIZE=1e3},90750:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),e(85608).__exportStar(e(34982),t)},91676:(x,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.chunkSize=t.METHOD_NOT_REGISTERED=void 0,t.METHOD_NOT_REGISTERED="$$METHOD_NOT_REGISTERED",t.chunkSize=1048576},89104:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ExtObjectTransfer=t.AnySerializer=t.ProtocolType=void 0;const n=e(43718);var r;(function(v){v[v.String=0]="String",v[v.Buffer=1]="Buffer",v[v.Number=2]="Number",v[v.JSONObject=3]="JSONObject",v[v.BigInt=4]="BigInt",v[v.Array=5]="Array",v[v.Object=6]="Object",v[v.Undefined=7]="Undefined",v[v.Null=8]="Null",v[v.Boolean=9]="Boolean"})(r||(t.ProtocolType=r={}));class o{constructor(m,_,s){this.writer=m,this.reader=_,this.objectTransfer=s,this.deserialize=f=>(this.reader.reset(f),this.read()),this.serialize=f=>(this.writer.reset(),this.write(f),this.writer.dump())}write(m){var _;const{writer:s}=this,f=typeof m;switch(s.reserve(1),m){case null:s.uint8(r.Null);return;default:switch(f){case"undefined":s.uint8(r.Undefined);break;case"string":s.uint8(r.String),s.stringOfVarUInt32(m);break;case"boolean":s.reserve(1),s.uint8(r.Boolean),s.uint8(m?1:0);break;case"number":s.reserve(8),s.uint8(r.Number),s.double(m);break;case"bigint":s.reserve(8),s.uint8(r.BigInt),s.int64(m);break;case"object":if(Array.isArray(m)){s.reserve(4),s.uint8(r.Array),s.varUInt32(m.length);for(const a of m)this.write(a)}else(0,n.isUint8Array)(m)?(s.reserve(4),s.uint8(r.Buffer),s.varUInt32(m.byteLength),s.buffer(m)):(s.uint8(r.JSONObject),s.stringOfVarUInt32(JSON.stringify(m,(_=this.objectTransfer)===null||_===void 0?void 0:_.replacer)));break;default:throw new Error(`Unknown type ${f}`)}}}read(){var m;const{reader:_}=this,s=_.uint8();switch(s){case r.Undefined:return;case r.Null:return null;case r.String:return _.stringOfVarUInt32();case r.Buffer:{const f=_.varUInt32();return _.buffer(f)}case r.Number:return _.double();case r.JSONObject:{const f=_.stringOfVarUInt32();return JSON.parse(f,(m=this.objectTransfer)===null||m===void 0?void 0:m.reviver)}case r.BigInt:return _.int64();case r.Array:{const f=_.varUInt32(),a=[];for(let h=0;h<f;h++)a.push(this.read());return a}case r.Boolean:return _.uint8()===1;default:throw new Error(`Unknown type ${s}`)}}}t.AnySerializer=o;var l;(function(v){v.CODE_URI="CodeURI",v.BUFFER="Buffer"})(l||(l={}));class p{static replacer(m,_){if(_){switch(_.$mid){case 1:{const s=n.Uri.revive(_);return{$type:l.CODE_URI,data:s.toString()}}}if(_ instanceof Uint8Array||_ instanceof Uint32Array||_ instanceof Uint16Array)return{$type:"Buffer",data:Array.from(_)};if(_ instanceof ArrayBuffer)return{$type:"Buffer",data:Array.from(new Uint8Array(_))};if(_.type==="Buffer")return{$type:"Buffer",data:_.data}}return _}static reviver(m,_){if(_&&_.$type!==void 0&&_.data!==void 0)switch(_.$type){case l.CODE_URI:return n.Uri.parse(_.data);case l.BUFFER:return Uint8Array.from(_.data)}return _}}t.ExtObjectTransfer=p},94846:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.oneOf=void 0;const n=e(26246),r=e(4405),o=8,l=(p,v)=>{v||(v=(0,r.furyFactory)());const{fury:m,reader:_,writer:s}=v,f=new Array(o),a=new Array(o),h={};return p.forEach((E,g)=>{const c=E.options.tag;f[g]=(0,n.generateSerializer)(m,E),a[g]=c,h[c]=g}),{deserialize:E=>{_.reset(E);const g=_.uint8();let c;switch(g){case 0:c=f[0].read();break;case 1:c=f[1].read();break;case 2:c=f[2].read();break;case 3:c=f[3].read();break;case 4:c=f[4].read();break;case 5:c=f[5].read();break;case 6:c=f[6].read();break;case 7:c=f[7].read();break;default:throw new Error("unknown index: "+g)}return c.kind=a[g],c},serialize:E=>{const g=h[E.kind];switch(s.reset(),s.uint8(g),g){case 0:f[0].write(E);break;case 1:f[1].write(E);break;case 2:f[2].write(E);break;case 3:f[3].write(E);break;case 4:f[4].write(E);break;case 5:f[5].write(E);break;case 6:f[6].write(E);break;case 7:f[7].write(E);break}return s.dump()}}};t.oneOf=l},4405:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.furyFactory=void 0;const r=e(85608).__importDefault(e(97419)),o=l=>{const p=new r.default(l),v=p.binaryReader,m=p.binaryWriter;return{fury:p,reader:v,writer:m}};t.furyFactory=o},25285:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(85608);n.__exportStar(e(66748),t),n.__exportStar(e(62199),t),n.__exportStar(e(86058),t),n.__exportStar(e(15726),t),n.__exportStar(e(30613),t),n.__exportStar(e(47561),t),n.__exportStar(e(9811),t),n.__exportStar(e(8140),t),n.__exportStar(e(90750),t),n.__exportStar(e(54558),t),n.__exportStar(e(29433),t)},16908:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CommonServerProtocol=void 0;const n=e(26387),r=e(43718);t.CommonServerProtocol={name:r.CommonServerPath,methods:[{method:"getBackendOS",request:[],response:{type:n.Type.uint16()}}]}},52890:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PositionProto=t.SelectionProto=t.RangeProto=t.UriComponentsProto=void 0;const n=e(26387);t.UriComponentsProto=n.Type.object("uri-components",{scheme:n.Type.string(),authority:n.Type.string(),path:n.Type.string(),query:n.Type.string(),fragment:n.Type.string()}),t.RangeProto=n.Type.object("range",{startLineNumber:n.Type.uint32(),startColumn:n.Type.uint32(),endLineNumber:n.Type.uint32(),endColumn:n.Type.uint32()}),t.SelectionProto=n.Type.object("selection",{selectionStartLineNumber:n.Type.uint32(),selectionStartColumn:n.Type.uint32(),positionLineNumber:n.Type.uint32(),positionColumn:n.Type.uint32()}),t.PositionProto=n.Type.object("position",{lineNumber:n.Type.uint32(),column:n.Type.uint32()})},11431:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ExtensionDocumentProtocol=void 0;const n=e(26387),r=e(52890);t.ExtensionDocumentProtocol={name:"ExtHostDocuments",methods:[{method:"$fireModelChangedEvent",request:[{name:"event",type:n.Type.object("model-changed-event",{changes:n.Type.array(n.Type.object("model-changed-event-changes",{range:r.RangeProto,rangeLength:n.Type.uint32(),rangeOffset:n.Type.uint32(),text:n.Type.string()})),uri:n.Type.string(),versionId:n.Type.uint32(),eol:n.Type.string(),dirty:n.Type.bool(),isRedoing:n.Type.bool(),isUndoing:n.Type.bool()})}]},{method:"$fireModelOpenedEvent",request:[{name:"event",type:n.Type.object("model-open-event",{uri:n.Type.string(),lines:n.Type.array(n.Type.string()),eol:n.Type.string(),versionId:n.Type.uint32(),languageId:n.Type.string(),dirty:n.Type.bool()})}]},{method:"$provideTextDocumentContent",request:[{name:"path",type:n.Type.string()},{name:"encoding",type:n.Type.string()}],response:{type:n.Type.string()}}]}},26166:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RPCServiceCenter=void 0,t.getNotificationName=s,t.getRequestName=f,t.getMethodName=a;const n=e(43718),r=e(96068),o=e(91676),l=e(8140),p=e(66748),v=e(92408),m=200;class _{constructor(u,d){this.bench=u,this._disposables=new n.DisposableStore,this.proxies=[],this.serviceRegistry=this._disposables.add(new v.ServiceRegistry),this.protocolRegistry=this._disposables.add(new v.ProtocolRegistry),this.deferred=new n.Deferred,this._reportThreshold=m,this.uid=(0,n.randomString)(6),this.logger=d||console}setReporter(u,d=m){this._reporterService=u,this._reportThreshold=d}registerService(u,d){d===l.ServiceType.Service&&this.bench&&this.bench.registerService(u)}ready(){return this.deferred.promise}loadProtocol(u){this.protocolRegistry.addProtocol(u,{nameConverter:d=>a(u.name,d)})}setSumiConnection(u){this.proxies.length===0&&this.deferred.resolve(),this.protocolRegistry.applyTo(u.io);const d=new p.ProxySumi(this.serviceRegistry,this.logger);d.listen(u);const E=(0,r.addElement)(this.proxies,d);return{dispose:()=>{E.dispose(),d.dispose()}}}setConnection(u){this.proxies.length===0&&this.deferred.resolve();const d=new p.ProxyJson(this.serviceRegistry,this.logger);d.listen(u);const E=(0,r.addElement)(this.proxies,d);return{dispose:()=>{E.dispose(),d.dispose()}}}onRequest(u,d,E){this.serviceRegistry.register(a(u,d),E)}onRequestService(u,d){this.serviceRegistry.registerService(d,{nameConverter:E=>a(u,E)})}async broadcast(u,d,...E){await this.ready();const g=a(u,d);let c;this._reporterService&&(c=this._reporterService.time(n.REPORT_NAME.RPC_TIMMING_MEASURE));const b=await Promise.all(this.proxies.map(A=>A.invoke(g,...E))),y=[],S=[];for(const A of b)A===o.METHOD_NOT_REGISTERED?y.push(A):S.push(A);if(y.length>0&&this.logger.warn(`broadcast rpc \`${g}\` getting doubtful responses: ${y.join(",")}`),S.length===0)throw c&&c.timeEnd(g,{success:!1},{minimumReportThresholdTime:this._reportThreshold}),new Error(`broadcast rpc \`${g}\` error: no remote service can handle this call`);return c&&c.timeEnd(g,{success:!0},{minimumReportThresholdTime:this._reportThreshold}),S.length===1?S[0]:S}dispose(){this._disposables.dispose(),this.proxies.forEach(u=>u.dispose()),this.proxies=[]}}t.RPCServiceCenter=_;function s(h,u){return`on:${h}:${u}`}function f(h,u){return`${h}:${u}`}function a(h,u){return u.startsWith("on")?s(h,u):f(h,u)}},62199:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RPCService=void 0;const n=e(85608);n.__exportStar(e(68855),t),n.__exportStar(e(26166),t),n.__exportStar(e(92408),t);class r{get client(){return this.rpcClient?this.rpcClient[0]:void 0}}t.RPCService=r},59875:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ProxyBase=void 0;const n=e(43718),r=new Set(["then","finally"]);let o=0;class l{constructor(v,m){this.registry=v,this.connectionPromise=new n.Deferred,this._disposables=new n.DisposableStore,this.logger=m||console,this.registry.onServicesUpdate(_=>{this.connection&&this.bindMethods(_)})}nextRequestId(){return String(o++)}listen(v){this.connection=v,this._disposables.add(this.connection),this.bindMethods(this.registry.methods()),v.listen(),this.connectionPromise.resolve()}listenService(v){this.registry.registerService(v)}dispose(){this._disposables.dispose()}getInvokeProxy(){return new Proxy(Object.create(null),{get:(v,m)=>typeof m!="string"?null:r.has(m)?Promise.resolve():(v[m]||(v[m]=(..._)=>this.invoke(m,..._)),v[m])})}}t.ProxyBase=l},66748:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(85608);n.__exportStar(e(33716),t),n.__exportStar(e(16420),t)},33716:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ProxyJson=void 0;const n=e(30613),r=e(91676),o=e(59875);class l extends o.ProxyBase{constructor(){super(...arguments),this.engine="json",this.capturer=this._disposables.add(new n.Capturer(this.engine))}bindMethods(v){for(const m of v)m.startsWith("on")?this.connection.onNotification(m,async(..._)=>{this.capturer.captureOnNotification("_",m,_);try{await this.registry.invoke(m,...this.serializeArguments(_))}catch(s){this.logger.warn(`notification exec ${m} error`,s)}}):this.connection.onRequest(m,async(..._)=>{const s=this.nextRequestId();this.capturer.captureOnRequest(s,m,_);try{const f=await this.registry.invoke(m,...this.serializeArguments(_));return this.capturer.captureOnRequestResult(s,m,f),{error:!1,data:f}}catch(f){return this.capturer.captureOnRequestFail(s,m,f),{error:!0,data:{message:f.message,stack:f.stack}}}})}async invoke(v,...m){await this.connectionPromise.promise;let _=!1;if(m.length===1&&Array.isArray(m[0])&&(_=!0),v.startsWith("on"))this.capturer.captureSendNotification("_",v,m),_?this.connection.sendNotification(v,[...m]):this.connection.sendNotification(v,...m);else{const s=this.nextRequestId();let f;_?f=this.connection.sendRequest(v,[...m]):f=this.connection.sendRequest(v,...m),this.capturer.captureSendRequest(s,v,m);const a=await f;if(a.error){const h=new Error(a.data.message);throw a.data.stack&&(h.stack=a.data.stack),this.capturer.captureSendRequestFail(s,v,a.data),h}else return this.capturer.captureSendRequestResult(s,v,a.data),a.data}}serializeArguments(v){const m=v[v.length-1];return v.length===2&&Array.isArray(v[0])&&Object.prototype.hasOwnProperty.call(m,"_isCancelled")?[...v[0],m]:v}listen(v){super.listen(v),this._disposables.add(v.onRequest(m=>{if(!this.registry.has(m)){const _=this.nextRequestId();this.capturer.captureOnRequest(_,m,[]);const s={data:r.METHOD_NOT_REGISTERED};return this.capturer.captureOnRequestFail(_,m,s.data),s}}))}}t.ProxyJson=l},16420:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ProxySumi=void 0;const n=e(91676),r=e(59875);class o extends r.ProxyBase{constructor(){super(...arguments),this.engine="sumi"}bindMethods(p){for(const v of p)v.startsWith("on")?this.connection.onNotification(v,async(...m)=>{try{await this.registry.invoke(v,...m)}catch(_){this.logger.warn(`notification exec ${v} error`,_)}}):this.connection.onRequest(v,async(...m)=>await this.registry.invoke(v,...m))}async invoke(p,...v){if(await this.connectionPromise.promise,p.startsWith("on"))this.connection.sendNotification(p,...v);else return await this.connection.sendRequest(p,...v)}listen(p){super.listen(p),this._disposables.add(p.onRequestNotFound(()=>{throw n.METHOD_NOT_REGISTERED}))}}t.ProxySumi=o},92408:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ProtocolRegistry=t.ServiceRegistry=void 0,t.getServiceMethods=o;const n=e(43718),r=new Set(["constructor"]);function o(v){const m=new Set;let _=v;do{const f=Object.getOwnPropertyNames(_);for(const a of f)r.has(a)||typeof v[a]=="function"&&m.add(a)}while(_=Object.getPrototypeOf(_));const s=Array.from(m);return s.sort(),s}class l{constructor(){this._disposables=new n.DisposableStore,this.emitter=this._disposables.add(new n.Emitter),this.onServicesUpdate=this.emitter.event,this.serviceMethodMap=new Map}register(m,_){this.serviceMethodMap.set(m,_),this.emitter.fire([m])}registerService(m,_){const s=[],{nameConverter:f}=_||{},a=o(m);for(const h of a){let u=h;f&&(u=f(h)),this.serviceMethodMap.set(u,m[h].bind(m)),s.push(u)}this.emitter.fire(s)}has(m){return this.serviceMethodMap.has(m)}invoke(m,..._){return this.serviceMethodMap.get(m)(..._)}methods(){return Array.from(this.serviceMethodMap.keys())}dispose(){this._disposables.dispose()}}t.ServiceRegistry=l;class p{constructor(){this._disposables=new n.DisposableStore,this.emitter=this._disposables.add(new n.Emitter),this.onProtocolUpdate=this.emitter.event,this.protocolMap=new Map}addProtocol(m,_){const s=[],{nameConverter:f}=_||{},{methods:a}=m;for(const h of a){let u=h.method;f&&(u=f(u)),this.protocolMap.set(u,{...h,method:u}),s.push(u)}this.emitter.fire(s)}applyTo(m){if(m.loadProtocolMethod){for(const _ of this.protocolMap.values())m.loadProtocolMethod(_);this._disposables.add(this.onProtocolUpdate(_=>{if(m.loadProtocolMethod)for(const s of _){const f=this.protocolMap.get(s);f&&m.loadProtocolMethod(f)}}))}}dispose(){this._disposables.dispose()}}t.ProtocolRegistry=p},68855:(x,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RPCServiceStub=void 0;class e{constructor(r,o,l){this.serviceName=r,this.center=o,this.type=l,this.getProxy=()=>new Proxy(this,{get:(p,v)=>typeof v=="symbol"?Promise.resolve():(p[v]||(p[v]=(...m)=>this.broadcast(v,...m)),p[v])}),this.center.registerService(r,this.type)}on(r,o){this.onRequest(r,o)}onRequestService(r){this.center.onRequestService(this.serviceName,r)}onRequest(r,o){this.center.onRequest(this.serviceName,r,o)}broadcast(r,...o){return this.center.broadcast(this.serviceName,r,...o)}}t.RPCServiceStub=e},97349:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SumiConnection=void 0;const n=e(43718),r=e(70392),o=e(93062),l=e(30613),p=e(90750),v=e(91676),m=e(48218),_=e(76339),s={},f={chunked:!0};class a{constructor(u,d={}){this.socket=u,this.options=d,this.disposable=new r.DisposableStore,this._requestHandlers=new Map,this._notificationHandlers=new Map,this._requestId=0,this._callbacks=new Map,this._reqTimeoutHandles=new Map,this._cancellationTokenSources=new Map,this._knownCanceledRequests=new Set,this.activeRequestPool=new Map,d.logger?this.logger=d.logger:this.logger=(0,n.getDebugLogger)(),this.io=d.io||new _.MessageIO,this.capturer=new l.Capturer(d.name||"sumi"),this.disposable.add(this.capturer)}sendNotification(u,...d){const E=this._requestId++;this.capturer.captureSendNotification(E,u,d),this.socket.send(this.io.Notification(E,u,s,d))}sendRequest(u,...d){return new Promise((E,g)=>{const c=this._requestId++;if(this._callbacks.set(c,(y,S,A)=>{if(S){if(this.traceRequestError(c,u,d,S),S===v.METHOD_NOT_REGISTERED){E(S);return}g(S);return}this.capturer.captureSendRequestResult(c,u,A),E(A)}),this.options.timeout&&this.options.timeout!==-1){const y=setTimeout(()=>{this._handleTimeout(u,c)},this.options.timeout);this._reqTimeoutHandles.set(c,y)}const b=d.length&&r.CancellationToken.isCancellationToken(d[d.length-1])?d.pop():void 0;if(b&&b.isCancellationRequested)return Promise.reject((0,r.canceled)());b&&b.onCancellationRequested(()=>this.cancelRequest(c)),this.capturer.captureSendRequest(c,u,d),this.socket.send(this.io.Request(c,u,{cancelable:!!b||void 0},d))})}cancelRequest(u){this.socket.send(this.io.Cancel(u))}_handleTimeout(u,d){if(!this._callbacks.has(d)||!this._reqTimeoutHandles.has(d))return;const E=this._callbacks.get(d);this._callbacks.delete(d),this._reqTimeoutHandles.delete(d),E(s,new m.MethodTimeoutError(u))}onRequest(u,d){return this._requestHandlers.set(u,d),{dispose:()=>{this._requestHandlers.delete(u)}}}onRequestNotFound(u){return this._starRequestHandler=u,{dispose:()=>{this._starRequestHandler=void 0}}}onNotification(u,d){return this._notificationHandlers.set(u,d),{dispose:()=>{this._notificationHandlers.delete(u)}}}onNotificationNotFound(u){return this._starNotificationHandler=u,{dispose:()=>{this._starNotificationHandler=void 0}}}listen(){this.disposable.add(this.socket.onMessage(u=>{const d=this.io.parse(u),E=d.kind,g=d.requestId;switch(E===_.OperationType.Error&&this.logger.warn(`[${d.requestId}] Error received from server method ${d.method}: ${d.error}`),E){case _.OperationType.Error:case _.OperationType.Response:{const{headers:c,method:b}=d,y=d.error,S=d.result;this._reqTimeoutHandles.has(g)&&(clearTimeout(this._reqTimeoutHandles.get(g)),this._reqTimeoutHandles.delete(g));const A=(w,T,D)=>{const I=this._callbacks.get(g);if(!I){this.logger.error(`Cannot find callback for request ${g}: ${b}`);return}this._callbacks.delete(g),I(w,T,D)};if(c&&c.chunked){let w;if(this.activeRequestPool.has(g)?w=this.activeRequestPool.get(g):(w=new o.SumiReadableStream,this.activeRequestPool.set(g,w),A(c,void 0,w)),S===null){w.end(),this.activeRequestPool.delete(g);break}if(y){w.emitError(y);break}w.emitData(S);break}A(c,y,S);break}case _.OperationType.Notification:case _.OperationType.Request:{const{method:c,headers:b,args:y}=d;if(b.cancelable){const S=new r.CancellationTokenSource;this._cancellationTokenSources.set(g,S),y.push(S.token),this._knownCanceledRequests.has(g)&&(S.cancel(),this._knownCanceledRequests.delete(g))}switch(E){case _.OperationType.Request:{this.capturer.captureOnRequest(g,c,y);let S;try{let T;const D=this._requestHandlers.get(c);D?T=D(...y):this._starRequestHandler&&(T=this._starRequestHandler(c,y)),S=Promise.resolve(T)}catch(T){S=Promise.reject(T)}const A=T=>{this.capturer.captureOnRequestResult(g,c,T),(0,o.isReadableStream)(T)?(0,o.listenReadable)(T,{onData:D=>{this.socket.send(this.io.Response(g,c,f,D))},onEnd:()=>{this.socket.send(this.io.Response(g,c,f,null)),this._cancellationTokenSources.delete(g)},onError:D=>{this.socket.send(this.io.Error(g,c,f,D)),this._cancellationTokenSources.delete(g)}}):(this.socket.send(this.io.Response(g,c,s,T)),this._cancellationTokenSources.delete(g))},w=T=>{this.traceRequestError(g,c,y,T),this.socket.send(this.io.Error(g,c,s,T)),this._cancellationTokenSources.delete(g)};S.then(A).catch(w);break}case _.OperationType.Notification:{this.capturer.captureOnNotification(g,c,y);const S=this._notificationHandlers.get(c);S?S(...y):this._starNotificationHandler&&this._starNotificationHandler(c,y);break}}break}case _.OperationType.Cancel:{const c=this._cancellationTokenSources.get(g);c?c.cancel():this._knownCanceledRequests.add(g);break}default:break}}))}dispose(){this.disposable.dispose()}static forWSWebSocket(u,d={}){return new a(new p.WSWebSocketConnection(u),d)}static forNetSocket(u,d={}){return new a(new p.NetSocketConnection(u),d)}traceRequestError(u,d,E,g){this.capturer.captureSendRequestFail(u,d,g)}toJSON(){throw new Error(`You're trying to serialize a SumiConnection instance, which is not allowed.
|
|
30257
30257
|
Please check your code, and remove the rpc proxy reference.`)}}t.SumiConnection=a},48218:(x,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MethodTimeoutError=void 0;class e extends Error{constructor(r){super(`method ${r} timeout`)}}t.MethodTimeoutError=e},76339:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RawMessageIO=t.MessageIO=t.IMessageIO=t.AnyProtocolSerializer=t.HeadersProto=t.OperationType=void 0;const n=e(26387),r=e(26246),o=e(86560),l=e(89104),p=e(4405),v=1;var m;(function(d){d[d.Request=0]="Request",d[d.Notification=1]="Notification",d[d.Response=2]="Response",d[d.Cancel=3]="Cancel",d[d.Error=4]="Error"})(m||(t.OperationType=m={})),t.HeadersProto={Request:n.Type.object("req-headers",{cancelable:n.Type.bool()}),Response:n.Type.object("resp-headers",{chunked:n.Type.bool()})};const _={Request:m.Request<<8|v,Notification:m.Notification<<8|v,Response:m.Response<<8|v,Cancel:m.Cancel<<8|v,Error:m.Error<<8|v};class s{constructor(E,g){this.fury=g;const c=[];for(const S of E.request)c.push(S.type);const b=n.Type.tuple(c);let y=n.Type.any();E.response&&E.response.type&&(y=E.response.type),this.request=this.fury.registerSerializer(b),this.result=this.fury.registerSerializer(y)}writeRequest(E){return this.request.serializer.write(E)}readRequest(){return this.request.serializer.read()}writeResponse(E){return this.result.serializer.write(E)}readResponse(){return this.result.serializer.read()}}class f{constructor(E,g,c){this.writer=E,this.reader=g,this.anySerializer=new l.AnySerializer(this.writer,this.reader,c)}writeRequest(E){this.anySerializer.write(E)}readRequest(){return this.anySerializer.read()}writeResponse(E){this.anySerializer.write(E)}readResponse(){return this.anySerializer.read()}}t.AnyProtocolSerializer=f;class a{}t.IMessageIO=a;class h extends a{constructor(){super(),this.serializerMap=new Map;const E=(0,p.furyFactory)();this.fury=E.fury,this.reader=E.reader,this.writer=E.writer,this.requestHeadersSerializer=(0,r.generateSerializer)(this.fury,t.HeadersProto.Request),this.responseHeadersSerializer=(0,r.generateSerializer)(this.fury,t.HeadersProto.Response),this.anySerializer=new f(this.writer,this.reader)}setAnySerializer(E){this.anySerializer=E}has(E){return this.serializerMap.has(E)}loadProtocol(E,g){const{methods:c}=E;for(const b of c)this.loadProtocolMethod(b,g)}loadProtocolMethod(E,g){let c=E.method;g?.nameConverter&&(c=g.nameConverter(c)),this.serializerMap.set(c,new s(E,this.fury))}getProcessor(E){const g=this.serializerMap.get(E);return g||this.anySerializer}Notification(E,g,c,b){const{writer:y}=this;return y.reset(),y.uint16(_.Notification),y.uint32(E),y.stringOfVarUInt32(g),this.requestHeadersSerializer.write(c),this.getProcessor(g).writeRequest(b),y.dump()}Request(E,g,c,b){const{writer:y}=this;return y.reset(),y.uint16(_.Request),y.uint32(E),y.stringOfVarUInt32(g),this.requestHeadersSerializer.write(c),this.getProcessor(g).writeRequest(b),y.dump()}Cancel(E){const{writer:g}=this;return g.reset(),g.uint16(_.Cancel),g.uint32(E),g.dump()}Response(E,g,c,b){const{writer:y}=this;return y.reset(),y.uint16(_.Response),y.uint32(E),y.stringOfVarUInt32(g),this.responseHeadersSerializer.write(c),this.getProcessor(g).writeResponse(b),y.dump()}Error(E,g,c,b){const{writer:y}=this;return y.reset(),y.uint16(_.Error),y.uint32(E),y.stringOfVarUInt32(g),this.responseHeadersSerializer.write(c),y.stringOfVarUInt32((0,o.stringifyError)(b)),y.dump()}parse(E){const{reader:g}=this;g.reset(E),g.skip(1);const c=g.uint8(),b=g.uint32();switch(c){case m.Request:case m.Notification:{const y=g.stringOfVarUInt32(),S=this.requestHeadersSerializer.read(),A=this.getProcessor(y).readRequest();return{kind:c,requestId:b,method:y,headers:S,args:A}}case m.Error:{const y=g.stringOfVarUInt32(),S=this.responseHeadersSerializer.read(),A=(0,o.parseError)(g.stringOfVarUInt32());return{kind:m.Error,requestId:b,method:y,headers:S,error:A}}case m.Response:{const y=g.stringOfVarUInt32(),S=this.responseHeadersSerializer.read(),A=this.getProcessor(y).readResponse();return{kind:m.Response,requestId:b,method:y,headers:S,result:A}}case m.Cancel:return{kind:m.Cancel,requestId:b};default:throw new Error(`Unknown message type: ${c}`)}}}t.MessageIO=h;class u{Request(E,g,c,b){return{kind:m.Request,requestId:E,method:g,headers:c,args:b}}Notification(E,g,c,b){return{kind:m.Notification,requestId:E,method:g,headers:c,args:b}}Cancel(E){return{kind:m.Cancel,requestId:E}}Response(E,g,c,b){return{kind:m.Response,requestId:E,headers:c,method:g,result:b}}Error(E,g,c,b){return{kind:m.Error,requestId:E,method:g,headers:c,error:b}}parse(E){return E}}t.RawMessageIO=u},86058:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SumiConnectionMultiplexer=t.IRPCProtocol=t.ProxyIdentifier=void 0,t.createExtMessageIO=p;const n=e(89104),r=e(97349),o=e(76339);class l{constructor(_){this.serviceId=_,this.countId=++l.count}static for(_){return new l(_)}}t.ProxyIdentifier=l,l.count=0,t.IRPCProtocol=Symbol("IRPCProtocol");function p(m){const _=new o.MessageIO;return _.setAnySerializer(new o.AnyProtocolSerializer(_.writer,_.reader,n.ExtObjectTransfer)),m?.forEach((s,f)=>{_.loadProtocol(s,{nameConverter:a=>v.getRPCName(f.serviceId,a)})}),_}class v extends r.SumiConnection{static getRPCName(_,s){return`${_}${v.SEP}${s}`}static extractServiceAndMethod(_){const s=_.indexOf(v.SEP);return[_.substring(0,s),_.substring(s+v.SEP_LENGTH)]}static normalizeServiceId(_){return _.replace(/\//g,"_")}constructor(_,s={}){super(_,{...s,io:s.io||p()}),this.socket=_,this.options=s,this._locals=new Map,this._proxies=new Map,this.onRequestNotFound((f,a)=>this.invoke(f,a)),this.listen()}set(_,s){const f=v.normalizeServiceId(_.serviceId);return this._locals.set(f,s),s}get(_){return this._locals.get(v.normalizeServiceId(_.serviceId))}getProxy(_){const s=v.normalizeServiceId(_.serviceId);return this._proxies.has(s)||this._proxies.set(s,this._createProxy(s)),this._proxies.get(s)}_createProxy(_){const s={get:(f,a)=>{if(typeof a=="symbol")return null;if(!f[a])if(a.charCodeAt(0)===36){const h=v.getRPCName(_,a);f[a]=(...u)=>this.sendRequest(h,...u)}else a==="toJSON"&&(f[a]=()=>{throw new Error("Cannot serialize a rpc protocol proxy object")});return f[a]}};return new Proxy(Object.create(null),s)}async invoke(_,s){const[f,a]=v.extractServiceAndMethod(_),h=this._locals.get(f);if(!h)throw new Error("Unknown actor "+f);const u=await h[a];if(typeof u!="function")throw new Error("Unknown method "+a+" on actor "+f);return u.apply(h,s)}getSocket(){return this.socket}}t.SumiConnectionMultiplexer=v,v.SEP="/",v.SEP_LENGTH=v.SEP.length},15726:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RPCProtocol=t.MessageIO=t.ObjectTransfer=t.ProxyIdentifier=t.IRPCProtocol=t.RPCProtocolEnv=void 0,t.createExtHostContextProxyIdentifier=l,t.createMainContextProxyIdentifier=p;const n=e(43718),r=e(86058);Object.defineProperty(t,"IRPCProtocol",{enumerable:!0,get:function(){return r.IRPCProtocol}}),Object.defineProperty(t,"ProxyIdentifier",{enumerable:!0,get:function(){return r.ProxyIdentifier}});var o;(function(f){f[f.MAIN=0]="MAIN",f[f.EXT=1]="EXT"})(o||(t.RPCProtocolEnv=o={}));function l(f){return new r.ProxyIdentifier(f)}function p(f){return new r.ProxyIdentifier(f)}var v;(function(f){function a(u,d){if(d){if(d.$mid===1)return{$type:"VSCODE_URI",data:n.Uri.revive(d).toString()};if(d instanceof Uint8Array||d instanceof Uint32Array||d instanceof Uint16Array)return{$type:"Buffer",data:Array.from(d)};if(d instanceof ArrayBuffer)return{$type:"Buffer",data:Array.from(new Uint8Array(d))};if(d.type==="Buffer")return{$type:"Buffer",data:d.data}}return d}f.replacer=a;function h(u,d){if(d&&d.$type!==void 0&&d.data!==void 0){if(d.$type==="VSCODE_URI")return n.Uri.parse(d.data);if(d.$type==="Buffer")return Uint8Array.from(d.data)}return d}f.reviver=h})(v||(t.ObjectTransfer=v={}));class m{static cancel(a,h){return`{"type":4,"id":"${a}"}`}static serializeRequest(a,h,u,d){return d=d.map(E=>{if(E instanceof Error){const g=Array.prototype.slice.call(arguments);return g[0]=E.stack,g.join(`
|
|
30258
|
-
`)}return E}),`{"type": 1, "id": "${a}", "proxyId": "${h}", "method": "${u}", "args": ${JSON.stringify(d,v.replacer)}}`}static serializeReplyOK(a,h,u){if(typeof h>"u")return`{"type": 2, "id": "${a}"}`;try{return`{"type": 2, "id": "${a}", "res": ${JSON.stringify(h,v.replacer)}}`}catch{return u&&u.warn("res",h),`{"type": 2, "id": "${a}", "res": {}}`}}static serializeReplyError(a,h,u){try{return`{"type": 3, "id": "${a}", "res": ${JSON.stringify((0,n.transformErrorForSerialization)(h),v.replacer)}}`}catch{return u&&u.error("error",h),`{"type": 3, "id": "${a}", "res": {}}`}}}t.MessageIO=m;function _(){const f=new Error("Canceled");return f.name=f.message,f}class s{constructor(a,h){this._protocol=a,this._locals=new Map,this._proxies=new Map,this._pendingRPCReplies=new Map,this._cancellationTokenSources=new Map,this._timeoutHandles=new Map,this._lastMessageId=0,this.logger=h||console,this.logger.error("You are using the deprecated class: 'RPCProtocol'. Please use the new one: 'SumiConnectionMultiplexer'"),this._protocol.onMessage(u=>this._receiveOneMessage(u))}set(a,h){return this._locals.set(a.serviceId,h),h}get(a){return this._locals.get(a.serviceId)}getProxy(a){return this._proxies.has(a.serviceId)||this._proxies.set(a.serviceId,this._createProxy(a.serviceId)),this._proxies.get(a.serviceId)}_createProxy(a){const h={get:(u,d)=>typeof d=="symbol"?null:(!u[d]&&d.charCodeAt(0)===36&&(u[d]=(...E)=>this._remoteCall(a,d,E)),u[d])};return new Proxy(Object.create(null),h)}_remoteCall(a,h,u){const d=u.length&&n.CancellationToken.isCancellationToken(u[u.length-1])?u.pop():void 0;if(d&&d.isCancellationRequested)return Promise.reject(_());const E=String(++this._lastMessageId),g=new n.Deferred;d&&(u.push("add.cancellation.token"),d.onCancellationRequested(()=>this._protocol.send(m.cancel(E)))),this._pendingRPCReplies.set(E,g);const c=m.serializeRequest(E,a,h,u);if(this._protocol.send(c),this._protocol.timeout&&this._protocol.timeout!==-1){const b=setTimeout(()=>{this._handleTimeout(E)},this._protocol.timeout);this._timeoutHandles.set(E,b)}return g.promise}_receiveOneMessage(a){const h=JSON.parse(a,v.reviver);switch(this._timeoutHandles.has(h.id)&&(typeof clearTimeout=="function"&&clearTimeout(this._timeoutHandles.get(h.id)),this._timeoutHandles.delete(h.id)),h.type){case 1:this._receiveRequest(h);break;case 2:this._receiveReply(h);break;case 4:this._receiveCancel(h);break;case 3:this._receiveError(h);break}}_receiveCancel(a){const h=this._cancellationTokenSources.get(a.id);h&&h.cancel()}_receiveError(a){const h=a.id;if(!this._pendingRPCReplies.has(h))return;const u=this._pendingRPCReplies.get(h);this._pendingRPCReplies.delete(h);let d;a.res&&(a.res.$isError?(d=new Error,d.name=a.res.name,d.message=a.res.message,d.stack=a.res.stack):d=a.res),u.reject(d)}_receiveRequest(a){const h=a.id,u=a.proxyId,d=a.method,E=a.args.map(b=>b===null?void 0:b);if(E.length&&E[E.length-1]==="add.cancellation.token"?E.pop():!1){const b=new n.CancellationTokenSource;this._cancellationTokenSources.set(h,b),E.push(b.token)}this._invokeHandler(u,d,E).then(b=>{this._protocol.send(m.serializeReplyOK(h,b)),this._cancellationTokenSources.delete(h)}).catch(b=>{this._protocol.send(m.serializeReplyError(h,b)),this._cancellationTokenSources.delete(h)})}_invokeHandler(a,h,u){try{return this._doInvokeHandler(a,h,u)}catch(d){return Promise.reject(d)}}async _doInvokeHandler(a,h,u){const d=this._locals.get(a);if(!d)throw new Error("Unknown actor "+a);const E=await d[h];if(typeof E!="function")throw new Error("Unknown method "+h+" on actor "+a);return E.apply(d,u)}_receiveReply(a){const h=a.id;if(!this._pendingRPCReplies.has(h))return;const u=this._pendingRPCReplies.get(h);this._pendingRPCReplies.delete(h),u.resolve(a.res)}_handleTimeout(a){if(!this._pendingRPCReplies.has(a)||!this._timeoutHandles.has(a))return;const h=this._pendingRPCReplies.get(a);this._pendingRPCReplies.delete(a),this._timeoutHandles.delete(a),h.reject(new Error("RPC Timeout: "+a))}}t.RPCProtocol=s},64592:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.furySerializer=t.CloseProtocol=t.BinaryProtocol=t.DataProtocol=t.ErrorProtocol=t.ServerReadyProtocol=t.OpenProtocol=t.PongProtocol=t.PingProtocol=void 0;const n=e(26387),r=e(94846);function o(){return{id:n.Type.string()}}t.PingProtocol=n.Type.object("ping",{...o()}),t.PongProtocol=n.Type.object("pong",{...o()}),t.OpenProtocol=n.Type.object("open",{...o(),clientId:n.Type.string(),path:n.Type.string(),traceId:n.Type.string()}),t.ServerReadyProtocol=n.Type.object("server-ready",{...o(),traceId:n.Type.string()}),t.ErrorProtocol=n.Type.object("error",{...o(),code:n.Type.uint16(),message:n.Type.string()}),t.DataProtocol=n.Type.object("data",{...o(),content:n.Type.string()}),t.BinaryProtocol=n.Type.object("binary",{...o(),binary:n.Type.binary()}),t.CloseProtocol=n.Type.object("close",{...o(),code:n.Type.uint32(),reason:n.Type.string()});const l=(0,r.oneOf)([t.PingProtocol,t.PongProtocol,t.OpenProtocol,t.ServerReadyProtocol,t.DataProtocol,t.BinaryProtocol,t.CloseProtocol,t.ErrorProtocol]);t.furySerializer=l},54558:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.wrapSerializer=void 0;const n=e(85608);n.__exportStar(e(64592),t),n.__exportStar(e(43620),t),n.__exportStar(e(41619),t);const r=(o,l)=>({onceClose(p){return o.onceClose(p)},onMessage(p){return o.onMessage(v=>{p(l.deserialize(v))})},send(p){o.send(l.serialize(p))}});t.wrapSerializer=r},43620:(x,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.rawSerializer=void 0,t.rawSerializer={serialize:e=>e,deserialize:e=>e}},41619:(x,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},76271:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RPCServiceChannelPath=t.BaseCommonChannelHandler=t.CommonChannelPathHandler=void 0,t.injectConnectionProviders=m;const n=e(39048),r=e(54558),o=e(47561);class l{constructor(){this.handlerMap=new Map,this.paramsKey=new Map}register(s,f){const a=s.indexOf("/:"),h=a>=0;let u=s;h&&(u=s.slice(0,a),this.paramsKey.set(u,s.slice(a+2))),this.handlerMap.has(u)||this.handlerMap.set(u,[]);const d=this.handlerMap.get(u),E=f.handler.bind(f),g=(c,b,y)=>{f.connection=c,E(c,b,y)};f.handler=g,d.push(f),this.handlerMap.set(u,d)}getParams(s,f){const a={};if(this.paramsKey.has(s)){const h=this.paramsKey.get(s);h&&(a[h]=f)}return a}removeHandler(s,f){const a=s.indexOf(":"),h=a>=0;let u=s;h&&(u=s.slice(0,a));const d=this.handlerMap.get(u)||[],E=d.indexOf(f);E!==-1&&d.splice(E,1),this.handlerMap.set(s,d)}get(s){return this.handlerMap.get(s)}disposeConnectionClientId(s,f){this.handlerMap.forEach(a=>{a.forEach(h=>{h.dispose(s,f)})})}openChannel(s,f,a){let h=this.get(s),u;if(!h){const d=s.indexOf("/");d>=0&&(h=this.get(s.slice(0,d)),u=this.getParams(s.slice(0,d),s.slice(d+1)))}if(h)for(let d=0,E=h.length;d<E;d++)h[d].handler(f,a,u)}getAll(){return Array.from(this.handlerMap.values())}}t.CommonChannelPathHandler=l;var p;(function(_){_[_.ConnectionClosed=1]="ConnectionClosed",_[_.NewChannelOpened=2]="NewChannelOpened"})(p||(p={}));class v{constructor(s,f,a=console,h={}){this.handlerId=s,this.commonChannelPathHandler=f,this.logger=a,this.channelMap=new Map,this.heartbeatTimer=null,this.serializer=r.furySerializer,h.serializer&&(this.serializer=h.serializer)}heartbeat(s){this.heartbeatTimer&&clearTimeout(this.heartbeatTimer),this.heartbeatTimer=setTimeout(()=>{this.doHeartbeat(s),this.heartbeat(s)},5e3)}receiveConnection(s){let f;this.heartbeat(s);const a=(0,r.wrapSerializer)(s,this.serializer);a.onMessage(h=>{try{switch(h.kind){case"open":{const{id:u,path:d,traceId:E}=h;f=h.clientId,this.logger.log(`open a new connection channel ${f} with path ${d}`);let g=this.channelMap.get(u);g&&(g.close(p.NewChannelOpened,"new channel opened for the same channel id"),g.dispose()),g=new o.WSServerChannel(a,{id:u,clientId:f,logger:this.logger}),this.channelMap.set(u,g),this.commonChannelPathHandler.openChannel(d,g,f),g.serverReady(E);break}default:{const{id:u}=h,d=this.channelMap.get(u);d?d.dispatch(h):(a.send({kind:"error",id:u,code:n.ErrorMessageCode.ChannelNotFound,message:`channel ${u} not found`}),this.logger.warn(`channel ${u} is not found`))}}}catch(u){this.logger.error("handle connection message error",u)}}),s.onceClose(()=>{this.logger.log(`connection ${f} is closed, dispose all channels`),this.commonChannelPathHandler.disposeConnectionClientId(s,f),Array.from(this.channelMap.values()).filter(h=>h.clientId===f).forEach(h=>{h.close(p.ConnectionClosed,"connection closed"),h.dispose(),this.channelMap.delete(h.id),this.logger.log(`Remove connection channel ${h.id}`)})})}dispose(){this.heartbeatTimer&&clearTimeout(this.heartbeatTimer)}}t.BaseCommonChannelHandler=v,t.RPCServiceChannelPath="RPCService";function m(_){const s=new l;_.addProviders({token:l,useValue:s})}},8140:(x,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ServiceType=void 0;var e;(function(n){n[n.Service=0]="Service",n[n.Stub=1]="Stub"})(e||(t.ServiceType=e={}))},47561:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WSServerChannel=t.WSChannel=void 0;const n=e(40396),r=e(43718),o=e(39048),l=e(97349);var p;(function(s){s[s.ReSend=0]="ReSend",s[s.Sended=1]="Sended",s[s.Success=2]="Success",s[s.Failed=3]="Failed"})(p||(p={}));class v{constructor(){this.map=new Map,this.deliveryTimeout=500,this.timerMap=new Map}setDeliveryTimeout(f){this.deliveryTimeout=f}set(f,a){this.map.set(f,a)}get(f){return this.map.get(f)}success(f){this.map.set(f,p.Success);const a=this.timerMap.get(f);a&&clearTimeout(a)}dispose(){this.timerMap.forEach(f=>{clearTimeout(f)})}stop(f){const a=this.timerMap.get(f);a&&clearTimeout(a)}send(f,a){this.set(f,p.Sended),this.guard(f,a)}guard(f,a){const h=this.timerMap.get(f);h&&clearTimeout(h);const u=setTimeout(()=>{this.set(f,p.ReSend),a.whenRetry()},this.deliveryTimeout);this.timerMap.set(f,u)}}class m{constructor(f,a){this.connection=f,this._disposables=new r.DisposableStore,this.emitter=this._disposables.add(new n.EventEmitter),this.onBinaryQueue=this._disposables.add(new r.EventQueue),this.sendQueue=[],this._isServerReady=!1,this.stateTracer=new v,this.LOG_TAG="[WSChannel]",this.logger=console;const{id:h,logger:u,ensureServerReady:d}=a;this.id=h,this.LOG_TAG=`[WSChannel id:${this.id}]`,u&&(this.logger=u),this._ensureServerReady=!!d,a.deliveryTimeout&&this.stateTracer.setDeliveryTimeout(a.deliveryTimeout),this._disposables.add(this.emitter.on("binary",E=>this.onBinaryQueue.push(E)))}inqueue(f){if(this._ensureServerReady&&!this._isServerReady){this.sendQueue||(this.sendQueue=[]),this.sendQueue.push(f);return}this.connection.send(f)}ensureMessageDeliveried(f,a=(0,r.randomString)(16)){const h=this.stateTracer.get(a);if(h&&h>=p.Sended){this.logger.error(`message already send already success or in progress, traceId: ${a}, state: ${h}`);return}f.traceId=a,this.connection.send(f),this.stateTracer.send(a,{whenRetry:()=>{if(this._isServerReady){this.stateTracer.stop(a);return}this.ensureMessageDeliveried(f,a)}})}onMessage(f){return this.emitter.on("message",f)}onBinary(f){return this.onBinaryQueue.on(f)}onOpen(f){return this.emitter.on("open",f)}onReopen(f){return this.emitter.on("reopen",f)}pause(){this._isServerReady=!1}onServerReady(f){if(this._isServerReady){f();return}return this.emitter.on("open",f)}resume(){if(this._isServerReady=!0,this.sendQueue){for(const f of this.sendQueue)this.connection.send(f);this.sendQueue=[]}}dispatch(f){switch(f.kind){case"server-ready":f.traceId&&this.stateTracer.success(f.traceId),this.resume(),this.emitter.emit("open",f.id);break;case"data":this.emitter.emit("message",f.content);break;case"binary":this.emitter.emit("binary",f.binary);break;case"error":switch(this.logger.error(this.LOG_TAG,`receive error: id: ${f.id}, code: ${f.code}, error: ${f.message}`),f.code){case o.ErrorMessageCode.ChannelNotFound:this.channelPath&&(this.pause(),this.open(this.channelPath,this.clientId));break}break}}open(f,a){this.channelPath=f,this.clientId=a,this.LOG_TAG=`[WSChannel id=${this.id} path=${f}]`;const h={kind:"open",id:this.id,path:f,clientId:a};this._ensureServerReady?this.ensureMessageDeliveried(h):this.connection.send(h)}send(f){this.inqueue({kind:"data",id:this.id,content:f})}sendBinary(f){this.inqueue({kind:"binary",id:this.id,binary:f})}onError(){}close(f,a){this.pause(),this.emitter.emit("close",f,a)}fireReopen(){this.emitter.emit("reopen")}onClose(f){return this.emitter.on("close",f)}onceClose(f){return this.emitter.once("close",f)}createConnection(){return{onceClose:f=>this.onceClose(f),onMessage:f=>this.onBinary(f),send:f=>{this.sendBinary(f)},dispose(){}}}createSumiConnection(f={}){return new l.SumiConnection(this.createConnection(),f)}dispose(){this.stateTracer.dispose(),this.sendQueue=[],this._disposables.dispose()}ping(){this.connection.send({kind:"ping",id:this.id})}}t.WSChannel=m;class _ extends m{constructor(f,a){super(f,a),this.connection=f,this.messageQueue=[],this.clientId=a.clientId}serverReady(f){this.connection.send({kind:"server-ready",id:this.id,traceId:f})}dispatch(f){switch(f.kind){case"data":this.emitter.emit("message",f.content);break;case"binary":this.emitter.emit("binary",f.binary);break;case"ping":this.connection.send({kind:"pong",id:this.id});break}}}t.WSServerChannel=_},8919:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),e(85608).__exportStar(e(25285),t)},70650:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AINativeConfigService=void 0;const n=e(85608),r=e(76003),o=e(89195),l=e(1149),p=e(11050),v={supportsMarkers:!0,supportsChatAssistant:!0,supportsCodeAction:!0,supportsInlineChat:!0,supportsInlineCompletion:!0,supportsConflictResolve:!0,supportsRenameSuggestions:!0,supportsProblemFix:!0,supportsTerminalDetection:!0,supportsTerminalCommandSuggest:!0,supportsCustomLLMSettings:!0,supportsMCP:!0},m={};Object.keys(v).forEach(a=>{m[a]=!1});const _={inputWidth:320,inputKeybinding:"ctrlcmd+k",logo:o.AILogoAvatar},s={triggerKeybinding:"alt+\\"};let f=class{constructor(){this.aiModuleLoaded=!1,this.internalCapabilities=v,this.internalInlineChat=_,this.internalCodeEdits=s}get capabilities(){if(!this.aiModuleLoaded)return m;const{AINativeConfig:h}=this.appConfig;return h?.capabilities?{...this.internalCapabilities,...h.capabilities}:this.internalCapabilities}get inlineChat(){const{AINativeConfig:h}=this.appConfig;return h?.inlineChat?{...this.internalInlineChat,...h.inlineChat}:this.internalInlineChat}get codeEdits(){const{AINativeConfig:h}=this.appConfig;return h?.codeEdits?{...this.internalCodeEdits,...h.codeEdits}:this.internalCodeEdits}setAINativeModuleLoaded(h){this.aiModuleLoaded=h}};t.AINativeConfigService=f,n.__decorate([(0,r.Autowired)(p.AppConfig),n.__metadata("design:type",Object)],f.prototype,"appConfig",void 0),n.__decorate([(0,r.Autowired)(l.LayoutViewSizeConfig),n.__metadata("design:type",l.LayoutViewSizeConfig)],f.prototype,"layoutViewSize",void 0),t.AINativeConfigService=f=n.__decorate([(0,r.Injectable)()],f)},41480:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AIReporter=void 0;const n=e(85608),r=e(76003),o=e(43718),l=e(52664);let p=class{constructor(){this.reportInfoCache=new Map,this.reporterCancelHandler=new Map}getRelationId(){return(0,o.uuid)()}getCacheReportInfo(m){return this.reportInfoCache.get(m)}getCommonReportInfo(){return{}}start(m,_){const s=this.getRelationId();this.report(s,{..._,msgType:m,isStart:!0});const f=setTimeout(()=>{this.report(s,{..._,success:!1})},60*1e3);return this.reporterCancelHandler.set(s,f),s}end(m,_){const s=this.reporterCancelHandler.get(m);s&&clearTimeout(s),this.report(m,{success:!0,..._,isStart:!1})}record(m,_){_||(_=this.getRelationId());const s=this.reportInfoCache.get(_)||{},f={...this.getCommonReportInfo(),...s,...m,relationId:_};return this.reportInfoCache.set(_,f),f}report(m,_){const s=this.record(_,m);this.reporter.point(l.AI_REPORTER_NAME,_.msgType||s.msgType,s)}};t.AIReporter=p,n.__decorate([(0,r.Autowired)(o.IReporterService),n.__metadata("design:type",Object)],p.prototype,"reporter",void 0),t.AIReporter=p=n.__decorate([(0,r.Injectable)()],p)},57925:(x,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AI_CODE_EDITS_COMMANDS=t.AI_CODE_ACTION=t.AI_CHAT_VISIBLE=t.AI_INLINE_COMPLETION_REPORTER=t.AI_INLINE_DIFF_PARTIAL_EDIT=t.AI_INLINE_COMPLETION_VISIBLE=t.AI_INLINE_CHAT_INTERACTIVE_INPUT_CANCEL=t.AI_INLINE_CHAT_INTERACTIVE_INPUT_VISIBLE=t.AI_INLINE_CHAT_VISIBLE=void 0,t.AI_INLINE_CHAT_VISIBLE={id:"ai.inlineChat.visible"},t.AI_INLINE_CHAT_INTERACTIVE_INPUT_VISIBLE={id:"ai.inlineChat.interactiveInput.visible"},t.AI_INLINE_CHAT_INTERACTIVE_INPUT_CANCEL={id:"ai.inlineChat.interactiveInput.cancel"},t.AI_INLINE_COMPLETION_VISIBLE={id:"ai.inline.completion.visible"},t.AI_INLINE_DIFF_PARTIAL_EDIT={id:"ai.inline.diff.partial.edit"},t.AI_INLINE_COMPLETION_REPORTER={id:"ai.inline.completion.reporter"},t.AI_CHAT_VISIBLE={id:"ai.chat.visible"},t.AI_CODE_ACTION={id:"ai.code.action"};var e;(function(n){n.DISCARD={id:"ai.codeEdits.discard"},n.ACCEPT={id:"ai.codeEdits.accept"},n.TRIGGER={id:"ai.codeEdits.trigger"}})(e||(t.AI_CODE_EDITS_COMMANDS=e={}))},38070:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MergeConflictReportService=void 0;const n=e(85608),r=e(76003),o=e(43718),l=e(70650);let p=class extends o.Disposable{constructor(){super(...arguments),this.reportInfoMap=new Map,this.unique2RelationMap=new Map}record(m,_){if(!this.aiNativeConfigService.capabilities.supportsConflictResolve)return _;let s="";return this.unique2RelationMap.has(m)?(s=this.unique2RelationMap.get(m),this.aiReporter.record(_,s)):(s=this.aiReporter.record({..._,msgType:o.AIServiceType.MergeConflict,message:o.AIServiceType.MergeConflict,editorMode:_.editorMode||o.MergeConflictEditorMode.traditional}).relationId,this.unique2RelationMap.set(m,s)),{..._,relationId:s}}report(m,_){if(!this.aiNativeConfigService.capabilities.supportsConflictResolve)return;const s=this.record(m,_);this.aiReporter.end(s.relationId,s)}reportIncrementNum(m,_){if(!this.aiNativeConfigService.capabilities.supportsConflictResolve)return;const s=this.unique2RelationMap.get(m);if(!s)return;const f=this.aiReporter.getCacheReportInfo(s)[_]||0;this.report(m,{[_]:f+1})}dispose(){super.dispose(),this.reportInfoMap.clear()}};t.MergeConflictReportService=p,n.__decorate([(0,r.Autowired)(l.AINativeConfigService),n.__metadata("design:type",l.AINativeConfigService)],p.prototype,"aiNativeConfigService",void 0),n.__decorate([(0,r.Autowired)(o.IAIReporter),n.__metadata("design:type",Object)],p.prototype,"aiReporter",void 0),t.MergeConflictReportService=p=n.__decorate([(0,r.Injectable)()],p)},95040:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IAIInlineChatService=void 0,e(85608).__exportStar(e(70650),t),t.IAIInlineChatService=Symbol("IAIInlineChatService")},12956:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ClientAppStateService=t.ClientAppStateEvent=void 0;const n=e(85608),r=e(76003),o=e(43718);class l extends o.BasicEvent{}t.ClientAppStateEvent=l;let p=class{constructor(){this._state="init",this.deferred={}}get state(){return this._state}set state(m){m!==this._state&&(this._state=m,this.deferred[m]===void 0&&(this.deferred[m]=new o.Deferred),this.deferred[m].resolve(),this.eventBus.fire(new l(m)))}reachedState(m){return this.deferred[m]===void 0&&(this.deferred[m]=new o.Deferred),this.deferred[m].promise}reachedAnyState(...m){return Promise.race(m.map(_=>this.reachedState(_)))}};t.ClientAppStateService=p,n.__decorate([(0,r.Autowired)(o.IEventBus),n.__metadata("design:type",Object)],p.prototype,"eventBus",void 0),t.ClientAppStateService=p=n.__decorate([(0,r.Injectable)()],p)},59555:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ApplicationService=void 0;const n=e(85608),r=e(76003),o=e(59019),l=e(43718),p=e(11050),v=e(42101);let m=class{constructor(){this._initialized=new l.Deferred}async initializeData(){this._backendOS=await this.commonServer.getBackendOS(),this._initialized.resolve()}get frontendOS(){return l.OS.type()}get backendOS(){if(this._backendOS)return this._backendOS;if(this.appConfig.isElectronRenderer)return this.frontendOS;throw new Error("Can't get backend os type before initialize, if you want wait to get backend os, please use async method: getBackendOS")}async getBackendOS(){return await this._initialized.promise,this.backendOS}get clientId(){return this.injector.get(o.WSChannelHandler).clientId}get windowId(){return this.appConfig.isElectronRenderer?v.electronEnv.currentWindowId:this.injector.get(o.WSChannelHandler).clientId}};t.ApplicationService=m,n.__decorate([(0,r.Autowired)(l.CommonServerPath),n.__metadata("design:type",Object)],m.prototype,"commonServer",void 0),n.__decorate([(0,r.Autowired)(p.AppConfig),n.__metadata("design:type",Object)],m.prototype,"appConfig",void 0),n.__decorate([(0,r.Autowired)(r.INJECTOR_TOKEN),n.__metadata("design:type",r.Injector)],m.prototype,"injector",void 0),t.ApplicationService=m=n.__decorate([(0,r.Injectable)()],m)},16884:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(85608);n.__exportStar(e(12956),t),n.__exportStar(e(59555),t)},22914:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BaseConnectionHelper=void 0;const n=e(85608),r=e(76003),o=e(18740),l=e(43718),p=e(32796),v=e(38578),m=(0,l.getDebugLogger)();let _=class{async createRPCServiceChannel(f){var a;const h=this.createConnection(),u=(a=this.appConfig.clientId)!==null&&a!==void 0?a:this.getDefaultClientId(),d=new o.WSChannelHandler(h,u,{logger:m});return(0,p.createConnectionService)(this.injector,f,d)}};t.BaseConnectionHelper=_,n.__decorate([(0,r.Autowired)(r.INJECTOR_TOKEN),n.__metadata("design:type",r.Injector)],_.prototype,"injector",void 0),n.__decorate([(0,r.Autowired)(v.AppConfig),n.__metadata("design:type",Object)],_.prototype,"appConfig",void 0),n.__decorate([(0,r.Autowired)(l.IReporterService),n.__metadata("design:type",Object)],_.prototype,"reporterService",void 0),t.BaseConnectionHelper=_=n.__decorate([(0,r.Injectable)({multiple:!0})],_)},41320:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BrowserRuntime=void 0;const n=e(85608),r=e(76003),o=e(44142),l=e(6858),p=e(53206);let v=class extends l.RendererRuntime{constructor(){super(...arguments),this.runtimeName=o.ESupportRuntime.Web}registerRuntimeModuleProviders(_,s){s.webProviders&&_.addProviders(...s.webProviders)}registerRuntimeInnerProviders(_){(0,p.injectBrowserInnerProviders)(_)}};t.BrowserRuntime=v,t.BrowserRuntime=v=n.__decorate([(0,r.Injectable)()],v)},53206:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.injectBrowserInnerProviders=o;const n=e(93899),r=e(97222);function o(l){l.addProviders({token:n.ICtxMenuRenderer,useClass:r.BrowserCtxMenuRenderer})}},55267:(x,t,e)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.WebConnectionHelper=void 0;const r=e(85608),o=e(76003),l=e(91493),p=e(43718),v=e(22914);let m=n=class extends v.BaseConnectionHelper{constructor(s){super(),this.options=s,this.clientId=n.clientIdFactory()}getDefaultClientId(){return this.clientId}createConnection(){return l.ReconnectingWebSocketConnection.forURL(this.options.connectionPath,this.options.connectionProtocols)}static clientIdFactory(){return`CLIENT_ID_${(0,p.uuid)()}`}};t.WebConnectionHelper=m,t.WebConnectionHelper=m=n=r.__decorate([(0,o.Injectable)({multiple:!0}),r.__metadata("design:paramtypes",[Object])],m)},44142:(x,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.onigWasmCDNUri=t.ESupportRuntime=void 0;var e;(function(n){n.Electron="electron",n.Web="web"})(e||(t.ESupportRuntime=e={})),t.onigWasmCDNUri="https://g.alicdn.com/kaitian/vscode-oniguruma-wasm/1.5.1/onig.wasm"},59574:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ElectronRendererRuntime=void 0;const n=e(85608),r=e(76003),o=e(38578),l=e(42101),p=e(44142),v=e(6858),m=e(38892);let _=class extends v.RendererRuntime{constructor(){super(...arguments),this.runtimeName=p.ESupportRuntime.Electron}registerRuntimeModuleProviders(a,h){h.electronProviders&&a.addProviders(...h.electronProviders)}registerRuntimeInnerProviders(a){(0,m.injectElectronInnerProviders)(a)}mergeAppConfig(a){return s(a)}async provideResourceUri(a){switch(a){case v.EKnownResources.OnigWasm:return l.electronEnv.onigWasmUri||this.appConfig.onigWasmUri||p.onigWasmCDNUri;case v.EKnownResources.TreeSitterWasmDirectory:return l.electronEnv.treeSitterWasmDirectoryUri||this.appConfig.treeSitterWasmDirectoryUri||(0,o.getTreeSitterWasmCDNUri)(this.appConfig.componentCDNType);default:throw new Error(`Unknown resource: ${a}`)}}};t.ElectronRendererRuntime=_,t.ElectronRendererRuntime=_=n.__decorate([(0,r.Injectable)()],_);function s(f){var a;const h=(a=l.electronEnv.metadata)!==null&&a!==void 0?a:{},u={...f,appRoot:f.appRoot||l.electronEnv.appPath,extensionDir:f.extensionDir||h.extensionDir};return h.extensionDevelopmentHost&&(f.extensionDevelopmentHost=h.extensionDevelopmentHost),h.extensionCandidate&&(f.extensionCandidate=(f.extensionCandidate||[]).concat(l.electronEnv.metadata.extensionCandidate||[])),u}},38892:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.injectElectronInnerProviders=m;const n=e(43718),r=e(37406),o=e(93899),l=e(27790),p=e(11050),v=e(42101);function m(_){const s=_.get(p.AppConfig);_.addProviders({token:n.IElectronMainMenuService,useValue:(0,v.createElectronMainApi)(n.IElectronMainMenuService,s.devtools)},{token:r.IElectronMainUIService,useValue:(0,v.createElectronMainApi)(r.IElectronMainUIService,s.devtools)},{token:r.IElectronMainLifeCycleService,useValue:(0,v.createElectronMainApi)(r.IElectronMainLifeCycleService,s.devtools)},{token:r.IElectronURLService,useValue:(0,v.createElectronMainApi)(r.IElectronURLService,s.devtools)},{token:l.IElectronMenuFactory,useClass:l.ElectronMenuFactory},{token:l.IElectronMenuBarService,useClass:l.ElectronMenuBarService},{token:o.ICtxMenuRenderer,useClass:l.ElectronCtxMenuRenderer})}},63977:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ElectronConnectionHelper=void 0;const n=e(85608),r=e(76003),o=e(42101),l=e(22914);let p=class extends l.BaseConnectionHelper{getDefaultClientId(){return o.electronEnv.metadata.windowClientId}createConnection(){return(0,o.createNetSocketConnection)()}};t.ElectronConnectionHelper=p,t.ElectronConnectionHelper=p=n.__decorate([(0,r.Injectable)({multiple:!0})],p)},18379:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ConnectionHelperFactory=v;const n=e(85608),r=e(38578),o=e(55267),l=e(44142),p=e(63977);n.__exportStar(e(55267),t),n.__exportStar(e(63977),t),n.__exportStar(e(22914),t),n.__exportStar(e(44142),t);function v(m){return _=>{const s=m.get(r.AppConfig);let f;switch(_){case l.ESupportRuntime.Electron:f=m.get(p.ElectronConnectionHelper);break;case l.ESupportRuntime.Web:f=m.get(o.WebConnectionHelper,[{connectionPath:s.connectionPath,connectionProtocols:s.connectionProtocols}]);break;default:throw new Error(`Unknown backend type: ${_}`)}return f}}},6858:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RendererRuntime=t.EKnownResources=void 0;const n=e(85608),r=e(76003),o=e(11050),l=e(44142);var p;(function(m){m.OnigWasm="wasm:onig",m.TreeSitterWasmDirectory="wasm:tree-sitter"})(p||(t.EKnownResources=p={}));let v=class{mergeAppConfig(_){return _}async provideResourceUri(_){switch(_){case p.OnigWasm:return this.appConfig.onigWasmUri||l.onigWasmCDNUri;case p.TreeSitterWasmDirectory:return this.appConfig.treeSitterWasmDirectoryUri||(0,o.getTreeSitterWasmCDNUri)(this.appConfig.componentCDNType);default:throw new Error(`Unknown resource: ${_}`)}}};t.RendererRuntime=v,n.__decorate([(0,r.Autowired)(o.AppConfig),n.__metadata("design:type",Object)],v.prototype,"appConfig",void 0),t.RendererRuntime=v=n.__decorate([(0,r.Injectable)()],v)},37638:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AuthenticationContribution=void 0;const n=e(85608),r=e(76003),o=e(43718),l=e(66549);let p=class{onStart(){this.authenticationService.initialize()}registerCommands(m){m.registerCommand({id:o.noAccountsId,label:"%authentication.noAccounts%"},{execute:()=>{}})}};t.AuthenticationContribution=p,n.__decorate([(0,r.Autowired)(o.IAuthenticationService),n.__metadata("design:type",Object)],p.prototype,"authenticationService",void 0),t.AuthenticationContribution=p=n.__decorate([(0,o.Domain)(l.ClientAppContribution,o.CommandContribution)],p)},10605:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AuthenticationService=void 0;const n=e(85608),r=e(76003),o=e(43718),l=e(93899);let p=class extends o.Disposable{constructor(){super(...arguments),this._onDidRegisterAuthenticationProvider=this.registerDispose(new o.Emitter),this.onDidRegisterAuthenticationProvider=this._onDidRegisterAuthenticationProvider.event,this._onDidUnregisterAuthenticationProvider=this.registerDispose(new o.Emitter),this.onDidUnregisterAuthenticationProvider=this._onDidUnregisterAuthenticationProvider.event,this._onDidChangeSessions=this.registerDispose(new o.Emitter),this.onDidChangeSessions=this._onDidChangeSessions.event,this._authenticationProviders=new Map,this._signInRequestItems=new Map}async initialize(){this._storage=await this.getStorage(new o.URI("authentication").withScheme(o.STORAGE_SCHEMA.GLOBAL));const m=new Map;this.onDidChangeSessions(async _=>{if(_.event.added.length>0){const s=await this.getSessions(_.providerId);s.forEach(f=>{if(s.find(y=>m.get(y.id)))return;const a=new o.DisposableCollection,h=`account-sign-out-${_.providerId}-${f.id}`,u=this.commands.registerCommand({id:h,label:(0,o.formatLocalize)("authentication.signOut",_.label)},{execute:async()=>{await this.signOutOfAccount(_.providerId,f.account.label)}}),d=`manage-trusted-${_.providerId}-${f.id}`,E=this.commands.registerCommand({id:d,label:"%authentication.manageTrustedExtensions%"},{execute:async()=>{await this.manageTrustedExtensionsForAccount(_.providerId,f.account.label)}}),g=`${_.providerId}${f.account.label}`,c=this.menus.registerMenuItem(l.MenuId.AccountsContext,{submenu:g,label:`${f.account.label} (${_.label})`}),b=this.menus.registerMenuItems(g,[{command:d},{command:h}]);a.push(c),a.push(b),a.push(u),a.push(E),m.set(f.id,a)})}_.event.removed.length>0&&_.event.removed.forEach(s=>{const f=m.get(s.id);f&&(f.dispose(),m.delete(s.id))})})}get storage(){return this._storage}registerAuthenticationProvider(m,_){this._authenticationProviders.set(m,_),this._onDidRegisterAuthenticationProvider.fire({id:m,label:_.label}),this.updateAccountsMenuItem()}async sessionsUpdate(m,_){const s=this._authenticationProviders.get(m);s&&(this._onDidChangeSessions.fire({providerId:m,label:s.label,event:_}),await s.updateSessionItems(_),this.updateAccountsMenuItem(),_.added&&await this.updateNewSessionRequests(s))}async updateNewSessionRequests(m){const _=this._signInRequestItems.get(m.id);if(!_)return;const s=await m.getSessions();Object.keys(_).forEach(f=>{if(s.some(a=>a.scopes.slice().sort().join("")===f)){const a=_[f];a&&a.disposables.forEach(h=>h.dispose()),delete _[f],Object.keys(_).length===0?this._signInRequestItems.delete(m.id):this._signInRequestItems.set(m.id,_)}})}getTrustedKey(m,_){return`trusted-${m}-${_}`}async getAllowedExtensions(m,_){const s=this.getTrustedKey(m,_);let f=[];try{const a=await this.storage.get(s);a&&(f=JSON.parse(a))}catch(a){this.logger.warn("read allow extensions error: "+a)}return f}async setAllowedExtensions(m,_,s){const f=this.getTrustedKey(m,_);await this.storage.set(f,JSON.stringify(s))}async removeAllowedExtensions(m,_){const s=this.getTrustedKey(m,_);await this.storage.delete(s)}async updatedAllowedExtension(m,_,s,f,a){const h=await this.getAllowedExtensions(m,_),u=h.findIndex(d=>d.id===s);u===-1?h.push({id:s,name:f,allowed:a}):h[u].allowed=a,await this.setAllowedExtensions(m,_,h)}async isAccessAllowed(m,_,s){const a=(await this.getAllowedExtensions(m,_)).find(h=>h.id===s);return a?a.allowed!==void 0?a.allowed:!0:!1}async tryActivateProvider(m){await this.eventBus.fireAndAwait(new o.ExtensionActivateEvent({topic:"onView",data:m}));let _=this._authenticationProviders.get(m);if(_)return _;const s=new Promise((a,h)=>{this.onDidRegisterAuthenticationProvider(u=>{if(u.id===m)if(_=this._authenticationProviders.get(m),_)a(_);else throw new Error(`No authentication provider '${m}' is currently registered.`)})}),f=new Promise((a,h)=>{setTimeout(()=>{h(new Error(`didRegister ${m} timeout`))},5e3)});return Promise.race([s,f])}async getSessions(m,_,s,f){try{return await(this._authenticationProviders.get(m)||await this.tryActivateProvider(m)).getSessions(_,f)}catch{throw new Error(`No authentication provider '${m}' is currently registered.`)}}isAuthenticationProviderRegistered(m){return this._authenticationProviders.has(m)}getProviderIds(){const m=[];return this._authenticationProviders.forEach(_=>{m.push(_.id)}),m}unregisterAuthenticationProvider(m){const _=this._authenticationProviders.get(m);_&&(_.dispose(),this._authenticationProviders.delete(m),this._onDidUnregisterAuthenticationProvider.fire({id:m,label:_.label}),this.updateAccountsMenuItem())}updateAccountsMenuItem(){let m=!1;this._authenticationProviders.forEach(_=>{m=m||_.hasSessions()}),m&&this._noAccountsMenuItem&&(this._noAccountsMenuItem.dispose(),this._noAccountsMenuItem=void 0),!m&&!this._noAccountsMenuItem&&(this._noAccountsMenuItem=this.menus.registerMenuItem(l.MenuId.AccountsContext,{group:"0_accounts",command:o.noAccountsId}))}async requestNewSession(m,_,s,f,a){let h=this._authenticationProviders.get(m);if(h||await new Promise((u,d)=>{this.onDidRegisterAuthenticationProvider(E=>{E.id===m&&(h=this._authenticationProviders.get(m),u())})}),h){const u=this._signInRequestItems.get(m),d=_.sort().join("");if(u&&u[d]&&u[d].requestingExtensionIds.includes(f))return;const g=this.commands.registerCommand({id:`${f}signIn`,label:(0,o.formatLocalize)("authentication.signInRequests",a)},{execute:async()=>{const b=await this.login(m,_,s),y=b.account.label,S=await this.getAllowedExtensions(m,y);S.find(A=>A.id===f)||(S.push({id:f,name:a}),await this.setAllowedExtensions(m,y,S)),await this.setExtensionSessionId(a,m,b.id)}}),c=this.menus.registerMenuItem(l.MenuId.AccountsContext,{group:"2_signInRequests",command:`${f}signIn`});if(u){const b=u[d]||{disposables:[],requestingExtensionIds:[]};u[d]={disposables:[...b.disposables,c,g],requestingExtensionIds:[...b.requestingExtensionIds,f]},this._signInRequestItems.set(m,u)}else this._signInRequestItems.set(m,{[d]:{disposables:[c,g],requestingExtensionIds:[f]}})}}getLabel(m){const _=this._authenticationProviders.get(m);if(_)return _.label;throw new Error(`No authentication provider '${m}' has been declared.`)}supportsMultipleAccounts(m){const _=this._authenticationProviders.get(m);if(_)return _.supportsMultipleAccounts;throw new Error(`No authentication provider '${m}' is currently registered.`)}async login(m,_,s){try{return await(this._authenticationProviders.get(m)||await this.tryActivateProvider(m)).login(_,s)}catch(f){throw new Error(`No authentication provider '${m}' is currently registered, error messge: ${f.message}`)}}logout(m,_){const s=this._authenticationProviders.get(m);if(s)return s.logout(_);throw new Error(`No authentication provider '${m}' is currently registered.`)}manageTrustedExtensionsForAccount(m,_){const s=this._authenticationProviders.get(m);if(s)return s.manageTrustedExtensions(_);throw new Error(`No authentication provider '${m}' is currently registered.`)}signOutOfAccount(m,_){const s=this._authenticationProviders.get(m);if(s)return s.signOut(_);throw new Error(`No authentication provider '${m}' is currently registered.`)}getUsagesKey(m,_){return`usages-${m}-${_}`}async getAccountUsages(m,_){const s=this.getUsagesKey(m,_),f=await this.storage.get(s);let a=[];if(f)try{a=JSON.parse(f)}catch(h){this.logger.warn("parse account usages error: "+h)}return a}async addAccountUsage(m,_,s,f){const a=this.getUsagesKey(m,_),h=await this.getAccountUsages(m,_),u=h.findIndex(d=>d.extensionId===s);u>-1?h.splice(u,1,{extensionId:s,extensionName:f,lastUsed:Date.now()}):h.push({extensionId:s,extensionName:f,lastUsed:Date.now()}),await this.storage.set(a,JSON.stringify(h))}async removeAccountUsage(m,_){const s=this.getUsagesKey(m,_);await this.storage.delete(s)}getExtensionSessionIdKey(m,_){return`session-${m}-${_}`}async getExtensionSessionId(m,_){const s=this.getExtensionSessionIdKey(m,_);return await this.storage.get(s)}async setExtensionSessionId(m,_,s){const f=this.getExtensionSessionIdKey(m,_);await this.storage.set(f,s)}async removeExtensionSessionId(m,_){const s=this.getExtensionSessionIdKey(m,_);await this.storage.delete(s)}};t.AuthenticationService=p,n.__decorate([(0,r.Autowired)(o.ILogger),n.__metadata("design:type",Object)],p.prototype,"logger",void 0),n.__decorate([(0,r.Autowired)(o.StorageProvider),n.__metadata("design:type",Function)],p.prototype,"getStorage",void 0),n.__decorate([(0,r.Autowired)(o.IEventBus),n.__metadata("design:type",Object)],p.prototype,"eventBus",void 0),n.__decorate([(0,r.Autowired)(l.IMenuRegistry),n.__metadata("design:type",l.IMenuRegistry)],p.prototype,"menus",void 0),n.__decorate([(0,r.Autowired)(o.CommandRegistry),n.__metadata("design:type",Object)],p.prototype,"commands",void 0),t.AuthenticationService=p=n.__decorate([(0,r.Injectable)()],p)},72746:(x,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},33916:(x,t,e)=>{"use strict";var n;n={value:!0},t.j=void 0,e(37533);const r=e(76003),o=e(43718),l=e(4588),p=e(37406),v=e(16884),m=e(18379),_=e(41320),s=e(59574),f=e(6858),a=e(36206),h=e(66963),u=e(18193),d=e(41118),E=e(1149),g=e(11949),c=e(64102),b=e(78132),y=e(11050),S=e(67304),A=e(79951),w=e(79248),T=e(96302),D=e(71843);e(99696);class I{constructor(M){var O,P,k;this.opts=M,this.appInitialized=new o.Deferred,this.browserModules=[],this._disposables=new o.DisposableCollection,this._inComposition=!1,this._handleBeforeUpload=K=>{if(this.config.isElectronRenderer){if(this.stateService.state==="electron_confirmed_close")return;K.returnValue="",K.preventDefault(),this.stateService.state!=="electron_asking_close"&&(this.stateService.state="electron_asking_close",this.preventStopElectron().then(Z=>{if(Z)this.stateService.state="ready";else return this.stopContributionsElectron().then(()=>{this.stateService.state="electron_confirmed_close";const Q=this.injector.get(p.IElectronMainLifeCycleService);setTimeout(()=>{Q.closeWindow(A.electronEnv.currentWindowId)},0)})}))}else if(this.preventStop())return(K||window.event).returnValue=!0,!0},this._handleUnload=()=>{this.stateService.state="closing_window",this.config.isElectronRenderer||(this.disposeSideEffect(),this.stopContributions())},this._handleResize=()=>{},this._handleKeydown=K=>{K&&K.target.name!==d.NO_KEYBINDING_NAME&&!this._inComposition&&this.keybindingService.run(K)},this._handleKeyup=K=>{this.keybindingService.resolveModifierKey(K)},this._handleCompositionstart=()=>{this._inComposition=!0},this._handleCompositionend=()=>{this._inComposition=!1},this._handleWheel=()=>{};const{modules:F,contributions:L,iconStyleSheets:B,useCdnIcon:j,editorBackgroundImage:W,defaultPreferences:U,allowSetDocumentTitleFollowWorkspaceDir:X=!0,...V}=M;this.initEarlyPreference(M.workspaceDir||"");const $=(0,b.getPreferenceLanguageId)(U);(0,o.setLanguageId)($),this.injector=M.injector||new r.Injector,this.modules=F,this.modules.forEach(K=>this.resolveModuleDeps(K)),this.browserModules=M.modulesInstances||[];const Y=(O=M.isElectronRenderer)!==null&&O!==void 0?O:this.detectRuntime()===m.ESupportRuntime.Electron;this.config={appName:l.DEFAULT_APPLICATION_NAME,appHost:Y?l.DEFAULT_APPLICATION_DESKTOP_HOST:l.DEFAULT_APPLICATION_WEB_HOST,appRoot:M.appRoot||"",uriScheme:l.DEFAULT_URI_SCHEME,...V,isElectronRenderer:Y,workspaceDir:M.workspaceDir||"",extensionDir:M.extensionDir||"",injector:this.injector,wsPath:M.wsPath||`ws://${window.location.hostname}:8000`,layoutConfig:M.layoutConfig,editorBackgroundImage:M.editorBackgroundImage||W,allowSetDocumentTitleFollowWorkspaceDir:X,devtools:(P=M.devtools)!==null&&P!==void 0?P:!1,rpcMessageTimeout:M.rpcMessageTimeout||-1},this.config.connectionPath=M.connectionPath||`${this.config.wsPath}/service`;const z=this.injector.get(E.LayoutViewSizeConfig);z.init(M.layoutViewSize),this.config.layoutViewSize=z,this.injector.get(E.DesignLayoutConfig).setLayout(M.designLayout,(k=M.AINativeConfig)===null||k===void 0?void 0:k.layout),this.injector.addProviders({token:a.IClientApp,useValue:this}),this.injector.addProviders({token:y.AppConfig,useValue:this.config}),this.runtime=Y?this.injector.get(s.ElectronRendererRuntime):this.injector.get(_.BrowserRuntime),this.injector.addProviders({token:f.RendererRuntime,useValue:this.runtime}),this.config.devtools&&(window.__OPENSUMI_DEVTOOLS_GLOBAL_HOOK__={}),M.extensionDevelopmentPath&&(this.config.extensionCandidate=(this.config.extensionCandidate||[]).concat(Array.isArray(M.extensionDevelopmentPath)?M.extensionDevelopmentPath.map(K=>(0,o.asExtensionCandidate)(K,!0)):[(0,o.asExtensionCandidate)(M.extensionDevelopmentPath,!0)]),this.config.extensionDevelopmentHost=!0),this.config=this.runtime.mergeAppConfig(this.config),L&&this.injector.addProviders(...L),this.initBaseProvider(),this.initFields(),this.appendIconStyleSheets(B,j),this.createBrowserModules(U)}resolveModuleDeps(M){const O=Reflect.getMetadata("dependencies",M);O&&O.forEach(P=>{this.modules.indexOf(P)===-1&&this.modules.push(P)})}get lifeCycleService(){return this.injector.get(o.AppLifeCycleServiceToken)}async start(M,O,P){const F=this.injector.get(o.IReporterService).time(o.REPORT_NAME.MEASURE);this.lifeCycleService.phase=1,P?(console.error("You're using deprecated method 'start()' with connection parameter"),console.error("We introduced a new connection service to replace the old one"),(0,T.bindConnectionServiceDeprecated)(this.injector,this.modules,P)):O&&await this.createConnection(O),F.timeEnd("ClientApp.createConnection"),this.logger=this.injector.get(o.ILogger),this.stateService.state="client_connected",this.registerEventListeners(),await this.injector.get(o.IApplicationService).initializeData(),await this.measure("Contributions.start",()=>this.startContributions(M)),this.stateService.state="started_contributions",this.stateService.state="ready",this.lifeCycleService.phase=4,F.timeEnd("Framework.ready")}async createConnection(M){(await this.injector.get(m.ConnectionHelperFactory)(M).createRPCServiceChannel(this.modules)).onReopen(()=>{this.onReconnectContributions()})}onReconnectContributions(){const M=this.contributions;for(const O of M)O.onReconnect&&O.onReconnect(this)}initBaseProvider(){(0,D.injectInnerProviders)(this.injector),this.runtime.registerRuntimeInnerProviders(this.injector)}initFields(){this.contributionsProvider=this.injector.get(h.ClientAppContribution),this.commandRegistry=this.injector.get(o.CommandRegistry),this.keybindingRegistry=this.injector.get(d.KeybindingRegistry),this.keybindingService=this.injector.get(d.KeybindingService),this.stateService=this.injector.get(v.ClientAppStateService),this.nextMenuRegistry=this.injector.get(c.IMenuRegistry)}createBrowserModules(M){const O=this.injector;for(const P of this.modules){const k=O.get(P);this.browserModules.push(k),k.providers&&this.injector.addProviders(...k.providers),this.runtime.registerRuntimeModuleProviders(this.injector,k),k.preferences&&k.preferences(this.injector)}(0,u.injectCorePreferences)(this.injector),this.injectPreferenceService(this.injector,M),this.injectStorageProvider(this.injector);for(const P of this.browserModules)if(P.contributionProvider)if(Array.isArray(P.contributionProvider))for(const k of P.contributionProvider)(0,o.createContributionProvider)(this.injector,k);else(0,o.createContributionProvider)(this.injector,P.contributionProvider)}get contributions(){return this.contributionsProvider.getContributions()}async startContributions(M){await this.measure("RenderApp.render",()=>this.renderApp(M)),this.lifeCycleService.phase=2,await this.measure("Contributions.initialize",()=>this.initializeContributions()),await this.initializeCoreRegistry(),this.stateService.state="core_module_initialized",this.lifeCycleService.phase=3,await this.measure("Contributions.onStart",()=>this.onStartContributions()),await this.runContributionsPhase(this.contributions,"onDidStart")}async initializeCoreRegistry(){this.commandRegistry.initialize(),await this.keybindingRegistry.initialize(),this.nextMenuRegistry.initialize()}async initializeContributions(){await this.runContributionsPhase(this.contributions,"initialize"),this.appInitialized.resolve(),this.logger.verbose("contributions.initialize done")}async onStartContributions(){await this.runContributionsPhase(this.contributions,"onStart")}async runContributionsPhase(M,O){return await Promise.all(M.map(P=>this.contributionPhaseRunner(P,O)))}async contributionPhaseRunner(M,O){const P=M[O];if(typeof P=="function")try{const k=M.constructor.name+"."+O;return await this.measure(k,()=>P.call(M,this))}catch(k){this.logger.error(`Could not run contribution#${O}`,k)}}async renderApp(M){await(0,w.renderClientApp)(this,M),this.injector.get(o.IEventBus).fire(new g.RenderedEvent)}async measure(M,O){const k=this.injector.get(o.IReporterService).time(o.REPORT_NAME.MEASURE),F=await O();return k.timeEnd(M),F}preventStop(){const O=this.injector.get(u.CorePreferences)["application.confirmExit"];if(O==="never")return!1;for(const P of this.contributions)if(P.onWillStop)try{if(P.onWillStop(this))return!0}catch(k){(0,o.getDebugLogger)().error(k)}return O==="always"}async preventStopElectron(){if(this.injector.get(u.CorePreferences)["application.confirmExit"]==="never")return!1;for(const P of this.contributions)if(P.onWillStop)try{if(await P.onWillStop(this))return!0}catch(k){(0,o.getDebugLogger)().error(k)}return!1}stopContributions(){for(const M of this.contributions)if(M.onStop)try{M.onStop(this)}catch(O){this.logger.error("Could not stop contribution",O)}}async stopContributionsElectron(){const M=[];for(const O of this.contributions)O.onStop&&M.push((async()=>{try{await O.onStop(this)}catch(P){this.logger.error("Could not stop contribution",P)}})());await Promise.all(M)}registerEventListeners(){window.addEventListener("beforeunload",this._handleBeforeUpload),window.addEventListener("unload",this._handleUnload),window.addEventListener("resize",this._handleResize),window.addEventListener("compositionstart",this._handleCompositionstart),window.addEventListener("compositionend",this._handleCompositionend),window.addEventListener("keydown",this._handleKeydown,!0),window.addEventListener("keyup",this._handleKeyup,!0),o.isOSX&&document.body.addEventListener("wheel",this._handleWheel,{passive:!1})}injectPreferenceService(M,O){const P=()=>k=>{const F=M.get(b.PreferenceProvider,{tag:k});return F.asScope(k),F};if((0,b.injectPreferenceConfigurations)(M),(0,b.injectPreferenceSchemaProvider)(M),M.addProviders({token:b.PreferenceProviderProvider,useFactory:P},{token:b.PreferenceService,useClass:b.PreferenceServiceImpl}),O){const F=M.get(b.PreferenceProviderProvider)(b.PreferenceScope.Default);for(const L of Object.keys(O))F.setPreference(L,O[L])}}injectStorageProvider(M){M.addProviders({token:o.DefaultStorageProvider,useClass:o.DefaultStorageProvider}),M.addProviders({token:o.StorageProvider,useFactory:O=>P=>O.get(o.DefaultStorageProvider).get(P)}),(0,o.createContributionProvider)(M,o.StorageResolverContribution)}fireOnReload(M=!1){window.location.reload(M)}appendIconStyleSheets(M,O){const P=O?[S.DEFAULT_CDN_ICON,S.IDE_OCTICONS_CN_CSS,S.IDE_CODICONS_CN_CSS]:[];M&&M.length&&M.forEach(k=>{this.updateIconMap(k.prefix,k.iconMap),P.push(k.cssPath)});for(const k of P){const F=document.createElement("link");F.setAttribute("rel","stylesheet"),F.setAttribute("href",k),document.getElementsByTagName("head")[0].appendChild(F)}}updateIconMap(M,O){M==="kaitian-icon kticon-"&&this.logger.error(`The icon prefix '${M}' conflicts with the built-in icon, please check the icon configuration.`),(0,S.updateIconMap)(M,O)}initEarlyPreference(M){this._disposables.push((0,b.registerLocalStorageProvider)(o.GeneralSettingsId.Theme,M)),this._disposables.push((0,b.registerLocalStorageProvider)(o.GeneralSettingsId.Icon,M)),this._disposables.push((0,b.registerLocalStorageProvider)(o.GeneralSettingsId.Language,M))}async dispose(){window.removeEventListener("beforeunload",this._handleBeforeUpload),window.removeEventListener("unload",this._handleUnload),window.removeEventListener("resize",this._handleResize),window.removeEventListener("compositionstart",this._handleCompositionstart),window.removeEventListener("compositionend",this._handleCompositionend),window.removeEventListener("keydown",this._handleKeydown,!0),o.isOSX&&document.body.removeEventListener("wheel",this._handleWheel),this._disposables.dispose(),this.disposeSideEffect()}disposeSideEffect(){for(const M of this.contributions)if(M.onDisposeSideEffects)try{M.onDisposeSideEffects(this)}catch(O){this.logger.error("Could not dispose contribution",O)}}detectRuntime(){return window.isElectronRenderer||typeof navigator=="object"&&typeof navigator.userAgent=="string"&&navigator.userAgent.indexOf("Electron")>=0?m.ESupportRuntime.Electron:m.ESupportRuntime.Web}}t.j=I},79248:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.App=u,t.renderClientApp=g;const n=e(85608),r=n.__importDefault(e(14041)),o=n.__importDefault(e(25873)),l=e(97267),p=e(43718),v=e(28003),m=e(68456),_=e(11050),s=e(52564),f=e(26542),a=e(67304),h=e(75206);function u(c){const b=c.app.injector,y=b.get(p.IEventBus),S=b.get(f.LabelService),A=r.default.useCallback((w,T)=>S.getIcon(p.URI.parse(w),T),[]);return r.default.useEffect(()=>{let w;const T=()=>{w&&window.cancelAnimationFrame(w),w=window.requestAnimationFrame(()=>{w=null,s.allSlot.forEach(D=>{y.fire(new m.ResizeEvent({slotLocation:D.slot})),y.fireDirective(m.ResizeEvent.createDirective(D.slot))})})};return window.addEventListener("resize",T),()=>{window.removeEventListener("resize",T)}},[]),r.default.createElement(l.ComponentContextProvider,{value:{getIcon:a.getIcon,localize:p.localize,getResourceIcon:A}},r.default.createElement(_.ConfigProvider,{value:c.app.config},r.default.createElement(c.main,{callback:c.callback}),c.overlays&&c.overlays.map((w,T)=>r.default.createElement(w,{key:T}))))}const d=c=>b=>{o.default.createRoot(c).render(r.default.createElement(b,null))},E=(0,p.getDebugLogger)();function g(c,b){let y=c.config.layoutComponent||v.DefaultLayout;const S=c.browserModules.filter(R=>R.isOverlay).map(R=>R.component?R.component:(E.warn("Overlay module does not have component",R),null)).filter(Boolean),A=c.injector;A.get(h.ClientAppContextContribution).getContributions().forEach(R=>y=R.registerClientAppContext(y,A));const D=R=>r.default.createElement(u,{...R,app:c,main:y,overlays:S});return(typeof b=="function"?b:d(b))(D)}},96302:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createConnectionService=m,t.bindConnectionServiceDeprecated=_;const n=e(8919),r=e(18740),o=e(76271),l=e(43718),p=e(16884),v=e(11050);async function m(f,a,h,u={}){var d;const E=f.get(v.AppConfig),g=f.get(l.IReporterService);h.setReporter(g);const c=f.get(l.IEventBus),b=f.get(p.ClientAppStateService),y=()=>{b.reachedState("core_module_initialized").then(()=>{c.fire(new l.BrowserConnectionOpenEvent)})};h.connection.isOpen()&&y(),h.connection.onOpen(()=>{y()}),h.connection.onClose(()=>{b.reachedState("core_module_initialized").then(()=>{c.fire(new l.BrowserConnectionCloseEvent)})}),h.connection.onError(T=>{b.reachedState("core_module_initialized").then(()=>{c.fire(new l.BrowserConnectionErrorEvent(T))})}),await h.initHandler(),f.addProviders({token:r.WSChannelHandler,useValue:h});const S=await h.openChannel(o.RPCServiceChannelPath),A=new n.RPCServiceCenter;return A.setSumiConnection(S.createSumiConnection(u)),!((d=E?.measure)===null||d===void 0)&&d.connection&&A.setReporter(g,E.measure.connection.minimumReportThresholdTime),s(f,a,A),f.get(l.ILogger).reportToServer(),S}function _(f,a,h){const u=new n.RPCServiceCenter,d=u.setConnection(h),E=h.onClose(()=>{d.dispose(),E.dispose()});s(f,a,u)}function s(f,a,h){const{getRPCService:u}=(0,n.initRPCService)(h),d=[],E=[];for(const g of a){const c=f.get(g);if(c.backServices)for(const b of c.backServices)d.push(b),b.protocol&&h.loadProtocol(b.protocol)}for(const g of d){const{servicePath:c}=g,b=u(c),y={token:c,useValue:b};f.addProviders(y),g.clientToken&&E.push(g)}for(const g of E){const{servicePath:c}=g,b=u(c);if(g.clientToken){const y=f.get(g.clientToken);b.onRequestService(y)}}}},75206:(x,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ClientAppContextContribution=void 0,t.ClientAppContextContribution=Symbol("ClientAppContextContribution")},32796:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(85608);n.__exportStar(e(72746),t),n.__exportStar(e(79248),t),n.__exportStar(e(96302),t),n.__exportStar(e(75206),t)},71843:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.injectInnerProviders=Y;const n=e(43718),r=e(96405),o=e(16872),l=e(41480),p=e(12956),v=e(59555),m=e(18379),_=e(10605),s=e(66963),f=e(71707),a=e(80832),h=e(23396),u=e(77273),d=e(41118),E=e(37015),g=e(68456),c=e(75694),b=e(93899),y=e(77666),S=e(90697),A=e(73967),w=e(78132),T=e(68969),D=e(11719),I=e(52564),R=e(26542),M=e(52993),O=e(10845),P=e(40827),k=e(32242),F=e(99e3),L=e(42637),B=e(62652),j=e(27957),W=e(45670),U=e(66894),X=e(63921),V=e(75206),$=e(82493);function Y(z){(0,n.createContributionProvider)(z,s.ClientAppContribution),(0,n.createContributionProvider)(z,n.CommandContribution),(0,n.createContributionProvider)(z,u.FsProviderContribution),(0,n.createContributionProvider)(z,d.KeybindingContribution),(0,n.createContributionProvider)(z,b.MenuContribution),(0,n.createContributionProvider)(z,g.ComponentContribution),(0,n.createContributionProvider)(z,I.SlotRendererContribution),(0,n.createContributionProvider)(z,w.PreferenceContribution),(0,n.createContributionProvider)(z,W.VariableContribution),(0,n.createContributionProvider)(z,g.TabBarToolbarContribution),(0,n.createContributionProvider)(z,L.ToolBarActionContribution),(0,n.createContributionProvider)(z,k.StaticResourceContribution),(0,n.createContributionProvider)(z,V.ClientAppContextContribution);const H=[{token:n.IEventBus,useClass:n.EventBusImpl},{token:n.CommandService,useClass:n.CommandServiceImpl},{token:n.CommandRegistry,useClass:n.CommandRegistryImpl},{token:d.KeybindingRegistry,useClass:d.KeybindingRegistryImpl},{token:d.KeybindingService,useFactory:K=>K.get(d.KeybindingRegistry)},{token:o.KeyboardNativeLayoutService,useClass:E.BrowserKeyboardLayoutImpl},{token:o.KeyboardLayoutChangeNotifierService,useFactory:K=>K.get(o.KeyboardNativeLayoutService)},{token:E.KeyValidator,useFactory:K=>K.get(o.KeyboardNativeLayoutService)},p.ClientAppStateService,{token:c.ILogger,useClass:c.Logger},{token:c.Logger,useAlias:c.ILogger},{token:g.ComponentRegistry,useClass:g.ComponentRegistryImpl},{token:W.VariableRegistry,useClass:W.VariableRegistryImpl},{token:b.AbstractMenuService,useClass:b.MenuServiceImpl},{token:b.AbstractContextMenuService,useClass:b.ContextMenuServiceImpl},{token:b.IMenuRegistry,useClass:b.MenuRegistryImpl},{token:y.IToolbarActionService,useClass:y.ToolbarActionService},{token:b.AbstractMenubarService,useClass:b.MenubarServiceImpl},{token:n.IReporter,useClass:n.DefaultReporter},{token:n.IReporterService,useClass:n.ReporterService},{token:n.ReporterMetadata,useValue:{host:n.REPORT_HOST.BROWSER}},{token:T.IProgressService,useClass:D.ProgressService},{token:L.IToolbarRegistry,useClass:j.NextToolbarRegistryImpl},{token:L.IToolbarPopoverRegistry,useClass:B.ToolbarPopoverRegistry},j.ToolbarClientAppContribution,{token:n.IProblemPatternRegistry,useClass:n.ProblemPatternRegistryImpl},{token:n.IProblemMatcherRegistry,useClass:n.ProblemMatchersRegistryImpl},{token:n.ITaskDefinitionRegistry,useClass:n.TaskDefinitionRegistryImpl},{token:S.IOpenerService,useClass:A.OpenerService},{token:U.IWindowService,useClass:X.WindowService},{token:n.IApplicationService,useClass:v.ApplicationService},{token:M.IClipboardService,useClass:M.BrowserClipboardService},{token:O.IExternalUriService,useClass:O.ExternalUriService},{token:n.IAuthenticationService,useClass:_.AuthenticationService},{token:R.ICryptoService,useClass:R.CryptoService},{token:R.ICredentialsService,useClass:R.CredentialsService},{token:r.IHashCalculateService,useClass:r.HashCalculateServiceImpl},{token:n.IExtensionsSchemaService,useClass:h.ExtensionsPointServiceImpl},{token:n.AppLifeCycleServiceToken,useClass:$.AppLifeCycleService},{token:k.StaticResourceService,useClass:F.StaticResourceServiceImpl},P.StaticResourceClientAppContribution,{token:f.ISplitPanelService,useClass:f.SplitPanelService},{token:n.IAIReporter,useClass:l.AIReporter},{token:a.IDesignStyleService,useClass:a.DesignStyleService},{token:m.ConnectionHelperFactory,useFactory:m.ConnectionHelperFactory}];z.addProviders(...H)}},82493:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AppLifeCycleService=void 0;const n=e(85608),r=e(76003),o=e(43718);let l=class{constructor(){this.onDidChangeLifecyclePhaseEmitter=new o.Emitter,this.onDidLifeCyclePhaseChange=this.onDidChangeLifecyclePhaseEmitter.event}set phase(v){this.lifeCyclePhase=v,this.onDidChangeLifecyclePhaseEmitter.fire(this.lifeCyclePhase)}get phase(){return this.lifeCyclePhase}};t.AppLifeCycleService=l,t.AppLifeCycleService=l=n.__decorate([(0,r.Injectable)()],l)},99696:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=e(85608).__importDefault(e(99126));typeof window.ResizeObserver>"u"&&(window.ResizeObserver=r.default)},36206:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BrowserModule=t.IClientApp=void 0;const n=e(85608),r=e(76003),o=e(43718);t.IClientApp=Symbol("CLIENT_APP_TOKEN");class l extends o.BasicModule{}t.BrowserModule=l,n.__decorate([(0,r.Autowired)(t.IClientApp),n.__metadata("design:type",Object)],l.prototype,"app",void 0)},14109:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MERGE_CONFLICT_COMMANDS=t.SCM_COMMANDS=t.QUICK_OPEN_COMMANDS=t.MARKER_COMMANDS=t.LAYOUT_COMMANDS=t.TERMINAL_COMMANDS=t.DIALOG_COMMANDS=t.KEYBOARD_COMMANDS=t.WORKSPACE_COMMANDS=t.OUTLINE_COMMANDS=t.SEARCH_COMMANDS=t.DIFF_EDITOR_COMMANDS=t.EDITOR_COMMANDS=t.COMMON_COMMANDS=t.OPEN_EDITORS_COMMANDS=t.FILE_COMMANDS=void 0;const n=e(67304);var r;(function(b){const y="file";b.NEW_FILE={id:"file.new",category:y,iconClass:(0,n.getIcon)("new-file")},b.RENAME_FILE={id:"file.rename",category:y},b.DELETE_FILE={id:"file.delete",category:y},b.NEW_FOLDER={id:"file.folder.new",category:y,iconClass:(0,n.getIcon)("new-folder")},b.COMPARE_SELECTED={id:"file.compare",category:y},b.OPEN_FILE={id:"file.open",category:y},b.SAVE_FILE={id:"file.save",category:y},b.COLLAPSE_ALL={id:"filetree.collapse.all",category:y,iconClass:(0,n.getIcon)("collapse-all")},b.REFRESH_ALL={id:"filetree.refresh.all",category:y,iconClass:(0,n.getIcon)("refresh")},b.OPEN_RESOURCES={id:"filetree.open.file",category:y},b.OPEN_TO_THE_SIDE={id:"filetree.open.side",category:y},b.OPEN_TYPE_WITH={id:"filetree.open.with",category:y},b.COPY_PATH={id:"filetree.copy.path",category:y,label:"%file.copy.path%"},b.COPY_RELATIVE_PATH={id:"filetree.copy.relativepath",category:y},b.COPY_FILE={id:"filetree.copy.file",category:y},b.CUT_FILE={id:"filetree.cut.file",category:y},b.PASTE_FILE={id:"filetree.paste.file",category:y},b.SELECT_CURRENT_NODE={id:"filetree.selectCurrentNode",category:y},b.LOCATION={id:"filetree.location",category:y},b.LOCATION_WITH_EDITOR={id:"filetree.location_with_editor",category:y,iconClass:(0,n.getIcon)("focus")},b.OPEN_FOLDER={id:"filetree.open.folder",category:y,label:"%file.open.folder%"},b.VSCODE_OPEN_FOLDER={id:"filetree.open.vscode_open_folder",category:y},b.OPEN_WORKSPACE={id:"filetree.open.workspace",category:y,label:"%file.open.workspace%"},b.SEARCH_ON_FOLDER={id:"filetree.search.folder",category:y},b.FOCUS_FILES={id:"filetree.focus.files",category:y,label:"%file.focus.files%"},b.FILTER_TOGGLE={id:"filetree.files.filter_toggle",category:y,iconClass:(0,n.getIcon)("retrieval")},b.FILTER_OPEN={id:"filetree.files.filter_open",category:y},b.OPEN_TERMINAL_WITH_PATH={id:"filetree.openTerminalWithPath",category:y},b.FILTER_CLOSE={id:"filetree.quitFilterMode",category:y},b.NEXT={id:"filetree.next",category:y},b.PREV={id:"filetree.prev",category:y},b.COLLAPSE={id:"filetree.collapse",category:y},b.EXPAND={id:"filetree.expand",category:y},b.REVEAL_IN_EXPLORER={id:"filetree.revealInExplorer",category:y},b.TOGGLE_OR_OPEN={id:"filetree.toggleOrOpen",category:y}})(r||(t.FILE_COMMANDS=r={}));var o;(function(b){const y="openeditors";b.SAVE_ALL={id:"opened.editors.save.all",category:y,iconClass:(0,n.getIcon)("save-all")},b.CLOSE_ALL={id:"opened.editors.close.all",category:y,iconClass:(0,n.getIcon)("close-all")},b.SAVE_BY_GROUP={id:"opened.editors.save.byGroup"},b.CLOSE_BY_GROUP={id:"opened.editors.close.byGroup"},b.OPEN={id:"opened.editors.open",category:y},b.CLOSE={id:"opened.editors.close",category:y},b.OPEN_TO_THE_SIDE={id:"opened.editors.openToTheSide",category:y},b.COMPARE_SELECTED={id:"opened.editors.compare",category:y},b.COPY_RELATIVE_PATH={id:"opened.editors.copyRelativePath",category:y},b.COPY_PATH={id:"opened.editors.copyPath",category:y},b.LOCATION={id:"opened.editors.location",category:y}})(o||(t.OPEN_EDITORS_COMMANDS=o={}));var l;(function(b){b.FIND={id:"core.find",label:"%common.find%"},b.REPLACE={id:"core.replace",label:"%common.replace%"},b.ABOUT_COMMAND={id:"core.about",label:"%common.about%"},b.OPEN_PREFERENCES={id:"core.openpreference",label:"%common.preference.open%"},b.LOCATE_PREFERENCES={id:"workbench.preferences.locate"},b.OPEN_KEYMAPS={id:"core.keymaps.open",label:"%common.keymaps.open%"},b.OPEN_LAUNCH_CONFIGURATION={id:"core.launchConfiguration.open",label:"%debug.action.open.configuration%"},b.ENVIRONMENT_VARIABLE={id:"core.environment.variable"}})(l||(t.COMMON_COMMANDS=l={}));var p;(function(b){const y="editor";b.API_OPEN_EDITOR_COMMAND_ID="_workbench.open",b.API_OPEN_DIFF_EDITOR_COMMAND_ID="_workbench.diff",b.API_OPEN_WITH_EDITOR_COMMAND_ID="_workbench.openWith",b.NEW_UNTITLED_FILE={id:"file.new.untitled",category:y,label:"%file.new%",iconClass:(0,n.getIcon)("new-file")},b.UNDO={id:"editor.undo",category:y,label:"%editor.undo%"},b.REDO={id:"editor.redo",category:y,label:"%editor.redo%"},b.SELECT_ALL={id:"editor.selectAll",category:y,label:"%selection.all%"},b.OPEN_RESOURCE={id:"editor.openUri",category:y},b.OPEN_RESOURCES={id:"editor.openUris",category:y},b.SAVE_URI={id:"editor.saveUri",category:y},b.SAVE_CURRENT={id:"editor.saveCurrent",category:y,label:"%editor.saveCurrent%"},b.FOCUS_IF_NOT_ACTIVATE_ELEMENT={id:"editor.focusIfNotActivateElement",category:y,label:"%editor.saveCurrent%"},b.COMPARE={id:"editor.compare",category:y},b.OPEN_MERGEEDITOR={id:"editor.open.mergeEditor",category:y},b.OPEN_MERGEEDITOR_DEV={id:"editor.open.mergeEditor.dev",category:"Merge Editor (Dev)",label:"Open Merge Editor State from Json"},b.MERGEEDITOR_RESET={id:"editor.mergeEditor.reset",category:y,label:"%mergeEditor.reset%"},b.CLOSE={id:"editor.close",category:y,label:"%editor.closeCurrent%"},b.CLOSE_ALL_IN_GROUP={id:"editor.closeAllInGroup",category:y,label:"%editor.closeAllInGroup%"},b.CLOSE_OTHER_IN_GROUP={id:"editor.closeOtherEditorsInGroup",category:y,label:"%editor.closeOtherEditors%"},b.CLOSE_ALL={id:"editor.closeAll",category:y,label:"%editor.close.all%"},b.CLOSE_SAVED={id:"editor.closeSaved",category:y,label:"%editor.closeSaved%"},b.SAVE_ALL={id:"editor.saveAll",category:y,label:"%editor.saveAll%"},b.CLOSE_TO_RIGHT={id:"editor.closeToRight",category:y,label:"%editor.closeToRight%"},b.GET_CURRENT={id:"editor.getCurrent",category:y},b.GET_CURRENT_RESOURCE={id:"editor.getCurrentResource",category:y},b.SPLIT_TO_LEFT={id:"editor.splitToLeft",category:y,label:"%editor.splitToLeft%"},b.SPLIT_TO_RIGHT={id:"editor.splitToRight",category:y,label:"%editor.splitToRight%"},b.SPLIT_TO_TOP={id:"editor.splitToTop",category:y,label:"%editor.splitToTop%"},b.SPLIT_TO_BOTTOM={id:"editor.splitToBottom",category:y,label:"%editor.splitToBottom%"},b.CHANGE_LANGUAGE={id:"editor.changeLanguage",category:y},b.CHANGE_ENCODING={id:"editor.changeEncoding",category:y},b.GET_ENCODING={id:"editor.getEncoding",category:y},b.CHANGE_EOL={id:"editor.changeEol",category:y},b.NAVIGATE_LEFT={id:"editor.navigateLeft",category:y},b.NAVIGATE_RIGHT={id:"editor.navigateRight",category:y},b.NAVIGATE_UP={id:"editor.navigateUp",category:y},b.NAVIGATE_DOWN={id:"editor.navigateDown",category:y},b.NAVIGATE_NEXT={id:"editor.navigateNext",category:y},b.NAVIGATE_PREVIOUS={id:"editor.navigatePrevious",category:y},b.PREVIOUS={id:"editor.previous",category:y},b.NEXT={id:"editor.next",category:y},b.PREVIOUS_IN_GROUP={id:"editor.previousInGroup",category:y},b.NEXT_IN_GROUP={id:"editor.nextInGroup",category:y},b.LAST_IN_GROUP={id:"editor.lastInGroup",category:y},b.CLOSE_OTHER_GROUPS={id:"editor.closeOtherGroup",category:y,label:"%editor.closeEditorsInOtherGroups%"},b.OPEN_EDITOR_AT_INDEX={id:"editor.openEditorAtIndex",category:y},b.EVEN_EDITOR_GROUPS={id:"editor.evenEditorGroups",category:y,label:"%editor.resetEditorGroups%"},b.REVERT_DOCUMENT={id:"editor.document.revert",category:y,label:"%editor.revert%"},b.REVERT_AND_CLOSE={id:"editor.revertAndClose",category:y},b.GO_FORWARD={id:"editor.goForward",category:y},b.GO_BACK={id:"editor.goBack",category:y},b.PIN_CURRENT={id:"editor.pinCurrent",category:y},b.COPY_CURRENT_PATH={id:"editor.copyCurrentPath",category:y},b.GO_TO_GROUP={id:"editor.goToGroup",category:y},b.MOVE_GROUP={id:"editor.moveGroup",category:y},b.REOPEN_CLOSED={id:"editor.reopenClosed",category:y},b.FOCUS={id:"editor.focus",category:y},b.TEST_TOKENIZE={id:"editor.tokenize.test",category:y,label:"%editor.tokenize.test%"},b.AUTO_SAVE={id:"editor.autoSave",category:y},b.FOCUS_ACTIVE_EDITOR_GROUP={id:"editor.focusActiveEditorGroup",category:y},b.COMPONENT_UNDO={id:"editor.componentUndo",category:y},b.COMPONENT_REDO={id:"editor.componentRedo"},b.SEARCH_WORKSPACE_SYMBOL={id:"editor.workspaceSymbol.quickopen",label:"%editor.workspaceSymbol.quickopen%",category:y},b.SEARCH_WORKSPACE_SYMBOL_CLASS={id:"editor.workspaceSymbolClass.quickopen",label:"%editor.workspaceSymbolClass.quickopen%",category:y},b.GO_TO_LINE={id:"editor.action.gotoLine",label:"%editor.goToLine%",category:y},b.QUICK_OPEN={id:"workbench.action.quickOpen",category:y,label:"%editor.quickOpen%"},b.TOGGLE_WORD_WRAP={id:"editor.toggleWordWrap",label:"%editor.toggleWordWrap%",category:y},b.TOGGLE_COLUMN_SELECTION={id:"editor.action.toggleColumnSelection",label:"%editor.action.toggleColumnSelection%",category:y},b.FORMAT_DOCUMENT={id:"editor.action.formatDocument",category:y},b.FORMAT_SELECTION={id:"editor.action.formatSelection",category:y},b.FORMAT_DOCUMENT_WITH={id:"editor.action.formatDocument.multiple",category:y,label:"%editor.formatDocument.label.multiple%"},b.FORMAT_SELECTION_WITH={id:"editor.action.formatSelection.multiple",category:y,label:"%editor.formatSelection.label.multiple%"},b.COPY_PATH={id:"editor.action.copyPath",category:y,label:"%editor.copyPath%"},b.COPY_RELATIVE_PATH={id:"editor.action.copyRelativePath",category:y,label:"%editor.copyRelativePath%"}})(p||(t.EDITOR_COMMANDS=p={}));var v;(function(b){const y="diff-editor";b.REVERT={id:"editor.diff.revert",category:y},b.ACCEPT={id:"editor.diff.accept",category:y},b.TOGGLE_COLLAPSE_UNCHANGED_REGIONS={id:"editor.diff.toggleCollapseUnchangedRegions",category:y}})(v||(t.DIFF_EDITOR_COMMANDS=v={}));var m;(function(b){const y="search";b.OPEN_SEARCH={id:"content-search.openSearch",category:y,label:"Open search sidebar"},b.REFRESH={id:"file-search.refresh",label:"refresh search",iconClass:(0,n.getIcon)("refresh"),category:y},b.CLEAN={id:"file-search.clean",label:"clean search",iconClass:(0,n.getIcon)("clear"),category:y},b.GET_RECENT_SEARCH_WORD={id:"search.getRecentSearchWordCmd",category:y},b.GET_BACK_RECENT_SEARCH_WORD={id:"search.getBackRecentSearchWordCmd",category:y},b.MENU_REPLACE={id:"search.menu.replace",category:y,label:"%search.replace.title%"},b.MENU_REPLACE_ALL={id:"search.menu.replaceAll",category:y,label:"%search.replaceAll.label%"},b.MENU_HIDE={id:"search.menu.hide",category:y,label:"%search.result.hide%"},b.MENU_COPY={id:"search.menu.copy",category:y,label:"%file.copy.file%"},b.MENU_COPY_ALL={id:"search.menu.copyAll",category:y,label:"%search.menu.copyAll%"},b.MENU_COPY_PATH={id:"search.menu.copyPath",category:y,label:"%file.copy.path%"},b.REPLACE={id:"search.replace",category:y},b.CLOSE={id:"search.close",category:y}})(m||(t.SEARCH_COMMANDS=m={}));var _;(function(b){const y="outline";b.OUTLINE_COLLAPSE_ALL={id:"outline.collapse.all",category:y},b.OUTLINE_FOLLOW_CURSOR={id:"outline.follow.cursor",category:y},b.OUTLINE_SORT_KIND={id:"outline.sort.kind",category:y},b.OUTLINE_SORT_NAME={id:"outline.sort.name",category:y},b.OUTLINE_SORT_POSITION={id:"outline.sort.position",category:y}})(_||(t.OUTLINE_COMMANDS=_={}));var s;(function(b){const y="workspace";b.ADD_WORKSPACE_FOLDER={id:"workspace.addFolderToWorkspace",label:"%workspace.addFolderToWorkspace%",category:y},b.REMOVE_WORKSPACE_FOLDER={id:"workspace.removeFolderFromWorkspace",label:"%workspace.removeFolderFromWorkspace%",category:y},b.SAVE_WORKSPACE_AS_FILE={id:"workspace.saveWorkspaceAsFile",label:"%workspace.saveWorkspaceAsFile%",category:y}})(s||(t.WORKSPACE_COMMANDS=s={}));var f;(function(b){const y="keyboard";b.CHOOSE_KEYBOARD_LAYOUT={id:"keyboard.chooseKeyboardLayout",label:"%keyboard.chooseKeyboardLayout%",category:y}})(f||(t.KEYBOARD_COMMANDS=f={}));var a;(function(b){const y="dialog";b.ENSURE={id:"dialog.ensure",category:y}})(a||(t.DIALOG_COMMANDS=a={}));var h;(function(b){b.CATEGORY="%terminal.name%",b.FOCUS_NEXT_TERMINAL={id:"workbench.action.terminal.focusNextPane",label:"%terminal.focusNext.inTerminalGroup%",category:b.CATEGORY},b.FOCUS_PREVIOUS_TERMINAL={id:"workbench.action.terminal.focusPreviousPane",label:"%terminal.focusPrevious.inTerminalGroup%",category:b.CATEGORY},b.SPLIT={id:"terminal.split",label:"%terminal.split%",category:b.CATEGORY},b.ADD={id:"terminal.add",label:"%terminal.new%",category:b.CATEGORY},b.REMOVE={id:"terminal.remove",label:"%terminal.remove%",category:b.CATEGORY},b.CLEAR={id:"terminal.clear",label:"%terminal.clear%",category:b.CATEGORY},b.OPEN_SEARCH={id:"terminal.search",label:"%terminal.search%",category:b.CATEGORY},b.SEARCH_NEXT={id:"terminal.search.next",label:"%terminal.search.next%",category:b.CATEGORY},b.OPEN_WITH_PATH={id:"terminal.openWithPath",category:b.CATEGORY},b.CLEAR_CONTENT={id:"terminal.clearContent",label:"%terminal.menu.clearCurrentContent%",category:b.CATEGORY},b.CLEAR_ALL_CONTENT={id:"terminal.clearAllContent",label:"%terminal.menu.clearAllContents%",category:b.CATEGORY},b.TAB_RENAME={id:"terminal.tabRename",category:b.CATEGORY},b.SELECT_ALL_CONTENT={id:"terminal.selectAllContent",label:"%terminal.menu.selectAllContent%",category:b.CATEGORY},b.MORE_SETTINGS={id:"terminal.moreSettings",label:"%terminal.menu.moreSettings%",category:b.CATEGORY},b.SELECT_TYPE={id:"terminal.selectType",category:b.CATEGORY},b.SELECT_ZSH={id:"terminal.selectTypeZsh",label:"zsh",category:b.CATEGORY},b.SELECT_BASH={id:"terminal.selectTypeBash",label:"bash",category:b.CATEGORY},b.SELECT_SH={id:"terminal.selectTypeSh",label:"sh",category:b.CATEGORY},b.SELECT_CMD={id:"terminal.selectTypeCMD",label:"cmd",category:b.CATEGORY},b.SELECT_POWERSHELL={id:"terminal.selectTypePowerShell",label:"powershell",category:b.CATEGORY},b.COPY={id:"terminal.copy",label:"%edit.copy%",category:b.CATEGORY},b.PASTE={id:"terminal.paste",label:"%edit.paste%",category:b.CATEGORY},b.SELECT_ALL={id:"terminal.selectAll",label:"%terminal.menu.selectCurrentContent%",category:b.CATEGORY},b.RE_LAUNCH={id:"terminal.relaunch",category:b.CATEGORY},b.TOGGLE_TERMINAL={id:"terminal.toggleTerminal",label:"%terminal.toggleTerminal%",category:b.CATEGORY},b.KILL_PROCESS={id:"terminal.killProcess",label:"%terminal.killProcess%",category:b.CATEGORY}})(h||(t.TERMINAL_COMMANDS=h={}));var u;(function(b){const y="view";b.QUICK_OPEN_VIEW={id:"layout.action.quickOpenView",category:y},b.OPEN_VIEW={id:"layout.action.openView",label:"%layout.action.openView%",category:y},b.MAXIMIZE_EDITOR={id:"layout.action.Maximizeeditor",category:y},b.TOGGLE_SIDEBAR_VISIBILITY={id:"main-layout.left-panel.toggle",category:y}})(u||(t.LAYOUT_COMMANDS=u={}));var d;(function(b){const y="marker";b.SHOW_ERRORS_WARNINGS={id:"marker.action.showErrorsWarnings",category:y},b.TOGGLE_SHOW_ERRORS_WARNINGS={id:"marker.action.toggleShowErrorsWarnings",category:y}})(d||(t.MARKER_COMMANDS=d={}));var E;(function(b){b.OPEN={id:"editor.action.quickCommand"},b.OPEN_OUTLINE={id:"editor.action.quickOutline"},b.OPEN_VIEW={id:"editor.action.quickView"},b.OPEN_WITH_COMMAND={id:"editor.action.quickCommand.withCommand"}})(E||(t.QUICK_OPEN_COMMANDS=E={}));var g;(function(b){const y="SCM";b.GetSCMResource={id:"scm.getResource",category:y},b._GIT_OPEN_MERGE_EDITOR={id:"_git.openMergeEditor"},b.GIT_OPEN_MERGE_EDITOR={id:"git.openMergeEditor"}})(g||(t.SCM_COMMANDS=g={}));var c;(function(b){const y="MergeConflict";b.AI_ACCEPT={id:"merge-conflict.ai.accept",category:y},b.ALL_RESET={id:"merge-conflict.ai.all-reset",category:y},b.AI_ALL_ACCEPT={id:"merge-conflict.ai.all-accept",category:y},b.AI_ALL_ACCEPT_STOP={id:"merge-conflict.ai.all-accept-stop",category:y}})(c||(t.MERGE_CONFLICT_COMMANDS=c={}))},22780:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ClientCommonContribution=t.locationProtocolContextKey=t.inputFocusedContextKey=void 0;const n=e(85608),r=e(76003),o=e(97267),l=e(43718),p=e(53736),v=e(18193),m=e(22366),_=e(41118),s=e(1149),f=e(64102),a=e(39496),h=e(78132),u=e(11050),d=e(14109),E=e(66549);t.inputFocusedContextKey="inputFocus",t.locationProtocolContextKey="locationProtocol";let g=class{constructor(){this.schema=v.corePreferenceSchema;const b={"application.supportsOpenFolder":!!this.appConfig.isElectronRenderer&&!this.appConfig.isRemote,"application.supportsOpenWorkspace":!!this.appConfig.isElectronRenderer&&!this.appConfig.isRemote,"debug.toolbar.top":this.appConfig.isElectronRenderer?0:this.layoutViewSize.menubarHeight},y=Object.keys(this.schema.properties);for(const S of y)this.schema.properties[S].default=b[S]||this.schema.properties[S].default}onStart(){this.contextKeyService.createKey(t.locationProtocolContextKey,window.location.protocol.split(":")[0]),this.inputFocusedContext=this.contextKeyService.createKey(t.inputFocusedContextKey,!1),window.addEventListener("focusin",this.updateInputContextKeys.bind(this))}onStop(){window.removeEventListener("focusin",this.updateInputContextKeys.bind(this))}activeElementIsInput(){return!!document.activeElement&&(document.activeElement.tagName==="INPUT"||document.activeElement.tagName==="TEXTAREA")}updateInputContextKeys(){const b=this.activeElementIsInput();if(this.inputFocusedContext.set(b),b){const y=(0,m.trackFocus)(document.activeElement);l.Event.once(y.onDidBlur)(()=>{this.inputFocusedContext.set(this.activeElementIsInput()),y.dispose()})}}registerCommands(b){b.registerCommand(d.EDITOR_COMMANDS.UNDO),b.registerCommand(d.EDITOR_COMMANDS.REDO),b.registerCommand(d.EDITOR_COMMANDS.SELECT_ALL),b.registerCommand(d.COMMON_COMMANDS.ABOUT_COMMAND,{execute:()=>{alert((0,l.replaceLocalizePlaceholder)(this.appConfig.appName))}})}registerMenus(b){b.registerMenubarItem(a.MenuId.MenubarFileMenu,{label:(0,l.localize)("menu-bar.title.file"),order:1,iconClass:(0,o.getIcon)("menubar-file")}),b.registerMenubarItem(a.MenuId.MenubarEditMenu,{label:(0,l.localize)("menu-bar.title.edit"),order:2,iconClass:(0,o.getIcon)("menubar-edit")}),b.registerMenubarItem(a.MenuId.MenubarSelectionMenu,{label:(0,l.localize)("menu-bar.title.selection"),order:3,iconClass:(0,o.getIcon)("menubar-selection")}),b.registerMenubarItem(a.MenuId.MenubarViewMenu,{label:(0,l.localize)("menu-bar.title.view"),order:4,iconClass:(0,o.getIcon)("menubar-view")}),b.registerMenubarItem(a.MenuId.MenubarGoMenu,{label:(0,l.localize)("menu-bar.title.go"),order:5,iconClass:(0,o.getIcon)("menubar-go")}),b.registerMenubarItem(a.MenuId.MenubarTerminalMenu,{label:(0,l.localize)("menu-bar.title.terminal"),order:5,iconClass:(0,o.getIcon)("terminal")}),b.registerMenubarItem(a.MenuId.MenubarHelpMenu,{label:(0,l.localize)("menu-bar.title.help"),order:999,iconClass:(0,o.getIcon)("question-circle")}),b.registerMenuItems(a.MenuId.MenubarFileMenu,[{command:d.FILE_COMMANDS.OPEN_FOLDER.id,group:"1_open",when:"config.application.supportsOpenFolder"},{command:d.FILE_COMMANDS.OPEN_WORKSPACE.id,group:"1_open",when:"config.application.supportsOpenWorkspace"},{command:d.WORKSPACE_COMMANDS.ADD_WORKSPACE_FOLDER.id,group:"1_open",when:"config.workspace.supportMultiRootWorkspace"},{command:d.WORKSPACE_COMMANDS.SAVE_WORKSPACE_AS_FILE.id,group:"1_open",when:"config.workspace.supportMultiRootWorkspace"},{command:d.EDITOR_COMMANDS.NEW_UNTITLED_FILE.id,group:"2_new"},{command:{id:d.EDITOR_COMMANDS.SAVE_CURRENT.id,label:(0,l.localize)("file.save")},group:"3_save"},{command:{id:d.EDITOR_COMMANDS.SAVE_ALL.id,label:(0,l.localize)("file.saveAll")},group:"3_save"},{command:{id:d.EDITOR_COMMANDS.AUTO_SAVE.id,label:(0,l.localize)("file.autoSave")},toggledWhen:"config.editor.autoSave != off",group:"4_autosave"}]),b.registerMenuItems(a.MenuId.MenubarGoMenu,[{command:{id:d.EDITOR_COMMANDS.GO_BACK.id,label:(0,l.localize)("editor.goBack")},group:"1_go"},{command:{id:d.EDITOR_COMMANDS.GO_FORWARD.id,label:(0,l.localize)("editor.goForward")},group:"1_go"},{command:{id:d.EDITOR_COMMANDS.QUICK_OPEN.id,label:(0,l.localize)("editor.quickOpen")},group:"2_go_file"},{command:{id:d.EDITOR_COMMANDS.SEARCH_WORKSPACE_SYMBOL.id,label:(0,l.localize)("editor.workspaceSymbol.quickopen")},group:"2_go_file"},{command:{id:d.EDITOR_COMMANDS.GO_TO_LINE.id,label:(0,l.localize)("editor.goToLine")},group:"3_go_infile"},{command:{id:"editor.action.jumpToBracket",label:(0,l.localize)("menu-bar.go.jumpToBracket")},group:"3_go_infile"},{command:{id:"editor.action.marker.nextInFiles",label:(0,l.localize)("menu-bar.go.nextProblemInFiles")},group:"6_go_problem"},{command:{id:"editor.action.marker.prevInFiles",label:(0,l.localize)("menu-bar.go.prevProblemInFiles")},group:"6_go_problem"}]),b.registerMenuItems(a.MenuId.MenubarTerminalMenu,[{command:{id:d.TERMINAL_COMMANDS.ADD.id,label:d.TERMINAL_COMMANDS.ADD.label},group:"1_terminal"},{command:{id:d.TERMINAL_COMMANDS.SPLIT.id,label:d.TERMINAL_COMMANDS.SPLIT.label},group:"1_terminal"}])}registerKeybindings(b){b.registerKeybinding({command:d.EDITOR_COMMANDS.SELECT_ALL.id,keybinding:"ctrlcmd+a",when:"editorFocus"}),b.registerKeybinding({command:d.EDITOR_COMMANDS.UNDO.id,keybinding:"ctrlcmd+z",when:"editorFocus"}),b.registerKeybinding({command:d.EDITOR_COMMANDS.REDO.id,keybinding:"ctrlcmd+shift+z",when:"editorFocus"})}};t.ClientCommonContribution=g,n.__decorate([(0,r.Autowired)(l.CommandService),n.__metadata("design:type",Object)],g.prototype,"commandService",void 0),n.__decorate([(0,r.Autowired)(p.IContextKeyService),n.__metadata("design:type",Object)],g.prototype,"contextKeyService",void 0),n.__decorate([(0,r.Autowired)(u.AppConfig),n.__metadata("design:type",Object)],g.prototype,"appConfig",void 0),n.__decorate([(0,r.Autowired)(s.LayoutViewSizeConfig),n.__metadata("design:type",s.LayoutViewSizeConfig)],g.prototype,"layoutViewSize",void 0),t.ClientCommonContribution=g=n.__decorate([(0,l.Domain)(l.CommandContribution,E.ClientAppContribution,h.PreferenceContribution,f.MenuContribution,_.KeybindingContribution),n.__metadata("design:paramtypes",[])],g)},66549:(x,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ClientAppContribution=void 0,t.ClientAppContribution=Symbol("ClientAppContribution")},34505:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ClientCommonModule=void 0;const n=e(85608),r=e(76003),o=e(16908),l=e(43718),p=e(37638),v=e(36206),m=e(136),_=e(90697),s=e(45829),f=e(44867),a=e(22780),h=e(10797),u=e(17821);let d=class extends v.BrowserModule{constructor(){super(...arguments),this.contributionProvider=[_.OpenerContribution],this.providers=[a.ClientCommonContribution,f.DefaultOpenerContribution,f.OpenerContributionClient,p.AuthenticationContribution,m.HashCalculateContribution],this.electronProviders=[h.ClientElectronCommonContribution,s.ElectronOpenerContributionClient],this.webProviders=[u.ClientWebCommonContribution],this.backServices=[{servicePath:l.CommonServerPath,protocol:o.CommonServerProtocol},{servicePath:l.KeytarServicePath},{servicePath:l.CryptoServicePath}]}};t.ClientCommonModule=d,t.ClientCommonModule=d=n.__decorate([(0,r.Injectable)()],d)},98881:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RecentStorage=void 0;const n=e(85608),r=e(76003),o=e(43718);let l=class{async getScopeStorage(){return this.recentStorage=this.recentStorage||await this.getStorage(o.STORAGE_NAMESPACE.RECENT_DATA),this.recentStorage}async getGlobalStorage(){return this.recentGlobalStorage=this.recentGlobalStorage||await this.getStorage(o.STORAGE_NAMESPACE.GLOBAL_RECENT_DATA),this.recentGlobalStorage}};t.RecentStorage=l,n.__decorate([(0,r.Autowired)(o.StorageProvider),n.__metadata("design:type",Function)],l.prototype,"getStorage",void 0),t.RecentStorage=l=n.__decorate([(0,r.Injectable)()],l)},30144:(x,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EXTENSION_CONTAINER_ID=t.SCM_CONTAINER_ID=t.SEARCH_CONTAINER_ID=t.EXPLORER_CONTAINER_ID=t.DEBUG_CONTAINER_ID=t.TEST_RESULT_CONTAINER_ID=t.DEBUG_CONSOLE_CONTAINER_ID=t.TERMINAL_CONTAINER_ID=t.OUTPUT_CONTAINER_ID=t.MARKER_CONTAINER_ID=void 0,t.MARKER_CONTAINER_ID="markers",t.OUTPUT_CONTAINER_ID="output",t.TERMINAL_CONTAINER_ID="terminal",t.DEBUG_CONSOLE_CONTAINER_ID="debug-console",t.TEST_RESULT_CONTAINER_ID="test-result",t.DEBUG_CONTAINER_ID="debug",t.EXPLORER_CONTAINER_ID="explorer",t.SEARCH_CONTAINER_ID="search",t.SCM_CONTAINER_ID="scm",t.EXTENSION_CONTAINER_ID="extension"},10797:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ClientElectronCommonContribution=void 0;const n=e(85608),r=e(76003),o=e(43718),l=e(64102),p=e(39496),v=e(11050);let m=class{registerMenus(s){s.registerMenubarItem(p.MenuId.MenubarAppMenu,{label:(0,o.localize)("app.name",this.appConfig.appName),order:0}),s.registerMenuItems(p.MenuId.MenubarEditMenu,[{command:{id:"electron.undo",label:(0,o.localize)("editor.undo")},nativeRole:"undo",group:"1_undo"},{command:{id:"electron.redo",label:(0,o.localize)("editor.redo")},group:"1_undo",nativeRole:"redo"},{command:{label:(0,o.localize)("edit.cut"),id:"electron.cut"},nativeRole:"cut",group:"2_clipboard"},{command:{label:(0,o.localize)("edit.copy"),id:"electron.copy"},nativeRole:"copy",group:"2_clipboard"},{command:{label:(0,o.localize)("edit.paste"),id:"electron.paste"},nativeRole:"paste",group:"2_clipboard"},{command:{label:(0,o.localize)("edit.selectAll"),id:"electron.selectAll"},nativeRole:"selectAll",group:"2_clipboard"}]),s.registerMenuItems(p.MenuId.MenubarAppMenu,[{command:{id:"electron.quit",label:(0,o.localize)("app.quit")},nativeRole:"quit",group:"4_quit"}])}};t.ClientElectronCommonContribution=m,n.__decorate([(0,r.Autowired)(v.AppConfig),n.__metadata("design:type",Object)],m.prototype,"appConfig",void 0),t.ClientElectronCommonContribution=m=n.__decorate([(0,o.Domain)(l.MenuContribution)],m)},66963:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(85608);n.__exportStar(e(14109),t),n.__exportStar(e(34505),t),n.__exportStar(e(66549),t),n.__exportStar(e(98881),t)},17821:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ClientWebCommonContribution=void 0;const n=e(85608),r=e(43718),o=e(64102),l=e(39496),p=e(14109);let v=class{registerMenus(_){_.registerMenuItems(l.MenuId.MenubarEditMenu,[{command:p.EDITOR_COMMANDS.REDO.id,group:"1_undo"},{command:p.EDITOR_COMMANDS.UNDO.id,group:"1_undo"}]),_.registerMenuItem(l.MenuId.MenubarHelpMenu,{command:{id:p.COMMON_COMMANDS.ABOUT_COMMAND.id,label:p.COMMON_COMMANDS.ABOUT_COMMAND.label},nativeRole:"about",group:"0_about"})}};t.ClientWebCommonContribution=v,t.ClientWebCommonContribution=v=n.__decorate([(0,r.Domain)(o.MenuContribution)],v)},25918:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TitleActionList=t.InlineActionWidget=t.MenuActionList=void 0,t.InlineActionBar=c,t.InlineMenuBar=b;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importStar(e(14041)),l=e(97267),p=e(45803),v=e(43718),m=e(93899),_=e(48560),s=e(79951),f=e(55693),a=n.__importDefault(e(17647)),h=n.__importDefault(e(54859)),u=({data:y,hasSubmenu:S,disabled:A,iconService:w,hasChecked:T})=>o.default.createElement("div",{className:(0,r.default)(h.default.menuAction,{[h.default.disabled]:A,[h.default.checked]:y.checked})},o.default.createElement("div",{className:(0,r.default)({[h.default.icon]:T})},y.checked?o.default.createElement(l.Icon,{icon:"check"}):null),o.default.createElement("div",{className:h.default.label},y.label?(0,s.transformLabelWithCodicon)(v.strings.mnemonicButtonLabel(y.label,!0),{margin:"0 3px"},w?.fromString.bind(w)):""),o.default.createElement("div",{className:h.default.tip},y.keybinding?o.default.createElement("div",{className:h.default.shortcut},y.keybinding):null,S?o.default.createElement("div",{className:h.default.submenuIcon},o.default.createElement(l.Icon,{icon:"right"})):null,!y.keybinding&&!S&&y.extraDesc&&o.default.createElement("div",{className:h.default.extraDesc},y.extraDesc))),d=({data:y=[],context:S=[],afterClick:A,style:w,iconService:T,renderSubMenuTitle:D,renderMenuItem:I})=>{if(!y.length)return null;const R=o.default.useCallback(k=>{const{key:F,item:L}=k;if([m.SeparatorMenuItemNode.ID,m.SubmenuItemNode.ID].includes(F))return;const j=(Array.isArray(L.props.children)?L.props.children[0]:L.props.children).props.data;j&&(typeof j.execute=="function"&&j.execute(S),typeof A=="function"&&A(j))},[y,S]),M=o.default.useCallback((k,F)=>{if(D){const L=D(k,{hasSubmenu:!0,disabled:!1});if(L)return L}return o.default.createElement(u,{hasChecked:F,hasSubmenu:!0,data:k,iconService:T})},[D]),O=o.default.useCallback((k,F)=>{if(I){const L=I(k,{hasSubmenu:!1,disabled:k.disabled});if(L)return L}return o.default.createElement(u,{hasChecked:F,data:k,disabled:k.disabled,iconService:T})},[I]),P=o.default.useCallback(k=>{const F=k.some(L=>L.checked);return k.map((L,B)=>{if(L.id===m.SeparatorMenuItemNode.ID)return null;const j=k[B+1]&&k[B+1].id===m.SeparatorMenuItemNode.ID;return L.id===m.SubmenuItemNode.ID?!Array.isArray(L.children)||!L.children.length?null:o.default.createElement(o.default.Fragment,{key:`${L.id}-${L.submenuId}-${B}`},o.default.createElement(p.Menu.SubMenu,{key:`${L.id}-${L.submenuId}-${B}`,className:h.default.submenuItem,popupClassName:"kt-menu",title:M(L,F)},P(L.children)),j?o.default.createElement(p.Menu.Divider,{key:`divider-${B}`,className:h.default.menuItemDivider}):null):o.default.createElement(o.default.Fragment,{key:`${L.id}-${B}`},o.default.createElement(p.Menu.Item,{id:`${L.id}-${B}`,key:`${L.id}-${B}`,className:h.default.menuItem,disabled:L.disabled},O(L,F)),j?o.default.createElement(p.Menu.Divider,{key:`divider-${B}`,className:h.default.menuItemDivider}):null)})},[]);return o.default.createElement(p.Menu,{className:"kt-menu",selectable:!1,motion:{motionLeave:!1,motionEnter:!1},builtinPlacements:a.default,onClick:R,style:w},P(y))};t.MenuActionList=d;const E=({type:y,icon:S,disabled:A,onClick:w,title:T})=>{const D=(0,f.useDesignStyles)(h.default.btnAction,"btnAction");if(y==="icon")return o.default.createElement(l.Button,{size:"small",type:y,className:D,onClick:w,title:T,icon:S||"ellipsis"});const I={};return(0,v.isBoolean)(A)&&(I.disabled=A),o.default.createElement(l.Button,{size:"small",type:"secondary",className:D,onClick:w,...I,title:T},o.default.createElement(l.Icon,{icon:S||"ellipsis"}))};E.displayName="EllipsisWidget",t.InlineActionWidget=o.default.memo(({iconService:y,type:S="icon",data:A,context:w=[],className:T,afterClick:D,...I})=>{const R=(0,f.useDesignStyles)(h.default.iconAction,"iconAction"),M=(0,f.useDesignStyles)(h.default.btnAction,"btnAction"),[O,P]=(0,o.useState)(!1),k=o.default.useCallback(async(j,...W)=>{if(j&&(j.preventDefault(),j.stopPropagation()),!O){if(P(!0),A.id===m.SubmenuItemNode.ID&&j){const U={x:j.clientX,y:j.clientY};await A.execute([U,...w])}else typeof A.execute=="function"&&await A.execute([...w,...W]);P(!1),typeof D=="function"&&D()}},[A,w]),[F,L]=o.default.useMemo(()=>{let j=A.tooltip||A.label;const W=A.label;return A.keybinding&&(j=`${j} (${A.keybinding})`),[j,W]},[A]),B=A.id===m.SubmenuItemNode.ID;return S==="icon"&&!A.type?o.default.createElement(l.Button,{type:A.icon?"icon":"link",className:(0,r.default)(R,T,{[h.default.disabled]:A.disabled,[h.default.submenuIconAction]:B}),title:F,iconClass:A.icon,onClick:k,...I},!A.icon&&L):A.type==="checkbox"?o.default.createElement(l.CheckBox,{className:(0,r.default)(T,M),disabled:A.disabled,label:A.label,title:F,checked:A.checked,onChange:j=>k(void 0,j.target.checked),...I}):o.default.createElement(l.Button,{loading:O,className:(0,r.default)(T,M),disabled:A.disabled,onClick:k,size:"small",type:A.type,title:F,...I},(0,s.transformLabelWithCodicon)(L,{margin:"0 3px"},y?.fromString.bind(y)),B&&o.default.createElement(l.Icon,{icon:"down",className:"kt-button-secondary-more"}))}),t.InlineActionWidget.displayName="InlineAction";const g=({data:y,context:S})=>{const A=o.default.useCallback(()=>y.getExecuteArgs(S),[y,S]);return o.default.createElement(y.component,{getExecuteArgs:A})};g.displayName="CustomAction",t.TitleActionList=o.default.memo(({type:y="icon",nav:S=[],more:A=[],moreIcon:w,moreTitle:T,context:D=[],extraNavActions:I=[],moreAtFirst:R=!1,className:M,afterClick:O,menuId:P,iconService:k,regroup:F=(...L)=>L})=>{const L=(0,_.useInjectable)(m.ICtxMenuRenderer),B=(0,_.useInjectable)(m.AbstractMenuService),j=(0,f.useDesignStyles)(h.default.titleActions,"titleActions"),[W,U]=F(S,A),X=o.default.useCallback($=>{$.preventDefault(),$.stopPropagation(),U&&L.show({anchor:{x:$.clientX,y:$.clientY},menuNodes:U,args:D,onHide:O})},[U,D]);if(W.length===0&&U.length===0&&I.length===0)return null;const V=U.length>0?o.default.createElement(E,{disabled:U[0].disabled,icon:w,type:y,onClick:X,title:T}):null;return o.default.createElement("div",{className:(0,r.default)([j,M]),"data-menu-id":P},R&&V,W.map($=>{if($.id===m.ComponentMenuItemNode.ID)return o.default.createElement(g,{context:D,data:$,key:$.nodeId});if($.id===m.SubmenuItemNode.ID){const z=B.createMenu($.submenuId);if(!((0,m.generateMergedCtxMenu)({menus:z}).length>0))return}if($.id===m.SeparatorMenuItemNode.ID)return o.default.createElement("span",{key:`vertical-divider-${$.id}`,className:h.default.verticalDivider});const Y=$.id===m.SubmenuItemNode.ID?$.submenuId:$.id;return o.default.createElement(t.InlineActionWidget,{id:Y,key:Y,className:(0,r.default)({[h.default.selected]:$.checked}),type:y,data:$,afterClick:O,context:D,iconService:k})}),Array.isArray(I)&&I.length?o.default.createElement(o.default.Fragment,null,W.length&&o.default.createElement("span",{className:h.default.divider}),I):null,!R&&V)}),t.TitleActionList.displayName="TitleActionList";function c(y){const{menus:S,context:A,separator:w="navigation",debounce:T,isFlattenMenu:D=!1,...I}=y,[R,M]=(0,f.useMenus)(S,w,A,T),O=(0,o.useMemo)(()=>D?[...R,...M]:R,[R,M,D]);return o.default.createElement(t.TitleActionList,{menuId:S.menuId,nav:O,more:w==="inline"||D?[]:M,...I})}function b(y){const{iconService:S,menus:A,context:w,moreIcon:T,moreTitle:D,separator:I="navigation",...R}=y,[M,O]=(0,f.useContextMenus)(A);return o.default.createElement(t.TitleActionList,{menuId:A.menuId,nav:M,more:I==="inline"?[]:O,moreIcon:T,moreTitle:D,context:w,iconService:S,...R})}b.displayName="InlineMenuBar"},17647:(x,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.placements=void 0;const e={adjustX:1,adjustY:1},n=[0,0];t.placements={topLeft:{points:["bl","tl"],overflow:e,offset:[0,-4],targetOffset:n},topCenter:{points:["bc","tc"],overflow:e,offset:[0,-4],targetOffset:n},topRight:{points:["br","tr"],overflow:e,offset:[0,-4],targetOffset:n},bottomLeft:{points:["tl","bl"],overflow:e,offset:[0,4],targetOffset:n},bottomCenter:{points:["tc","bc"],overflow:e,offset:[0,4],targetOffset:n},bottomRight:{points:["tr","br"],overflow:e,offset:[0,4],targetOffset:n}},t.default=t.placements},89847:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AIAction=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importStar(e(14041)),l=e(43718),p=e(70650),v=e(22689),m=e(48560),_=e(57995),s=e(24951),f=e(49716),a=e(52141),h=n.__importDefault(e(27410)),u=(0,v.createLayoutEventType)(l.AIInlineChatContentWidgetId),d=new CustomEvent(u,{bubbles:!0}),E=g=>{const{operationList:c,moreOperation:b,showClose:y=!0,onClickItem:S,onClose:A,customOperationRender:w,loading:T,loadingShowOperation:D=!1}=g,I=o.default.useRef(null),[R,M]=(0,m.useHover)(),O=(0,m.useInjectable)(p.AINativeConfigService),P=(0,o.useCallback)(()=>{A?.()},[A]);(0,m.useChange)(M,()=>{var B;(B=I.current)===null||B===void 0||B.dispatchEvent(d)});const k=(0,o.useMemo)(()=>{const B=O?.inlineChat.logo;return typeof B=="string"?o.default.createElement("img",{src:B,className:h.default.ai_action_icon}):o.default.isValidElement(B)?B:typeof B=="function"?o.default.createElement(B,null):null},[O?.inlineChat.logo]),F=(0,o.useCallback)(()=>T&&D?o.default.createElement("div",{className:h.default.loading_mask}):null,[T,D]),L=(0,o.useCallback)(()=>{if(T&&!D)return null;const B=o.default.createElement(o.default.Fragment,null,c?.map(({name:j,title:W,id:U},X)=>W?o.default.createElement(a.EnhancePopover,{id:U,title:W,key:`popover_${X}`},o.default.createElement(_.EnhanceIcon,{wrapperClassName:h.default.operate_item,onClick:()=>S?.(U)},o.default.createElement("span",{key:X},j))):o.default.createElement(_.EnhanceIcon,{wrapperClassName:h.default.operate_item,onClick:()=>S?.(U),key:X},o.default.createElement("span",null,j))),b?.length?o.default.createElement(_.EnhanceIconWithCtxMenu,{icon:"more",menuNodes:b,wrapperClassName:h.default.operate_btn,skew:{x:-83,y:5}}):null);return o.default.createElement("div",{ref:R,className:h.default.operate_container},F(),k&&o.default.createElement(s.LineVertical,{height:"100%",margin:"0 8px",maxHeight:14,minHeight:14}),w?o.default.createElement("div",{className:h.default.custom_operation_wrapper},w):o.default.createElement("div",{className:h.default.default_operation_wrapper},B))},[w,c,b,T,D,k]);return o.default.createElement("div",{ref:I,className:(0,r.default)(h.default.ai_action_wrapper,T&&h.default.loading,D&&h.default.loading_show_operation)},o.default.createElement(o.default.Fragment,null,o.default.createElement("div",{className:h.default.stable_container},T?o.default.createElement(a.EnhancePopover,{id:"inline_chat_loading",title:(0,l.localize)("aiNative.inline.chat.operate.loading.cancel")},o.default.createElement(f.Loading,{className:h.default.loading_icon})):k?o.default.createElement("div",{className:h.default.logo_container},k):null),L(),y&&o.default.createElement("div",{className:h.default.close_container},o.default.createElement(s.LineVertical,{height:"100%",margin:"0px 8px",maxHeight:14,minHeight:14}),o.default.createElement(_.EnhanceIcon,{wrapperClassName:h.default.operate_btn,icon:"window-close",onClick:P}))))};t.AIAction=E},66205:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ContentWidgetContainerPanel=void 0;const n=e(85608),r=n.__importDefault(e(14041)),o=n.__importDefault(e(41771)),l=p=>r.default.createElement("div",{className:o.default.inline_chat_container_panel,style:p.style},p.children);t.ContentWidgetContainerPanel=l},57995:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AILogoAvatar=t.EnhanceIconWithCtxMenu=t.EnhanceIcon=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importStar(e(14041)),l=e(43718),p=e(81878),v=e(97222),m=e(48560),_=n.__importDefault(e(42798));t.EnhanceIcon=o.default.forwardRef((a,h)=>o.default.createElement("div",{className:(0,r.default)(a.wrapperClassName,_.default.ai_enhance_icon),style:a.wrapperStyle,onClick:a.onClick,ref:h,tabIndex:a.tabIndex,role:a.role,"aria-label":a.ariaLabel,"aria-pressed":a.ariaPressed},o.default.createElement(p.Icon,{className:(0,r.default)(a.className,_.default.icon),children:null,onClick:()=>null,style:(a.icon||a.iconClass)&&a.children?{marginRight:5}:{},icon:a.icon,iconClass:a.iconClass}),a.children&&o.default.createElement("span",{className:_.default.children_wrap},a.children)));const s=a=>{const{children:h,menuNodes:u,skew:d,id:E,...g}=a,c=(0,m.useInjectable)(l.CommandService),b=(0,m.useInjectable)(v.IBrowserCtxMenu),[y,S]=o.default.useState(void 0),A=o.default.useRef(null);o.default.useEffect(()=>{w()},[A.current,d]);const w=(0,o.useCallback)(D=>{requestAnimationFrame(()=>{if(A.current){const I=A.current.getBoundingClientRect(),{x:R,y:M,width:O,height:P}=I,k={x:R+O,y:M+P};d&&(k.x+=d.x,k.y+=d.y),S(k),D&&D(k)}})},[A.current,d]),T=o.default.useCallback(()=>{y&&(u?w(D=>{b.show({anchor:D,menuNodes:u})}):E&&c.executeCommand(E))},[A.current,u,y,E]);return o.default.createElement(t.EnhanceIcon,{ref:A,onClick:T,...g},h)};t.EnhanceIconWithCtxMenu=s;const f=a=>o.default.createElement("div",{className:(0,r.default)(_.default.ai_logo_avatar_container,a.className)},o.default.createElement(p.Icon,{icon:"magic-wand",className:(0,r.default)(a.iconClassName,_.default.avatar_icon)}));t.AILogoAvatar=f},89195:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(85608);n.__exportStar(e(89847),t),n.__exportStar(e(57995),t),n.__exportStar(e(28229),t),n.__exportStar(e(24951),t),n.__exportStar(e(52141),t),n.__exportStar(e(75777),t),n.__exportStar(e(49716),t),n.__exportStar(e(83913),t)},28229:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AIInlineResult=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importDefault(e(14041)),l=e(57995),p=e(24951),v=e(75777),m=n.__importDefault(e(5011)),_=s=>{const{iconItems:f,isRenderThumbs:a=!0,isRenderClose:h=!1,closeClick:u}=s;return o.default.createElement("div",{className:m.default.ai_inline_result_panel},o.default.createElement("div",{className:m.default.side},f.map(({icon:d,text:E,onClick:g,btnType:c},b)=>o.default.createElement(l.EnhanceIcon,{wrapperClassName:(0,r.default)(m.default.operate_btn,c==="default"?m.default.default:""),icon:d,onClick:g,key:b},o.default.createElement("span",null,E)))),a&&o.default.createElement(o.default.Fragment,null,o.default.createElement(p.LineVertical,{height:"60%",margin:"0px 6px 0 6px"}),o.default.createElement("div",{className:m.default.side},o.default.createElement(v.Thumbs,{wrapperClassName:m.default.operate_icon}))),h&&o.default.createElement(o.default.Fragment,null,o.default.createElement(l.EnhanceIcon,{wrapperClassName:m.default.operate_btn,icon:"close",onClick:u})))};t.AIInlineResult=_},83913:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InteractiveInput=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importStar(e(14041)),l=e(97267),p=e(43718),v=e(37015),m=e(48560),_=e(7369),s=e(89195),f=n.__importDefault(e(42348)),a=160,h=32,u="ai-native-chat-input-history",d=10;t.InteractiveInput=o.default.forwardRef((E,g)=>{const{placeholder:c,onKeyDown:b,onBlur:y,onValueChange:S,onHeightChange:A,onFocus:w,onSend:T,disabled:D=!1,className:I,height:R,width:M,sendBtnClassName:O,popoverPosition:P,autoFocus:k,defaultValue:F}=E,L=(0,o.useRef)(null),B=(0,m.useInjectable)(_.GlobalBrowserStorageService),j=(0,o.useRef)(),W=(0,o.useRef)(0),[U,X]=(0,o.useState)(F||E.value||""),[V,$]=(0,o.useState)(R||h),[Y,z]=(0,o.useState)(!1),H=o.default.useRef(!1);(0,o.useImperativeHandle)(g,()=>L.current),(0,o.useEffect)(()=>{const q=B.getData(u);q&&(j.current=q)},[]),(0,o.useEffect)(()=>{L&&L.current&&k&&L.current.focus()},[L]),(0,o.useEffect)(()=>{var q;const Oe=E.value;(0,p.isUndefined)(Oe)||Oe!==((q=L.current)===null||q===void 0?void 0:q.value)&&X(Oe||"")},[E.value,U,L]),(0,o.useEffect)(()=>{(0,p.isUndefined)(R)||R!==V&&$(R)},[R,V,A]),(0,o.useEffect)(()=>{if(!U){$(h);return}if(L&&L.current&&V<=a){L.current.style.height="0px";const q=L.current.scrollHeight;L.current.style.height=Math.min(q,a)+"px";const Oe=Math.min(q+12,a);$(Oe)}},[L,U,A,V]),(0,o.useEffect)(()=>{A?.(V)},[V]);const K=(0,o.useCallback)(q=>{H.current=!0,X(q),S?.(q)},[S]),Z=(0,o.useCallback)(q=>{z(!0),w?.(q)},[w]),Q=(0,o.useCallback)(q=>{z(!1),y?.(q)},[y]),oe=(0,o.useCallback)(()=>{D||U.trim()&&(j.current=j.current||[],j.current.push(U),W.current=0,B.setData(u,j.current.slice(-d)),H.current=!1,T?.(U))},[T,U,D]),ne=(0,o.useCallback)(q=>{var Oe,ye,ie;if(q.key===v.Key.ENTER.code&&!q.nativeEvent.isComposing){if(q.shiftKey)return;q.preventDefault(),oe();return}else if((q.key===v.Key.ARROW_UP.code||q.key===v.Key.ARROW_DOWN.code)&&(!U||!H.current)){if(q.preventDefault(),q.key===v.Key.ARROW_UP.code){const fe=(Oe=j.current)===null||Oe===void 0?void 0:Oe[j.current.length-1-W.current];fe&&(X(fe),W.current=Math.min(W.current+1,((ye=j.current)===null||ye===void 0?void 0:ye.length)||0))}else if(q.key===v.Key.ARROW_DOWN.code){q.preventDefault();const fe=(ie=j.current)===null||ie===void 0?void 0:ie[j.current.length-1-W.current];fe&&(X(fe),W.current=Math.max(W.current-1,0))}}b?.(q)},[b,oe,U]),he=(0,o.useMemo)(()=>o.default.createElement("div",{className:f.default.input_icon_container},o.default.createElement("div",{className:(0,r.default)(f.default.send_chat_btn,Y&&f.default.active,D&&f.default.disabled,O)},D?o.default.createElement("div",{className:f.default.ai_loading},o.default.createElement("div",{className:f.default.loader}),o.default.createElement("div",{className:f.default.loader}),o.default.createElement("div",{className:f.default.loader})):o.default.createElement(l.Popover,{id:`ai_chat_input_send_${(0,p.uuid)(4)}`,content:(0,p.localize)("aiNative.chat.enter.send"),delay:1500,position:P??l.PopoverPosition.top,disable:D},o.default.createElement(s.EnhanceIcon,{wrapperClassName:f.default.send_icon,className:(0,l.getIcon)("send-solid"),onClick:oe,tabIndex:0,role:"button",ariaLabel:(0,p.localize)("aiNative.chat.enter.send")})))),[Y,D,O,U,P]),_e=(0,o.useMemo)(()=>(0,p.isUndefined)(M)?"100%":M+"px",[M]);return o.default.createElement(l.TextArea,{ref:L,placeholder:c,wrapperStyle:{height:V+"px",width:_e},style:{height:V-10+"px"},value:U,onKeyDown:ne,onFocus:Z,onBlur:Q,onValueChange:K,disabled:D,className:(0,r.default)(f.default.interactive_input_container,Y?f.default.active:null,I),addonAfter:he})}),t.InteractiveInput.displayName="interactiveInput"},24951:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HorizontalVertical=t.LineVertical=void 0;const r=e(85608).__importDefault(e(14041)),o={backgroundColor:"var(--editorGroup-border)",height:"100%",width:"1px",minWidth:"1px"},l={backgroundColor:"var(--editorGroup-border)",width:"100%",height:"1px",minHeight:"1px"},p=m=>r.default.createElement("span",{style:{...o,...m}});t.LineVertical=p;const v=m=>r.default.createElement("span",{style:{...l,...m}});t.HorizontalVertical=v},49716:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Loading=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importDefault(e(14041)),l=e(97267),p=n.__importDefault(e(43135));t.Loading=o.default.memo(v=>o.default.createElement(l.Icon,{className:(0,r.default)(v.className,p.default.loading_indicator),iconClass:(0,l.getIcon)("loading")})),t.Loading.displayName="Loading"},52141:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EnhancePopover=void 0;const r=e(85608).__importStar(e(14041)),o=e(97267),l=e(43718),p=v=>{const{children:m,id:_,title:s,onClick:f}=v,[a,h]=r.default.useState(!1),u=(0,r.useMemo)(()=>_+(0,l.uuid)(6),[_]),d=(0,r.useCallback)(g=>{h(!1),f&&f(g)},[f]),E=(0,r.useCallback)(g=>{h(g)},[]);return r.default.createElement(o.Popover,{id:u,title:s,onClick:d,display:a,onDisplayChange:E},m)};t.EnhancePopover=p},75777:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Thumbs=void 0;const r=e(85608).__importStar(e(14041)),o=e(43718),l=e(95040),p=e(81878),v=e(48560),m=e(67304),_=e(57995),s=f=>{const a=(0,v.useInjectable)(l.IAIInlineChatService),{relationId:h,onClick:u,wrapperClassName:d}=f,[E,g]=(0,r.useState)("thumbs"),[c,b]=(0,r.useState)("thumbsdown"),y=(0,r.useCallback)(w=>{u&&u(w),a&&a.fireThumbsEvent(w)},[h,a]),S=(0,r.useCallback)(w=>{w==="up"&&E==="thumbs"&&(g("thumbs-fill"),b(!1),y(!0)),w==="up"&&E==="thumbs-fill"&&(g("thumbs"),b("thumbsdown")),w==="down"&&c==="thumbsdown"&&(b("thumbsdown-fill"),g(!1),y(!1)),w==="down"&&c==="thumbsdown-fill"&&(b("thumbsdown"),g("thumbs"))},[E,c]),A=(0,v.useUUID)();return r.default.createElement(r.default.Fragment,null,typeof E=="string"&&r.default.createElement(p.Popover,{id:`ai-chat-thumbsup-${A}`,title:(0,o.localize)("aiNative.inline.chat.operate.thumbsup.title")},r.default.createElement(_.EnhanceIcon,{wrapperClassName:d,onClick:()=>S("up"),className:(0,m.getExternalIcon)(E,m.KTICON_OWNER),tabIndex:0,role:"button",ariaLabel:(0,o.localize)("aiNative.inline.chat.operate.thumbsup.title"),ariaPressed:E==="thumbs-fill"?"true":"false"})),typeof c=="string"&&r.default.createElement(p.Popover,{id:`ai-chat-thumbsdown-${A}`,title:(0,o.localize)("aiNative.inline.chat.operate.thumbsdown.title")},r.default.createElement(_.EnhanceIcon,{wrapperClassName:d,onClick:()=>S("down"),className:(0,m.getExternalIcon)(c,m.KTICON_OWNER),tabIndex:0,role:"button",ariaLabel:(0,o.localize)("aiNative.inline.chat.operate.thumbsdown.title"),ariaPressed:c==="thumbsdown-fill"?"true":"false"})))};t.Thumbs=s},81878:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Scroll=t.Scrollbars=t.NativeSelect=void 0;const n=e(85608);n.__exportStar(e(97885),t),n.__exportStar(e(73215),t),n.__exportStar(e(32293),t);var r=e(77331);Object.defineProperty(t,"NativeSelect",{enumerable:!0,get:function(){return r.Select}}),n.__exportStar(e(48412),t),n.__exportStar(e(79383),t),n.__exportStar(e(50708),t),n.__exportStar(e(7273),t),n.__exportStar(e(14640),t),n.__exportStar(e(54076),t),n.__exportStar(e(79024),t),n.__exportStar(e(89832),t),n.__exportStar(e(54713),t),n.__exportStar(e(18875),t),n.__exportStar(e(91397),t),n.__exportStar(e(31059),t),n.__exportStar(e(72871),t),n.__exportStar(e(34128),t);var o=e(77011);Object.defineProperty(t,"Scrollbars",{enumerable:!0,get:function(){return o.Scrollbars}}),Object.defineProperty(t,"Scroll",{enumerable:!0,get:function(){return o.Scrollbars}})},57327:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BoxPanel=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importStar(e(14041)),l=e(48560),p=e(38578),v=e(55693),m=e(25719),_=n.__importDefault(e(91290)),s=({className:f,children:a=[],direction:h="left-to-right",...u})=>{const d=o.default.Children.toArray(a),E=(0,l.useInjectable)(p.AppConfig),g=(0,v.useDesignStyles)(_.default["box-panel"],"box-panel");(0,o.useEffect)(()=>{E.didRendered&&E.didRendered()},[]);const c=m.Layout.getStyleProperties(h);return o.default.createElement("div",{...u,className:(0,r.default)(g,f),style:{flexDirection:c.direction,zIndex:u.zIndex||u["z-index"]}},d.map((b,y)=>{const S=b.props||{};return o.default.createElement("div",{key:y,id:S["data-wrapper-id"],className:(0,r.default)(_.default.wrapper,S["data-wrapper-class"]),style:{flex:S.flex,overflow:S.overflow,zIndex:S.zIndex||S["z-index"],[c.minSize]:S.defaultSize,backgroundColor:S.backgroundColor}},b)}))};t.BoxPanel=s},28003:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DefaultLayout=t.getStorageValue=void 0,t.ToolbarActionBasedLayout=m,t.fixLayout=_;const r=e(85608).__importDefault(e(14041)),o=e(52564),l=e(57327),p=e(99333),v=()=>{let s={},f={};try{const a=localStorage.getItem("layout");a&&(s=JSON.parse(a));const h=localStorage.getItem("theme");h&&(f=JSON.parse(h))}catch{}return{layout:_(s),colors:f}};t.getStorageValue=v,t.DefaultLayout=m;function m(s={}){var f,a,h,u,d,E;const{layout:g}=(0,t.getStorageValue)();return r.default.createElement(l.BoxPanel,{direction:"top-to-bottom"},r.default.createElement(o.SlotRenderer,{id:"top",defaultSize:s.topSlotDefaultSize||0,slot:"top",zIndex:s.topSlotZIndex}),r.default.createElement(p.SplitPanel,{id:"main-horizontal",flex:1},r.default.createElement(o.SlotRenderer,{slot:"left",isTabbar:!0,defaultSize:!((f=g.left)===null||f===void 0)&&f.currentId?((a=g.left)===null||a===void 0?void 0:a.size)||310:49,minResize:280,maxResize:480,minSize:49}),r.default.createElement(p.SplitPanel,{id:"main-vertical",minResize:300,flexGrow:1,direction:"top-to-bottom"},r.default.createElement(o.SlotRenderer,{flex:2,flexGrow:1,minResize:200,slot:"main"}),r.default.createElement(o.SlotRenderer,{flex:1,defaultSize:!((h=g.bottom)===null||h===void 0)&&h.currentId?(u=g.bottom)===null||u===void 0?void 0:u.size:24,minResize:160,slot:"bottom",isTabbar:!0})),r.default.createElement(o.SlotRenderer,{slot:"right",isTabbar:!0,defaultSize:!((d=g.right)===null||d===void 0)&&d.currentId?((E=g.right)===null||E===void 0?void 0:E.size)||310:0,minResize:280,maxResize:480,minSize:0})),r.default.createElement(o.SlotRenderer,{id:"statusBar",defaultSize:24,slot:"statusBar"}))}function _(s){const f={...s};for(const a in s)s[a]&&(s[a].size||(f[a].currentId=""));return f}},32293:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(85608);n.__exportStar(e(25719),t),n.__exportStar(e(99333),t),n.__exportStar(e(57327),t),n.__exportStar(e(28003),t)},25719:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Layout=void 0;const n=e(73215),r={"left-to-right":{direction:"row",size:"width",domSize:"clientHeight",minSize:"minWidth",maxSize:"maxWidth"},"right-to-left":{direction:"row-reverse",size:"width",domSize:"clientHeight",minSize:"minWidth",maxSize:"maxWidth"},"top-to-bottom":{direction:"column",size:"height",domSize:"clientWidth",minSize:"minHeight",maxSize:"maxHeight"},"bottom-to-top":{direction:"column-reverse",size:"height",domSize:"clientWidth",minSize:"minHeight",maxSize:"maxHeight"}};var o;(function(l){function p(u){return r[u]}l.getStyleProperties=p;function v(u){return r[u].direction}l.getFlexDirection=v;function m(u){return r[u].size}l.getSizeProperty=m;function _(u){return r[u].domSize}l.getDomSizeProperty=_;function s(u){return r[u].minSize}l.getMinSizeProperty=s;function f(u){return r[u].maxSize}l.getMaxSizeProperty=f;function a(u){return u==="bottom-to-top"||u==="top-to-bottom"?n.ResizeHandleVertical:n.ResizeHandleHorizontal}l.getResizeHandle=a;function h(u){return u==="bottom-to-top"||u==="top-to-bottom"?"row":"column"}l.getTabbarDirection=h})(o||(t.Layout=o={}))},99333:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SplitPanel=t.PanelContext=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importDefault(e(14041)),l=e(43718),p=e(68456),v=e(48560),m=e(73215),_=e(25719),s=e(71707),f=n.__importDefault(e(91290));t.PanelContext=o.default.createContext({setSize:(d,E)=>{},setRelativeSize:(d,E,g)=>{},getSize:d=>0,getRelativeSize:d=>[0,0],lockSize:(d,E)=>{},setMaxSize:(d,E)=>{},hidePanel:d=>{}});const a=(d,E,g)=>{var c,b;return(b=d&&d.props&&((c=d.props[E])!==null&&c!==void 0?c:d.props[`data-sp-${E}`]))!==null&&b!==void 0?b:g};function h(d,E){return a(d,"savedSize")?a(d,"savedSize")+"px":a(d,"defaultSize")!==void 0?a(d,"defaultSize")+"px":a(d,"flex")?a(d,"flex")/E*100+"%":1/E*100+"%"}const u=d=>{const E=(0,v.useInjectable)(s.SplitPanelManager).getService(d.id),{id:g,className:c,headerSize:b,resizeHandleClassName:y,style:S,children:A=[],direction:w="left-to-right",resizeKeep:T=!0,dynamicTarget:D}=o.default.useMemo(()=>E.interceptProps(d),[E,E.interceptProps,d]),I=_.Layout.getResizeHandle(w),R=_.Layout.getStyleProperties(w),M=o.default.useMemo(()=>o.default.Children.toArray(A),[A]),O=o.default.useMemo(()=>M.find(ye=>a(ye,"flexGrow")),[M]),P=o.default.useMemo(()=>M.reduce((ye,ie)=>ye+a(ie,"flex",1),0),[M]),k=o.default.useRef([]),F=(0,v.useInjectable)(l.IEventBus),L=o.default.useRef(),B=o.default.useRef(M.map(()=>!1)),j=o.default.useRef(M.map(()=>!1)),W=o.default.useRef(B.current.slice(0,M.length-1)),[U,X]=o.default.useState(W.current),[V,$]=o.default.useState(j.current),[Y,z]=o.default.useState(B.current);E.panels=[];const H=o.default.useCallback(ye=>(ie,fe)=>{const Me=fe?ye-1:ye,Le=k.current[Me];Le&&Le.setAbsoluteSize(ie!==void 0?ie:a(M[ye],"defaultSize"),fe,T)},[k.current]),K=o.default.useCallback(ye=>(ie,fe,Me)=>{const Le=Me?ye-1:ye,Ce=k.current[Le];Ce&&Ce.setRelativeSize(ie,fe)},[k.current]),Z=o.default.useCallback(ye=>ie=>{const fe=ie?ye-1:ye,Me=k.current[fe];return Me?Me.getAbsoluteSize(ie):0},[k.current]),Q=o.default.useCallback(ye=>ie=>{const fe=ie?ye-1:ye,Me=k.current[fe];return Me?Me.getRelativeSize():[0,0]},[k.current]),oe=o.default.useCallback(ye=>(ie,fe)=>{const Me=fe?ye-1:ye,Le=W.current.map((Ce,Ae)=>Ae===Me?ie!==void 0?ie:!Ce:Ce);W.current=Le,X(Le)},[k.current]),ne=o.default.useCallback(ye=>ie=>{const fe=B.current.map((Me,Le)=>Le===ye?ie!==void 0?ie:!Me:Me);B.current=fe,z(fe)},[k.current]),he=o.default.useCallback(ye=>ie=>{const fe=j.current.map((Le,Ce)=>Ce===ye?ie!==void 0?!ie:!Le:Le);j.current=fe;const Me=a(M[ye],"slot")||a(M[ye],"id");Me&&_e(Me),$(fe)},[M,j.current]),_e=o.default.useCallback(ye=>{ye&&(F.fire(new p.ResizeEvent({slotLocation:ye})),F.fireDirective(p.ResizeEvent.createDirective(ye)))},[F]),q=o.default.useMemo(()=>M.map((ye,ie)=>{const fe=[],Me=a(ye,"minSize"),Le=a(ye,"maxSize"),Ce=a(ye,"flexGrow");if(ie!==0){const Ae=ie===1?M[ie-1]:M[ie];let ve;Ce?ve=m.ResizeFlexMode.Prev:a(M[ie-1],"flexGrow")&&(ve=m.ResizeFlexMode.Next),a(Ae,"noResize")||U[ie-1]||fe.push(o.default.createElement(I,{className:y,onResize:()=>{const xe=a(M[ie-1],"slot")||a(M[ie-1],"id"),Ie=a(M[ie],"slot")||a(M[ie],"id");_e(xe),_e(Ie)},noColor:!0,findNextElement:D?xe=>E.getFirstResizablePanel(ie-1,xe):void 0,findPrevElement:D?xe=>E.getFirstResizablePanel(ie-1,xe,!0):void 0,key:`split-handle-${ie}`,delegate:xe=>{k.current.push(xe)},flexMode:ve}))}return fe.push(o.default.createElement(t.PanelContext.Provider,{key:ie,value:{setSize:H(ie),getSize:Z(ie),setRelativeSize:K(ie),getRelativeSize:Q(ie),lockSize:oe(ie),setMaxSize:ne(ie),hidePanel:he(ie)}},o.default.createElement("div",{"data-min-resize":a(ye,"minResize"),"data-max-resize":a(ye,"maxResize"),ref:Ae=>{Ae&&E.panels.indexOf(Ae)===-1&&E.panels.push(Ae)},className:h(ye,P)===`${b}px`?m.RESIZE_LOCK:"",id:a(ye,"id"),style:{...a(ye,"flex")&&!a(ye,"savedSize")&&!O?{flex:a(ye,"flex")}:{[R.size]:h(ye,P)},[R.minSize]:Me?Me+"px":"-1px",[R.maxSize]:Y[ie]&&Le?Le+"px":"unset",...Ce!==void 0?{flexGrow:Ce}:{},display:V[ie]?"none":"block"}},ye))),fe}).filter(Boolean),[A,M,y,D,k.current,V,U]);return o.default.useEffect(()=>{L.current&&E.setRootNode(L.current);const ye=F.onDirective(p.ResizeEvent.createDirective(g),()=>{M.forEach(ie=>{_e(a(ie,"slot")||a(ie,"id"))})});return()=>{ye.dispose()}},[]),o.default.useMemo(()=>{const{minResize:ye,flexGrow:ie,minSize:fe,maxSize:Me,savedSize:Le,defaultSize:Ce,flex:Ae,noResize:ve,slot:ge,headerSize:xe,...Ie}=d;return delete Ie.resizeHandleClassName,delete Ie.dynamicTarget,delete Ie.resizeKeep,delete Ie.direction,E.renderSplitPanel(o.default.createElement("div",{...Ie,ref:We=>L.current=We,className:(0,r.default)(f.default["split-panel"],c),style:{flexDirection:R.direction,...S},"data-min-resize":ye,"data-max-resize":Me,"data-min-size":fe,"data-max-size":Me,"data-saved-size":Le,"data-default-size":Ce,"data-header-size":xe,"data-flex":Ae,"data-flex-grow":ie,"data-no-resize":ve,"data-slot":ge}),q,Ie)},[E,E.renderSplitPanel,q,L,S,d])};t.SplitPanel=u},71707:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SplitPanelManager=t.SplitPanelService=t.ISplitPanelService=void 0;const n=e(85608),r=n.__importDefault(e(14041)),o=e(76003),l=e(43718),p=e(38578),v=e(73215);t.ISplitPanelService=Symbol("ISplitPanelService");let m=class extends l.Disposable{constructor(f){super(),this.panelId=f,this._whenReadyDeferred=new l.Deferred,this.panels=[]}get isVisible(){return this.rootNode&&this.rootNode.clientHeight>0||!1}get whenReady(){return this._whenReadyDeferred.promise}setRootNode(f){this.rootNode=f,this._whenReadyDeferred.resolve()}getFirstResizablePanel(f,a,h){if(h){if(a){for(let u=f;u>=0;u--)if(!this.panels[u].classList.contains(v.RESIZE_LOCK))return this.panels[u]}else for(let u=f;u>=0;u--)if(!this.panels[u].classList.contains(v.RESIZE_LOCK))return this.panels[u]}else if(a){for(let u=f+1;u<this.panels.length;u++)if(!this.panels[u].classList.contains(v.RESIZE_LOCK))return this.panels[u]}else for(let u=f+1;u<this.panels.length;u++)if(!this.panels[u].classList.contains(v.RESIZE_LOCK))return this.panels[u]}checkChildNoResize(f){var a,h;if(f&&f.type===p.SlotRenderer){const u=(h=this.appConfig.layoutConfig[(a=f.props)===null||a===void 0?void 0:a.slot])===null||h===void 0?void 0:h.modules;if(!u||u.length===0)return!0}return!1}renderSplitPanel(f,a,h){return r.default.cloneElement(f,{...h,...f.props},a)}interceptProps(f){return f}};t.SplitPanelService=m,n.__decorate([(0,o.Autowired)(p.AppConfig),n.__metadata("design:type",Object)],m.prototype,"appConfig",void 0),t.SplitPanelService=m=n.__decorate([(0,o.Injectable)({multiple:!0}),n.__metadata("design:paramtypes",[String])],m);let _=class{constructor(){this.services=new Map}getService(f){let a=this.services.get(f);return a||(a=this.injector.get(t.ISplitPanelService,[f]),this.services.set(f,a)),a}};t.SplitPanelManager=_,n.__decorate([(0,o.Autowired)(o.INJECTOR_TOKEN),n.__metadata("design:type",o.Injector)],_.prototype,"injector",void 0),t.SplitPanelManager=_=n.__decorate([(0,o.Injectable)()],_)},89897:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),e(85608).__exportStar(e(85266),t)},85266:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Loading=void 0;const r=e(85608).__importDefault(e(14041));e(18182);const o=()=>r.default.createElement("div",{className:"loading_indicator "});t.Loading=o,t.Loading.displayName="Loading"},97885:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=e(85608).__importDefault(e(43144)),o=e(48560),l=({id:p,className:v,children:m})=>{const _=(0,o.usePortal)(p,v);return r.default.createPortal(m,_)};t.default=l},73215:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ResizeHandleVertical=t.ResizeHandleHorizontal=t.ResizeFlexMode=t.RESIZE_LOCK=void 0,t.preventWebviewCatchMouseEvents=m,t.allowWebviewCatchMouseEvents=_;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importDefault(e(14041)),l=e(22366),p=n.__importDefault(e(57482));t.RESIZE_LOCK="resize-lock";var v;(function(a){a.Prev="prev",a.Next="next",a.Percentage="Percentage"})(v||(t.ResizeFlexMode=v={}));function m(){const a=document.getElementsByTagName("iframe"),h=document.getElementsByTagName("webview"),u=document.getElementsByClassName("shadow-root-host");for(const d of h)d.classList.add("none-pointer-event");for(const d of a)d.classList.add("none-pointer-event");for(const d of u)d?.classList.add("none-pointer-event")}function _(){const a=document.getElementsByTagName("iframe"),h=document.getElementsByTagName("webview"),u=document.getElementsByClassName("shadow-root-host");for(const d of h)d.classList.remove("none-pointer-event");for(const d of a)d.classList.remove("none-pointer-event");for(const d of u)d?.classList.remove("none-pointer-event")}const s=a=>{const h=o.default.useRef(),u=o.default.useRef(!1),d=o.default.useRef(0),E=o.default.useRef(0),g=o.default.useRef(0),c=o.default.useRef(),b=o.default.useRef(),y=o.default.useRef(),S=(L,B)=>{const j=a.findPrevElement?a.findPrevElement():c.current,W=a.findNextElement?a.findNextElement():b.current;if(j&&j.classList.contains(t.RESIZE_LOCK)||W&&W.classList.contains(t.RESIZE_LOCK))return;const U=h.current.parentElement.offsetWidth,X=Number(j?.dataset.minResize||0),V=Number(W?.dataset.minResize||0),$=Number(j?.dataset.maxResize||0),Y=Number(W?.dataset.maxResize||0);(X||V)&&(L*U<=X||B*U<=V)||($||Y)&&(L*U>=$||B*U>=Y)||(W&&(W.style.width=B*100+"%"),j&&(j.style.width=L*100+"%"),a.onResize&&W&&j&&a.onResize(j,W))},A=(L,B,j,W)=>{var U,X;const V=a.findPrevElement?a.findPrevElement(W):c.current,$=a.findNextElement?a.findNextElement(W):b.current,Y=Number((U=V?.dataset.minResize)!==null&&U!==void 0?U:0),z=Number((X=$?.dataset.minResize)!==null&&X!==void 0?X:0),H=V?.dataset.maxResize?Number(V?.dataset.maxResize):null,K=$?.dataset.maxResize?Number($?.dataset.maxResize):null,Z=a.flexMode===v.Prev,Q=Z?V:$,oe=Z?$:V;let ne=Z?L:B;j||((Y||z)&&(Z?Y>L?ne=Y:z>B&&(ne=L+B-z):z>B?ne=z:Y>L&&(ne=L+B-Y)),(H||K)&&(Z?H&&H<=L?ne=H:K&&K>B&&(ne=L+B-K):K&&K<=B?ne=K:H&&H>B&&(ne=L+B-H))),Q.style.width=ne+"px",Q.style.flexGrow="0",Q.style.flexShrink="1",oe.style.width="0",oe.style.flexGrow="1",oe.style.flexShrink="0",a.onResize&&$&&V&&a.onResize(V,$)},w=(L,B)=>{const j=c.current,W=b.current;let U;a.flexMode?U=(j.offsetWidth+W.offsetWidth)/j.parentElement.offsetWidth*100:U=+b.current.style.width.replace("%","")+ +c.current.style.width.replace("%",""),W&&(W.style.width=B/(L+B)*U+"%"),j&&(j.style.width=L/(L+B)*U+"%"),T(L,B),a.onResize&&W&&j&&a.onResize(j,W)},T=(L,B)=>{const j=c.current,W=b.current;let U=!1;j&&(L===0?(j.classList.add("kt_display_none"),U=!0):j.classList.remove("kt_display_none")),W&&(B===0?(W.classList.add("kt_display_none"),U=!0):W.classList.remove("kt_display_none")),h.current&&(U?h.current.classList.add("none-pointer-event"):h.current.classList.remove("none-pointer-event"))},D=()=>{const L=c.current.clientWidth,B=b.current.clientWidth,j=L+B,W=[];return W.push(L/j),W.push(B/j),W},I=(L,B)=>{l.fastdom.measure(()=>{const j=c.current.clientWidth,W=b.current.clientWidth,U=j+W;if(a.flexMode){const X=a.flexMode===v.Prev?L:U-L,V=a.flexMode===v.Next?L:U-L;A(X,V,!0)}else{const X=+b.current.style.width.replace("%",""),V=+c.current.style.width.replace("%",""),$=X+V;B?(b.current.style.width=$*(L/U)+"%",c.current.style.width=$*(1-L/U)+"%"):(c.current.style.width=$*(L/U)+"%",b.current.style.width=$*(1-L/U)+"%")}B?T(U-L,L):T(L,U-L),a.onResize&&a.onResize(c.current,b.current)})},R=L=>L?b.current.clientWidth:c.current.clientWidth,M=L=>{const B=L.classList,j=p.default["resize-overflow-hidden"];B?.contains(j)||B.add(j)},O=L=>{const B=L.classList,j=p.default["resize-overflow-hidden"];B?.contains(j)&&B.remove(j)},P=L=>{if(L.preventDefault(),h.current&&h.current.classList.contains("no-resize"))return;const B=E.current+L.pageX-d.current,j=g.current-(L.pageX-d.current);y.current&&y.current.dispose(),y.current=l.fastdom.mutate(()=>{if(a.flexMode)A(B,j);else{const W=h.current.parentElement.offsetWidth;S(B/W,j/W)}})},k=()=>{u.current=!1,document.removeEventListener("mousemove",P),document.removeEventListener("mouseup",k),a.onFinished&&a.onFinished(),l.fastdom.mutate(()=>{var L;(L=h.current)===null||L===void 0||L.classList.remove(p.default.active),O(c.current),O(b.current),_()})},F=L=>{u.current=!0,document.addEventListener("mousemove",P),document.addEventListener("mouseup",k),d.current=L.pageX,l.fastdom.measure(()=>{E.current=c.current.offsetWidth,g.current=b.current.offsetWidth,l.fastdom.mutate(()=>{var B;(B=h.current)===null||B===void 0||B.classList.add(p.default.active),M(c.current),M(b.current),m()})})};return o.default.useEffect(()=>(h.current&&(h.current.addEventListener("mousedown",F),c.current=h.current.previousSibling,b.current=h.current.nextSibling),()=>{h.current&&(h.current.removeEventListener("mousedown",F),h.current.removeEventListener("mousemove",P),h.current.removeEventListener("mouseup",k))}),[]),a.delegate&&a.delegate({setSize:S,setAbsoluteSize:I,getAbsoluteSize:R,setRelativeSize:w,getRelativeSize:D}),o.default.createElement("div",{ref:L=>{h.current=L},className:(0,r.default)({[p.default["resize-handle-horizontal"]]:!0,[p.default["with-color"]]:!a.noColor,[a.className||""]:!0})})};t.ResizeHandleHorizontal=s;const f=a=>{const h=o.default.useRef(),u=o.default.useRef(!1),d=o.default.useRef(0),E=o.default.useRef(0),g=o.default.useRef(0),c=o.default.useRef(),b=o.default.useRef(),y=o.default.useRef(),S=o.default.useRef(),A=(L,B,j)=>{const W=a.findPrevElement?a.findPrevElement(j):c.current,U=a.findNextElement?a.findNextElement(j):b.current;!U||!W||W.classList.contains(t.RESIZE_LOCK)||U.classList.contains(t.RESIZE_LOCK)||(U.style.height=B*100+"%",W.style.height=L*100+"%",a.onResize&&a.onResize(W,U))},w=(L,B,j,W)=>{var U,X;const V=a.findPrevElement?a.findPrevElement(W):c.current,$=a.findNextElement?a.findNextElement(W):b.current;let Y,z,H=0;const K=Number(((U=V?.dataset)===null||U===void 0?void 0:U.minResize)||0),Z=Number(((X=$?.dataset)===null||X===void 0?void 0:X.minResize)||0);a.flexMode===v.Prev?(Y=V,z=$,H=L,j||(K>L?H=K:Z>B&&(H=L+B-Z))):(Y=$,z=V,H=B,j||(Z>B?H=Z:K>L&&(H=L+B-K))),Y.style.height=H+"px",Y.style.flexGrow="0",Y.style.flexShrink="1",z.style.height="0",z.style.flexGrow="1",z.style.flexShrink="0",a.onResize&&$&&V&&a.onResize(V,$)},T=(L,B)=>{const j=c.current,W=b.current;let U;a.flexMode?U=(j.offsetHeight+W.offsetHeight)/j.parentElement.offsetHeight*100:U=+W.style.height.replace("%","")+ +j.style.height.replace("%",""),W&&(W.style.height=B/(L+B)*U+"%"),j&&(j.style.height=L/(L+B)*U+"%"),D(L,B),a.onResize&&W&&j&&a.onResize(j,W)},D=(L,B)=>{const j=c.current,W=b.current;let U=!1;j&&(L===0?(j.classList.add("kt_display_none"),U=!0):j.classList.remove("kt_display_none")),W&&(B===0?(W.classList.add("kt_display_none"),U=!0):W.classList.remove("kt_display_none")),h.current&&(U?h.current.classList.add("none-pointer-event"):h.current.classList.remove("none-pointer-event"))},I=()=>{const L=c.current.clientHeight,B=b.current.clientHeight,j=L+B,W=[];return W.push(L/j),W.push(B/j),W},R=(L,B,j,W)=>{j.classList.contains(t.RESIZE_LOCK)||W.classList.contains(t.RESIZE_LOCK)||(W.style.height=B+"px",j.style.height=L+"px",W.style.flex="unset",j.style.flex="unset",a.onResize&&W&&j&&a.onResize(j,W))},M=(L,B,j)=>{if(!c.current||!b.current)return;const W=c.current.clientHeight,U=b.current.clientHeight,X=W+U;if(a.flexMode){const V=a.flexMode===v.Prev?L:X-L,$=a.flexMode===v.Next?L:X-L;w(V,$,!0)}else{const V=+b.current.style.height.replace(/\%|px/,""),$=+c.current.style.height.replace(/\%|px/,""),Y=V+$;if(B){j&&(c.current.style.height=Y*(1-L/X)+"%");const z=Y*(L/X);b.current.style.height=z===0?z+"px":z+"%"}else c.current.style.height=Y*(L/X)+"%",j&&(b.current.style.height=Y*(1-L/X)+"%")}B?D(X-L,L):D(L,X-L),a.onResize&&a.onResize(c.current,b.current)},O=L=>L?b.current.clientHeight:c.current.clientHeight,P=L=>{u.current=!0,document.addEventListener("mousemove",k),document.addEventListener("mouseup",F),d.current=L.pageY,S.current=b.current,y.current=c.current,l.fastdom.measure(()=>{E.current=c.current.offsetHeight,g.current=b.current.offsetHeight,l.fastdom.mutate(()=>{var B;(B=h.current)===null||B===void 0||B.classList.add(p.default.active),m()})})},k=L=>{L.preventDefault(),!(h.current&&h.current.classList.contains("no-resize"))&&l.fastdom.measure(()=>{const B=L.pageY>d.current,j=a.findNextElement?a.findNextElement(B):null,W=a.findPrevElement?a.findPrevElement(B):null;if(j!==null&&S.current!==j||W!==null&&y.current!==W){if(!j||!W)return;S.current=j,y.current=W,d.current=L.pageY,E.current=y.current.offsetHeight,g.current=S.current.offsetHeight}const U=E.current+L.pageY-d.current,X=g.current-(L.pageY-d.current),V=Number(y.current.dataset.minResize||0),$=Number(S.current.dataset.minResize||0);(V||$)&&(U<=V||X<=$)||l.fastdom.mutate(()=>{if(a.flexMode===v.Prev||a.flexMode===v.Next)w(U,X);else if(a.flexMode===v.Percentage){const Y=h.current.parentElement.offsetHeight;A(U/Y,X/Y)}else R(U,X,y.current,S.current)})})},F=L=>{u.current=!1,document.removeEventListener("mousemove",k),document.removeEventListener("mouseup",F),l.fastdom.mutate(()=>{var B;(B=h.current)===null||B===void 0||B.classList.remove(p.default.active),a.onFinished&&a.onFinished(),_()})};return o.default.useEffect(()=>(h.current.addEventListener("mousedown",P),c.current=h.current.previousSibling,b.current=h.current.nextSibling,()=>{h.current.removeEventListener("mousedown",P),document.removeEventListener("mousemove",k),document.removeEventListener("mouseup",F)}),[]),a.delegate&&a.delegate({setSize:A,setAbsoluteSize:M,getAbsoluteSize:O,setRelativeSize:T,getRelativeSize:I}),o.default.createElement("div",{ref:L=>L&&(h.current=L),className:(0,r.default)({[p.default["resize-handle-vertical"]]:!0,[a.className||""]:!0,[p.default["with-color"]]:!a.noColor})})};t.ResizeHandleVertical=f},77331:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Select=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importDefault(e(14041));n.__exportStar(e(88706),t);const l=p=>(p={...p,className:(0,r.default)("kt_select",p.className)},o.default.createElement("select",{...p}));t.Select=l},53736:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ContextKeyChangeEvent=t.IContextKeyService=void 0;const n=e(43718);t.IContextKeyService=Symbol("IContextKeyService");class r extends n.BasicEvent{}t.ContextKeyChangeEvent=r},50394:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InlineInputWidgetIsStreaming=t.InlineInputWidgetIsVisible=t.CodeEditsIsVisible=t.InlineDiffPartialEditsIsVisible=t.InlineHintWidgetIsVisible=t.InlineCompletionIsTrigger=t.InlineChatIsVisible=void 0;const n=e(40191);t.InlineChatIsVisible=new n.RawContextKey("ai.native.inlineChatIsVisible",!1),t.InlineCompletionIsTrigger=new n.RawContextKey("ai.native.inlineCompletionIsTrigger",!1),t.InlineHintWidgetIsVisible=new n.RawContextKey("ai.native.inlineHintWidgetIsVisible",!1),t.InlineDiffPartialEditsIsVisible=new n.RawContextKey("ai.native.inlineDiffPartialEditsIsVisible",!1),t.CodeEditsIsVisible=new n.RawContextKey("ai.native.codeEditsIsVisible",!1),t.InlineInputWidgetIsVisible=new n.RawContextKey("ai.native.inlineInputWidgetIsVisible",!1),t.InlineInputWidgetIsStreaming=new n.RawContextKey("ai.native.inlineInputWidgetIsStreaming",!1)},20162:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FileDialogViewVisibleContext=t.DialogViewVisibleContext=void 0;const n=e(40191);t.DialogViewVisibleContext=new n.RawContextKey("dialogViewVisible",!1),t.FileDialogViewVisibleContext=new n.RawContextKey("fileDialogViewVisible",!1)},16413:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ExplorerCompressedLastFocusContext=t.ExplorerCompressedFirstFocusContext=t.ExplorerCompressedFocusContext=t.FilesExplorerFilteredContext=t.FilesExplorerInputFocusedContext=t.FilesExplorerFocusedContext=t.ExplorerFilteredContext=t.ExplorerFocusedContext=t.ExplorerResourceCut=t.ExplorerViewletVisibleContext=t.ExplorerResourceIsFolderContext=void 0;const n=e(40191);t.ExplorerResourceIsFolderContext=new n.RawContextKey("explorerResourceIsFolder",!1),t.ExplorerViewletVisibleContext=new n.RawContextKey("explorerViewletVisible",!0),t.ExplorerResourceCut=new n.RawContextKey("explorerResourceCut",!1),t.ExplorerFocusedContext=new n.RawContextKey("explorerViewletFocus",!1),t.ExplorerFilteredContext=new n.RawContextKey("explorerViewletFilter",!1),t.FilesExplorerFocusedContext=new n.RawContextKey("filesExplorerFocus",!1),t.FilesExplorerInputFocusedContext=new n.RawContextKey("filesExplorerInputFocus",!1),t.FilesExplorerFilteredContext=new n.RawContextKey("filesExplorerFilteredContext",!1),t.ExplorerCompressedFocusContext=new n.RawContextKey("explorerViewletCompressedFocus",!1),t.ExplorerCompressedFirstFocusContext=new n.RawContextKey("explorerViewletCompressedFirstFocus",!1),t.ExplorerCompressedLastFocusContext=new n.RawContextKey("explorerViewletCompressedLastFocus",!1)},66e3:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(85608);n.__exportStar(e(16413),t),n.__exportStar(e(91830),t),n.__exportStar(e(29906),t),n.__exportStar(e(96774),t),n.__exportStar(e(73537),t),n.__exportStar(e(20162),t)},379:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ShowExcludedFilesFilterContextKey=t.ShowActiveFileFilterContextKey=t.ShowInfoFilterContextKey=t.ShowWarningsFilterContextKey=t.ShowErrorsFilterContextKey=t.RelatedInformationFocusContextKey=t.MarkerViewFilterFocusContextKey=t.MarkerFocusContextKey=t.MarkersTreeVisibilityContextKey=void 0;const n=e(40191);t.MarkersTreeVisibilityContextKey=new n.RawContextKey("problemsVisibility",!1),t.MarkerFocusContextKey=new n.RawContextKey("problemFocus",!1),t.MarkerViewFilterFocusContextKey=new n.RawContextKey("problemsFilterFocus",!1),t.RelatedInformationFocusContextKey=new n.RawContextKey("relatedInformationFocus",!1),t.ShowErrorsFilterContextKey=new n.RawContextKey("problems.filter.errors",!0),t.ShowWarningsFilterContextKey=new n.RawContextKey("problems.filter.warnings",!0),t.ShowInfoFilterContextKey=new n.RawContextKey("problems.filter.info",!0),t.ShowActiveFileFilterContextKey=new n.RawContextKey("problems.filter.activeFile",!1),t.ShowExcludedFilesFilterContextKey=new n.RawContextKey("problems.filter.excludedFiles",!0)},96774:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OutlineFollowCursorContext=t.OutlineSortTypeContext=void 0;const n=e(40191);t.OutlineSortTypeContext=new n.RawContextKey("outlineSortType",0),t.OutlineFollowCursorContext=new n.RawContextKey("outlineFollowCursor",!1)},91830:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ResourceContextKey=void 0;const n=e(43718),r=e(63214);class o{constructor(p,v=r.getLanguageIdFromMonaco,m="resource"){if(this.contextKeyService=p,this.languageResolver=v,!m)throw new Error("resource key prefix cannot be empty!");this.resourceScheme=this.contextKeyService.createKey(m+"Scheme",""),this.resourceFilename=this.contextKeyService.createKey(m+"Filename",""),this.resourceExtname=this.contextKeyService.createKey(m+"Extname",""),this.resourceLangId=this.contextKeyService.createKey(m+"LangId",""),this.resourceKey=this.contextKeyService.createKey(m,""),this.isFileSystemResource=this.contextKeyService.createKey("isFileSystem"+m.substr(0,1).toUpperCase()+m.substr(1),!1)}set(p){if(!p){this.reset();return}const v=this.resourceKey.get();p.isEqual(new n.URI(v))||(this.resourceScheme.set(p.scheme),this.resourceFilename.set(p.path.name+p.path.ext),this.resourceExtname.set(p.path.ext),this.resourceLangId.set(this.languageResolver(p)),this.resourceKey.set(p.toString()),this.isFileSystemResource.set(p.scheme===n.Schemes.file))}reset(){this.resourceScheme.set(""),this.resourceFilename.set(""),this.resourceExtname.set(""),this.resourceLangId.set(""),this.resourceKey.set(""),this.isFileSystemResource.set(!1)}}t.ResourceContextKey=o},67386:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InTreeViewKey=t.ViewHasSomeCollapsibleKey=t.ViewHasFilePatternKey=t.ViewHasReplacePatternKey=t.ViewHasSearchPatternKey=t.MatchFocusKey=t.ResourceFolderFocusKey=t.FolderFocusKey=t.FileFocusKey=t.FileMatchOrFolderMatchWithResourceFocusKey=t.FileMatchOrFolderMatchFocusKey=t.FileMatchOrMatchFocusKey=t.FirstMatchFocusKey=t.ReplaceActiveKey=t.PatternExcludesFocusedKey=t.PatternIncludesFocusedKey=t.InputBoxFocusedKey=t.SearchViewVisibleKey=t.HasSearchResults=t.ReplaceInputBoxFocusedKey=t.SearchInputBoxFocusedKey=t.SearchViewFocusedKey=void 0;const n=e(40191);t.SearchViewFocusedKey=new n.RawContextKey("searchViewletFocus",!1),t.SearchInputBoxFocusedKey=new n.RawContextKey("searchInputBoxFocus",!1),t.ReplaceInputBoxFocusedKey=new n.RawContextKey("replaceInputBoxFocus",!1),t.HasSearchResults=new n.RawContextKey("hasSearchResult",!1),t.SearchViewVisibleKey=new n.RawContextKey("searchViewletVisible",!0),t.InputBoxFocusedKey=new n.RawContextKey("inputBoxFocus",!1),t.PatternIncludesFocusedKey=new n.RawContextKey("patternIncludesInputBoxFocus",!1),t.PatternExcludesFocusedKey=new n.RawContextKey("patternExcludesInputBoxFocus",!1),t.ReplaceActiveKey=new n.RawContextKey("replaceActive",!1),t.FirstMatchFocusKey=new n.RawContextKey("firstMatchFocus",!1),t.FileMatchOrMatchFocusKey=new n.RawContextKey("fileMatchOrMatchFocus",!1),t.FileMatchOrFolderMatchFocusKey=new n.RawContextKey("fileMatchOrFolderMatchFocus",!1),t.FileMatchOrFolderMatchWithResourceFocusKey=new n.RawContextKey("fileMatchOrFolderMatchWithResourceFocus",!1),t.FileFocusKey=new n.RawContextKey("fileMatchFocus",!1),t.FolderFocusKey=new n.RawContextKey("folderMatchFocus",!1),t.ResourceFolderFocusKey=new n.RawContextKey("folderMatchWithResourceFocus",!1),t.MatchFocusKey=new n.RawContextKey("matchFocus",!1),t.ViewHasSearchPatternKey=new n.RawContextKey("viewHasSearchPattern",!1),t.ViewHasReplacePatternKey=new n.RawContextKey("viewHasReplacePattern",!1),t.ViewHasFilePatternKey=new n.RawContextKey("viewHasFilePattern",!1),t.ViewHasSomeCollapsibleKey=new n.RawContextKey("viewHasSomeCollapsibleResult",!1),t.InTreeViewKey=new n.RawContextKey("inTreeView",!1)},29906:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ShellExecutionSupported=t.IsTerminalFocused=t.IsTerminalViewInitialized=void 0;const n=e(40191);t.IsTerminalViewInitialized=new n.RawContextKey("isTerminalViewInitialized",!1),t.IsTerminalFocused=new n.RawContextKey("isTerminalFocused",!1),t.ShellExecutionSupported=new n.RawContextKey("shellExecutionSupported",!0)},12288:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TestingCanRefreshTests=t.TestingIsPeekVisible=t.TestingIsInPeek=t.TestingIsRunning=t.TestingHasAnyResults=t.TestingServiceHasDebuggableContextKey=t.TestingServiceProviderCount=void 0;const n=e(40191);t.TestingServiceProviderCount=new n.RawContextKey("service.testing.providerCount",0),t.TestingServiceHasDebuggableContextKey=new n.RawContextKey("service.testing.hasDebuggableContext",!1),t.TestingHasAnyResults=new n.RawContextKey("testing.hasAnyResults",!1),t.TestingIsRunning=new n.RawContextKey("testing.isRunning",!1),t.TestingIsInPeek=new n.RawContextKey("testing.isInPeek",!0),t.TestingIsPeekVisible=new n.RawContextKey("testing.isPeekVisible",!1),t.TestingCanRefreshTests=new n.RawContextKey("testing.canRefresh",!1)},73537:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.VirtualWorkspace=t.WorkspaceTrusted=t.WorkspaceFolderCount=t.WorkbenchState=void 0;const n=e(40191);t.WorkbenchState=new n.RawContextKey("workbenchState","empty"),t.WorkspaceFolderCount=new n.RawContextKey("workspaceFolderCount",0),t.WorkspaceTrusted=new n.RawContextKey("isWorkspaceTrusted",!0),t.VirtualWorkspace=new n.RawContextKey("virtualWorkspace",!1)},18193:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CorePreferences=t.corePreferenceSchema=t.FILE_TREE_DEFAULTS=t.FILES_DEFAULTS=void 0,t.injectCorePreferences=v;const n=e(43718),r=e(69734),o=e(87863),l=e(78132),p={confirmDelete:!0,confirmMove:!0};t.FILES_DEFAULTS={filesWatcherExclude:o.defaultFilesWatcherExcludes,filesExclude:{"**/.git":!0,"**/.svn":!0,"**/.hg":!0,"**/CVS":!0,"**/.DS_Store":!0}},t.FILE_TREE_DEFAULTS={baseIndent:10,indent:8},t.corePreferenceSchema={type:"object",properties:{[n.GeneralSettingsId.Language]:{type:"string",enum:(0,n.getAvailableLanguages)().map(m=>m.languageId),default:r.LOCALE_TYPES.EN_US},[n.GeneralSettingsId.Theme]:{type:"string",default:"vs-dark",enum:[]},"general.askReloadOnLanguageChange":{type:"boolean",default:!0,description:"%preference.description.general.askReloadOnLanguageChange%"},[n.GeneralSettingsId.Icon]:{type:"string",default:"vs-minimal",enum:[]},[n.GeneralSettingsId.ProductIconTheme]:{type:"string",default:"opensumi-icons",enum:["opensumi-icons"]},"workbench.colorCustomizations":{type:"object",description:"%preference.workbench.colorCustomizations%",default:{}},"application.supportsOpenFolder":{type:"boolean",default:!1,description:"Whether default open folder behavior is supported"},"application.supportsOpenWorkspace":{type:"boolean",default:!1,description:"Whether default open workspace behavior is supported"},"application.confirmExit":{type:"string",enum:["never","ifRequired","always"],default:"always",description:"When to confirm before closing the application window."},"application.preferMarkdownPreview":{type:"boolean",default:!1,description:"Use markdown preview first"},"application.invalidExthostReload":{type:"string",enum:["ifRequired","always"],default:"ifRequired",description:"Reload strategy when exthost process became invalid."},"workbench.list.openMode":{type:"string",enum:["singleClick","doubleClick"],default:"singleClick",description:"%preference.workbench.list.openMode%"},"workbench.commandPalette.history":{type:"number",default:50,minimum:0,description:"Controls the number of recently used commands to keep in history for the command palette. Set to 0 to disable command history."},"workbench.refactoringChanges.showPreviewStrategy":{type:"string",default:"askMe",enum:["show","hide","askMe"],description:"%preference.workbench.refactoringChanges.showPreviewStrategy%"},"workbench.quickOpen.preserveInput":{type:"boolean",default:!0,description:"%workbench.quickOpen.preserveInput%"},"workbench.hideSlotTabBarWhenHidePanel":{type:"boolean",default:!1,description:"%workbench.hideSlotTabBarWhenHidePanel%"},"explorer.confirmMove":{type:"boolean",default:p.confirmDelete,description:"%preference.explorer.confirm.move%"},"explorer.confirmDelete":{type:"boolean",default:p.confirmMove,description:"%preference.explorer.confirm.delete%"},"explorer.fileTree.baseIndent":{type:"number",default:t.FILE_TREE_DEFAULTS.baseIndent},"explorer.fileTree.indent":{type:"number",default:t.FILE_TREE_DEFAULTS.indent},"explorer.compactFolders":{type:"boolean",description:"%preference.explorer.compactFolders%",default:!0},"explorer.autoReveal":{type:"boolean",default:!0},"debug.toolbar.float":{type:"boolean",default:!0},"debug.breakpoint.editorHint":{type:"boolean",default:!0,description:"%preference.debug.breakpoint.editorHint%"},"debug.breakpoint.showBreakpointsInOverviewRuler":{type:"boolean",default:!1,description:"%preference.debug.breakpoint.showBreakpointsInOverviewRuler%"},"debug.toolbar.top":{type:"number",default:0,description:"%preference.debug.toolbar.top%"},"debug.toolbar.height":{type:"number",default:30,description:"%preference.debug.toolbar.height%"},"debug.console.filter.mode":{type:"string",enum:["filter","matcher"],default:"filter"},"files.exclude":{type:"object",description:"%preference.files.exclude%",default:t.FILES_DEFAULTS.filesExclude,additionalProperties:{anyOf:[{type:"boolean",description:(0,n.localize)("files.exclude.boolean","The glob pattern to match file paths against. Set to true or false to enable or disable the pattern.")}]}},"files.watcherExclude":{type:"object",default:t.FILES_DEFAULTS.filesWatcherExclude,description:"%preference.files.watcherExclude%"},"files.associations":{type:"object",markdownDescription:"%preference.files.associations%"},"files.encoding":{type:"string",description:"%preference.files.encoding%",default:"utf8",enum:Object.keys(n.SUPPORTED_ENCODINGS)},"files.eol":{type:"string",enum:[`
|
|
30258
|
+
`)}return E}),`{"type": 1, "id": "${a}", "proxyId": "${h}", "method": "${u}", "args": ${JSON.stringify(d,v.replacer)}}`}static serializeReplyOK(a,h,u){if(typeof h>"u")return`{"type": 2, "id": "${a}"}`;try{return`{"type": 2, "id": "${a}", "res": ${JSON.stringify(h,v.replacer)}}`}catch{return u&&u.warn("res",h),`{"type": 2, "id": "${a}", "res": {}}`}}static serializeReplyError(a,h,u){try{return`{"type": 3, "id": "${a}", "res": ${JSON.stringify((0,n.transformErrorForSerialization)(h),v.replacer)}}`}catch{return u&&u.error("error",h),`{"type": 3, "id": "${a}", "res": {}}`}}}t.MessageIO=m;function _(){const f=new Error("Canceled");return f.name=f.message,f}class s{constructor(a,h){this._protocol=a,this._locals=new Map,this._proxies=new Map,this._pendingRPCReplies=new Map,this._cancellationTokenSources=new Map,this._timeoutHandles=new Map,this._lastMessageId=0,this.logger=h||console,this.logger.error("You are using the deprecated class: 'RPCProtocol'. Please use the new one: 'SumiConnectionMultiplexer'"),this._protocol.onMessage(u=>this._receiveOneMessage(u))}set(a,h){return this._locals.set(a.serviceId,h),h}get(a){return this._locals.get(a.serviceId)}getProxy(a){return this._proxies.has(a.serviceId)||this._proxies.set(a.serviceId,this._createProxy(a.serviceId)),this._proxies.get(a.serviceId)}_createProxy(a){const h={get:(u,d)=>typeof d=="symbol"?null:(!u[d]&&d.charCodeAt(0)===36&&(u[d]=(...E)=>this._remoteCall(a,d,E)),u[d])};return new Proxy(Object.create(null),h)}_remoteCall(a,h,u){const d=u.length&&n.CancellationToken.isCancellationToken(u[u.length-1])?u.pop():void 0;if(d&&d.isCancellationRequested)return Promise.reject(_());const E=String(++this._lastMessageId),g=new n.Deferred;d&&(u.push("add.cancellation.token"),d.onCancellationRequested(()=>this._protocol.send(m.cancel(E)))),this._pendingRPCReplies.set(E,g);const c=m.serializeRequest(E,a,h,u);if(this._protocol.send(c),this._protocol.timeout&&this._protocol.timeout!==-1){const b=setTimeout(()=>{this._handleTimeout(E)},this._protocol.timeout);this._timeoutHandles.set(E,b)}return g.promise}_receiveOneMessage(a){const h=JSON.parse(a,v.reviver);switch(this._timeoutHandles.has(h.id)&&(typeof clearTimeout=="function"&&clearTimeout(this._timeoutHandles.get(h.id)),this._timeoutHandles.delete(h.id)),h.type){case 1:this._receiveRequest(h);break;case 2:this._receiveReply(h);break;case 4:this._receiveCancel(h);break;case 3:this._receiveError(h);break}}_receiveCancel(a){const h=this._cancellationTokenSources.get(a.id);h&&h.cancel()}_receiveError(a){const h=a.id;if(!this._pendingRPCReplies.has(h))return;const u=this._pendingRPCReplies.get(h);this._pendingRPCReplies.delete(h);let d;a.res&&(a.res.$isError?(d=new Error,d.name=a.res.name,d.message=a.res.message,d.stack=a.res.stack):d=a.res),u.reject(d)}_receiveRequest(a){const h=a.id,u=a.proxyId,d=a.method,E=a.args.map(b=>b===null?void 0:b);if(E.length&&E[E.length-1]==="add.cancellation.token"?E.pop():!1){const b=new n.CancellationTokenSource;this._cancellationTokenSources.set(h,b),E.push(b.token)}this._invokeHandler(u,d,E).then(b=>{this._protocol.send(m.serializeReplyOK(h,b)),this._cancellationTokenSources.delete(h)}).catch(b=>{this._protocol.send(m.serializeReplyError(h,b)),this._cancellationTokenSources.delete(h)})}_invokeHandler(a,h,u){try{return this._doInvokeHandler(a,h,u)}catch(d){return Promise.reject(d)}}async _doInvokeHandler(a,h,u){const d=this._locals.get(a);if(!d)throw new Error("Unknown actor "+a);const E=await d[h];if(typeof E!="function")throw new Error("Unknown method "+h+" on actor "+a);return E.apply(d,u)}_receiveReply(a){const h=a.id;if(!this._pendingRPCReplies.has(h))return;const u=this._pendingRPCReplies.get(h);this._pendingRPCReplies.delete(h),u.resolve(a.res)}_handleTimeout(a){if(!this._pendingRPCReplies.has(a)||!this._timeoutHandles.has(a))return;const h=this._pendingRPCReplies.get(a);this._pendingRPCReplies.delete(a),this._timeoutHandles.delete(a),h.reject(new Error("RPC Timeout: "+a))}}t.RPCProtocol=s},64592:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.furySerializer=t.CloseProtocol=t.BinaryProtocol=t.DataProtocol=t.ErrorProtocol=t.ServerReadyProtocol=t.OpenProtocol=t.PongProtocol=t.PingProtocol=void 0;const n=e(26387),r=e(94846);function o(){return{id:n.Type.string()}}t.PingProtocol=n.Type.object("ping",{...o()}),t.PongProtocol=n.Type.object("pong",{...o()}),t.OpenProtocol=n.Type.object("open",{...o(),clientId:n.Type.string(),path:n.Type.string(),traceId:n.Type.string()}),t.ServerReadyProtocol=n.Type.object("server-ready",{...o(),traceId:n.Type.string()}),t.ErrorProtocol=n.Type.object("error",{...o(),code:n.Type.uint16(),message:n.Type.string()}),t.DataProtocol=n.Type.object("data",{...o(),content:n.Type.string()}),t.BinaryProtocol=n.Type.object("binary",{...o(),binary:n.Type.binary()}),t.CloseProtocol=n.Type.object("close",{...o(),code:n.Type.uint32(),reason:n.Type.string()});const l=(0,r.oneOf)([t.PingProtocol,t.PongProtocol,t.OpenProtocol,t.ServerReadyProtocol,t.DataProtocol,t.BinaryProtocol,t.CloseProtocol,t.ErrorProtocol]);t.furySerializer=l},54558:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.wrapSerializer=void 0;const n=e(85608);n.__exportStar(e(64592),t),n.__exportStar(e(43620),t),n.__exportStar(e(41619),t);const r=(o,l)=>({onceClose(p){return o.onceClose(p)},onMessage(p){return o.onMessage(v=>{p(l.deserialize(v))})},send(p){o.send(l.serialize(p))}});t.wrapSerializer=r},43620:(x,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.rawSerializer=void 0,t.rawSerializer={serialize:e=>e,deserialize:e=>e}},41619:(x,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},76271:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RPCServiceChannelPath=t.BaseCommonChannelHandler=t.CommonChannelPathHandler=void 0,t.injectConnectionProviders=m;const n=e(39048),r=e(54558),o=e(47561);class l{constructor(){this.handlerMap=new Map,this.paramsKey=new Map}register(s,f){const a=s.indexOf("/:"),h=a>=0;let u=s;h&&(u=s.slice(0,a),this.paramsKey.set(u,s.slice(a+2))),this.handlerMap.has(u)||this.handlerMap.set(u,[]);const d=this.handlerMap.get(u),E=f.handler.bind(f),g=(c,b,y)=>{f.connection=c,E(c,b,y)};f.handler=g,d.push(f),this.handlerMap.set(u,d)}getParams(s,f){const a={};if(this.paramsKey.has(s)){const h=this.paramsKey.get(s);h&&(a[h]=f)}return a}removeHandler(s,f){const a=s.indexOf(":"),h=a>=0;let u=s;h&&(u=s.slice(0,a));const d=this.handlerMap.get(u)||[],E=d.indexOf(f);E!==-1&&d.splice(E,1),this.handlerMap.set(s,d)}get(s){return this.handlerMap.get(s)}disposeConnectionClientId(s,f){this.handlerMap.forEach(a=>{a.forEach(h=>{h.dispose(s,f)})})}openChannel(s,f,a){let h=this.get(s),u;if(!h){const d=s.indexOf("/");d>=0&&(h=this.get(s.slice(0,d)),u=this.getParams(s.slice(0,d),s.slice(d+1)))}if(h)for(let d=0,E=h.length;d<E;d++)h[d].handler(f,a,u)}getAll(){return Array.from(this.handlerMap.values())}}t.CommonChannelPathHandler=l;var p;(function(_){_[_.ConnectionClosed=1]="ConnectionClosed",_[_.NewChannelOpened=2]="NewChannelOpened"})(p||(p={}));class v{constructor(s,f,a=console,h={}){this.handlerId=s,this.commonChannelPathHandler=f,this.logger=a,this.channelMap=new Map,this.heartbeatTimer=null,this.serializer=r.furySerializer,h.serializer&&(this.serializer=h.serializer)}heartbeat(s){this.heartbeatTimer&&clearTimeout(this.heartbeatTimer),this.heartbeatTimer=setTimeout(()=>{this.doHeartbeat(s),this.heartbeat(s)},5e3)}receiveConnection(s){let f;this.heartbeat(s);const a=(0,r.wrapSerializer)(s,this.serializer);a.onMessage(h=>{try{switch(h.kind){case"open":{const{id:u,path:d,traceId:E}=h;f=h.clientId,this.logger.log(`open a new connection channel ${f} with path ${d}`);let g=this.channelMap.get(u);g&&(g.close(p.NewChannelOpened,"new channel opened for the same channel id"),g.dispose()),g=new o.WSServerChannel(a,{id:u,clientId:f,logger:this.logger}),this.channelMap.set(u,g),this.commonChannelPathHandler.openChannel(d,g,f),g.serverReady(E);break}default:{const{id:u}=h,d=this.channelMap.get(u);d?d.dispatch(h):(a.send({kind:"error",id:u,code:n.ErrorMessageCode.ChannelNotFound,message:`channel ${u} not found`}),this.logger.warn(`channel ${u} is not found`))}}}catch(u){this.logger.error("handle connection message error",u)}}),s.onceClose(()=>{this.logger.log(`connection ${f} is closed, dispose all channels`),this.commonChannelPathHandler.disposeConnectionClientId(s,f),Array.from(this.channelMap.values()).filter(h=>h.clientId===f).forEach(h=>{h.close(p.ConnectionClosed,"connection closed"),h.dispose(),this.channelMap.delete(h.id),this.logger.log(`Remove connection channel ${h.id}`)})})}dispose(){this.heartbeatTimer&&clearTimeout(this.heartbeatTimer)}}t.BaseCommonChannelHandler=v,t.RPCServiceChannelPath="RPCService";function m(_){const s=new l;_.addProviders({token:l,useValue:s})}},8140:(x,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ServiceType=void 0;var e;(function(n){n[n.Service=0]="Service",n[n.Stub=1]="Stub"})(e||(t.ServiceType=e={}))},47561:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WSServerChannel=t.WSChannel=void 0;const n=e(40396),r=e(43718),o=e(39048),l=e(97349);var p;(function(s){s[s.ReSend=0]="ReSend",s[s.Sended=1]="Sended",s[s.Success=2]="Success",s[s.Failed=3]="Failed"})(p||(p={}));class v{constructor(){this.map=new Map,this.deliveryTimeout=500,this.timerMap=new Map}setDeliveryTimeout(f){this.deliveryTimeout=f}set(f,a){this.map.set(f,a)}get(f){return this.map.get(f)}success(f){this.map.set(f,p.Success);const a=this.timerMap.get(f);a&&clearTimeout(a)}dispose(){this.timerMap.forEach(f=>{clearTimeout(f)})}stop(f){const a=this.timerMap.get(f);a&&clearTimeout(a)}send(f,a){this.set(f,p.Sended),this.guard(f,a)}guard(f,a){const h=this.timerMap.get(f);h&&clearTimeout(h);const u=setTimeout(()=>{this.set(f,p.ReSend),a.whenRetry()},this.deliveryTimeout);this.timerMap.set(f,u)}}class m{constructor(f,a){this.connection=f,this._disposables=new r.DisposableStore,this.emitter=this._disposables.add(new n.EventEmitter),this.onBinaryQueue=this._disposables.add(new r.EventQueue),this.sendQueue=[],this._isServerReady=!1,this.stateTracer=new v,this.LOG_TAG="[WSChannel]",this.logger=console;const{id:h,logger:u,ensureServerReady:d}=a;this.id=h,this.LOG_TAG=`[WSChannel id:${this.id}]`,u&&(this.logger=u),this._ensureServerReady=!!d,a.deliveryTimeout&&this.stateTracer.setDeliveryTimeout(a.deliveryTimeout),this._disposables.add(this.emitter.on("binary",E=>this.onBinaryQueue.push(E)))}inqueue(f){if(this._ensureServerReady&&!this._isServerReady){this.sendQueue||(this.sendQueue=[]),this.sendQueue.push(f);return}this.connection.send(f)}ensureMessageDeliveried(f,a=(0,r.randomString)(16)){const h=this.stateTracer.get(a);if(h&&h>=p.Sended){this.logger.error(`message already send already success or in progress, traceId: ${a}, state: ${h}`);return}f.traceId=a,this.connection.send(f),this.stateTracer.send(a,{whenRetry:()=>{if(this._isServerReady){this.stateTracer.stop(a);return}this.ensureMessageDeliveried(f,a)}})}onMessage(f){return this.emitter.on("message",f)}onBinary(f){return this.onBinaryQueue.on(f)}onOpen(f){return this.emitter.on("open",f)}onReopen(f){return this.emitter.on("reopen",f)}pause(){this._isServerReady=!1}onServerReady(f){if(this._isServerReady){f();return}return this.emitter.on("open",f)}resume(){if(this._isServerReady=!0,this.sendQueue){for(const f of this.sendQueue)this.connection.send(f);this.sendQueue=[]}}dispatch(f){switch(f.kind){case"server-ready":f.traceId&&this.stateTracer.success(f.traceId),this.resume(),this.emitter.emit("open",f.id);break;case"data":this.emitter.emit("message",f.content);break;case"binary":this.emitter.emit("binary",f.binary);break;case"error":switch(this.logger.error(this.LOG_TAG,`receive error: id: ${f.id}, code: ${f.code}, error: ${f.message}`),f.code){case o.ErrorMessageCode.ChannelNotFound:this.channelPath&&(this.pause(),this.open(this.channelPath,this.clientId));break}break}}open(f,a){this.channelPath=f,this.clientId=a,this.LOG_TAG=`[WSChannel id=${this.id} path=${f}]`;const h={kind:"open",id:this.id,path:f,clientId:a};this._ensureServerReady?this.ensureMessageDeliveried(h):this.connection.send(h)}send(f){this.inqueue({kind:"data",id:this.id,content:f})}sendBinary(f){this.inqueue({kind:"binary",id:this.id,binary:f})}onError(){}close(f,a){this.pause(),this.emitter.emit("close",f,a)}fireReopen(){this.emitter.emit("reopen")}onClose(f){return this.emitter.on("close",f)}onceClose(f){return this.emitter.once("close",f)}createConnection(){return{onceClose:f=>this.onceClose(f),onMessage:f=>this.onBinary(f),send:f=>{this.sendBinary(f)},dispose(){}}}createSumiConnection(f={}){return new l.SumiConnection(this.createConnection(),f)}dispose(){this.stateTracer.dispose(),this.sendQueue=[],this._disposables.dispose()}ping(){this.connection.send({kind:"ping",id:this.id})}}t.WSChannel=m;class _ extends m{constructor(f,a){super(f,a),this.connection=f,this.messageQueue=[],this.clientId=a.clientId}serverReady(f){this.connection.send({kind:"server-ready",id:this.id,traceId:f})}dispatch(f){switch(f.kind){case"data":this.emitter.emit("message",f.content);break;case"binary":this.emitter.emit("binary",f.binary);break;case"ping":this.connection.send({kind:"pong",id:this.id});break}}}t.WSServerChannel=_},8919:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),e(85608).__exportStar(e(25285),t)},70650:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AINativeConfigService=void 0;const n=e(85608),r=e(76003),o=e(89195),l=e(1149),p=e(11050),v={supportsMarkers:!0,supportsChatAssistant:!0,supportsCodeAction:!0,supportsInlineChat:!0,supportsInlineCompletion:!0,supportsConflictResolve:!0,supportsRenameSuggestions:!0,supportsProblemFix:!0,supportsTerminalDetection:!0,supportsTerminalCommandSuggest:!0,supportsCustomLLMSettings:!0,supportsMCP:!0},m={};Object.keys(v).forEach(a=>{m[a]=!1});const _={inputWidth:320,inputKeybinding:"ctrlcmd+k",logo:o.AILogoAvatar},s={triggerKeybinding:"alt+\\"};let f=class{constructor(){this.aiModuleLoaded=!1,this.internalCapabilities=v,this.internalInlineChat=_,this.internalCodeEdits=s}get capabilities(){if(!this.aiModuleLoaded)return m;const{AINativeConfig:h}=this.appConfig;return h?.capabilities?{...this.internalCapabilities,...h.capabilities}:this.internalCapabilities}get inlineChat(){const{AINativeConfig:h}=this.appConfig;return h?.inlineChat?{...this.internalInlineChat,...h.inlineChat}:this.internalInlineChat}get codeEdits(){const{AINativeConfig:h}=this.appConfig;return h?.codeEdits?{...this.internalCodeEdits,...h.codeEdits}:this.internalCodeEdits}setAINativeModuleLoaded(h){this.aiModuleLoaded=h}};t.AINativeConfigService=f,n.__decorate([(0,r.Autowired)(p.AppConfig),n.__metadata("design:type",Object)],f.prototype,"appConfig",void 0),n.__decorate([(0,r.Autowired)(l.LayoutViewSizeConfig),n.__metadata("design:type",l.LayoutViewSizeConfig)],f.prototype,"layoutViewSize",void 0),t.AINativeConfigService=f=n.__decorate([(0,r.Injectable)()],f)},41480:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AIReporter=void 0;const n=e(85608),r=e(76003),o=e(43718),l=e(52664);let p=class{constructor(){this.reportInfoCache=new Map,this.reporterCancelHandler=new Map}getRelationId(){return(0,o.uuid)()}getCacheReportInfo(m){return this.reportInfoCache.get(m)}getCommonReportInfo(){return{}}start(m,_){const s=this.getRelationId();this.report(s,{..._,msgType:m,isStart:!0});const f=setTimeout(()=>{this.report(s,{..._,success:!1})},60*1e3);return this.reporterCancelHandler.set(s,f),s}end(m,_){const s=this.reporterCancelHandler.get(m);s&&clearTimeout(s),this.report(m,{success:!0,..._,isStart:!1})}record(m,_){_||(_=this.getRelationId());const s=this.reportInfoCache.get(_)||{},f={...this.getCommonReportInfo(),...s,...m,relationId:_};return this.reportInfoCache.set(_,f),f}report(m,_){const s=this.record(_,m);this.reporter.point(l.AI_REPORTER_NAME,_.msgType||s.msgType,s)}};t.AIReporter=p,n.__decorate([(0,r.Autowired)(o.IReporterService),n.__metadata("design:type",Object)],p.prototype,"reporter",void 0),t.AIReporter=p=n.__decorate([(0,r.Injectable)()],p)},57925:(x,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AI_CODE_EDITS_COMMANDS=t.AI_CODE_ACTION=t.AI_CHAT_VISIBLE=t.AI_INLINE_COMPLETION_REPORTER=t.AI_INLINE_DIFF_PARTIAL_EDIT=t.AI_INLINE_COMPLETION_VISIBLE=t.AI_INLINE_CHAT_INTERACTIVE_INPUT_CANCEL=t.AI_INLINE_CHAT_INTERACTIVE_INPUT_VISIBLE=t.AI_INLINE_CHAT_VISIBLE=void 0,t.AI_INLINE_CHAT_VISIBLE={id:"ai.inlineChat.visible"},t.AI_INLINE_CHAT_INTERACTIVE_INPUT_VISIBLE={id:"ai.inlineChat.interactiveInput.visible"},t.AI_INLINE_CHAT_INTERACTIVE_INPUT_CANCEL={id:"ai.inlineChat.interactiveInput.cancel"},t.AI_INLINE_COMPLETION_VISIBLE={id:"ai.inline.completion.visible"},t.AI_INLINE_DIFF_PARTIAL_EDIT={id:"ai.inline.diff.partial.edit"},t.AI_INLINE_COMPLETION_REPORTER={id:"ai.inline.completion.reporter"},t.AI_CHAT_VISIBLE={id:"ai.chat.visible"},t.AI_CODE_ACTION={id:"ai.code.action"};var e;(function(n){n.DISCARD={id:"ai.codeEdits.discard"},n.ACCEPT={id:"ai.codeEdits.accept"},n.TRIGGER={id:"ai.codeEdits.trigger"}})(e||(t.AI_CODE_EDITS_COMMANDS=e={}))},38070:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MergeConflictReportService=void 0;const n=e(85608),r=e(76003),o=e(43718),l=e(70650);let p=class extends o.Disposable{constructor(){super(...arguments),this.reportInfoMap=new Map,this.unique2RelationMap=new Map}record(m,_){if(!this.aiNativeConfigService.capabilities.supportsConflictResolve)return _;let s="";return this.unique2RelationMap.has(m)?(s=this.unique2RelationMap.get(m),this.aiReporter.record(_,s)):(s=this.aiReporter.record({..._,msgType:o.AIServiceType.MergeConflict,message:o.AIServiceType.MergeConflict,editorMode:_.editorMode||o.MergeConflictEditorMode.traditional}).relationId,this.unique2RelationMap.set(m,s)),{..._,relationId:s}}report(m,_){if(!this.aiNativeConfigService.capabilities.supportsConflictResolve)return;const s=this.record(m,_);this.aiReporter.end(s.relationId,s)}reportIncrementNum(m,_){if(!this.aiNativeConfigService.capabilities.supportsConflictResolve)return;const s=this.unique2RelationMap.get(m);if(!s)return;const f=this.aiReporter.getCacheReportInfo(s)[_]||0;this.report(m,{[_]:f+1})}dispose(){super.dispose(),this.reportInfoMap.clear()}};t.MergeConflictReportService=p,n.__decorate([(0,r.Autowired)(l.AINativeConfigService),n.__metadata("design:type",l.AINativeConfigService)],p.prototype,"aiNativeConfigService",void 0),n.__decorate([(0,r.Autowired)(o.IAIReporter),n.__metadata("design:type",Object)],p.prototype,"aiReporter",void 0),t.MergeConflictReportService=p=n.__decorate([(0,r.Injectable)()],p)},95040:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IAIInlineChatService=void 0,e(85608).__exportStar(e(70650),t),t.IAIInlineChatService=Symbol("IAIInlineChatService")},12956:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ClientAppStateService=t.ClientAppStateEvent=void 0;const n=e(85608),r=e(76003),o=e(43718);class l extends o.BasicEvent{}t.ClientAppStateEvent=l;let p=class{constructor(){this._state="init",this.deferred={}}get state(){return this._state}set state(m){m!==this._state&&(this._state=m,this.deferred[m]===void 0&&(this.deferred[m]=new o.Deferred),this.deferred[m].resolve(),this.eventBus.fire(new l(m)))}reachedState(m){return this.deferred[m]===void 0&&(this.deferred[m]=new o.Deferred),this.deferred[m].promise}reachedAnyState(...m){return Promise.race(m.map(_=>this.reachedState(_)))}};t.ClientAppStateService=p,n.__decorate([(0,r.Autowired)(o.IEventBus),n.__metadata("design:type",Object)],p.prototype,"eventBus",void 0),t.ClientAppStateService=p=n.__decorate([(0,r.Injectable)()],p)},59555:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ApplicationService=void 0;const n=e(85608),r=e(76003),o=e(59019),l=e(43718),p=e(11050),v=e(42101);let m=class{constructor(){this._initialized=new l.Deferred}async initializeData(){this._backendOS=await this.commonServer.getBackendOS(),this._initialized.resolve()}get frontendOS(){return l.OS.type()}get backendOS(){if(this._backendOS)return this._backendOS;if(this.appConfig.isElectronRenderer)return this.frontendOS;throw new Error("Can't get backend os type before initialize, if you want wait to get backend os, please use async method: getBackendOS")}async getBackendOS(){return await this._initialized.promise,this.backendOS}get clientId(){return this.injector.get(o.WSChannelHandler).clientId}get windowId(){return this.appConfig.isElectronRenderer?v.electronEnv.currentWindowId:this.injector.get(o.WSChannelHandler).clientId}};t.ApplicationService=m,n.__decorate([(0,r.Autowired)(l.CommonServerPath),n.__metadata("design:type",Object)],m.prototype,"commonServer",void 0),n.__decorate([(0,r.Autowired)(p.AppConfig),n.__metadata("design:type",Object)],m.prototype,"appConfig",void 0),n.__decorate([(0,r.Autowired)(r.INJECTOR_TOKEN),n.__metadata("design:type",r.Injector)],m.prototype,"injector",void 0),t.ApplicationService=m=n.__decorate([(0,r.Injectable)()],m)},16884:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(85608);n.__exportStar(e(12956),t),n.__exportStar(e(59555),t)},22914:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BaseConnectionHelper=void 0;const n=e(85608),r=e(76003),o=e(18740),l=e(43718),p=e(32796),v=e(38578),m=(0,l.getDebugLogger)();let _=class{async createRPCServiceChannel(f){var a;const h=this.createConnection(),u=(a=this.appConfig.clientId)!==null&&a!==void 0?a:this.getDefaultClientId(),d=new o.WSChannelHandler(h,u,{logger:m});return(0,p.createConnectionService)(this.injector,f,d)}};t.BaseConnectionHelper=_,n.__decorate([(0,r.Autowired)(r.INJECTOR_TOKEN),n.__metadata("design:type",r.Injector)],_.prototype,"injector",void 0),n.__decorate([(0,r.Autowired)(v.AppConfig),n.__metadata("design:type",Object)],_.prototype,"appConfig",void 0),n.__decorate([(0,r.Autowired)(l.IReporterService),n.__metadata("design:type",Object)],_.prototype,"reporterService",void 0),t.BaseConnectionHelper=_=n.__decorate([(0,r.Injectable)({multiple:!0})],_)},41320:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BrowserRuntime=void 0;const n=e(85608),r=e(76003),o=e(44142),l=e(6858),p=e(53206);let v=class extends l.RendererRuntime{constructor(){super(...arguments),this.runtimeName=o.ESupportRuntime.Web}registerRuntimeModuleProviders(_,s){s.webProviders&&_.addProviders(...s.webProviders)}registerRuntimeInnerProviders(_){(0,p.injectBrowserInnerProviders)(_)}};t.BrowserRuntime=v,t.BrowserRuntime=v=n.__decorate([(0,r.Injectable)()],v)},53206:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.injectBrowserInnerProviders=o;const n=e(93899),r=e(97222);function o(l){l.addProviders({token:n.ICtxMenuRenderer,useClass:r.BrowserCtxMenuRenderer})}},55267:(x,t,e)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.WebConnectionHelper=void 0;const r=e(85608),o=e(76003),l=e(91493),p=e(43718),v=e(22914);let m=n=class extends v.BaseConnectionHelper{constructor(s){super(),this.options=s,this.clientId=n.clientIdFactory()}getDefaultClientId(){return this.clientId}createConnection(){return l.ReconnectingWebSocketConnection.forURL(this.options.connectionPath,this.options.connectionProtocols)}static clientIdFactory(){return`CLIENT_ID_${(0,p.uuid)()}`}};t.WebConnectionHelper=m,t.WebConnectionHelper=m=n=r.__decorate([(0,o.Injectable)({multiple:!0}),r.__metadata("design:paramtypes",[Object])],m)},44142:(x,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.onigWasmCDNUri=t.ESupportRuntime=void 0;var e;(function(n){n.Electron="electron",n.Web="web"})(e||(t.ESupportRuntime=e={})),t.onigWasmCDNUri="https://g.alicdn.com/kaitian/vscode-oniguruma-wasm/1.5.1/onig.wasm"},59574:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ElectronRendererRuntime=void 0;const n=e(85608),r=e(76003),o=e(38578),l=e(42101),p=e(44142),v=e(6858),m=e(38892);let _=class extends v.RendererRuntime{constructor(){super(...arguments),this.runtimeName=p.ESupportRuntime.Electron}registerRuntimeModuleProviders(a,h){h.electronProviders&&a.addProviders(...h.electronProviders)}registerRuntimeInnerProviders(a){(0,m.injectElectronInnerProviders)(a)}mergeAppConfig(a){return s(a)}async provideResourceUri(a){switch(a){case v.EKnownResources.OnigWasm:return l.electronEnv.onigWasmUri||this.appConfig.onigWasmUri||p.onigWasmCDNUri;case v.EKnownResources.TreeSitterWasmDirectory:return l.electronEnv.treeSitterWasmDirectoryUri||this.appConfig.treeSitterWasmDirectoryUri||(0,o.getTreeSitterWasmCDNUri)(this.appConfig.componentCDNType);default:throw new Error(`Unknown resource: ${a}`)}}};t.ElectronRendererRuntime=_,t.ElectronRendererRuntime=_=n.__decorate([(0,r.Injectable)()],_);function s(f){var a;const h=(a=l.electronEnv.metadata)!==null&&a!==void 0?a:{},u={...f,appRoot:f.appRoot||l.electronEnv.appPath,extensionDir:f.extensionDir||h.extensionDir};return h.extensionDevelopmentHost&&(f.extensionDevelopmentHost=h.extensionDevelopmentHost),h.extensionCandidate&&(f.extensionCandidate=(f.extensionCandidate||[]).concat(l.electronEnv.metadata.extensionCandidate||[])),u}},38892:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.injectElectronInnerProviders=m;const n=e(43718),r=e(37406),o=e(93899),l=e(27790),p=e(11050),v=e(42101);function m(_){const s=_.get(p.AppConfig);_.addProviders({token:n.IElectronMainMenuService,useValue:(0,v.createElectronMainApi)(n.IElectronMainMenuService,s.devtools)},{token:r.IElectronMainUIService,useValue:(0,v.createElectronMainApi)(r.IElectronMainUIService,s.devtools)},{token:r.IElectronMainLifeCycleService,useValue:(0,v.createElectronMainApi)(r.IElectronMainLifeCycleService,s.devtools)},{token:r.IElectronURLService,useValue:(0,v.createElectronMainApi)(r.IElectronURLService,s.devtools)},{token:l.IElectronMenuFactory,useClass:l.ElectronMenuFactory},{token:l.IElectronMenuBarService,useClass:l.ElectronMenuBarService},{token:o.ICtxMenuRenderer,useClass:l.ElectronCtxMenuRenderer})}},63977:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ElectronConnectionHelper=void 0;const n=e(85608),r=e(76003),o=e(42101),l=e(22914);let p=class extends l.BaseConnectionHelper{getDefaultClientId(){return o.electronEnv.metadata.windowClientId}createConnection(){return(0,o.createNetSocketConnection)()}};t.ElectronConnectionHelper=p,t.ElectronConnectionHelper=p=n.__decorate([(0,r.Injectable)({multiple:!0})],p)},18379:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ConnectionHelperFactory=v;const n=e(85608),r=e(38578),o=e(55267),l=e(44142),p=e(63977);n.__exportStar(e(55267),t),n.__exportStar(e(63977),t),n.__exportStar(e(22914),t),n.__exportStar(e(44142),t);function v(m){return _=>{const s=m.get(r.AppConfig);let f;switch(_){case l.ESupportRuntime.Electron:f=m.get(p.ElectronConnectionHelper);break;case l.ESupportRuntime.Web:f=m.get(o.WebConnectionHelper,[{connectionPath:s.connectionPath,connectionProtocols:s.connectionProtocols}]);break;default:throw new Error(`Unknown backend type: ${_}`)}return f}}},6858:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RendererRuntime=t.EKnownResources=void 0;const n=e(85608),r=e(76003),o=e(11050),l=e(44142);var p;(function(m){m.OnigWasm="wasm:onig",m.TreeSitterWasmDirectory="wasm:tree-sitter"})(p||(t.EKnownResources=p={}));let v=class{mergeAppConfig(_){return _}async provideResourceUri(_){switch(_){case p.OnigWasm:return this.appConfig.onigWasmUri||l.onigWasmCDNUri;case p.TreeSitterWasmDirectory:return this.appConfig.treeSitterWasmDirectoryUri||(0,o.getTreeSitterWasmCDNUri)(this.appConfig.componentCDNType);default:throw new Error(`Unknown resource: ${_}`)}}};t.RendererRuntime=v,n.__decorate([(0,r.Autowired)(o.AppConfig),n.__metadata("design:type",Object)],v.prototype,"appConfig",void 0),t.RendererRuntime=v=n.__decorate([(0,r.Injectable)()],v)},37638:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AuthenticationContribution=void 0;const n=e(85608),r=e(76003),o=e(43718),l=e(66549);let p=class{onStart(){this.authenticationService.initialize()}registerCommands(m){m.registerCommand({id:o.noAccountsId,label:"%authentication.noAccounts%"},{execute:()=>{}})}};t.AuthenticationContribution=p,n.__decorate([(0,r.Autowired)(o.IAuthenticationService),n.__metadata("design:type",Object)],p.prototype,"authenticationService",void 0),t.AuthenticationContribution=p=n.__decorate([(0,o.Domain)(l.ClientAppContribution,o.CommandContribution)],p)},10605:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AuthenticationService=void 0;const n=e(85608),r=e(76003),o=e(43718),l=e(93899);let p=class extends o.Disposable{constructor(){super(...arguments),this._onDidRegisterAuthenticationProvider=this.registerDispose(new o.Emitter),this.onDidRegisterAuthenticationProvider=this._onDidRegisterAuthenticationProvider.event,this._onDidUnregisterAuthenticationProvider=this.registerDispose(new o.Emitter),this.onDidUnregisterAuthenticationProvider=this._onDidUnregisterAuthenticationProvider.event,this._onDidChangeSessions=this.registerDispose(new o.Emitter),this.onDidChangeSessions=this._onDidChangeSessions.event,this._authenticationProviders=new Map,this._signInRequestItems=new Map}async initialize(){this._storage=await this.getStorage(new o.URI("authentication").withScheme(o.STORAGE_SCHEMA.GLOBAL));const m=new Map;this.onDidChangeSessions(async _=>{if(_.event.added.length>0){const s=await this.getSessions(_.providerId);s.forEach(f=>{if(s.find(y=>m.get(y.id)))return;const a=new o.DisposableCollection,h=`account-sign-out-${_.providerId}-${f.id}`,u=this.commands.registerCommand({id:h,label:(0,o.formatLocalize)("authentication.signOut",_.label)},{execute:async()=>{await this.signOutOfAccount(_.providerId,f.account.label)}}),d=`manage-trusted-${_.providerId}-${f.id}`,E=this.commands.registerCommand({id:d,label:"%authentication.manageTrustedExtensions%"},{execute:async()=>{await this.manageTrustedExtensionsForAccount(_.providerId,f.account.label)}}),g=`${_.providerId}${f.account.label}`,c=this.menus.registerMenuItem(l.MenuId.AccountsContext,{submenu:g,label:`${f.account.label} (${_.label})`}),b=this.menus.registerMenuItems(g,[{command:d},{command:h}]);a.push(c),a.push(b),a.push(u),a.push(E),m.set(f.id,a)})}_.event.removed.length>0&&_.event.removed.forEach(s=>{const f=m.get(s.id);f&&(f.dispose(),m.delete(s.id))})})}get storage(){return this._storage}registerAuthenticationProvider(m,_){this._authenticationProviders.set(m,_),this._onDidRegisterAuthenticationProvider.fire({id:m,label:_.label}),this.updateAccountsMenuItem()}async sessionsUpdate(m,_){const s=this._authenticationProviders.get(m);s&&(this._onDidChangeSessions.fire({providerId:m,label:s.label,event:_}),await s.updateSessionItems(_),this.updateAccountsMenuItem(),_.added&&await this.updateNewSessionRequests(s))}async updateNewSessionRequests(m){const _=this._signInRequestItems.get(m.id);if(!_)return;const s=await m.getSessions();Object.keys(_).forEach(f=>{if(s.some(a=>a.scopes.slice().sort().join("")===f)){const a=_[f];a&&a.disposables.forEach(h=>h.dispose()),delete _[f],Object.keys(_).length===0?this._signInRequestItems.delete(m.id):this._signInRequestItems.set(m.id,_)}})}getTrustedKey(m,_){return`trusted-${m}-${_}`}async getAllowedExtensions(m,_){const s=this.getTrustedKey(m,_);let f=[];try{const a=await this.storage.get(s);a&&(f=JSON.parse(a))}catch(a){this.logger.warn("read allow extensions error: "+a)}return f}async setAllowedExtensions(m,_,s){const f=this.getTrustedKey(m,_);await this.storage.set(f,JSON.stringify(s))}async removeAllowedExtensions(m,_){const s=this.getTrustedKey(m,_);await this.storage.delete(s)}async updatedAllowedExtension(m,_,s,f,a){const h=await this.getAllowedExtensions(m,_),u=h.findIndex(d=>d.id===s);u===-1?h.push({id:s,name:f,allowed:a}):h[u].allowed=a,await this.setAllowedExtensions(m,_,h)}async isAccessAllowed(m,_,s){const a=(await this.getAllowedExtensions(m,_)).find(h=>h.id===s);return a?a.allowed!==void 0?a.allowed:!0:!1}async tryActivateProvider(m){await this.eventBus.fireAndAwait(new o.ExtensionActivateEvent({topic:"onView",data:m}));let _=this._authenticationProviders.get(m);if(_)return _;const s=new Promise((a,h)=>{this.onDidRegisterAuthenticationProvider(u=>{if(u.id===m)if(_=this._authenticationProviders.get(m),_)a(_);else throw new Error(`No authentication provider '${m}' is currently registered.`)})}),f=new Promise((a,h)=>{setTimeout(()=>{h(new Error(`didRegister ${m} timeout`))},5e3)});return Promise.race([s,f])}async getSessions(m,_,s,f){try{return await(this._authenticationProviders.get(m)||await this.tryActivateProvider(m)).getSessions(_,f)}catch{throw new Error(`No authentication provider '${m}' is currently registered.`)}}isAuthenticationProviderRegistered(m){return this._authenticationProviders.has(m)}getProviderIds(){const m=[];return this._authenticationProviders.forEach(_=>{m.push(_.id)}),m}unregisterAuthenticationProvider(m){const _=this._authenticationProviders.get(m);_&&(_.dispose(),this._authenticationProviders.delete(m),this._onDidUnregisterAuthenticationProvider.fire({id:m,label:_.label}),this.updateAccountsMenuItem())}updateAccountsMenuItem(){let m=!1;this._authenticationProviders.forEach(_=>{m=m||_.hasSessions()}),m&&this._noAccountsMenuItem&&(this._noAccountsMenuItem.dispose(),this._noAccountsMenuItem=void 0),!m&&!this._noAccountsMenuItem&&(this._noAccountsMenuItem=this.menus.registerMenuItem(l.MenuId.AccountsContext,{group:"0_accounts",command:o.noAccountsId}))}async requestNewSession(m,_,s,f,a){let h=this._authenticationProviders.get(m);if(h||await new Promise((u,d)=>{this.onDidRegisterAuthenticationProvider(E=>{E.id===m&&(h=this._authenticationProviders.get(m),u())})}),h){const u=this._signInRequestItems.get(m),d=_.sort().join("");if(u&&u[d]&&u[d].requestingExtensionIds.includes(f))return;const g=this.commands.registerCommand({id:`${f}signIn`,label:(0,o.formatLocalize)("authentication.signInRequests",a)},{execute:async()=>{const b=await this.login(m,_,s),y=b.account.label,S=await this.getAllowedExtensions(m,y);S.find(A=>A.id===f)||(S.push({id:f,name:a}),await this.setAllowedExtensions(m,y,S)),await this.setExtensionSessionId(a,m,b.id)}}),c=this.menus.registerMenuItem(l.MenuId.AccountsContext,{group:"2_signInRequests",command:`${f}signIn`});if(u){const b=u[d]||{disposables:[],requestingExtensionIds:[]};u[d]={disposables:[...b.disposables,c,g],requestingExtensionIds:[...b.requestingExtensionIds,f]},this._signInRequestItems.set(m,u)}else this._signInRequestItems.set(m,{[d]:{disposables:[c,g],requestingExtensionIds:[f]}})}}getLabel(m){const _=this._authenticationProviders.get(m);if(_)return _.label;throw new Error(`No authentication provider '${m}' has been declared.`)}supportsMultipleAccounts(m){const _=this._authenticationProviders.get(m);if(_)return _.supportsMultipleAccounts;throw new Error(`No authentication provider '${m}' is currently registered.`)}async login(m,_,s){try{return await(this._authenticationProviders.get(m)||await this.tryActivateProvider(m)).login(_,s)}catch(f){throw new Error(`No authentication provider '${m}' is currently registered, error messge: ${f.message}`)}}logout(m,_){const s=this._authenticationProviders.get(m);if(s)return s.logout(_);throw new Error(`No authentication provider '${m}' is currently registered.`)}manageTrustedExtensionsForAccount(m,_){const s=this._authenticationProviders.get(m);if(s)return s.manageTrustedExtensions(_);throw new Error(`No authentication provider '${m}' is currently registered.`)}signOutOfAccount(m,_){const s=this._authenticationProviders.get(m);if(s)return s.signOut(_);throw new Error(`No authentication provider '${m}' is currently registered.`)}getUsagesKey(m,_){return`usages-${m}-${_}`}async getAccountUsages(m,_){const s=this.getUsagesKey(m,_),f=await this.storage.get(s);let a=[];if(f)try{a=JSON.parse(f)}catch(h){this.logger.warn("parse account usages error: "+h)}return a}async addAccountUsage(m,_,s,f){const a=this.getUsagesKey(m,_),h=await this.getAccountUsages(m,_),u=h.findIndex(d=>d.extensionId===s);u>-1?h.splice(u,1,{extensionId:s,extensionName:f,lastUsed:Date.now()}):h.push({extensionId:s,extensionName:f,lastUsed:Date.now()}),await this.storage.set(a,JSON.stringify(h))}async removeAccountUsage(m,_){const s=this.getUsagesKey(m,_);await this.storage.delete(s)}getExtensionSessionIdKey(m,_){return`session-${m}-${_}`}async getExtensionSessionId(m,_){const s=this.getExtensionSessionIdKey(m,_);return await this.storage.get(s)}async setExtensionSessionId(m,_,s){const f=this.getExtensionSessionIdKey(m,_);await this.storage.set(f,s)}async removeExtensionSessionId(m,_){const s=this.getExtensionSessionIdKey(m,_);await this.storage.delete(s)}};t.AuthenticationService=p,n.__decorate([(0,r.Autowired)(o.ILogger),n.__metadata("design:type",Object)],p.prototype,"logger",void 0),n.__decorate([(0,r.Autowired)(o.StorageProvider),n.__metadata("design:type",Function)],p.prototype,"getStorage",void 0),n.__decorate([(0,r.Autowired)(o.IEventBus),n.__metadata("design:type",Object)],p.prototype,"eventBus",void 0),n.__decorate([(0,r.Autowired)(l.IMenuRegistry),n.__metadata("design:type",l.IMenuRegistry)],p.prototype,"menus",void 0),n.__decorate([(0,r.Autowired)(o.CommandRegistry),n.__metadata("design:type",Object)],p.prototype,"commands",void 0),t.AuthenticationService=p=n.__decorate([(0,r.Injectable)()],p)},72746:(x,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},33916:(x,t,e)=>{"use strict";var n;n={value:!0},t.j=void 0,e(37533);const r=e(76003),o=e(43718),l=e(4588),p=e(37406),v=e(16884),m=e(18379),_=e(41320),s=e(59574),f=e(6858),a=e(36206),h=e(66963),u=e(18193),d=e(41118),E=e(1149),g=e(11949),c=e(64102),b=e(78132),y=e(11050),S=e(67304),A=e(79951),w=e(79248),T=e(96302),D=e(71843);e(99696);class I{constructor(M){var O,P,k;this.opts=M,this.appInitialized=new o.Deferred,this.browserModules=[],this._disposables=new o.DisposableCollection,this._inComposition=!1,this._handleBeforeUpload=K=>{if(this.config.isElectronRenderer){if(this.stateService.state==="electron_confirmed_close")return;K.returnValue="",K.preventDefault(),this.stateService.state!=="electron_asking_close"&&(this.stateService.state="electron_asking_close",this.preventStopElectron().then(Z=>{if(Z)this.stateService.state="ready";else return this.stopContributionsElectron().then(()=>{this.stateService.state="electron_confirmed_close";const Q=this.injector.get(p.IElectronMainLifeCycleService);setTimeout(()=>{Q.closeWindow(A.electronEnv.currentWindowId)},0)})}))}else if(this.preventStop())return(K||window.event).returnValue=!0,!0},this._handleUnload=()=>{this.stateService.state="closing_window",this.config.isElectronRenderer||(this.disposeSideEffect(),this.stopContributions())},this._handleResize=()=>{},this._handleKeydown=K=>{K&&K.target.name!==d.NO_KEYBINDING_NAME&&!this._inComposition&&this.keybindingService.run(K)},this._handleKeyup=K=>{this.keybindingService.resolveModifierKey(K)},this._handleCompositionstart=()=>{this._inComposition=!0},this._handleCompositionend=()=>{this._inComposition=!1},this._handleWheel=()=>{};const{modules:F,contributions:L,iconStyleSheets:B,useCdnIcon:j,editorBackgroundImage:W,defaultPreferences:U,allowSetDocumentTitleFollowWorkspaceDir:X=!0,...V}=M;this.initEarlyPreference(M.workspaceDir||"");const $=(0,b.getPreferenceLanguageId)(U);(0,o.setLanguageId)($),this.injector=M.injector||new r.Injector,this.modules=F,this.modules.forEach(K=>this.resolveModuleDeps(K)),this.browserModules=M.modulesInstances||[];const Y=(O=M.isElectronRenderer)!==null&&O!==void 0?O:this.detectRuntime()===m.ESupportRuntime.Electron;this.config={appName:l.DEFAULT_APPLICATION_NAME,appHost:Y?l.DEFAULT_APPLICATION_DESKTOP_HOST:l.DEFAULT_APPLICATION_WEB_HOST,appRoot:M.appRoot||"",uriScheme:l.DEFAULT_URI_SCHEME,...V,isElectronRenderer:Y,workspaceDir:M.workspaceDir||"",extensionDir:M.extensionDir||"",injector:this.injector,wsPath:M.wsPath||`ws://${window.location.hostname}:8000`,layoutConfig:M.layoutConfig,editorBackgroundImage:M.editorBackgroundImage||W,allowSetDocumentTitleFollowWorkspaceDir:X,devtools:(P=M.devtools)!==null&&P!==void 0?P:!1,rpcMessageTimeout:M.rpcMessageTimeout||-1},this.config.connectionPath=M.connectionPath||`${this.config.wsPath}/service`;const z=this.injector.get(E.LayoutViewSizeConfig);z.init(M.layoutViewSize),this.config.layoutViewSize=z,this.injector.get(E.DesignLayoutConfig).setLayout(M.designLayout,(k=M.AINativeConfig)===null||k===void 0?void 0:k.layout),this.injector.addProviders({token:a.IClientApp,useValue:this}),this.injector.addProviders({token:y.AppConfig,useValue:this.config}),this.runtime=Y?this.injector.get(s.ElectronRendererRuntime):this.injector.get(_.BrowserRuntime),this.injector.addProviders({token:f.RendererRuntime,useValue:this.runtime}),this.config.devtools&&(window.__OPENSUMI_DEVTOOLS_GLOBAL_HOOK__={}),M.extensionDevelopmentPath&&(this.config.extensionCandidate=(this.config.extensionCandidate||[]).concat(Array.isArray(M.extensionDevelopmentPath)?M.extensionDevelopmentPath.map(K=>(0,o.asExtensionCandidate)(K,!0)):[(0,o.asExtensionCandidate)(M.extensionDevelopmentPath,!0)]),this.config.extensionDevelopmentHost=!0),this.config=this.runtime.mergeAppConfig(this.config),L&&this.injector.addProviders(...L),this.initBaseProvider(),this.initFields(),this.appendIconStyleSheets(B,j),this.createBrowserModules(U)}resolveModuleDeps(M){const O=Reflect.getMetadata("dependencies",M);O&&O.forEach(P=>{this.modules.indexOf(P)===-1&&this.modules.push(P)})}get lifeCycleService(){return this.injector.get(o.AppLifeCycleServiceToken)}async start(M,O,P){const F=this.injector.get(o.IReporterService).time(o.REPORT_NAME.MEASURE);this.lifeCycleService.phase=1,P?(console.error("You're using deprecated method 'start()' with connection parameter"),console.error("We introduced a new connection service to replace the old one"),(0,T.bindConnectionServiceDeprecated)(this.injector,this.modules,P)):O&&await this.createConnection(O),F.timeEnd("ClientApp.createConnection"),this.logger=this.injector.get(o.ILogger),this.stateService.state="client_connected",this.registerEventListeners(),await this.injector.get(o.IApplicationService).initializeData(),await this.measure("Contributions.start",()=>this.startContributions(M)),this.stateService.state="started_contributions",this.stateService.state="ready",this.lifeCycleService.phase=4,F.timeEnd("Framework.ready")}async createConnection(M){(await this.injector.get(m.ConnectionHelperFactory)(M).createRPCServiceChannel(this.modules)).onReopen(()=>{this.onReconnectContributions()})}onReconnectContributions(){const M=this.contributions;for(const O of M)O.onReconnect&&O.onReconnect(this)}initBaseProvider(){(0,D.injectInnerProviders)(this.injector),this.runtime.registerRuntimeInnerProviders(this.injector)}initFields(){this.contributionsProvider=this.injector.get(h.ClientAppContribution),this.commandRegistry=this.injector.get(o.CommandRegistry),this.keybindingRegistry=this.injector.get(d.KeybindingRegistry),this.keybindingService=this.injector.get(d.KeybindingService),this.stateService=this.injector.get(v.ClientAppStateService),this.nextMenuRegistry=this.injector.get(c.IMenuRegistry)}createBrowserModules(M){const O=this.injector;for(const P of this.modules){const k=O.get(P);this.browserModules.push(k),k.providers&&this.injector.addProviders(...k.providers),this.runtime.registerRuntimeModuleProviders(this.injector,k),k.preferences&&k.preferences(this.injector)}(0,u.injectCorePreferences)(this.injector),this.injectPreferenceService(this.injector,M),this.injectStorageProvider(this.injector);for(const P of this.browserModules)if(P.contributionProvider)if(Array.isArray(P.contributionProvider))for(const k of P.contributionProvider)(0,o.createContributionProvider)(this.injector,k);else(0,o.createContributionProvider)(this.injector,P.contributionProvider)}get contributions(){return this.contributionsProvider.getContributions()}async startContributions(M){await this.measure("RenderApp.render",()=>this.renderApp(M)),this.lifeCycleService.phase=2,await this.measure("Contributions.initialize",()=>this.initializeContributions()),await this.initializeCoreRegistry(),this.stateService.state="core_module_initialized",this.lifeCycleService.phase=3,await this.measure("Contributions.onStart",()=>this.onStartContributions()),await this.runContributionsPhase(this.contributions,"onDidStart")}async initializeCoreRegistry(){this.commandRegistry.initialize(),await this.keybindingRegistry.initialize(),this.nextMenuRegistry.initialize()}async initializeContributions(){await this.runContributionsPhase(this.contributions,"initialize"),this.appInitialized.resolve(),this.logger.verbose("contributions.initialize done")}async onStartContributions(){await this.runContributionsPhase(this.contributions,"onStart")}async runContributionsPhase(M,O){return await Promise.all(M.map(P=>this.contributionPhaseRunner(P,O)))}async contributionPhaseRunner(M,O){const P=M[O];if(typeof P=="function")try{const k=M.constructor.name+"."+O;return await this.measure(k,()=>P.call(M,this))}catch(k){this.logger.error(`Could not run contribution#${O}`,k)}}async renderApp(M){await(0,w.renderClientApp)(this,M),this.injector.get(o.IEventBus).fire(new g.RenderedEvent)}async measure(M,O){const k=this.injector.get(o.IReporterService).time(o.REPORT_NAME.MEASURE),F=await O();return k.timeEnd(M),F}preventStop(){const O=this.injector.get(u.CorePreferences)["application.confirmExit"];if(O==="never")return!1;for(const P of this.contributions)if(P.onWillStop)try{if(P.onWillStop(this))return!0}catch(k){(0,o.getDebugLogger)().error(k)}return O==="always"}async preventStopElectron(){if(this.injector.get(u.CorePreferences)["application.confirmExit"]==="never")return!1;for(const P of this.contributions)if(P.onWillStop)try{if(await P.onWillStop(this))return!0}catch(k){(0,o.getDebugLogger)().error(k)}return!1}stopContributions(){for(const M of this.contributions)if(M.onStop)try{M.onStop(this)}catch(O){this.logger.error("Could not stop contribution",O)}}async stopContributionsElectron(){const M=[];for(const O of this.contributions)O.onStop&&M.push((async()=>{try{await O.onStop(this)}catch(P){this.logger.error("Could not stop contribution",P)}})());await Promise.all(M)}registerEventListeners(){window.addEventListener("beforeunload",this._handleBeforeUpload),window.addEventListener("unload",this._handleUnload),window.addEventListener("resize",this._handleResize),window.addEventListener("compositionstart",this._handleCompositionstart),window.addEventListener("compositionend",this._handleCompositionend),window.addEventListener("keydown",this._handleKeydown,!0),window.addEventListener("keyup",this._handleKeyup,!0),o.isOSX&&document.body.addEventListener("wheel",this._handleWheel,{passive:!1})}injectPreferenceService(M,O){const P=()=>k=>{const F=M.get(b.PreferenceProvider,{tag:k});return F.asScope(k),F};if((0,b.injectPreferenceConfigurations)(M),(0,b.injectPreferenceSchemaProvider)(M),M.addProviders({token:b.PreferenceProviderProvider,useFactory:P},{token:b.PreferenceService,useClass:b.PreferenceServiceImpl}),O){const F=M.get(b.PreferenceProviderProvider)(b.PreferenceScope.Default);for(const L of Object.keys(O))F.setPreference(L,O[L])}}injectStorageProvider(M){M.addProviders({token:o.DefaultStorageProvider,useClass:o.DefaultStorageProvider}),M.addProviders({token:o.StorageProvider,useFactory:O=>P=>O.get(o.DefaultStorageProvider).get(P)}),(0,o.createContributionProvider)(M,o.StorageResolverContribution)}fireOnReload(M=!1){window.location.reload(M)}appendIconStyleSheets(M,O){const P=O?[S.DEFAULT_CDN_ICON,S.IDE_OCTICONS_CN_CSS,S.IDE_CODICONS_CN_CSS]:[];M&&M.length&&M.forEach(k=>{this.updateIconMap(k.prefix,k.iconMap),P.push(k.cssPath)});for(const k of P){const F=document.createElement("link");F.setAttribute("rel","stylesheet"),F.setAttribute("href",k),document.getElementsByTagName("head")[0].appendChild(F)}}updateIconMap(M,O){M==="kaitian-icon kticon-"&&this.logger.error(`The icon prefix '${M}' conflicts with the built-in icon, please check the icon configuration.`),(0,S.updateIconMap)(M,O)}initEarlyPreference(M){this._disposables.push((0,b.registerLocalStorageProvider)(o.GeneralSettingsId.Theme,M)),this._disposables.push((0,b.registerLocalStorageProvider)(o.GeneralSettingsId.Icon,M)),this._disposables.push((0,b.registerLocalStorageProvider)(o.GeneralSettingsId.Language,M))}async dispose(){window.removeEventListener("beforeunload",this._handleBeforeUpload),window.removeEventListener("unload",this._handleUnload),window.removeEventListener("resize",this._handleResize),window.removeEventListener("compositionstart",this._handleCompositionstart),window.removeEventListener("compositionend",this._handleCompositionend),window.removeEventListener("keydown",this._handleKeydown,!0),o.isOSX&&document.body.removeEventListener("wheel",this._handleWheel),this._disposables.dispose(),this.disposeSideEffect()}disposeSideEffect(){for(const M of this.contributions)if(M.onDisposeSideEffects)try{M.onDisposeSideEffects(this)}catch(O){this.logger.error("Could not dispose contribution",O)}}detectRuntime(){return window.isElectronRenderer||typeof navigator=="object"&&typeof navigator.userAgent=="string"&&navigator.userAgent.indexOf("Electron")>=0?m.ESupportRuntime.Electron:m.ESupportRuntime.Web}}t.j=I},79248:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.App=u,t.renderClientApp=g;const n=e(85608),r=n.__importDefault(e(14041)),o=n.__importDefault(e(25873)),l=e(97267),p=e(43718),v=e(28003),m=e(68456),_=e(11050),s=e(52564),f=e(26542),a=e(67304),h=e(75206);function u(c){const b=c.app.injector,y=b.get(p.IEventBus),S=b.get(f.LabelService),A=r.default.useCallback((w,T)=>S.getIcon(p.URI.parse(w),T),[]);return r.default.useEffect(()=>{let w;const T=()=>{w&&window.cancelAnimationFrame(w),w=window.requestAnimationFrame(()=>{w=null,s.allSlot.forEach(D=>{y.fire(new m.ResizeEvent({slotLocation:D.slot})),y.fireDirective(m.ResizeEvent.createDirective(D.slot))})})};return window.addEventListener("resize",T),()=>{window.removeEventListener("resize",T)}},[]),r.default.createElement(l.ComponentContextProvider,{value:{getIcon:a.getIcon,localize:p.localize,getResourceIcon:A}},r.default.createElement(_.ConfigProvider,{value:c.app.config},r.default.createElement(c.main,{callback:c.callback}),c.overlays&&c.overlays.map((w,T)=>r.default.createElement(w,{key:T}))))}const d=c=>b=>{o.default.createRoot(c).render(r.default.createElement(b,null))},E=(0,p.getDebugLogger)();function g(c,b){let y=c.config.layoutComponent||v.DefaultLayout;const S=c.browserModules.filter(R=>R.isOverlay).map(R=>R.component?R.component:(E.warn("Overlay module does not have component",R),null)).filter(Boolean),A=c.injector;A.get(h.ClientAppContextContribution).getContributions().forEach(R=>y=R.registerClientAppContext(y,A));const D=R=>r.default.createElement(u,{...R,app:c,main:y,overlays:S});return(typeof b=="function"?b:d(b))(D)}},96302:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createConnectionService=m,t.bindConnectionServiceDeprecated=_;const n=e(8919),r=e(18740),o=e(76271),l=e(43718),p=e(16884),v=e(11050);async function m(f,a,h,u={}){var d;const E=f.get(v.AppConfig),g=f.get(l.IReporterService);h.setReporter(g);const c=f.get(l.IEventBus),b=f.get(p.ClientAppStateService),y=()=>{b.reachedState("core_module_initialized").then(()=>{c.fire(new l.BrowserConnectionOpenEvent)})};h.connection.isOpen()&&y(),h.connection.onOpen(()=>{y()}),h.connection.onClose(()=>{b.reachedState("core_module_initialized").then(()=>{c.fire(new l.BrowserConnectionCloseEvent)})}),h.connection.onError(T=>{b.reachedState("core_module_initialized").then(()=>{c.fire(new l.BrowserConnectionErrorEvent(T))})}),await h.initHandler(),f.addProviders({token:r.WSChannelHandler,useValue:h});const S=await h.openChannel(o.RPCServiceChannelPath),A=new n.RPCServiceCenter;return A.setSumiConnection(S.createSumiConnection(u)),!((d=E?.measure)===null||d===void 0)&&d.connection&&A.setReporter(g,E.measure.connection.minimumReportThresholdTime),s(f,a,A),f.get(l.ILogger).reportToServer(),S}function _(f,a,h){const u=new n.RPCServiceCenter,d=u.setConnection(h),E=h.onClose(()=>{d.dispose(),E.dispose()});s(f,a,u)}function s(f,a,h){const{getRPCService:u}=(0,n.initRPCService)(h),d=[],E=[];for(const g of a){const c=f.get(g);if(c.backServices)for(const b of c.backServices)d.push(b),b.protocol&&h.loadProtocol(b.protocol)}for(const g of d){const{servicePath:c}=g,b=u(c),y={token:c,useValue:b};f.addProviders(y),g.clientToken&&E.push(g)}for(const g of E){const{servicePath:c}=g,b=u(c);if(g.clientToken){const y=f.get(g.clientToken);b.onRequestService(y)}}}},75206:(x,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ClientAppContextContribution=void 0,t.ClientAppContextContribution=Symbol("ClientAppContextContribution")},32796:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(85608);n.__exportStar(e(72746),t),n.__exportStar(e(79248),t),n.__exportStar(e(96302),t),n.__exportStar(e(75206),t)},71843:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.injectInnerProviders=Y;const n=e(43718),r=e(96405),o=e(16872),l=e(41480),p=e(12956),v=e(59555),m=e(18379),_=e(10605),s=e(66963),f=e(71707),a=e(80832),h=e(23396),u=e(77273),d=e(41118),E=e(37015),g=e(68456),c=e(75694),b=e(93899),y=e(77666),S=e(90697),A=e(73967),w=e(78132),T=e(68969),D=e(11719),I=e(52564),R=e(26542),M=e(52993),O=e(10845),P=e(40827),k=e(32242),F=e(99e3),L=e(42637),B=e(62652),j=e(27957),W=e(45670),U=e(66894),X=e(63921),V=e(75206),$=e(82493);function Y(z){(0,n.createContributionProvider)(z,s.ClientAppContribution),(0,n.createContributionProvider)(z,n.CommandContribution),(0,n.createContributionProvider)(z,u.FsProviderContribution),(0,n.createContributionProvider)(z,d.KeybindingContribution),(0,n.createContributionProvider)(z,b.MenuContribution),(0,n.createContributionProvider)(z,g.ComponentContribution),(0,n.createContributionProvider)(z,I.SlotRendererContribution),(0,n.createContributionProvider)(z,w.PreferenceContribution),(0,n.createContributionProvider)(z,W.VariableContribution),(0,n.createContributionProvider)(z,g.TabBarToolbarContribution),(0,n.createContributionProvider)(z,L.ToolBarActionContribution),(0,n.createContributionProvider)(z,k.StaticResourceContribution),(0,n.createContributionProvider)(z,V.ClientAppContextContribution);const H=[{token:n.IEventBus,useClass:n.EventBusImpl},{token:n.CommandService,useClass:n.CommandServiceImpl},{token:n.CommandRegistry,useClass:n.CommandRegistryImpl},{token:d.KeybindingRegistry,useClass:d.KeybindingRegistryImpl},{token:d.KeybindingService,useFactory:K=>K.get(d.KeybindingRegistry)},{token:o.KeyboardNativeLayoutService,useClass:E.BrowserKeyboardLayoutImpl},{token:o.KeyboardLayoutChangeNotifierService,useFactory:K=>K.get(o.KeyboardNativeLayoutService)},{token:E.KeyValidator,useFactory:K=>K.get(o.KeyboardNativeLayoutService)},p.ClientAppStateService,{token:c.ILogger,useClass:c.Logger},{token:c.Logger,useAlias:c.ILogger},{token:g.ComponentRegistry,useClass:g.ComponentRegistryImpl},{token:W.VariableRegistry,useClass:W.VariableRegistryImpl},{token:b.AbstractMenuService,useClass:b.MenuServiceImpl},{token:b.AbstractContextMenuService,useClass:b.ContextMenuServiceImpl},{token:b.IMenuRegistry,useClass:b.MenuRegistryImpl},{token:y.IToolbarActionService,useClass:y.ToolbarActionService},{token:b.AbstractMenubarService,useClass:b.MenubarServiceImpl},{token:n.IReporter,useClass:n.DefaultReporter},{token:n.IReporterService,useClass:n.ReporterService},{token:n.ReporterMetadata,useValue:{host:n.REPORT_HOST.BROWSER}},{token:T.IProgressService,useClass:D.ProgressService},{token:L.IToolbarRegistry,useClass:j.NextToolbarRegistryImpl},{token:L.IToolbarPopoverRegistry,useClass:B.ToolbarPopoverRegistry},j.ToolbarClientAppContribution,{token:n.IProblemPatternRegistry,useClass:n.ProblemPatternRegistryImpl},{token:n.IProblemMatcherRegistry,useClass:n.ProblemMatchersRegistryImpl},{token:n.ITaskDefinitionRegistry,useClass:n.TaskDefinitionRegistryImpl},{token:S.IOpenerService,useClass:A.OpenerService},{token:U.IWindowService,useClass:X.WindowService},{token:n.IApplicationService,useClass:v.ApplicationService},{token:M.IClipboardService,useClass:M.BrowserClipboardService},{token:O.IExternalUriService,useClass:O.ExternalUriService},{token:n.IAuthenticationService,useClass:_.AuthenticationService},{token:R.ICryptoService,useClass:R.CryptoService},{token:R.ICredentialsService,useClass:R.CredentialsService},{token:r.IHashCalculateService,useClass:r.HashCalculateServiceImpl},{token:n.IExtensionsSchemaService,useClass:h.ExtensionsPointServiceImpl},{token:n.AppLifeCycleServiceToken,useClass:$.AppLifeCycleService},{token:k.StaticResourceService,useClass:F.StaticResourceServiceImpl},P.StaticResourceClientAppContribution,{token:f.ISplitPanelService,useClass:f.SplitPanelService},{token:n.IAIReporter,useClass:l.AIReporter},{token:a.IDesignStyleService,useClass:a.DesignStyleService},{token:m.ConnectionHelperFactory,useFactory:m.ConnectionHelperFactory}];z.addProviders(...H)}},82493:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AppLifeCycleService=void 0;const n=e(85608),r=e(76003),o=e(43718);let l=class{constructor(){this.onDidChangeLifecyclePhaseEmitter=new o.Emitter,this.onDidLifeCyclePhaseChange=this.onDidChangeLifecyclePhaseEmitter.event}set phase(v){this.lifeCyclePhase=v,this.onDidChangeLifecyclePhaseEmitter.fire(this.lifeCyclePhase)}get phase(){return this.lifeCyclePhase}};t.AppLifeCycleService=l,t.AppLifeCycleService=l=n.__decorate([(0,r.Injectable)()],l)},99696:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=e(85608).__importDefault(e(99126));typeof window.ResizeObserver>"u"&&(window.ResizeObserver=r.default)},36206:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BrowserModule=t.IClientApp=void 0;const n=e(85608),r=e(76003),o=e(43718);t.IClientApp=Symbol("CLIENT_APP_TOKEN");class l extends o.BasicModule{}t.BrowserModule=l,n.__decorate([(0,r.Autowired)(t.IClientApp),n.__metadata("design:type",Object)],l.prototype,"app",void 0)},14109:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MERGE_CONFLICT_COMMANDS=t.SCM_COMMANDS=t.QUICK_OPEN_COMMANDS=t.MARKER_COMMANDS=t.LAYOUT_COMMANDS=t.TERMINAL_COMMANDS=t.DIALOG_COMMANDS=t.KEYBOARD_COMMANDS=t.WORKSPACE_COMMANDS=t.OUTLINE_COMMANDS=t.SEARCH_COMMANDS=t.DIFF_EDITOR_COMMANDS=t.EDITOR_COMMANDS=t.COMMON_COMMANDS=t.OPEN_EDITORS_COMMANDS=t.FILE_COMMANDS=void 0;const n=e(67304);var r;(function(b){const y="file";b.NEW_FILE={id:"file.new",category:y,iconClass:(0,n.getIcon)("new-file")},b.RENAME_FILE={id:"file.rename",category:y},b.DELETE_FILE={id:"file.delete",category:y},b.NEW_FOLDER={id:"file.folder.new",category:y,iconClass:(0,n.getIcon)("new-folder")},b.COMPARE_SELECTED={id:"file.compare",category:y},b.OPEN_FILE={id:"file.open",category:y},b.SAVE_FILE={id:"file.save",category:y},b.COLLAPSE_ALL={id:"filetree.collapse.all",category:y,iconClass:(0,n.getIcon)("collapse-all")},b.REFRESH_ALL={id:"filetree.refresh.all",category:y,iconClass:(0,n.getIcon)("refresh")},b.OPEN_RESOURCES={id:"filetree.open.file",category:y},b.OPEN_TO_THE_SIDE={id:"filetree.open.side",category:y},b.OPEN_TYPE_WITH={id:"filetree.open.with",category:y},b.COPY_PATH={id:"filetree.copy.path",category:y,label:"%file.copy.path%"},b.COPY_RELATIVE_PATH={id:"filetree.copy.relativepath",category:y},b.COPY_FILE={id:"filetree.copy.file",category:y},b.CUT_FILE={id:"filetree.cut.file",category:y},b.PASTE_FILE={id:"filetree.paste.file",category:y},b.SELECT_CURRENT_NODE={id:"filetree.selectCurrentNode",category:y},b.LOCATION={id:"filetree.location",category:y},b.LOCATION_WITH_EDITOR={id:"filetree.location_with_editor",category:y,iconClass:(0,n.getIcon)("focus")},b.OPEN_FOLDER={id:"filetree.open.folder",category:y,label:"%file.open.folder%"},b.VSCODE_OPEN_FOLDER={id:"filetree.open.vscode_open_folder",category:y},b.OPEN_WORKSPACE={id:"filetree.open.workspace",category:y,label:"%file.open.workspace%"},b.SEARCH_ON_FOLDER={id:"filetree.search.folder",category:y},b.FOCUS_FILES={id:"filetree.focus.files",category:y,label:"%file.focus.files%"},b.FILTER_TOGGLE={id:"filetree.files.filter_toggle",category:y,iconClass:(0,n.getIcon)("retrieval")},b.FILTER_OPEN={id:"filetree.files.filter_open",category:y},b.OPEN_TERMINAL_WITH_PATH={id:"filetree.openTerminalWithPath",category:y},b.FILTER_CLOSE={id:"filetree.quitFilterMode",category:y},b.NEXT={id:"filetree.next",category:y},b.PREV={id:"filetree.prev",category:y},b.COLLAPSE={id:"filetree.collapse",category:y},b.EXPAND={id:"filetree.expand",category:y},b.REVEAL_IN_EXPLORER={id:"filetree.revealInExplorer",category:y},b.TOGGLE_OR_OPEN={id:"filetree.toggleOrOpen",category:y}})(r||(t.FILE_COMMANDS=r={}));var o;(function(b){const y="openeditors";b.SAVE_ALL={id:"opened.editors.save.all",category:y,iconClass:(0,n.getIcon)("save-all")},b.CLOSE_ALL={id:"opened.editors.close.all",category:y,iconClass:(0,n.getIcon)("close-all")},b.SAVE_BY_GROUP={id:"opened.editors.save.byGroup"},b.CLOSE_BY_GROUP={id:"opened.editors.close.byGroup"},b.OPEN={id:"opened.editors.open",category:y},b.CLOSE={id:"opened.editors.close",category:y},b.OPEN_TO_THE_SIDE={id:"opened.editors.openToTheSide",category:y},b.COMPARE_SELECTED={id:"opened.editors.compare",category:y},b.COPY_RELATIVE_PATH={id:"opened.editors.copyRelativePath",category:y},b.COPY_PATH={id:"opened.editors.copyPath",category:y},b.LOCATION={id:"opened.editors.location",category:y}})(o||(t.OPEN_EDITORS_COMMANDS=o={}));var l;(function(b){b.FIND={id:"core.find",label:"%common.find%"},b.REPLACE={id:"core.replace",label:"%common.replace%"},b.ABOUT_COMMAND={id:"core.about",label:"%common.about%"},b.OPEN_PREFERENCES={id:"core.openpreference",label:"%common.preference.open%"},b.LOCATE_PREFERENCES={id:"workbench.preferences.locate"},b.OPEN_KEYMAPS={id:"core.keymaps.open",label:"%common.keymaps.open%"},b.OPEN_LAUNCH_CONFIGURATION={id:"core.launchConfiguration.open",label:"%debug.action.open.configuration%"},b.ENVIRONMENT_VARIABLE={id:"core.environment.variable"}})(l||(t.COMMON_COMMANDS=l={}));var p;(function(b){const y="editor";b.API_OPEN_EDITOR_COMMAND_ID="_workbench.open",b.API_OPEN_DIFF_EDITOR_COMMAND_ID="_workbench.diff",b.API_OPEN_WITH_EDITOR_COMMAND_ID="_workbench.openWith",b.NEW_UNTITLED_FILE={id:"file.new.untitled",category:y,label:"%file.new%",iconClass:(0,n.getIcon)("new-file")},b.UNDO={id:"editor.undo",category:y,label:"%editor.undo%"},b.REDO={id:"editor.redo",category:y,label:"%editor.redo%"},b.SELECT_ALL={id:"editor.selectAll",category:y,label:"%selection.all%"},b.OPEN_RESOURCE={id:"editor.openUri",category:y},b.OPEN_RESOURCES={id:"editor.openUris",category:y},b.SAVE_URI={id:"editor.saveUri",category:y},b.SAVE_CURRENT={id:"editor.saveCurrent",category:y,label:"%editor.saveCurrent%"},b.FOCUS_IF_NOT_ACTIVATE_ELEMENT={id:"editor.focusIfNotActivateElement",category:y,label:"%editor.saveCurrent%"},b.COMPARE={id:"editor.compare",category:y},b.OPEN_MERGEEDITOR={id:"editor.open.mergeEditor",category:y},b.OPEN_MERGEEDITOR_DEV={id:"editor.open.mergeEditor.dev",category:"Merge Editor (Dev)",label:"Open Merge Editor State from Json"},b.MERGEEDITOR_RESET={id:"editor.mergeEditor.reset",category:y,label:"%mergeEditor.reset%"},b.CLOSE={id:"editor.close",category:y,label:"%editor.closeCurrent%"},b.CLOSE_ALL_IN_GROUP={id:"editor.closeAllInGroup",category:y,label:"%editor.closeAllInGroup%"},b.CLOSE_OTHER_IN_GROUP={id:"editor.closeOtherEditorsInGroup",category:y,label:"%editor.closeOtherEditors%"},b.CLOSE_ALL={id:"editor.closeAll",category:y,label:"%editor.close.all%"},b.CLOSE_SAVED={id:"editor.closeSaved",category:y,label:"%editor.closeSaved%"},b.SAVE_ALL={id:"editor.saveAll",category:y,label:"%editor.saveAll%"},b.CLOSE_TO_RIGHT={id:"editor.closeToRight",category:y,label:"%editor.closeToRight%"},b.GET_CURRENT={id:"editor.getCurrent",category:y},b.GET_CURRENT_RESOURCE={id:"editor.getCurrentResource",category:y},b.SPLIT_TO_LEFT={id:"editor.splitToLeft",category:y,label:"%editor.splitToLeft%"},b.SPLIT_TO_RIGHT={id:"editor.splitToRight",category:y,label:"%editor.splitToRight%"},b.SPLIT_TO_TOP={id:"editor.splitToTop",category:y,label:"%editor.splitToTop%"},b.SPLIT_TO_BOTTOM={id:"editor.splitToBottom",category:y,label:"%editor.splitToBottom%"},b.CHANGE_LANGUAGE={id:"editor.changeLanguage",category:y},b.CHANGE_ENCODING={id:"editor.changeEncoding",category:y},b.GET_ENCODING={id:"editor.getEncoding",category:y},b.CHANGE_EOL={id:"editor.changeEol",category:y},b.NAVIGATE_LEFT={id:"editor.navigateLeft",category:y},b.NAVIGATE_RIGHT={id:"editor.navigateRight",category:y},b.NAVIGATE_UP={id:"editor.navigateUp",category:y},b.NAVIGATE_DOWN={id:"editor.navigateDown",category:y},b.NAVIGATE_NEXT={id:"editor.navigateNext",category:y},b.NAVIGATE_PREVIOUS={id:"editor.navigatePrevious",category:y},b.PREVIOUS={id:"editor.previous",category:y},b.NEXT={id:"editor.next",category:y},b.PREVIOUS_IN_GROUP={id:"editor.previousInGroup",category:y},b.NEXT_IN_GROUP={id:"editor.nextInGroup",category:y},b.LAST_IN_GROUP={id:"editor.lastInGroup",category:y},b.CLOSE_OTHER_GROUPS={id:"editor.closeOtherGroup",category:y,label:"%editor.closeEditorsInOtherGroups%"},b.OPEN_EDITOR_AT_INDEX={id:"editor.openEditorAtIndex",category:y},b.EVEN_EDITOR_GROUPS={id:"editor.evenEditorGroups",category:y,label:"%editor.resetEditorGroups%"},b.REVERT_DOCUMENT={id:"editor.document.revert",category:y,label:"%editor.revert%"},b.REVERT_AND_CLOSE={id:"editor.revertAndClose",category:y},b.GO_FORWARD={id:"editor.goForward",category:y},b.GO_BACK={id:"editor.goBack",category:y},b.PIN_CURRENT={id:"editor.pinCurrent",category:y},b.COPY_CURRENT_PATH={id:"editor.copyCurrentPath",category:y},b.GO_TO_GROUP={id:"editor.goToGroup",category:y},b.MOVE_GROUP={id:"editor.moveGroup",category:y},b.REOPEN_CLOSED={id:"editor.reopenClosed",category:y},b.FOCUS={id:"editor.focus",category:y},b.TEST_TOKENIZE={id:"editor.tokenize.test",category:y,label:"%editor.tokenize.test%"},b.AUTO_SAVE={id:"editor.autoSave",category:y},b.FOCUS_ACTIVE_EDITOR_GROUP={id:"editor.focusActiveEditorGroup",category:y},b.COMPONENT_UNDO={id:"editor.componentUndo",category:y},b.COMPONENT_REDO={id:"editor.componentRedo"},b.SEARCH_WORKSPACE_SYMBOL={id:"editor.workspaceSymbol.quickopen",label:"%editor.workspaceSymbol.quickopen%",category:y},b.SEARCH_WORKSPACE_SYMBOL_CLASS={id:"editor.workspaceSymbolClass.quickopen",label:"%editor.workspaceSymbolClass.quickopen%",category:y},b.GO_TO_LINE={id:"editor.action.gotoLine",label:"%editor.goToLine%",category:y},b.QUICK_OPEN={id:"workbench.action.quickOpen",category:y,label:"%editor.quickOpen%"},b.TOGGLE_WORD_WRAP={id:"editor.toggleWordWrap",label:"%editor.toggleWordWrap%",category:y},b.TOGGLE_COLUMN_SELECTION={id:"editor.action.toggleColumnSelection",label:"%editor.action.toggleColumnSelection%",category:y},b.FORMAT_DOCUMENT={id:"editor.action.formatDocument",category:y},b.FORMAT_SELECTION={id:"editor.action.formatSelection",category:y},b.FORMAT_DOCUMENT_WITH={id:"editor.action.formatDocument.multiple",category:y,label:"%editor.formatDocument.label.multiple%"},b.FORMAT_SELECTION_WITH={id:"editor.action.formatSelection.multiple",category:y,label:"%editor.formatSelection.label.multiple%"},b.COPY_PATH={id:"editor.action.copyPath",category:y,label:"%editor.copyPath%"},b.COPY_RELATIVE_PATH={id:"editor.action.copyRelativePath",category:y,label:"%editor.copyRelativePath%"}})(p||(t.EDITOR_COMMANDS=p={}));var v;(function(b){const y="diff-editor";b.REVERT={id:"editor.diff.revert",category:y},b.ACCEPT={id:"editor.diff.accept",category:y},b.TOGGLE_COLLAPSE_UNCHANGED_REGIONS={id:"editor.diff.toggleCollapseUnchangedRegions",category:y}})(v||(t.DIFF_EDITOR_COMMANDS=v={}));var m;(function(b){const y="search";b.OPEN_SEARCH={id:"content-search.openSearch",category:y,label:"Open search sidebar"},b.REFRESH={id:"file-search.refresh",label:"refresh search",iconClass:(0,n.getIcon)("refresh"),category:y},b.CLEAN={id:"file-search.clean",label:"clean search",iconClass:(0,n.getIcon)("clear"),category:y},b.GET_RECENT_SEARCH_WORD={id:"search.getRecentSearchWordCmd",category:y},b.GET_BACK_RECENT_SEARCH_WORD={id:"search.getBackRecentSearchWordCmd",category:y},b.MENU_REPLACE={id:"search.menu.replace",category:y,label:"%search.replace.title%"},b.MENU_REPLACE_ALL={id:"search.menu.replaceAll",category:y,label:"%search.replaceAll.label%"},b.MENU_HIDE={id:"search.menu.hide",category:y,label:"%search.result.hide%"},b.MENU_COPY={id:"search.menu.copy",category:y,label:"%file.copy.file%"},b.MENU_COPY_ALL={id:"search.menu.copyAll",category:y,label:"%search.menu.copyAll%"},b.MENU_COPY_PATH={id:"search.menu.copyPath",category:y,label:"%file.copy.path%"},b.REPLACE={id:"search.replace",category:y},b.CLOSE={id:"search.close",category:y}})(m||(t.SEARCH_COMMANDS=m={}));var _;(function(b){const y="outline";b.OUTLINE_COLLAPSE_ALL={id:"outline.collapse.all",category:y},b.OUTLINE_FOLLOW_CURSOR={id:"outline.follow.cursor",category:y},b.OUTLINE_SORT_KIND={id:"outline.sort.kind",category:y},b.OUTLINE_SORT_NAME={id:"outline.sort.name",category:y},b.OUTLINE_SORT_POSITION={id:"outline.sort.position",category:y}})(_||(t.OUTLINE_COMMANDS=_={}));var s;(function(b){const y="workspace";b.ADD_WORKSPACE_FOLDER={id:"workspace.addFolderToWorkspace",label:"%workspace.addFolderToWorkspace%",category:y},b.REMOVE_WORKSPACE_FOLDER={id:"workspace.removeFolderFromWorkspace",label:"%workspace.removeFolderFromWorkspace%",category:y},b.SAVE_WORKSPACE_AS_FILE={id:"workspace.saveWorkspaceAsFile",label:"%workspace.saveWorkspaceAsFile%",category:y}})(s||(t.WORKSPACE_COMMANDS=s={}));var f;(function(b){const y="keyboard";b.CHOOSE_KEYBOARD_LAYOUT={id:"keyboard.chooseKeyboardLayout",label:"%keyboard.chooseKeyboardLayout%",category:y}})(f||(t.KEYBOARD_COMMANDS=f={}));var a;(function(b){const y="dialog";b.ENSURE={id:"dialog.ensure",category:y}})(a||(t.DIALOG_COMMANDS=a={}));var h;(function(b){b.CATEGORY="%terminal.name%",b.FOCUS_NEXT_TERMINAL={id:"workbench.action.terminal.focusNextPane",label:"%terminal.focusNext.inTerminalGroup%",category:b.CATEGORY},b.FOCUS_PREVIOUS_TERMINAL={id:"workbench.action.terminal.focusPreviousPane",label:"%terminal.focusPrevious.inTerminalGroup%",category:b.CATEGORY},b.SPLIT={id:"terminal.split",label:"%terminal.split%",category:b.CATEGORY},b.ADD={id:"terminal.add",label:"%terminal.new%",category:b.CATEGORY},b.REMOVE={id:"terminal.remove",label:"%terminal.remove%",category:b.CATEGORY},b.CLEAR={id:"terminal.clear",label:"%terminal.clear%",category:b.CATEGORY},b.OPEN_SEARCH={id:"terminal.search",label:"%terminal.search%",category:b.CATEGORY},b.SEARCH_NEXT={id:"terminal.search.next",label:"%terminal.search.next%",category:b.CATEGORY},b.OPEN_WITH_PATH={id:"terminal.openWithPath",category:b.CATEGORY},b.CLEAR_CONTENT={id:"terminal.clearContent",label:"%terminal.menu.clearCurrentContent%",category:b.CATEGORY},b.CLEAR_ALL_CONTENT={id:"terminal.clearAllContent",label:"%terminal.menu.clearAllContents%",category:b.CATEGORY},b.TAB_RENAME={id:"terminal.tabRename",category:b.CATEGORY},b.SELECT_ALL_CONTENT={id:"terminal.selectAllContent",label:"%terminal.menu.selectAllContent%",category:b.CATEGORY},b.MORE_SETTINGS={id:"terminal.moreSettings",label:"%terminal.menu.moreSettings%",category:b.CATEGORY},b.SELECT_TYPE={id:"terminal.selectType",category:b.CATEGORY},b.SELECT_ZSH={id:"terminal.selectTypeZsh",label:"zsh",category:b.CATEGORY},b.SELECT_BASH={id:"terminal.selectTypeBash",label:"bash",category:b.CATEGORY},b.SELECT_SH={id:"terminal.selectTypeSh",label:"sh",category:b.CATEGORY},b.SELECT_CMD={id:"terminal.selectTypeCMD",label:"cmd",category:b.CATEGORY},b.SELECT_POWERSHELL={id:"terminal.selectTypePowerShell",label:"powershell",category:b.CATEGORY},b.COPY={id:"terminal.copy",label:"%edit.copy%",category:b.CATEGORY},b.PASTE={id:"terminal.paste",label:"%edit.paste%",category:b.CATEGORY},b.SELECT_ALL={id:"terminal.selectAll",label:"%terminal.menu.selectCurrentContent%",category:b.CATEGORY},b.RE_LAUNCH={id:"terminal.relaunch",category:b.CATEGORY},b.TOGGLE_TERMINAL={id:"terminal.toggleTerminal",label:"%terminal.toggleTerminal%",category:b.CATEGORY},b.KILL_PROCESS={id:"terminal.killProcess",label:"%terminal.killProcess%",category:b.CATEGORY}})(h||(t.TERMINAL_COMMANDS=h={}));var u;(function(b){const y="view";b.QUICK_OPEN_VIEW={id:"layout.action.quickOpenView",category:y},b.OPEN_VIEW={id:"layout.action.openView",label:"%layout.action.openView%",category:y},b.MAXIMIZE_EDITOR={id:"layout.action.Maximizeeditor",category:y},b.TOGGLE_SIDEBAR_VISIBILITY={id:"main-layout.left-panel.toggle",category:y}})(u||(t.LAYOUT_COMMANDS=u={}));var d;(function(b){const y="marker";b.SHOW_ERRORS_WARNINGS={id:"marker.action.showErrorsWarnings",category:y},b.TOGGLE_SHOW_ERRORS_WARNINGS={id:"marker.action.toggleShowErrorsWarnings",category:y}})(d||(t.MARKER_COMMANDS=d={}));var E;(function(b){b.OPEN={id:"editor.action.quickCommand"},b.OPEN_OUTLINE={id:"editor.action.quickOutline"},b.OPEN_VIEW={id:"editor.action.quickView"},b.OPEN_WITH_COMMAND={id:"editor.action.quickCommand.withCommand"}})(E||(t.QUICK_OPEN_COMMANDS=E={}));var g;(function(b){const y="SCM";b.GetSCMResource={id:"scm.getResource",category:y},b._GIT_OPEN_MERGE_EDITOR={id:"_git.openMergeEditor"},b.GIT_OPEN_MERGE_EDITOR={id:"git.openMergeEditor"}})(g||(t.SCM_COMMANDS=g={}));var c;(function(b){const y="MergeConflict";b.AI_ACCEPT={id:"merge-conflict.ai.accept",category:y},b.ALL_RESET={id:"merge-conflict.ai.all-reset",category:y},b.AI_ALL_ACCEPT={id:"merge-conflict.ai.all-accept",category:y},b.AI_ALL_ACCEPT_STOP={id:"merge-conflict.ai.all-accept-stop",category:y}})(c||(t.MERGE_CONFLICT_COMMANDS=c={}))},22780:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ClientCommonContribution=t.locationProtocolContextKey=t.inputFocusedContextKey=void 0;const n=e(85608),r=e(76003),o=e(97267),l=e(43718),p=e(53736),v=e(18193),m=e(22366),_=e(41118),s=e(1149),f=e(64102),a=e(39496),h=e(78132),u=e(11050),d=e(14109),E=e(66549);t.inputFocusedContextKey="inputFocus",t.locationProtocolContextKey="locationProtocol";let g=class{constructor(){this.schema=v.corePreferenceSchema;const b={"application.supportsOpenFolder":!!this.appConfig.isElectronRenderer&&!this.appConfig.isRemote,"application.supportsOpenWorkspace":!!this.appConfig.isElectronRenderer&&!this.appConfig.isRemote,"debug.toolbar.top":this.appConfig.isElectronRenderer?0:this.layoutViewSize.menubarHeight},y=Object.keys(this.schema.properties);for(const S of y)this.schema.properties[S].default=b[S]||this.schema.properties[S].default}onStart(){this.contextKeyService.createKey(t.locationProtocolContextKey,window.location.protocol.split(":")[0]),this.inputFocusedContext=this.contextKeyService.createKey(t.inputFocusedContextKey,!1),window.addEventListener("focusin",this.updateInputContextKeys.bind(this))}onStop(){window.removeEventListener("focusin",this.updateInputContextKeys.bind(this))}activeElementIsInput(){return!!document.activeElement&&(document.activeElement.tagName==="INPUT"||document.activeElement.tagName==="TEXTAREA")}updateInputContextKeys(){const b=this.activeElementIsInput();if(this.inputFocusedContext.set(b),b){const y=(0,m.trackFocus)(document.activeElement);l.Event.once(y.onDidBlur)(()=>{this.inputFocusedContext.set(this.activeElementIsInput()),y.dispose()})}}registerCommands(b){b.registerCommand(d.EDITOR_COMMANDS.UNDO),b.registerCommand(d.EDITOR_COMMANDS.REDO),b.registerCommand(d.EDITOR_COMMANDS.SELECT_ALL),b.registerCommand(d.COMMON_COMMANDS.ABOUT_COMMAND,{execute:()=>{alert((0,l.replaceLocalizePlaceholder)(this.appConfig.appName))}})}registerMenus(b){b.registerMenubarItem(a.MenuId.MenubarFileMenu,{label:(0,l.localize)("menu-bar.title.file"),order:1,iconClass:(0,o.getIcon)("menubar-file")}),b.registerMenubarItem(a.MenuId.MenubarEditMenu,{label:(0,l.localize)("menu-bar.title.edit"),order:2,iconClass:(0,o.getIcon)("menubar-edit")}),b.registerMenubarItem(a.MenuId.MenubarSelectionMenu,{label:(0,l.localize)("menu-bar.title.selection"),order:3,iconClass:(0,o.getIcon)("menubar-selection")}),b.registerMenubarItem(a.MenuId.MenubarViewMenu,{label:(0,l.localize)("menu-bar.title.view"),order:4,iconClass:(0,o.getIcon)("menubar-view")}),b.registerMenubarItem(a.MenuId.MenubarGoMenu,{label:(0,l.localize)("menu-bar.title.go"),order:5,iconClass:(0,o.getIcon)("menubar-go")}),b.registerMenubarItem(a.MenuId.MenubarTerminalMenu,{label:(0,l.localize)("menu-bar.title.terminal"),order:5,iconClass:(0,o.getIcon)("terminal")}),b.registerMenubarItem(a.MenuId.MenubarHelpMenu,{label:(0,l.localize)("menu-bar.title.help"),order:999,iconClass:(0,o.getIcon)("question-circle")}),b.registerMenuItems(a.MenuId.MenubarFileMenu,[{command:d.FILE_COMMANDS.OPEN_FOLDER.id,group:"1_open",when:"config.application.supportsOpenFolder"},{command:d.FILE_COMMANDS.OPEN_WORKSPACE.id,group:"1_open",when:"config.application.supportsOpenWorkspace"},{command:d.WORKSPACE_COMMANDS.ADD_WORKSPACE_FOLDER.id,group:"1_open",when:"config.workspace.supportMultiRootWorkspace"},{command:d.WORKSPACE_COMMANDS.SAVE_WORKSPACE_AS_FILE.id,group:"1_open",when:"config.workspace.supportMultiRootWorkspace"},{command:d.EDITOR_COMMANDS.NEW_UNTITLED_FILE.id,group:"2_new"},{command:{id:d.EDITOR_COMMANDS.SAVE_CURRENT.id,label:(0,l.localize)("file.save")},group:"3_save"},{command:{id:d.EDITOR_COMMANDS.SAVE_ALL.id,label:(0,l.localize)("file.saveAll")},group:"3_save"},{command:{id:d.EDITOR_COMMANDS.AUTO_SAVE.id,label:(0,l.localize)("file.autoSave")},toggledWhen:"config.editor.autoSave != off",group:"4_autosave"}]),b.registerMenuItems(a.MenuId.MenubarGoMenu,[{command:{id:d.EDITOR_COMMANDS.GO_BACK.id,label:(0,l.localize)("editor.goBack")},group:"1_go"},{command:{id:d.EDITOR_COMMANDS.GO_FORWARD.id,label:(0,l.localize)("editor.goForward")},group:"1_go"},{command:{id:d.EDITOR_COMMANDS.QUICK_OPEN.id,label:(0,l.localize)("editor.quickOpen")},group:"2_go_file"},{command:{id:d.EDITOR_COMMANDS.SEARCH_WORKSPACE_SYMBOL.id,label:(0,l.localize)("editor.workspaceSymbol.quickopen")},group:"2_go_file"},{command:{id:d.EDITOR_COMMANDS.GO_TO_LINE.id,label:(0,l.localize)("editor.goToLine")},group:"3_go_infile"},{command:{id:"editor.action.jumpToBracket",label:(0,l.localize)("menu-bar.go.jumpToBracket")},group:"3_go_infile"},{command:{id:"editor.action.marker.nextInFiles",label:(0,l.localize)("menu-bar.go.nextProblemInFiles")},group:"6_go_problem"},{command:{id:"editor.action.marker.prevInFiles",label:(0,l.localize)("menu-bar.go.prevProblemInFiles")},group:"6_go_problem"}]),b.registerMenuItems(a.MenuId.MenubarTerminalMenu,[{command:{id:d.TERMINAL_COMMANDS.ADD.id,label:d.TERMINAL_COMMANDS.ADD.label},group:"1_terminal"},{command:{id:d.TERMINAL_COMMANDS.SPLIT.id,label:d.TERMINAL_COMMANDS.SPLIT.label},group:"1_terminal"}])}registerKeybindings(b){b.registerKeybinding({command:d.EDITOR_COMMANDS.SELECT_ALL.id,keybinding:"ctrlcmd+a",when:"editorFocus"}),b.registerKeybinding({command:d.EDITOR_COMMANDS.UNDO.id,keybinding:"ctrlcmd+z",when:"editorFocus"}),b.registerKeybinding({command:d.EDITOR_COMMANDS.REDO.id,keybinding:"ctrlcmd+shift+z",when:"editorFocus"})}};t.ClientCommonContribution=g,n.__decorate([(0,r.Autowired)(l.CommandService),n.__metadata("design:type",Object)],g.prototype,"commandService",void 0),n.__decorate([(0,r.Autowired)(p.IContextKeyService),n.__metadata("design:type",Object)],g.prototype,"contextKeyService",void 0),n.__decorate([(0,r.Autowired)(u.AppConfig),n.__metadata("design:type",Object)],g.prototype,"appConfig",void 0),n.__decorate([(0,r.Autowired)(s.LayoutViewSizeConfig),n.__metadata("design:type",s.LayoutViewSizeConfig)],g.prototype,"layoutViewSize",void 0),t.ClientCommonContribution=g=n.__decorate([(0,l.Domain)(l.CommandContribution,E.ClientAppContribution,h.PreferenceContribution,f.MenuContribution,_.KeybindingContribution),n.__metadata("design:paramtypes",[])],g)},66549:(x,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ClientAppContribution=void 0,t.ClientAppContribution=Symbol("ClientAppContribution")},34505:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ClientCommonModule=void 0;const n=e(85608),r=e(76003),o=e(16908),l=e(43718),p=e(37638),v=e(36206),m=e(136),_=e(90697),s=e(45829),f=e(44867),a=e(22780),h=e(10797),u=e(17821);let d=class extends v.BrowserModule{constructor(){super(...arguments),this.contributionProvider=[_.OpenerContribution],this.providers=[a.ClientCommonContribution,f.DefaultOpenerContribution,f.OpenerContributionClient,p.AuthenticationContribution,m.HashCalculateContribution],this.electronProviders=[h.ClientElectronCommonContribution,s.ElectronOpenerContributionClient],this.webProviders=[u.ClientWebCommonContribution],this.backServices=[{servicePath:l.CommonServerPath,protocol:o.CommonServerProtocol},{servicePath:l.KeytarServicePath},{servicePath:l.CryptoServicePath}]}};t.ClientCommonModule=d,t.ClientCommonModule=d=n.__decorate([(0,r.Injectable)()],d)},98881:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RecentStorage=void 0;const n=e(85608),r=e(76003),o=e(43718);let l=class{async getScopeStorage(){return this.recentStorage=this.recentStorage||await this.getStorage(o.STORAGE_NAMESPACE.RECENT_DATA),this.recentStorage}async getGlobalStorage(){return this.recentGlobalStorage=this.recentGlobalStorage||await this.getStorage(o.STORAGE_NAMESPACE.GLOBAL_RECENT_DATA),this.recentGlobalStorage}};t.RecentStorage=l,n.__decorate([(0,r.Autowired)(o.StorageProvider),n.__metadata("design:type",Function)],l.prototype,"getStorage",void 0),t.RecentStorage=l=n.__decorate([(0,r.Injectable)()],l)},30144:(x,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EXTENSION_CONTAINER_ID=t.SCM_CONTAINER_ID=t.SEARCH_CONTAINER_ID=t.EXPLORER_CONTAINER_ID=t.DEBUG_CONTAINER_ID=t.TEST_RESULT_CONTAINER_ID=t.DEBUG_CONSOLE_CONTAINER_ID=t.TERMINAL_CONTAINER_ID=t.OUTPUT_CONTAINER_ID=t.MARKER_CONTAINER_ID=void 0,t.MARKER_CONTAINER_ID="markers",t.OUTPUT_CONTAINER_ID="output",t.TERMINAL_CONTAINER_ID="terminal",t.DEBUG_CONSOLE_CONTAINER_ID="debug-console",t.TEST_RESULT_CONTAINER_ID="test-result",t.DEBUG_CONTAINER_ID="debug",t.EXPLORER_CONTAINER_ID="explorer",t.SEARCH_CONTAINER_ID="search",t.SCM_CONTAINER_ID="scm",t.EXTENSION_CONTAINER_ID="extension"},10797:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ClientElectronCommonContribution=void 0;const n=e(85608),r=e(76003),o=e(43718),l=e(64102),p=e(39496),v=e(11050);let m=class{registerMenus(s){s.registerMenubarItem(p.MenuId.MenubarAppMenu,{label:(0,o.localize)("app.name",this.appConfig.appName),order:0}),s.registerMenuItems(p.MenuId.MenubarEditMenu,[{command:{id:"electron.undo",label:(0,o.localize)("editor.undo")},nativeRole:"undo",group:"1_undo"},{command:{id:"electron.redo",label:(0,o.localize)("editor.redo")},group:"1_undo",nativeRole:"redo"},{command:{label:(0,o.localize)("edit.cut"),id:"electron.cut"},nativeRole:"cut",group:"2_clipboard"},{command:{label:(0,o.localize)("edit.copy"),id:"electron.copy"},nativeRole:"copy",group:"2_clipboard"},{command:{label:(0,o.localize)("edit.paste"),id:"electron.paste"},nativeRole:"paste",group:"2_clipboard"},{command:{label:(0,o.localize)("edit.selectAll"),id:"electron.selectAll"},nativeRole:"selectAll",group:"2_clipboard"}]),s.registerMenuItems(p.MenuId.MenubarAppMenu,[{command:{id:"electron.quit",label:(0,o.localize)("app.quit")},nativeRole:"quit",group:"4_quit"}])}};t.ClientElectronCommonContribution=m,n.__decorate([(0,r.Autowired)(v.AppConfig),n.__metadata("design:type",Object)],m.prototype,"appConfig",void 0),t.ClientElectronCommonContribution=m=n.__decorate([(0,o.Domain)(l.MenuContribution)],m)},66963:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(85608);n.__exportStar(e(14109),t),n.__exportStar(e(34505),t),n.__exportStar(e(66549),t),n.__exportStar(e(98881),t)},17821:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ClientWebCommonContribution=void 0;const n=e(85608),r=e(43718),o=e(64102),l=e(39496),p=e(14109);let v=class{registerMenus(_){_.registerMenuItems(l.MenuId.MenubarEditMenu,[{command:p.EDITOR_COMMANDS.REDO.id,group:"1_undo"},{command:p.EDITOR_COMMANDS.UNDO.id,group:"1_undo"}]),_.registerMenuItem(l.MenuId.MenubarHelpMenu,{command:{id:p.COMMON_COMMANDS.ABOUT_COMMAND.id,label:p.COMMON_COMMANDS.ABOUT_COMMAND.label},nativeRole:"about",group:"0_about"})}};t.ClientWebCommonContribution=v,t.ClientWebCommonContribution=v=n.__decorate([(0,r.Domain)(o.MenuContribution)],v)},25918:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TitleActionList=t.InlineActionWidget=t.MenuActionList=void 0,t.InlineActionBar=c,t.InlineMenuBar=b;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importStar(e(14041)),l=e(97267),p=e(45803),v=e(43718),m=e(93899),_=e(48560),s=e(79951),f=e(55693),a=n.__importDefault(e(17647)),h=n.__importDefault(e(54859)),u=({data:y,hasSubmenu:S,disabled:A,iconService:w,hasChecked:T})=>o.default.createElement("div",{className:(0,r.default)(h.default.menuAction,{[h.default.disabled]:A,[h.default.checked]:y.checked})},o.default.createElement("div",{className:(0,r.default)({[h.default.icon]:T})},y.checked?o.default.createElement(l.Icon,{icon:"check"}):null),o.default.createElement("div",{className:h.default.label},y.label?(0,s.transformLabelWithCodicon)(v.strings.mnemonicButtonLabel(y.label,!0),{margin:"0 3px"},w?.fromString.bind(w)):""),o.default.createElement("div",{className:h.default.tip},y.keybinding?o.default.createElement("div",{className:h.default.shortcut},y.keybinding):null,S?o.default.createElement("div",{className:h.default.submenuIcon},o.default.createElement(l.Icon,{icon:"right"})):null,!y.keybinding&&!S&&y.extraDesc&&o.default.createElement("div",{className:h.default.extraDesc},y.extraDesc))),d=({data:y=[],context:S=[],afterClick:A,style:w,iconService:T,renderSubMenuTitle:D,renderMenuItem:I})=>{if(!y.length)return null;const R=o.default.useCallback(k=>{const{key:F,item:L}=k;if([m.SeparatorMenuItemNode.ID,m.SubmenuItemNode.ID].includes(F))return;const j=(Array.isArray(L.props.children)?L.props.children[0]:L.props.children).props.data;j&&(typeof j.execute=="function"&&j.execute(S),typeof A=="function"&&A(j))},[y,S]),M=o.default.useCallback((k,F)=>{if(D){const L=D(k,{hasSubmenu:!0,disabled:!1});if(L)return L}return o.default.createElement(u,{hasChecked:F,hasSubmenu:!0,data:k,iconService:T})},[D]),O=o.default.useCallback((k,F)=>{if(I){const L=I(k,{hasSubmenu:!1,disabled:k.disabled});if(L)return L}return o.default.createElement(u,{hasChecked:F,data:k,disabled:k.disabled,iconService:T})},[I]),P=o.default.useCallback(k=>{const F=k.some(L=>L.checked);return k.map((L,B)=>{if(L.id===m.SeparatorMenuItemNode.ID)return null;const j=k[B+1]&&k[B+1].id===m.SeparatorMenuItemNode.ID;return L.id===m.SubmenuItemNode.ID?!Array.isArray(L.children)||!L.children.length?null:o.default.createElement(o.default.Fragment,{key:`${L.id}-${L.submenuId}-${B}`},o.default.createElement(p.Menu.SubMenu,{key:`${L.id}-${L.submenuId}-${B}`,className:h.default.submenuItem,popupClassName:"kt-menu",title:M(L,F)},P(L.children)),j?o.default.createElement(p.Menu.Divider,{key:`divider-${B}`,className:h.default.menuItemDivider}):null):o.default.createElement(o.default.Fragment,{key:`${L.id}-${B}`},o.default.createElement(p.Menu.Item,{id:`${L.id}-${B}`,key:`${L.id}-${B}`,className:h.default.menuItem,disabled:L.disabled},O(L,F)),j?o.default.createElement(p.Menu.Divider,{key:`divider-${B}`,className:h.default.menuItemDivider}):null)})},[]);return o.default.createElement(p.Menu,{className:"kt-menu",selectable:!1,motion:{motionLeave:!1,motionEnter:!1},builtinPlacements:a.default,onClick:R,style:w},P(y))};t.MenuActionList=d;const E=({type:y,icon:S,disabled:A,onClick:w,title:T})=>{const D=(0,f.useDesignStyles)(h.default.btnAction,"btnAction");if(y==="icon")return o.default.createElement(l.Button,{size:"small",type:y,className:D,onClick:w,title:T,icon:S||"ellipsis"});const I={};return(0,v.isBoolean)(A)&&(I.disabled=A),o.default.createElement(l.Button,{size:"small",type:"secondary",className:D,onClick:w,...I,title:T},o.default.createElement(l.Icon,{icon:S||"ellipsis"}))};E.displayName="EllipsisWidget",t.InlineActionWidget=o.default.memo(({iconService:y,type:S="icon",data:A,context:w=[],className:T,afterClick:D,...I})=>{const R=(0,f.useDesignStyles)(h.default.iconAction,"iconAction"),M=(0,f.useDesignStyles)(h.default.btnAction,"btnAction"),[O,P]=(0,o.useState)(!1),k=o.default.useCallback(async(j,...W)=>{if(j&&(j.preventDefault(),j.stopPropagation()),!O){if(P(!0),A.id===m.SubmenuItemNode.ID&&j){const U={x:j.clientX,y:j.clientY};await A.execute([U,...w])}else typeof A.execute=="function"&&await A.execute([...w,...W]);P(!1),typeof D=="function"&&D()}},[A,w]),[F,L]=o.default.useMemo(()=>{let j=A.tooltip||A.label;const W=A.label;return A.keybinding&&(j=`${j} (${A.keybinding})`),[j,W]},[A]),B=A.id===m.SubmenuItemNode.ID;return S==="icon"&&!A.type?o.default.createElement(l.Button,{type:A.icon?"icon":"link",className:(0,r.default)(R,T,{[h.default.disabled]:A.disabled,[h.default.submenuIconAction]:B}),title:F,iconClass:A.icon,onClick:k,...I},!A.icon&&L):A.type==="checkbox"?o.default.createElement(l.CheckBox,{className:(0,r.default)(T,M),disabled:A.disabled,label:A.label,title:F,checked:A.checked,onChange:j=>k(void 0,j.target.checked),...I}):o.default.createElement(l.Button,{loading:O,className:(0,r.default)(T,M),disabled:A.disabled,onClick:k,size:"small",type:A.type,title:F,...I},(0,s.transformLabelWithCodicon)(L,{margin:"0 3px"},y?.fromString.bind(y)),B&&o.default.createElement(l.Icon,{icon:"down",className:"kt-button-secondary-more"}))}),t.InlineActionWidget.displayName="InlineAction";const g=({data:y,context:S})=>{const A=o.default.useCallback(()=>y.getExecuteArgs(S),[y,S]);return o.default.createElement(y.component,{getExecuteArgs:A})};g.displayName="CustomAction",t.TitleActionList=o.default.memo(({type:y="icon",nav:S=[],more:A=[],moreIcon:w,moreTitle:T,context:D=[],extraNavActions:I=[],moreAtFirst:R=!1,className:M,afterClick:O,menuId:P,iconService:k,regroup:F=(...L)=>L})=>{const L=(0,_.useInjectable)(m.ICtxMenuRenderer),B=(0,_.useInjectable)(m.AbstractMenuService),j=(0,f.useDesignStyles)(h.default.titleActions,"titleActions"),[W,U]=F(S,A),X=o.default.useCallback($=>{$.preventDefault(),$.stopPropagation(),U&&L.show({anchor:{x:$.clientX,y:$.clientY},menuNodes:U,args:D,onHide:O})},[U,D]);if(W.length===0&&U.length===0&&I.length===0)return null;const V=U.length>0?o.default.createElement(E,{disabled:U[0].disabled,icon:w,type:y,onClick:X,title:T}):null;return o.default.createElement("div",{className:(0,r.default)([j,M]),"data-menu-id":P},R&&V,W.map($=>{if($.id===m.ComponentMenuItemNode.ID)return o.default.createElement(g,{context:D,data:$,key:$.nodeId});if($.id===m.SubmenuItemNode.ID){const z=B.createMenu($.submenuId);if(!((0,m.generateMergedCtxMenu)({menus:z}).length>0))return}if($.id===m.SeparatorMenuItemNode.ID)return o.default.createElement("span",{key:`vertical-divider-${$.id}`,className:h.default.verticalDivider});const Y=$.id===m.SubmenuItemNode.ID?$.submenuId:$.id;return o.default.createElement(t.InlineActionWidget,{id:Y,key:Y,className:(0,r.default)({[h.default.selected]:$.checked}),type:y,data:$,afterClick:O,context:D,iconService:k})}),Array.isArray(I)&&I.length?o.default.createElement(o.default.Fragment,null,W.length&&o.default.createElement("span",{className:h.default.divider}),I):null,!R&&V)}),t.TitleActionList.displayName="TitleActionList";function c(y){const{menus:S,context:A,separator:w="navigation",debounce:T,isFlattenMenu:D=!1,...I}=y,[R,M]=(0,f.useMenus)(S,w,A,T),O=(0,o.useMemo)(()=>D?[...R,...M]:R,[R,M,D]);return o.default.createElement(t.TitleActionList,{menuId:S.menuId,nav:O,more:w==="inline"||D?[]:M,...I})}function b(y){const{iconService:S,menus:A,context:w,moreIcon:T,moreTitle:D,separator:I="navigation",...R}=y,[M,O]=(0,f.useContextMenus)(A);return o.default.createElement(t.TitleActionList,{menuId:A.menuId,nav:M,more:I==="inline"?[]:O,moreIcon:T,moreTitle:D,context:w,iconService:S,...R})}b.displayName="InlineMenuBar"},17647:(x,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.placements=void 0;const e={adjustX:1,adjustY:1},n=[0,0];t.placements={topLeft:{points:["bl","tl"],overflow:e,offset:[0,-4],targetOffset:n},topCenter:{points:["bc","tc"],overflow:e,offset:[0,-4],targetOffset:n},topRight:{points:["br","tr"],overflow:e,offset:[0,-4],targetOffset:n},bottomLeft:{points:["tl","bl"],overflow:e,offset:[0,4],targetOffset:n},bottomCenter:{points:["tc","bc"],overflow:e,offset:[0,4],targetOffset:n},bottomRight:{points:["tr","br"],overflow:e,offset:[0,4],targetOffset:n}},t.default=t.placements},89847:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AIAction=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importStar(e(14041)),l=e(43718),p=e(70650),v=e(22689),m=e(48560),_=e(57995),s=e(24951),f=e(49716),a=e(52141),h=n.__importDefault(e(27410)),u=(0,v.createLayoutEventType)(l.AIInlineChatContentWidgetId),d=new CustomEvent(u,{bubbles:!0}),E=g=>{const{operationList:c,moreOperation:b,showClose:y=!0,onClickItem:S,onClose:A,customOperationRender:w,loading:T,loadingShowOperation:D=!1}=g,I=o.default.useRef(null),[R,M]=(0,m.useHover)(),O=(0,m.useInjectable)(p.AINativeConfigService),P=(0,o.useCallback)(()=>{A?.()},[A]);(0,m.useChange)(M,()=>{var B;(B=I.current)===null||B===void 0||B.dispatchEvent(d)});const k=(0,o.useMemo)(()=>{const B=O?.inlineChat.logo;return typeof B=="string"?o.default.createElement("img",{src:B,className:h.default.ai_action_icon}):o.default.isValidElement(B)?B:typeof B=="function"?o.default.createElement(B,null):null},[O?.inlineChat.logo]),F=(0,o.useCallback)(()=>T&&D?o.default.createElement("div",{className:h.default.loading_mask}):null,[T,D]),L=(0,o.useCallback)(()=>{if(T&&!D)return null;const B=o.default.createElement(o.default.Fragment,null,c?.map(({name:j,title:W,id:U},X)=>W?o.default.createElement(a.EnhancePopover,{id:U,title:W,key:`popover_${X}`},o.default.createElement(_.EnhanceIcon,{wrapperClassName:h.default.operate_item,onClick:()=>S?.(U)},o.default.createElement("span",{key:X},j))):o.default.createElement(_.EnhanceIcon,{wrapperClassName:h.default.operate_item,onClick:()=>S?.(U),key:X},o.default.createElement("span",null,j))),b?.length?o.default.createElement(_.EnhanceIconWithCtxMenu,{icon:"more",menuNodes:b,wrapperClassName:h.default.operate_btn,skew:{x:-83,y:5}}):null);return o.default.createElement("div",{ref:R,className:h.default.operate_container},F(),k&&o.default.createElement(s.LineVertical,{height:"100%",margin:"0 8px",maxHeight:14,minHeight:14}),w?o.default.createElement("div",{className:h.default.custom_operation_wrapper},w):o.default.createElement("div",{className:h.default.default_operation_wrapper},B))},[w,c,b,T,D,k]);return o.default.createElement("div",{ref:I,className:(0,r.default)(h.default.ai_action_wrapper,T&&h.default.loading,D&&h.default.loading_show_operation)},o.default.createElement(o.default.Fragment,null,o.default.createElement("div",{className:h.default.stable_container},T?o.default.createElement(a.EnhancePopover,{id:"inline_chat_loading",title:(0,l.localize)("aiNative.inline.chat.operate.loading.cancel")},o.default.createElement(f.Loading,{className:h.default.loading_icon})):k?o.default.createElement("div",{className:h.default.logo_container},k):null),L(),y&&o.default.createElement("div",{className:h.default.close_container},o.default.createElement(s.LineVertical,{height:"100%",margin:"0px 8px",maxHeight:14,minHeight:14}),o.default.createElement(_.EnhanceIcon,{wrapperClassName:h.default.operate_btn,icon:"window-close",onClick:P}))))};t.AIAction=E},66205:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ContentWidgetContainerPanel=void 0;const n=e(85608),r=n.__importDefault(e(14041)),o=n.__importDefault(e(41771)),l=p=>r.default.createElement("div",{className:o.default.inline_chat_container_panel,style:p.style},p.children);t.ContentWidgetContainerPanel=l},57995:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AILogoAvatar=t.EnhanceIconWithCtxMenu=t.EnhanceIcon=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importStar(e(14041)),l=e(43718),p=e(81878),v=e(97222),m=e(48560),_=n.__importDefault(e(42798));t.EnhanceIcon=o.default.forwardRef((a,h)=>o.default.createElement("div",{className:(0,r.default)(a.wrapperClassName,_.default.ai_enhance_icon),style:a.wrapperStyle,onClick:a.onClick,ref:h,tabIndex:a.tabIndex,role:a.role,"aria-label":a.ariaLabel,"aria-pressed":a.ariaPressed},o.default.createElement(p.Icon,{className:(0,r.default)(a.className,_.default.icon),children:null,onClick:()=>null,style:(a.icon||a.iconClass)&&a.children?{marginRight:5}:{},icon:a.icon,iconClass:a.iconClass}),a.children&&o.default.createElement("span",{className:_.default.children_wrap},a.children)));const s=a=>{const{children:h,menuNodes:u,skew:d,id:E,...g}=a,c=(0,m.useInjectable)(l.CommandService),b=(0,m.useInjectable)(v.IBrowserCtxMenu),[y,S]=o.default.useState(void 0),A=o.default.useRef(null);o.default.useEffect(()=>{w()},[A.current,d]);const w=(0,o.useCallback)(D=>{requestAnimationFrame(()=>{if(A.current){const I=A.current.getBoundingClientRect(),{x:R,y:M,width:O,height:P}=I,k={x:R+O,y:M+P};d&&(k.x+=d.x,k.y+=d.y),S(k),D&&D(k)}})},[A.current,d]),T=o.default.useCallback(()=>{y&&(u?w(D=>{b.show({anchor:D,menuNodes:u})}):E&&c.executeCommand(E))},[A.current,u,y,E]);return o.default.createElement(t.EnhanceIcon,{ref:A,onClick:T,...g},h)};t.EnhanceIconWithCtxMenu=s;const f=a=>o.default.createElement("div",{className:(0,r.default)(_.default.ai_logo_avatar_container,a.className)},o.default.createElement(p.Icon,{icon:"magic-wand",className:(0,r.default)(a.iconClassName,_.default.avatar_icon)}));t.AILogoAvatar=f},89195:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(85608);n.__exportStar(e(89847),t),n.__exportStar(e(57995),t),n.__exportStar(e(28229),t),n.__exportStar(e(24951),t),n.__exportStar(e(52141),t),n.__exportStar(e(75777),t),n.__exportStar(e(49716),t),n.__exportStar(e(83913),t)},28229:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AIInlineResult=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importDefault(e(14041)),l=e(57995),p=e(24951),v=e(75777),m=n.__importDefault(e(5011)),_=s=>{const{iconItems:f,isRenderThumbs:a=!0,isRenderClose:h=!1,closeClick:u}=s;return o.default.createElement("div",{className:m.default.ai_inline_result_panel},o.default.createElement("div",{className:m.default.side},f.map(({icon:d,text:E,onClick:g,btnType:c},b)=>o.default.createElement(l.EnhanceIcon,{wrapperClassName:(0,r.default)(m.default.operate_btn,c==="default"?m.default.default:""),icon:d,onClick:g,key:b},o.default.createElement("span",null,E)))),a&&o.default.createElement(o.default.Fragment,null,o.default.createElement(p.LineVertical,{height:"60%",margin:"0px 6px 0 6px"}),o.default.createElement("div",{className:m.default.side},o.default.createElement(v.Thumbs,{wrapperClassName:m.default.operate_icon}))),h&&o.default.createElement(o.default.Fragment,null,o.default.createElement(l.EnhanceIcon,{wrapperClassName:m.default.operate_btn,icon:"close",onClick:u})))};t.AIInlineResult=_},83913:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InteractiveInput=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importStar(e(14041)),l=e(97267),p=e(43718),v=e(37015),m=e(48560),_=e(7369),s=e(89195),f=n.__importDefault(e(42348)),a=160,h=32,u="ai-native-chat-input-history",d=10;t.InteractiveInput=o.default.forwardRef((E,g)=>{const{placeholder:c,onKeyDown:b,onBlur:y,onValueChange:S,onHeightChange:A,onFocus:w,onSend:T,disabled:D=!1,className:I,height:R,width:M,sendBtnClassName:O,popoverPosition:P,autoFocus:k,defaultValue:F}=E,L=(0,o.useRef)(null),B=(0,m.useInjectable)(_.GlobalBrowserStorageService),j=(0,o.useRef)(),W=(0,o.useRef)(0),[U,X]=(0,o.useState)(F||E.value||""),[V,$]=(0,o.useState)(R||h),[Y,z]=(0,o.useState)(!1),H=o.default.useRef(!1);(0,o.useImperativeHandle)(g,()=>L.current),(0,o.useEffect)(()=>{const q=B.getData(u);q&&(j.current=q)},[]),(0,o.useEffect)(()=>{L&&L.current&&k&&L.current.focus()},[L]),(0,o.useEffect)(()=>{var q;const Oe=E.value;(0,p.isUndefined)(Oe)||Oe!==((q=L.current)===null||q===void 0?void 0:q.value)&&X(Oe||"")},[E.value,U,L]),(0,o.useEffect)(()=>{(0,p.isUndefined)(R)||R!==V&&$(R)},[R,V,A]),(0,o.useEffect)(()=>{if(!U){$(h);return}if(L&&L.current&&V<=a){L.current.style.height="0px";const q=L.current.scrollHeight;L.current.style.height=Math.min(q,a)+"px";const Oe=Math.min(q+12,a);$(Oe)}},[L,U,A,V]),(0,o.useEffect)(()=>{A?.(V)},[V]);const K=(0,o.useCallback)(q=>{H.current=!0,X(q),S?.(q)},[S]),Z=(0,o.useCallback)(q=>{z(!0),w?.(q)},[w]),Q=(0,o.useCallback)(q=>{z(!1),y?.(q)},[y]),oe=(0,o.useCallback)(()=>{D||U.trim()&&(j.current=j.current||[],j.current.push(U),W.current=0,B.setData(u,j.current.slice(-d)),H.current=!1,T?.(U))},[T,U,D]),ne=(0,o.useCallback)(q=>{var Oe,ye,ie;if(q.key===v.Key.ENTER.code&&!q.nativeEvent.isComposing){if(q.shiftKey)return;q.preventDefault(),oe();return}else if((q.key===v.Key.ARROW_UP.code||q.key===v.Key.ARROW_DOWN.code)&&(!U||!H.current)){if(q.preventDefault(),q.key===v.Key.ARROW_UP.code){const fe=(Oe=j.current)===null||Oe===void 0?void 0:Oe[j.current.length-1-W.current];fe&&(X(fe),S?.(fe),W.current=Math.min(W.current+1,((ye=j.current)===null||ye===void 0?void 0:ye.length)||0))}else if(q.key===v.Key.ARROW_DOWN.code){q.preventDefault();const fe=(ie=j.current)===null||ie===void 0?void 0:ie[j.current.length-1-W.current];fe&&(X(fe),S?.(fe),W.current=Math.max(W.current-1,0))}}b?.(q)},[b,oe,U]),he=(0,o.useMemo)(()=>o.default.createElement("div",{className:f.default.input_icon_container},o.default.createElement("div",{className:(0,r.default)(f.default.send_chat_btn,Y&&f.default.active,D&&f.default.disabled,O)},D?o.default.createElement("div",{className:f.default.ai_loading},o.default.createElement("div",{className:f.default.loader}),o.default.createElement("div",{className:f.default.loader}),o.default.createElement("div",{className:f.default.loader})):o.default.createElement(l.Popover,{id:`ai_chat_input_send_${(0,p.uuid)(4)}`,content:(0,p.localize)("aiNative.chat.enter.send"),delay:1500,position:P??l.PopoverPosition.top,disable:D},o.default.createElement(s.EnhanceIcon,{wrapperClassName:f.default.send_icon,className:(0,l.getIcon)("send-solid"),onClick:oe,tabIndex:0,role:"button",ariaLabel:(0,p.localize)("aiNative.chat.enter.send")})))),[Y,D,O,U,P]),_e=(0,o.useMemo)(()=>(0,p.isUndefined)(M)?"100%":M+"px",[M]);return o.default.createElement(l.TextArea,{ref:L,placeholder:c,wrapperStyle:{height:V+"px",width:_e},style:{height:V-10+"px"},value:U,onKeyDown:ne,onFocus:Z,onBlur:Q,onValueChange:K,disabled:D,className:(0,r.default)(f.default.interactive_input_container,Y?f.default.active:null,I),addonAfter:he})}),t.InteractiveInput.displayName="interactiveInput"},24951:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HorizontalVertical=t.LineVertical=void 0;const r=e(85608).__importDefault(e(14041)),o={backgroundColor:"var(--editorGroup-border)",height:"100%",width:"1px",minWidth:"1px"},l={backgroundColor:"var(--editorGroup-border)",width:"100%",height:"1px",minHeight:"1px"},p=m=>r.default.createElement("span",{style:{...o,...m}});t.LineVertical=p;const v=m=>r.default.createElement("span",{style:{...l,...m}});t.HorizontalVertical=v},49716:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Loading=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importDefault(e(14041)),l=e(97267),p=n.__importDefault(e(43135));t.Loading=o.default.memo(v=>o.default.createElement(l.Icon,{className:(0,r.default)(v.className,p.default.loading_indicator),iconClass:(0,l.getIcon)("loading")})),t.Loading.displayName="Loading"},52141:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EnhancePopover=void 0;const r=e(85608).__importStar(e(14041)),o=e(97267),l=e(43718),p=v=>{const{children:m,id:_,title:s,onClick:f}=v,[a,h]=r.default.useState(!1),u=(0,r.useMemo)(()=>_+(0,l.uuid)(6),[_]),d=(0,r.useCallback)(g=>{h(!1),f&&f(g)},[f]),E=(0,r.useCallback)(g=>{h(g)},[]);return r.default.createElement(o.Popover,{id:u,title:s,onClick:d,display:a,onDisplayChange:E},m)};t.EnhancePopover=p},75777:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Thumbs=void 0;const r=e(85608).__importStar(e(14041)),o=e(43718),l=e(95040),p=e(81878),v=e(48560),m=e(67304),_=e(57995),s=f=>{const a=(0,v.useInjectable)(l.IAIInlineChatService),{relationId:h,onClick:u,wrapperClassName:d}=f,[E,g]=(0,r.useState)("thumbs"),[c,b]=(0,r.useState)("thumbsdown"),y=(0,r.useCallback)(w=>{u&&u(w),a&&a.fireThumbsEvent(w)},[h,a]),S=(0,r.useCallback)(w=>{w==="up"&&E==="thumbs"&&(g("thumbs-fill"),b(!1),y(!0)),w==="up"&&E==="thumbs-fill"&&(g("thumbs"),b("thumbsdown")),w==="down"&&c==="thumbsdown"&&(b("thumbsdown-fill"),g(!1),y(!1)),w==="down"&&c==="thumbsdown-fill"&&(b("thumbsdown"),g("thumbs"))},[E,c]),A=(0,v.useUUID)();return r.default.createElement(r.default.Fragment,null,typeof E=="string"&&r.default.createElement(p.Popover,{id:`ai-chat-thumbsup-${A}`,title:(0,o.localize)("aiNative.inline.chat.operate.thumbsup.title")},r.default.createElement(_.EnhanceIcon,{wrapperClassName:d,onClick:()=>S("up"),className:(0,m.getExternalIcon)(E,m.KTICON_OWNER),tabIndex:0,role:"button",ariaLabel:(0,o.localize)("aiNative.inline.chat.operate.thumbsup.title"),ariaPressed:E==="thumbs-fill"?"true":"false"})),typeof c=="string"&&r.default.createElement(p.Popover,{id:`ai-chat-thumbsdown-${A}`,title:(0,o.localize)("aiNative.inline.chat.operate.thumbsdown.title")},r.default.createElement(_.EnhanceIcon,{wrapperClassName:d,onClick:()=>S("down"),className:(0,m.getExternalIcon)(c,m.KTICON_OWNER),tabIndex:0,role:"button",ariaLabel:(0,o.localize)("aiNative.inline.chat.operate.thumbsdown.title"),ariaPressed:c==="thumbsdown-fill"?"true":"false"})))};t.Thumbs=s},81878:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Scroll=t.Scrollbars=t.NativeSelect=void 0;const n=e(85608);n.__exportStar(e(97885),t),n.__exportStar(e(73215),t),n.__exportStar(e(32293),t);var r=e(77331);Object.defineProperty(t,"NativeSelect",{enumerable:!0,get:function(){return r.Select}}),n.__exportStar(e(48412),t),n.__exportStar(e(79383),t),n.__exportStar(e(50708),t),n.__exportStar(e(7273),t),n.__exportStar(e(14640),t),n.__exportStar(e(54076),t),n.__exportStar(e(79024),t),n.__exportStar(e(89832),t),n.__exportStar(e(54713),t),n.__exportStar(e(18875),t),n.__exportStar(e(91397),t),n.__exportStar(e(31059),t),n.__exportStar(e(72871),t),n.__exportStar(e(34128),t);var o=e(77011);Object.defineProperty(t,"Scrollbars",{enumerable:!0,get:function(){return o.Scrollbars}}),Object.defineProperty(t,"Scroll",{enumerable:!0,get:function(){return o.Scrollbars}})},57327:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BoxPanel=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importStar(e(14041)),l=e(48560),p=e(38578),v=e(55693),m=e(25719),_=n.__importDefault(e(91290)),s=({className:f,children:a=[],direction:h="left-to-right",...u})=>{const d=o.default.Children.toArray(a),E=(0,l.useInjectable)(p.AppConfig),g=(0,v.useDesignStyles)(_.default["box-panel"],"box-panel");(0,o.useEffect)(()=>{E.didRendered&&E.didRendered()},[]);const c=m.Layout.getStyleProperties(h);return o.default.createElement("div",{...u,className:(0,r.default)(g,f),style:{flexDirection:c.direction,zIndex:u.zIndex||u["z-index"]}},d.map((b,y)=>{const S=b.props||{};return o.default.createElement("div",{key:y,id:S["data-wrapper-id"],className:(0,r.default)(_.default.wrapper,S["data-wrapper-class"]),style:{flex:S.flex,overflow:S.overflow,zIndex:S.zIndex||S["z-index"],[c.minSize]:S.defaultSize,backgroundColor:S.backgroundColor}},b)}))};t.BoxPanel=s},28003:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DefaultLayout=t.getStorageValue=void 0,t.ToolbarActionBasedLayout=m,t.fixLayout=_;const r=e(85608).__importDefault(e(14041)),o=e(52564),l=e(57327),p=e(99333),v=()=>{let s={},f={};try{const a=localStorage.getItem("layout");a&&(s=JSON.parse(a));const h=localStorage.getItem("theme");h&&(f=JSON.parse(h))}catch{}return{layout:_(s),colors:f}};t.getStorageValue=v,t.DefaultLayout=m;function m(s={}){var f,a,h,u,d,E;const{layout:g}=(0,t.getStorageValue)();return r.default.createElement(l.BoxPanel,{direction:"top-to-bottom"},r.default.createElement(o.SlotRenderer,{id:"top",defaultSize:s.topSlotDefaultSize||0,slot:"top",zIndex:s.topSlotZIndex}),r.default.createElement(p.SplitPanel,{id:"main-horizontal",flex:1},r.default.createElement(o.SlotRenderer,{slot:"left",isTabbar:!0,defaultSize:!((f=g.left)===null||f===void 0)&&f.currentId?((a=g.left)===null||a===void 0?void 0:a.size)||310:49,minResize:280,maxResize:480,minSize:49}),r.default.createElement(p.SplitPanel,{id:"main-vertical",minResize:300,flexGrow:1,direction:"top-to-bottom"},r.default.createElement(o.SlotRenderer,{flex:2,flexGrow:1,minResize:200,slot:"main"}),r.default.createElement(o.SlotRenderer,{flex:1,defaultSize:!((h=g.bottom)===null||h===void 0)&&h.currentId?(u=g.bottom)===null||u===void 0?void 0:u.size:24,minResize:160,slot:"bottom",isTabbar:!0})),r.default.createElement(o.SlotRenderer,{slot:"right",isTabbar:!0,defaultSize:!((d=g.right)===null||d===void 0)&&d.currentId?((E=g.right)===null||E===void 0?void 0:E.size)||310:0,minResize:280,maxResize:480,minSize:0})),r.default.createElement(o.SlotRenderer,{id:"statusBar",defaultSize:24,slot:"statusBar"}))}function _(s){const f={...s};for(const a in s)s[a]&&(s[a].size||(f[a].currentId=""));return f}},32293:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(85608);n.__exportStar(e(25719),t),n.__exportStar(e(99333),t),n.__exportStar(e(57327),t),n.__exportStar(e(28003),t)},25719:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Layout=void 0;const n=e(73215),r={"left-to-right":{direction:"row",size:"width",domSize:"clientHeight",minSize:"minWidth",maxSize:"maxWidth"},"right-to-left":{direction:"row-reverse",size:"width",domSize:"clientHeight",minSize:"minWidth",maxSize:"maxWidth"},"top-to-bottom":{direction:"column",size:"height",domSize:"clientWidth",minSize:"minHeight",maxSize:"maxHeight"},"bottom-to-top":{direction:"column-reverse",size:"height",domSize:"clientWidth",minSize:"minHeight",maxSize:"maxHeight"}};var o;(function(l){function p(u){return r[u]}l.getStyleProperties=p;function v(u){return r[u].direction}l.getFlexDirection=v;function m(u){return r[u].size}l.getSizeProperty=m;function _(u){return r[u].domSize}l.getDomSizeProperty=_;function s(u){return r[u].minSize}l.getMinSizeProperty=s;function f(u){return r[u].maxSize}l.getMaxSizeProperty=f;function a(u){return u==="bottom-to-top"||u==="top-to-bottom"?n.ResizeHandleVertical:n.ResizeHandleHorizontal}l.getResizeHandle=a;function h(u){return u==="bottom-to-top"||u==="top-to-bottom"?"row":"column"}l.getTabbarDirection=h})(o||(t.Layout=o={}))},99333:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SplitPanel=t.PanelContext=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importDefault(e(14041)),l=e(43718),p=e(68456),v=e(48560),m=e(73215),_=e(25719),s=e(71707),f=n.__importDefault(e(91290));t.PanelContext=o.default.createContext({setSize:(d,E)=>{},setRelativeSize:(d,E,g)=>{},getSize:d=>0,getRelativeSize:d=>[0,0],lockSize:(d,E)=>{},setMaxSize:(d,E)=>{},hidePanel:d=>{}});const a=(d,E,g)=>{var c,b;return(b=d&&d.props&&((c=d.props[E])!==null&&c!==void 0?c:d.props[`data-sp-${E}`]))!==null&&b!==void 0?b:g};function h(d,E){return a(d,"savedSize")?a(d,"savedSize")+"px":a(d,"defaultSize")!==void 0?a(d,"defaultSize")+"px":a(d,"flex")?a(d,"flex")/E*100+"%":1/E*100+"%"}const u=d=>{const E=(0,v.useInjectable)(s.SplitPanelManager).getService(d.id),{id:g,className:c,headerSize:b,resizeHandleClassName:y,style:S,children:A=[],direction:w="left-to-right",resizeKeep:T=!0,dynamicTarget:D}=o.default.useMemo(()=>E.interceptProps(d),[E,E.interceptProps,d]),I=_.Layout.getResizeHandle(w),R=_.Layout.getStyleProperties(w),M=o.default.useMemo(()=>o.default.Children.toArray(A),[A]),O=o.default.useMemo(()=>M.find(ye=>a(ye,"flexGrow")),[M]),P=o.default.useMemo(()=>M.reduce((ye,ie)=>ye+a(ie,"flex",1),0),[M]),k=o.default.useRef([]),F=(0,v.useInjectable)(l.IEventBus),L=o.default.useRef(),B=o.default.useRef(M.map(()=>!1)),j=o.default.useRef(M.map(()=>!1)),W=o.default.useRef(B.current.slice(0,M.length-1)),[U,X]=o.default.useState(W.current),[V,$]=o.default.useState(j.current),[Y,z]=o.default.useState(B.current);E.panels=[];const H=o.default.useCallback(ye=>(ie,fe)=>{const Me=fe?ye-1:ye,Le=k.current[Me];Le&&Le.setAbsoluteSize(ie!==void 0?ie:a(M[ye],"defaultSize"),fe,T)},[k.current]),K=o.default.useCallback(ye=>(ie,fe,Me)=>{const Le=Me?ye-1:ye,Ce=k.current[Le];Ce&&Ce.setRelativeSize(ie,fe)},[k.current]),Z=o.default.useCallback(ye=>ie=>{const fe=ie?ye-1:ye,Me=k.current[fe];return Me?Me.getAbsoluteSize(ie):0},[k.current]),Q=o.default.useCallback(ye=>ie=>{const fe=ie?ye-1:ye,Me=k.current[fe];return Me?Me.getRelativeSize():[0,0]},[k.current]),oe=o.default.useCallback(ye=>(ie,fe)=>{const Me=fe?ye-1:ye,Le=W.current.map((Ce,Ae)=>Ae===Me?ie!==void 0?ie:!Ce:Ce);W.current=Le,X(Le)},[k.current]),ne=o.default.useCallback(ye=>ie=>{const fe=B.current.map((Me,Le)=>Le===ye?ie!==void 0?ie:!Me:Me);B.current=fe,z(fe)},[k.current]),he=o.default.useCallback(ye=>ie=>{const fe=j.current.map((Le,Ce)=>Ce===ye?ie!==void 0?!ie:!Le:Le);j.current=fe;const Me=a(M[ye],"slot")||a(M[ye],"id");Me&&_e(Me),$(fe)},[M,j.current]),_e=o.default.useCallback(ye=>{ye&&(F.fire(new p.ResizeEvent({slotLocation:ye})),F.fireDirective(p.ResizeEvent.createDirective(ye)))},[F]),q=o.default.useMemo(()=>M.map((ye,ie)=>{const fe=[],Me=a(ye,"minSize"),Le=a(ye,"maxSize"),Ce=a(ye,"flexGrow");if(ie!==0){const Ae=ie===1?M[ie-1]:M[ie];let ve;Ce?ve=m.ResizeFlexMode.Prev:a(M[ie-1],"flexGrow")&&(ve=m.ResizeFlexMode.Next),a(Ae,"noResize")||U[ie-1]||fe.push(o.default.createElement(I,{className:y,onResize:()=>{const xe=a(M[ie-1],"slot")||a(M[ie-1],"id"),Ie=a(M[ie],"slot")||a(M[ie],"id");_e(xe),_e(Ie)},noColor:!0,findNextElement:D?xe=>E.getFirstResizablePanel(ie-1,xe):void 0,findPrevElement:D?xe=>E.getFirstResizablePanel(ie-1,xe,!0):void 0,key:`split-handle-${ie}`,delegate:xe=>{k.current.push(xe)},flexMode:ve}))}return fe.push(o.default.createElement(t.PanelContext.Provider,{key:ie,value:{setSize:H(ie),getSize:Z(ie),setRelativeSize:K(ie),getRelativeSize:Q(ie),lockSize:oe(ie),setMaxSize:ne(ie),hidePanel:he(ie)}},o.default.createElement("div",{"data-min-resize":a(ye,"minResize"),"data-max-resize":a(ye,"maxResize"),ref:Ae=>{Ae&&E.panels.indexOf(Ae)===-1&&E.panels.push(Ae)},className:h(ye,P)===`${b}px`?m.RESIZE_LOCK:"",id:a(ye,"id"),style:{...a(ye,"flex")&&!a(ye,"savedSize")&&!O?{flex:a(ye,"flex")}:{[R.size]:h(ye,P)},[R.minSize]:Me?Me+"px":"-1px",[R.maxSize]:Y[ie]&&Le?Le+"px":"unset",...Ce!==void 0?{flexGrow:Ce}:{},display:V[ie]?"none":"block"}},ye))),fe}).filter(Boolean),[A,M,y,D,k.current,V,U]);return o.default.useEffect(()=>{L.current&&E.setRootNode(L.current);const ye=F.onDirective(p.ResizeEvent.createDirective(g),()=>{M.forEach(ie=>{_e(a(ie,"slot")||a(ie,"id"))})});return()=>{ye.dispose()}},[]),o.default.useMemo(()=>{const{minResize:ye,flexGrow:ie,minSize:fe,maxSize:Me,savedSize:Le,defaultSize:Ce,flex:Ae,noResize:ve,slot:ge,headerSize:xe,...Ie}=d;return delete Ie.resizeHandleClassName,delete Ie.dynamicTarget,delete Ie.resizeKeep,delete Ie.direction,E.renderSplitPanel(o.default.createElement("div",{...Ie,ref:We=>L.current=We,className:(0,r.default)(f.default["split-panel"],c),style:{flexDirection:R.direction,...S},"data-min-resize":ye,"data-max-resize":Me,"data-min-size":fe,"data-max-size":Me,"data-saved-size":Le,"data-default-size":Ce,"data-header-size":xe,"data-flex":Ae,"data-flex-grow":ie,"data-no-resize":ve,"data-slot":ge}),q,Ie)},[E,E.renderSplitPanel,q,L,S,d])};t.SplitPanel=u},71707:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SplitPanelManager=t.SplitPanelService=t.ISplitPanelService=void 0;const n=e(85608),r=n.__importDefault(e(14041)),o=e(76003),l=e(43718),p=e(38578),v=e(73215);t.ISplitPanelService=Symbol("ISplitPanelService");let m=class extends l.Disposable{constructor(f){super(),this.panelId=f,this._whenReadyDeferred=new l.Deferred,this.panels=[]}get isVisible(){return this.rootNode&&this.rootNode.clientHeight>0||!1}get whenReady(){return this._whenReadyDeferred.promise}setRootNode(f){this.rootNode=f,this._whenReadyDeferred.resolve()}getFirstResizablePanel(f,a,h){if(h){if(a){for(let u=f;u>=0;u--)if(!this.panels[u].classList.contains(v.RESIZE_LOCK))return this.panels[u]}else for(let u=f;u>=0;u--)if(!this.panels[u].classList.contains(v.RESIZE_LOCK))return this.panels[u]}else if(a){for(let u=f+1;u<this.panels.length;u++)if(!this.panels[u].classList.contains(v.RESIZE_LOCK))return this.panels[u]}else for(let u=f+1;u<this.panels.length;u++)if(!this.panels[u].classList.contains(v.RESIZE_LOCK))return this.panels[u]}checkChildNoResize(f){var a,h;if(f&&f.type===p.SlotRenderer){const u=(h=this.appConfig.layoutConfig[(a=f.props)===null||a===void 0?void 0:a.slot])===null||h===void 0?void 0:h.modules;if(!u||u.length===0)return!0}return!1}renderSplitPanel(f,a,h){return r.default.cloneElement(f,{...h,...f.props},a)}interceptProps(f){return f}};t.SplitPanelService=m,n.__decorate([(0,o.Autowired)(p.AppConfig),n.__metadata("design:type",Object)],m.prototype,"appConfig",void 0),t.SplitPanelService=m=n.__decorate([(0,o.Injectable)({multiple:!0}),n.__metadata("design:paramtypes",[String])],m);let _=class{constructor(){this.services=new Map}getService(f){let a=this.services.get(f);return a||(a=this.injector.get(t.ISplitPanelService,[f]),this.services.set(f,a)),a}};t.SplitPanelManager=_,n.__decorate([(0,o.Autowired)(o.INJECTOR_TOKEN),n.__metadata("design:type",o.Injector)],_.prototype,"injector",void 0),t.SplitPanelManager=_=n.__decorate([(0,o.Injectable)()],_)},89897:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),e(85608).__exportStar(e(85266),t)},85266:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Loading=void 0;const r=e(85608).__importDefault(e(14041));e(18182);const o=()=>r.default.createElement("div",{className:"loading_indicator "});t.Loading=o,t.Loading.displayName="Loading"},97885:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=e(85608).__importDefault(e(43144)),o=e(48560),l=({id:p,className:v,children:m})=>{const _=(0,o.usePortal)(p,v);return r.default.createPortal(m,_)};t.default=l},73215:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ResizeHandleVertical=t.ResizeHandleHorizontal=t.ResizeFlexMode=t.RESIZE_LOCK=void 0,t.preventWebviewCatchMouseEvents=m,t.allowWebviewCatchMouseEvents=_;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importDefault(e(14041)),l=e(22366),p=n.__importDefault(e(57482));t.RESIZE_LOCK="resize-lock";var v;(function(a){a.Prev="prev",a.Next="next",a.Percentage="Percentage"})(v||(t.ResizeFlexMode=v={}));function m(){const a=document.getElementsByTagName("iframe"),h=document.getElementsByTagName("webview"),u=document.getElementsByClassName("shadow-root-host");for(const d of h)d.classList.add("none-pointer-event");for(const d of a)d.classList.add("none-pointer-event");for(const d of u)d?.classList.add("none-pointer-event")}function _(){const a=document.getElementsByTagName("iframe"),h=document.getElementsByTagName("webview"),u=document.getElementsByClassName("shadow-root-host");for(const d of h)d.classList.remove("none-pointer-event");for(const d of a)d.classList.remove("none-pointer-event");for(const d of u)d?.classList.remove("none-pointer-event")}const s=a=>{const h=o.default.useRef(),u=o.default.useRef(!1),d=o.default.useRef(0),E=o.default.useRef(0),g=o.default.useRef(0),c=o.default.useRef(),b=o.default.useRef(),y=o.default.useRef(),S=(L,B)=>{const j=a.findPrevElement?a.findPrevElement():c.current,W=a.findNextElement?a.findNextElement():b.current;if(j&&j.classList.contains(t.RESIZE_LOCK)||W&&W.classList.contains(t.RESIZE_LOCK))return;const U=h.current.parentElement.offsetWidth,X=Number(j?.dataset.minResize||0),V=Number(W?.dataset.minResize||0),$=Number(j?.dataset.maxResize||0),Y=Number(W?.dataset.maxResize||0);(X||V)&&(L*U<=X||B*U<=V)||($||Y)&&(L*U>=$||B*U>=Y)||(W&&(W.style.width=B*100+"%"),j&&(j.style.width=L*100+"%"),a.onResize&&W&&j&&a.onResize(j,W))},A=(L,B,j,W)=>{var U,X;const V=a.findPrevElement?a.findPrevElement(W):c.current,$=a.findNextElement?a.findNextElement(W):b.current,Y=Number((U=V?.dataset.minResize)!==null&&U!==void 0?U:0),z=Number((X=$?.dataset.minResize)!==null&&X!==void 0?X:0),H=V?.dataset.maxResize?Number(V?.dataset.maxResize):null,K=$?.dataset.maxResize?Number($?.dataset.maxResize):null,Z=a.flexMode===v.Prev,Q=Z?V:$,oe=Z?$:V;let ne=Z?L:B;j||((Y||z)&&(Z?Y>L?ne=Y:z>B&&(ne=L+B-z):z>B?ne=z:Y>L&&(ne=L+B-Y)),(H||K)&&(Z?H&&H<=L?ne=H:K&&K>B&&(ne=L+B-K):K&&K<=B?ne=K:H&&H>B&&(ne=L+B-H))),Q.style.width=ne+"px",Q.style.flexGrow="0",Q.style.flexShrink="1",oe.style.width="0",oe.style.flexGrow="1",oe.style.flexShrink="0",a.onResize&&$&&V&&a.onResize(V,$)},w=(L,B)=>{const j=c.current,W=b.current;let U;a.flexMode?U=(j.offsetWidth+W.offsetWidth)/j.parentElement.offsetWidth*100:U=+b.current.style.width.replace("%","")+ +c.current.style.width.replace("%",""),W&&(W.style.width=B/(L+B)*U+"%"),j&&(j.style.width=L/(L+B)*U+"%"),T(L,B),a.onResize&&W&&j&&a.onResize(j,W)},T=(L,B)=>{const j=c.current,W=b.current;let U=!1;j&&(L===0?(j.classList.add("kt_display_none"),U=!0):j.classList.remove("kt_display_none")),W&&(B===0?(W.classList.add("kt_display_none"),U=!0):W.classList.remove("kt_display_none")),h.current&&(U?h.current.classList.add("none-pointer-event"):h.current.classList.remove("none-pointer-event"))},D=()=>{const L=c.current.clientWidth,B=b.current.clientWidth,j=L+B,W=[];return W.push(L/j),W.push(B/j),W},I=(L,B)=>{l.fastdom.measure(()=>{const j=c.current.clientWidth,W=b.current.clientWidth,U=j+W;if(a.flexMode){const X=a.flexMode===v.Prev?L:U-L,V=a.flexMode===v.Next?L:U-L;A(X,V,!0)}else{const X=+b.current.style.width.replace("%",""),V=+c.current.style.width.replace("%",""),$=X+V;B?(b.current.style.width=$*(L/U)+"%",c.current.style.width=$*(1-L/U)+"%"):(c.current.style.width=$*(L/U)+"%",b.current.style.width=$*(1-L/U)+"%")}B?T(U-L,L):T(L,U-L),a.onResize&&a.onResize(c.current,b.current)})},R=L=>L?b.current.clientWidth:c.current.clientWidth,M=L=>{const B=L.classList,j=p.default["resize-overflow-hidden"];B?.contains(j)||B.add(j)},O=L=>{const B=L.classList,j=p.default["resize-overflow-hidden"];B?.contains(j)&&B.remove(j)},P=L=>{if(L.preventDefault(),h.current&&h.current.classList.contains("no-resize"))return;const B=E.current+L.pageX-d.current,j=g.current-(L.pageX-d.current);y.current&&y.current.dispose(),y.current=l.fastdom.mutate(()=>{if(a.flexMode)A(B,j);else{const W=h.current.parentElement.offsetWidth;S(B/W,j/W)}})},k=()=>{u.current=!1,document.removeEventListener("mousemove",P),document.removeEventListener("mouseup",k),a.onFinished&&a.onFinished(),l.fastdom.mutate(()=>{var L;(L=h.current)===null||L===void 0||L.classList.remove(p.default.active),O(c.current),O(b.current),_()})},F=L=>{u.current=!0,document.addEventListener("mousemove",P),document.addEventListener("mouseup",k),d.current=L.pageX,l.fastdom.measure(()=>{E.current=c.current.offsetWidth,g.current=b.current.offsetWidth,l.fastdom.mutate(()=>{var B;(B=h.current)===null||B===void 0||B.classList.add(p.default.active),M(c.current),M(b.current),m()})})};return o.default.useEffect(()=>(h.current&&(h.current.addEventListener("mousedown",F),c.current=h.current.previousSibling,b.current=h.current.nextSibling),()=>{h.current&&(h.current.removeEventListener("mousedown",F),h.current.removeEventListener("mousemove",P),h.current.removeEventListener("mouseup",k))}),[]),a.delegate&&a.delegate({setSize:S,setAbsoluteSize:I,getAbsoluteSize:R,setRelativeSize:w,getRelativeSize:D}),o.default.createElement("div",{ref:L=>{h.current=L},className:(0,r.default)({[p.default["resize-handle-horizontal"]]:!0,[p.default["with-color"]]:!a.noColor,[a.className||""]:!0})})};t.ResizeHandleHorizontal=s;const f=a=>{const h=o.default.useRef(),u=o.default.useRef(!1),d=o.default.useRef(0),E=o.default.useRef(0),g=o.default.useRef(0),c=o.default.useRef(),b=o.default.useRef(),y=o.default.useRef(),S=o.default.useRef(),A=(L,B,j)=>{const W=a.findPrevElement?a.findPrevElement(j):c.current,U=a.findNextElement?a.findNextElement(j):b.current;!U||!W||W.classList.contains(t.RESIZE_LOCK)||U.classList.contains(t.RESIZE_LOCK)||(U.style.height=B*100+"%",W.style.height=L*100+"%",a.onResize&&a.onResize(W,U))},w=(L,B,j,W)=>{var U,X;const V=a.findPrevElement?a.findPrevElement(W):c.current,$=a.findNextElement?a.findNextElement(W):b.current;let Y,z,H=0;const K=Number(((U=V?.dataset)===null||U===void 0?void 0:U.minResize)||0),Z=Number(((X=$?.dataset)===null||X===void 0?void 0:X.minResize)||0);a.flexMode===v.Prev?(Y=V,z=$,H=L,j||(K>L?H=K:Z>B&&(H=L+B-Z))):(Y=$,z=V,H=B,j||(Z>B?H=Z:K>L&&(H=L+B-K))),Y.style.height=H+"px",Y.style.flexGrow="0",Y.style.flexShrink="1",z.style.height="0",z.style.flexGrow="1",z.style.flexShrink="0",a.onResize&&$&&V&&a.onResize(V,$)},T=(L,B)=>{const j=c.current,W=b.current;let U;a.flexMode?U=(j.offsetHeight+W.offsetHeight)/j.parentElement.offsetHeight*100:U=+W.style.height.replace("%","")+ +j.style.height.replace("%",""),W&&(W.style.height=B/(L+B)*U+"%"),j&&(j.style.height=L/(L+B)*U+"%"),D(L,B),a.onResize&&W&&j&&a.onResize(j,W)},D=(L,B)=>{const j=c.current,W=b.current;let U=!1;j&&(L===0?(j.classList.add("kt_display_none"),U=!0):j.classList.remove("kt_display_none")),W&&(B===0?(W.classList.add("kt_display_none"),U=!0):W.classList.remove("kt_display_none")),h.current&&(U?h.current.classList.add("none-pointer-event"):h.current.classList.remove("none-pointer-event"))},I=()=>{const L=c.current.clientHeight,B=b.current.clientHeight,j=L+B,W=[];return W.push(L/j),W.push(B/j),W},R=(L,B,j,W)=>{j.classList.contains(t.RESIZE_LOCK)||W.classList.contains(t.RESIZE_LOCK)||(W.style.height=B+"px",j.style.height=L+"px",W.style.flex="unset",j.style.flex="unset",a.onResize&&W&&j&&a.onResize(j,W))},M=(L,B,j)=>{if(!c.current||!b.current)return;const W=c.current.clientHeight,U=b.current.clientHeight,X=W+U;if(a.flexMode){const V=a.flexMode===v.Prev?L:X-L,$=a.flexMode===v.Next?L:X-L;w(V,$,!0)}else{const V=+b.current.style.height.replace(/\%|px/,""),$=+c.current.style.height.replace(/\%|px/,""),Y=V+$;if(B){j&&(c.current.style.height=Y*(1-L/X)+"%");const z=Y*(L/X);b.current.style.height=z===0?z+"px":z+"%"}else c.current.style.height=Y*(L/X)+"%",j&&(b.current.style.height=Y*(1-L/X)+"%")}B?D(X-L,L):D(L,X-L),a.onResize&&a.onResize(c.current,b.current)},O=L=>L?b.current.clientHeight:c.current.clientHeight,P=L=>{u.current=!0,document.addEventListener("mousemove",k),document.addEventListener("mouseup",F),d.current=L.pageY,S.current=b.current,y.current=c.current,l.fastdom.measure(()=>{E.current=c.current.offsetHeight,g.current=b.current.offsetHeight,l.fastdom.mutate(()=>{var B;(B=h.current)===null||B===void 0||B.classList.add(p.default.active),m()})})},k=L=>{L.preventDefault(),!(h.current&&h.current.classList.contains("no-resize"))&&l.fastdom.measure(()=>{const B=L.pageY>d.current,j=a.findNextElement?a.findNextElement(B):null,W=a.findPrevElement?a.findPrevElement(B):null;if(j!==null&&S.current!==j||W!==null&&y.current!==W){if(!j||!W)return;S.current=j,y.current=W,d.current=L.pageY,E.current=y.current.offsetHeight,g.current=S.current.offsetHeight}const U=E.current+L.pageY-d.current,X=g.current-(L.pageY-d.current),V=Number(y.current.dataset.minResize||0),$=Number(S.current.dataset.minResize||0);(V||$)&&(U<=V||X<=$)||l.fastdom.mutate(()=>{if(a.flexMode===v.Prev||a.flexMode===v.Next)w(U,X);else if(a.flexMode===v.Percentage){const Y=h.current.parentElement.offsetHeight;A(U/Y,X/Y)}else R(U,X,y.current,S.current)})})},F=L=>{u.current=!1,document.removeEventListener("mousemove",k),document.removeEventListener("mouseup",F),l.fastdom.mutate(()=>{var B;(B=h.current)===null||B===void 0||B.classList.remove(p.default.active),a.onFinished&&a.onFinished(),_()})};return o.default.useEffect(()=>(h.current.addEventListener("mousedown",P),c.current=h.current.previousSibling,b.current=h.current.nextSibling,()=>{h.current.removeEventListener("mousedown",P),document.removeEventListener("mousemove",k),document.removeEventListener("mouseup",F)}),[]),a.delegate&&a.delegate({setSize:A,setAbsoluteSize:M,getAbsoluteSize:O,setRelativeSize:T,getRelativeSize:I}),o.default.createElement("div",{ref:L=>L&&(h.current=L),className:(0,r.default)({[p.default["resize-handle-vertical"]]:!0,[a.className||""]:!0,[p.default["with-color"]]:!a.noColor})})};t.ResizeHandleVertical=f},77331:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Select=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importDefault(e(14041));n.__exportStar(e(88706),t);const l=p=>(p={...p,className:(0,r.default)("kt_select",p.className)},o.default.createElement("select",{...p}));t.Select=l},53736:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ContextKeyChangeEvent=t.IContextKeyService=void 0;const n=e(43718);t.IContextKeyService=Symbol("IContextKeyService");class r extends n.BasicEvent{}t.ContextKeyChangeEvent=r},50394:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InlineInputWidgetIsStreaming=t.InlineInputWidgetIsVisible=t.CodeEditsIsVisible=t.InlineDiffPartialEditsIsVisible=t.InlineHintWidgetIsVisible=t.InlineCompletionIsTrigger=t.InlineChatIsVisible=void 0;const n=e(40191);t.InlineChatIsVisible=new n.RawContextKey("ai.native.inlineChatIsVisible",!1),t.InlineCompletionIsTrigger=new n.RawContextKey("ai.native.inlineCompletionIsTrigger",!1),t.InlineHintWidgetIsVisible=new n.RawContextKey("ai.native.inlineHintWidgetIsVisible",!1),t.InlineDiffPartialEditsIsVisible=new n.RawContextKey("ai.native.inlineDiffPartialEditsIsVisible",!1),t.CodeEditsIsVisible=new n.RawContextKey("ai.native.codeEditsIsVisible",!1),t.InlineInputWidgetIsVisible=new n.RawContextKey("ai.native.inlineInputWidgetIsVisible",!1),t.InlineInputWidgetIsStreaming=new n.RawContextKey("ai.native.inlineInputWidgetIsStreaming",!1)},20162:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FileDialogViewVisibleContext=t.DialogViewVisibleContext=void 0;const n=e(40191);t.DialogViewVisibleContext=new n.RawContextKey("dialogViewVisible",!1),t.FileDialogViewVisibleContext=new n.RawContextKey("fileDialogViewVisible",!1)},16413:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ExplorerCompressedLastFocusContext=t.ExplorerCompressedFirstFocusContext=t.ExplorerCompressedFocusContext=t.FilesExplorerFilteredContext=t.FilesExplorerInputFocusedContext=t.FilesExplorerFocusedContext=t.ExplorerFilteredContext=t.ExplorerFocusedContext=t.ExplorerResourceCut=t.ExplorerViewletVisibleContext=t.ExplorerResourceIsFolderContext=void 0;const n=e(40191);t.ExplorerResourceIsFolderContext=new n.RawContextKey("explorerResourceIsFolder",!1),t.ExplorerViewletVisibleContext=new n.RawContextKey("explorerViewletVisible",!0),t.ExplorerResourceCut=new n.RawContextKey("explorerResourceCut",!1),t.ExplorerFocusedContext=new n.RawContextKey("explorerViewletFocus",!1),t.ExplorerFilteredContext=new n.RawContextKey("explorerViewletFilter",!1),t.FilesExplorerFocusedContext=new n.RawContextKey("filesExplorerFocus",!1),t.FilesExplorerInputFocusedContext=new n.RawContextKey("filesExplorerInputFocus",!1),t.FilesExplorerFilteredContext=new n.RawContextKey("filesExplorerFilteredContext",!1),t.ExplorerCompressedFocusContext=new n.RawContextKey("explorerViewletCompressedFocus",!1),t.ExplorerCompressedFirstFocusContext=new n.RawContextKey("explorerViewletCompressedFirstFocus",!1),t.ExplorerCompressedLastFocusContext=new n.RawContextKey("explorerViewletCompressedLastFocus",!1)},66e3:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(85608);n.__exportStar(e(16413),t),n.__exportStar(e(91830),t),n.__exportStar(e(29906),t),n.__exportStar(e(96774),t),n.__exportStar(e(73537),t),n.__exportStar(e(20162),t)},379:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ShowExcludedFilesFilterContextKey=t.ShowActiveFileFilterContextKey=t.ShowInfoFilterContextKey=t.ShowWarningsFilterContextKey=t.ShowErrorsFilterContextKey=t.RelatedInformationFocusContextKey=t.MarkerViewFilterFocusContextKey=t.MarkerFocusContextKey=t.MarkersTreeVisibilityContextKey=void 0;const n=e(40191);t.MarkersTreeVisibilityContextKey=new n.RawContextKey("problemsVisibility",!1),t.MarkerFocusContextKey=new n.RawContextKey("problemFocus",!1),t.MarkerViewFilterFocusContextKey=new n.RawContextKey("problemsFilterFocus",!1),t.RelatedInformationFocusContextKey=new n.RawContextKey("relatedInformationFocus",!1),t.ShowErrorsFilterContextKey=new n.RawContextKey("problems.filter.errors",!0),t.ShowWarningsFilterContextKey=new n.RawContextKey("problems.filter.warnings",!0),t.ShowInfoFilterContextKey=new n.RawContextKey("problems.filter.info",!0),t.ShowActiveFileFilterContextKey=new n.RawContextKey("problems.filter.activeFile",!1),t.ShowExcludedFilesFilterContextKey=new n.RawContextKey("problems.filter.excludedFiles",!0)},96774:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OutlineFollowCursorContext=t.OutlineSortTypeContext=void 0;const n=e(40191);t.OutlineSortTypeContext=new n.RawContextKey("outlineSortType",0),t.OutlineFollowCursorContext=new n.RawContextKey("outlineFollowCursor",!1)},91830:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ResourceContextKey=void 0;const n=e(43718),r=e(63214);class o{constructor(p,v=r.getLanguageIdFromMonaco,m="resource"){if(this.contextKeyService=p,this.languageResolver=v,!m)throw new Error("resource key prefix cannot be empty!");this.resourceScheme=this.contextKeyService.createKey(m+"Scheme",""),this.resourceFilename=this.contextKeyService.createKey(m+"Filename",""),this.resourceExtname=this.contextKeyService.createKey(m+"Extname",""),this.resourceLangId=this.contextKeyService.createKey(m+"LangId",""),this.resourceKey=this.contextKeyService.createKey(m,""),this.isFileSystemResource=this.contextKeyService.createKey("isFileSystem"+m.substr(0,1).toUpperCase()+m.substr(1),!1)}set(p){if(!p){this.reset();return}const v=this.resourceKey.get();p.isEqual(new n.URI(v))||(this.resourceScheme.set(p.scheme),this.resourceFilename.set(p.path.name+p.path.ext),this.resourceExtname.set(p.path.ext),this.resourceLangId.set(this.languageResolver(p)),this.resourceKey.set(p.toString()),this.isFileSystemResource.set(p.scheme===n.Schemes.file))}reset(){this.resourceScheme.set(""),this.resourceFilename.set(""),this.resourceExtname.set(""),this.resourceLangId.set(""),this.resourceKey.set(""),this.isFileSystemResource.set(!1)}}t.ResourceContextKey=o},67386:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InTreeViewKey=t.ViewHasSomeCollapsibleKey=t.ViewHasFilePatternKey=t.ViewHasReplacePatternKey=t.ViewHasSearchPatternKey=t.MatchFocusKey=t.ResourceFolderFocusKey=t.FolderFocusKey=t.FileFocusKey=t.FileMatchOrFolderMatchWithResourceFocusKey=t.FileMatchOrFolderMatchFocusKey=t.FileMatchOrMatchFocusKey=t.FirstMatchFocusKey=t.ReplaceActiveKey=t.PatternExcludesFocusedKey=t.PatternIncludesFocusedKey=t.InputBoxFocusedKey=t.SearchViewVisibleKey=t.HasSearchResults=t.ReplaceInputBoxFocusedKey=t.SearchInputBoxFocusedKey=t.SearchViewFocusedKey=void 0;const n=e(40191);t.SearchViewFocusedKey=new n.RawContextKey("searchViewletFocus",!1),t.SearchInputBoxFocusedKey=new n.RawContextKey("searchInputBoxFocus",!1),t.ReplaceInputBoxFocusedKey=new n.RawContextKey("replaceInputBoxFocus",!1),t.HasSearchResults=new n.RawContextKey("hasSearchResult",!1),t.SearchViewVisibleKey=new n.RawContextKey("searchViewletVisible",!0),t.InputBoxFocusedKey=new n.RawContextKey("inputBoxFocus",!1),t.PatternIncludesFocusedKey=new n.RawContextKey("patternIncludesInputBoxFocus",!1),t.PatternExcludesFocusedKey=new n.RawContextKey("patternExcludesInputBoxFocus",!1),t.ReplaceActiveKey=new n.RawContextKey("replaceActive",!1),t.FirstMatchFocusKey=new n.RawContextKey("firstMatchFocus",!1),t.FileMatchOrMatchFocusKey=new n.RawContextKey("fileMatchOrMatchFocus",!1),t.FileMatchOrFolderMatchFocusKey=new n.RawContextKey("fileMatchOrFolderMatchFocus",!1),t.FileMatchOrFolderMatchWithResourceFocusKey=new n.RawContextKey("fileMatchOrFolderMatchWithResourceFocus",!1),t.FileFocusKey=new n.RawContextKey("fileMatchFocus",!1),t.FolderFocusKey=new n.RawContextKey("folderMatchFocus",!1),t.ResourceFolderFocusKey=new n.RawContextKey("folderMatchWithResourceFocus",!1),t.MatchFocusKey=new n.RawContextKey("matchFocus",!1),t.ViewHasSearchPatternKey=new n.RawContextKey("viewHasSearchPattern",!1),t.ViewHasReplacePatternKey=new n.RawContextKey("viewHasReplacePattern",!1),t.ViewHasFilePatternKey=new n.RawContextKey("viewHasFilePattern",!1),t.ViewHasSomeCollapsibleKey=new n.RawContextKey("viewHasSomeCollapsibleResult",!1),t.InTreeViewKey=new n.RawContextKey("inTreeView",!1)},29906:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ShellExecutionSupported=t.IsTerminalFocused=t.IsTerminalViewInitialized=void 0;const n=e(40191);t.IsTerminalViewInitialized=new n.RawContextKey("isTerminalViewInitialized",!1),t.IsTerminalFocused=new n.RawContextKey("isTerminalFocused",!1),t.ShellExecutionSupported=new n.RawContextKey("shellExecutionSupported",!0)},12288:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TestingCanRefreshTests=t.TestingIsPeekVisible=t.TestingIsInPeek=t.TestingIsRunning=t.TestingHasAnyResults=t.TestingServiceHasDebuggableContextKey=t.TestingServiceProviderCount=void 0;const n=e(40191);t.TestingServiceProviderCount=new n.RawContextKey("service.testing.providerCount",0),t.TestingServiceHasDebuggableContextKey=new n.RawContextKey("service.testing.hasDebuggableContext",!1),t.TestingHasAnyResults=new n.RawContextKey("testing.hasAnyResults",!1),t.TestingIsRunning=new n.RawContextKey("testing.isRunning",!1),t.TestingIsInPeek=new n.RawContextKey("testing.isInPeek",!0),t.TestingIsPeekVisible=new n.RawContextKey("testing.isPeekVisible",!1),t.TestingCanRefreshTests=new n.RawContextKey("testing.canRefresh",!1)},73537:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.VirtualWorkspace=t.WorkspaceTrusted=t.WorkspaceFolderCount=t.WorkbenchState=void 0;const n=e(40191);t.WorkbenchState=new n.RawContextKey("workbenchState","empty"),t.WorkspaceFolderCount=new n.RawContextKey("workspaceFolderCount",0),t.WorkspaceTrusted=new n.RawContextKey("isWorkspaceTrusted",!0),t.VirtualWorkspace=new n.RawContextKey("virtualWorkspace",!1)},18193:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CorePreferences=t.corePreferenceSchema=t.FILE_TREE_DEFAULTS=t.FILES_DEFAULTS=void 0,t.injectCorePreferences=v;const n=e(43718),r=e(69734),o=e(87863),l=e(78132),p={confirmDelete:!0,confirmMove:!0};t.FILES_DEFAULTS={filesWatcherExclude:o.defaultFilesWatcherExcludes,filesExclude:{"**/.git":!0,"**/.svn":!0,"**/.hg":!0,"**/CVS":!0,"**/.DS_Store":!0}},t.FILE_TREE_DEFAULTS={baseIndent:10,indent:8},t.corePreferenceSchema={type:"object",properties:{[n.GeneralSettingsId.Language]:{type:"string",enum:(0,n.getAvailableLanguages)().map(m=>m.languageId),default:r.LOCALE_TYPES.EN_US},[n.GeneralSettingsId.Theme]:{type:"string",default:"vs-dark",enum:[]},"general.askReloadOnLanguageChange":{type:"boolean",default:!0,description:"%preference.description.general.askReloadOnLanguageChange%"},[n.GeneralSettingsId.Icon]:{type:"string",default:"vs-minimal",enum:[]},[n.GeneralSettingsId.ProductIconTheme]:{type:"string",default:"opensumi-icons",enum:["opensumi-icons"]},"workbench.colorCustomizations":{type:"object",description:"%preference.workbench.colorCustomizations%",default:{}},"application.supportsOpenFolder":{type:"boolean",default:!1,description:"Whether default open folder behavior is supported"},"application.supportsOpenWorkspace":{type:"boolean",default:!1,description:"Whether default open workspace behavior is supported"},"application.confirmExit":{type:"string",enum:["never","ifRequired","always"],default:"always",description:"When to confirm before closing the application window."},"application.preferMarkdownPreview":{type:"boolean",default:!1,description:"Use markdown preview first"},"application.invalidExthostReload":{type:"string",enum:["ifRequired","always"],default:"ifRequired",description:"Reload strategy when exthost process became invalid."},"workbench.list.openMode":{type:"string",enum:["singleClick","doubleClick"],default:"singleClick",description:"%preference.workbench.list.openMode%"},"workbench.commandPalette.history":{type:"number",default:50,minimum:0,description:"Controls the number of recently used commands to keep in history for the command palette. Set to 0 to disable command history."},"workbench.refactoringChanges.showPreviewStrategy":{type:"string",default:"askMe",enum:["show","hide","askMe"],description:"%preference.workbench.refactoringChanges.showPreviewStrategy%"},"workbench.quickOpen.preserveInput":{type:"boolean",default:!0,description:"%workbench.quickOpen.preserveInput%"},"workbench.hideSlotTabBarWhenHidePanel":{type:"boolean",default:!1,description:"%workbench.hideSlotTabBarWhenHidePanel%"},"explorer.confirmMove":{type:"boolean",default:p.confirmDelete,description:"%preference.explorer.confirm.move%"},"explorer.confirmDelete":{type:"boolean",default:p.confirmMove,description:"%preference.explorer.confirm.delete%"},"explorer.fileTree.baseIndent":{type:"number",default:t.FILE_TREE_DEFAULTS.baseIndent},"explorer.fileTree.indent":{type:"number",default:t.FILE_TREE_DEFAULTS.indent},"explorer.compactFolders":{type:"boolean",description:"%preference.explorer.compactFolders%",default:!0},"explorer.autoReveal":{type:"boolean",default:!0},"debug.toolbar.float":{type:"boolean",default:!0},"debug.breakpoint.editorHint":{type:"boolean",default:!0,description:"%preference.debug.breakpoint.editorHint%"},"debug.breakpoint.showBreakpointsInOverviewRuler":{type:"boolean",default:!1,description:"%preference.debug.breakpoint.showBreakpointsInOverviewRuler%"},"debug.toolbar.top":{type:"number",default:0,description:"%preference.debug.toolbar.top%"},"debug.toolbar.height":{type:"number",default:30,description:"%preference.debug.toolbar.height%"},"debug.console.filter.mode":{type:"string",enum:["filter","matcher"],default:"filter"},"files.exclude":{type:"object",description:"%preference.files.exclude%",default:t.FILES_DEFAULTS.filesExclude,additionalProperties:{anyOf:[{type:"boolean",description:(0,n.localize)("files.exclude.boolean","The glob pattern to match file paths against. Set to true or false to enable or disable the pattern.")}]}},"files.watcherExclude":{type:"object",default:t.FILES_DEFAULTS.filesWatcherExclude,description:"%preference.files.watcherExclude%"},"files.associations":{type:"object",markdownDescription:"%preference.files.associations%"},"files.encoding":{type:"string",description:"%preference.files.encoding%",default:"utf8",enum:Object.keys(n.SUPPORTED_ENCODINGS)},"files.eol":{type:"string",enum:[`
|
|
30259
30259
|
`,`\r
|
|
30260
30260
|
`,"auto"],default:"auto"},"files.trimFinalNewlines":{type:"boolean",default:!1},"files.trimTrailingWhitespace":{type:"boolean",default:!1},"files.insertFinalNewline":{type:"boolean",default:!1},"files.autoGuessEncoding":{type:"boolean",default:!1,description:"%preference.files.autoGuessEncoding%",included:Object.keys(n.SUPPORTED_ENCODINGS).length>1},"settings.userBeforeWorkspace":{type:"boolean",default:!1,description:"%settings.configuration.userBeforeWorkspace%"},"output.maxChannelLine":{type:"number",default:5e4,description:"%output.maxChannelLineDesc%"},"output.enableLogHighlight":{type:"boolean",default:!0,description:"%output.enableLogHighlightDesc%"},"output.enableSmartScroll":{type:"boolean",default:!0,description:"%output.enableSmartScrollDesc%"},"debug.inline.values":{type:"boolean",default:!1},"debug.console.wordWrap":{type:"boolean",default:!0},"toolbar.ignoreActions":{type:"object",patternProperties:{".*":{type:"array",items:[{type:"string"}]}},description:"%preference.toolbar.ignoreActions%"},"toolbar.buttonDisplay":{type:"string",enum:["icon","iconAndText"],default:"iconAndText",description:"%preference.toolbar.buttonDisplay%"},"toolbar.buttonTitleStyle":{type:"string",enum:["vertical","horizontal"],default:"horizontal"},"view.saveLayoutWithWorkspace":{type:"boolean",default:!1},"menubar.compactMode":{type:"boolean",default:!1},"editor.codeActionWidget.showHeaders":{type:"boolean",default:!0},"mergeEditor.autoApplyNonConflictChanges":{type:"boolean",default:!1}}},t.CorePreferences=Symbol("CorePreferences");function v(m){m.addProviders({token:t.CorePreferences,useFactory:_=>{const s=_.get(l.PreferenceService);return(0,l.createPreferenceProxy)(s,t.corePreferenceSchema)}})}},2758:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DesignStyleService=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=e(76003),l="design-";let p=class{get styles(){return this._styles}setStyles(m){this._styles=m}wrapStyles(m,_){return this._styles?m?(0,r.default)(m,this._styles[l+_]):"":m||""}};t.DesignStyleService=p,t.DesignStyleService=p=n.__decorate([(0,o.Injectable)()],p)},80832:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(85608);n.__exportStar(e(2758),t),n.__exportStar(e(66597),t),n.__exportStar(e(68576),t)},68576:(x,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StackingLevelStr=t.StackingLevel=void 0,t.StackingLevel=Object.freeze({Background:0,Workbench:1,Toolbar:2,XtermDecoration:8,ToolbarDropdown:10,EditorTabbarCurrent:11,ResizeHandle:12,EditorTabbarOverlay:15,EditorFloatingContainer:20,FindWidget:25,Popup:100,Overlay:800,PopoverComponent:999,PopoverComponentArrow:1e3,OverlayTop:1e3}),t.StackingLevelStr=Object.fromEntries(Object.entries(t.StackingLevel).map(([e,n])=>[e,n.toString()]))},66597:(x,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IDesignStyleService=void 0,t.IDesignStyleService=Symbol("IDesignStyleService")},4246:(x,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.withPrevented=e;function e(n){return r=>{r.preventDefault(),r.stopPropagation(),n&&n(r)}}},19636:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(70392);class r{constructor(b,y){this._runner=b,this.priority=y,this._disposed=!1}run(){if(!this._disposed)try{this._runner()}catch(b){(0,n.onUnexpectedError)(b)}}dispose(){this._disposed=!0}}const o=new n.Heap({comparator:(c,b)=>b.priority-c.priority}),l=new n.Heap({comparator:(c,b)=>b.priority-c.priority});let p=o,v=l;function m(){p===o?(p=l,v=o):(p=o,v=l)}let _,s=!1;function f(){for(_=void 0,s=!0,m();p.size>0;)p.pop().run();s=!1}function a(){_||(_=requestAnimationFrame(f))}function h(c){s?p.add(c):v.add(c)}function u(c){const b=new r(c,1e4);return h(b),a(),b}function d(c){const b=new r(c,-1e4);return h(b),a(),b}function E(c){const b=new r(c,1e4);return v.add(b),a(),b}const g={measure:u,measureAtNextFrame:E,mutate:d};t.default=g},22366:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MouseEventButton=t.fastdom=t.FocusTracker=t.DomListener=t.EventType=void 0,t.isAncestor=p,t.addDisposableListener=m,t.trackFocus=s,t.createClassNameTokens=f,t.addClassName=a;const n=e(85608),r=e(43718),o=e(77714),l=n.__importDefault(e(19636));t.fastdom=l.default,n.__exportStar(e(4246),t),t.EventType={CLICK:"click",DBLCLICK:"dblclick",MOUSE_UP:"mouseup",MOUSE_DOWN:"mousedown",MOUSE_OVER:"mouseover",MOUSE_MOVE:"mousemove",MOUSE_OUT:"mouseout",MOUSE_ENTER:"mouseenter",MOUSE_LEAVE:"mouseleave",CONTEXT_MENU:"contextmenu",WHEEL:"wheel",KEY_DOWN:"keydown",KEY_PRESS:"keypress",KEY_UP:"keyup",LOAD:"load",UNLOAD:"unload",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:r.isWebKit?"webkitAnimationStart":"animationstart",ANIMATION_END:r.isWebKit?"webkitAnimationEnd":"animationend",ANIMATION_ITERATION:r.isWebKit?"webkitAnimationIteration":"animationiteration"};function p(h,u){for(;h;){if(h===u)return!0;h=h.parentNode}return!1}class v{constructor(u,d,E,g){this._node=u,this._type=d,this._handler=E,this._useCapture=g||!1,this._node.addEventListener(this._type,this._handler,this._useCapture)}dispose(){this._handler&&(this._node.removeEventListener(this._type,this._handler,this._useCapture),this._node=null,this._handler=null)}}t.DomListener=v;function m(h,u,d,E){return new v(h,u,d,E)}class _ extends r.Disposable{constructor(u){super(),this.didFocus=new r.Emitter,this.onDidFocus=this.didFocus.event,this.didBlur=new r.Emitter,this.onDidBlur=this.didBlur.event;let d=p(document.activeElement,u),E=!1;const g=()=>{E=!1,d||(d=!0,this.didFocus.fire())},c=()=>{d&&(E=!0,window.setTimeout(()=>{E&&(E=!1,d=!1,this.didBlur.fire())},0))};this.addDispose(this.didBlur),this.addDispose(this.didFocus),this.addDispose(new v(u,t.EventType.FOCUS,g,!0)),this.addDispose(new v(u,t.EventType.BLUR,c,!0))}}t.FocusTracker=_;function s(h){return new _(h)}t.MouseEventButton={Left:0,Middle:1,Right:2,Back:3,Forward:4};function f(h){return h.split(o.space).filter(Boolean)}function a(h,u){const d=f(u);h.classList.add(...d)}},5910:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EncodingRegistry=void 0;const n=e(85608),r=e(76003),o=e(43718),l=e(78132),p=e(63214);let v=class{constructor(){this.encodingOverrides=[]}registerOverride(_){return this.encodingOverrides.push(_),o.Disposable.create(()=>{const s=this.encodingOverrides.indexOf(_);s!==-1&&this.encodingOverrides.splice(s,1)})}getEncodingForResource(_,s){let f;const a=this.getEncodingOverride(_);return a?f=a:s?f=s:f=this.preferenceService.get("files.encoding",void 0,_.toString(),(0,p.getLanguageIdFromMonaco)(_)||void 0)||"",!f||!(0,o.encodingExists)(f)?o.UTF8:f}getEncodingOverride(_){if(this.encodingOverrides&&this.encodingOverrides.length){for(const s of this.encodingOverrides)if(s.parent&&_.isEqualOrParent(s.parent)||s.extension&&_.path.ext===`.${s.extension}`||s.scheme&&s.scheme===_.scheme)return s.encoding}}};t.EncodingRegistry=v,n.__decorate([(0,r.Autowired)(l.PreferenceService),n.__metadata("design:type",Object)],v.prototype,"preferenceService",void 0),t.EncodingRegistry=v=n.__decorate([(0,r.Injectable)()],v)},35018:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ExtensionsPointServiceImpl=t.OPENSUMI_EXTENSION_JSON_URI=t.EXTENSION_JSON_URI=void 0;const n=e(85608),r=n.__importDefault(e(56757)),o=n.__importDefault(e(46123)),l=n.__importDefault(e(52103)),p=n.__importDefault(e(41263)),v=e(76003),m=e(22689),_=e(14790),s=e(96702);t.EXTENSION_JSON_URI="vscode://schemas/vscode-extensions",t.OPENSUMI_EXTENSION_JSON_URI="vscode://schemas/opensumi-extensions";let f=class{registerSchema(){this.schemaRegistry.registerSchema(t.OPENSUMI_EXTENSION_JSON_URI,_.OpenSumiExtensionPackageSchema,["package.json"]),this.schemaRegistry.registerSchema(t.EXTENSION_JSON_URI,s.VSCodeExtensionPackageSchema,["package.json"])}appendPropertiesFactory(h){const u=h==="opensumi"?_.OpenSumiExtensionPackageSchema.properties.sumiContributes.properties:s.VSCodeExtensionPackageSchema.properties.contributes.properties;return(d,E)=>{const{extensionPoint:g,jsonSchema:c}=E,b=d.concat(g).filter(Boolean);if((0,l.default)(u,b)){const y=(0,o.default)(u,b.concat("properties"));(0,r.default)(c.properties,y)}(0,p.default)(u,b,c)}}appendOpenSumiProperties(h,u){this.appendPropertiesFactory("opensumi")(h,u)}appendVScodeProperties(h,u){this.appendPropertiesFactory("vscode")(h,u)}appendExtensionPoint(h,u){if(!u)return;const{frameworkKind:d=["vscode"]}=u;d.includes("opensumi")&&this.appendOpenSumiProperties(h,u),d.includes("vscode")&&this.appendVScodeProperties(h,u),this.registerSchema()}registerExtensionPoint(h){h&&this.appendExtensionPoint([],h)}};t.ExtensionsPointServiceImpl=f,n.__decorate([(0,v.Autowired)(m.IJSONSchemaRegistry),n.__metadata("design:type",Object)],f.prototype,"schemaRegistry",void 0),t.ExtensionsPointServiceImpl=f=n.__decorate([(0,v.Injectable)()],f)},23396:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(85608);n.__exportStar(e(35018),t),n.__exportStar(e(96702),t),n.__exportStar(e(14790),t)},21634:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.browserViews=void 0;const n=e(43718);var r;(function(o){o.properties={type:"object",required:["type","view"],defaultSnippets:[{label:"type",bodyText:JSON.stringify({type:"${1:add}",view:[{id:"${2}"}]},null," ")}],properties:{type:{type:"string",enum:["add","replace"]},view:{type:"array",items:{type:"object",required:["id"],defaultSnippets:[{label:'{"id":""}',description:"",bodyText:JSON.stringify({id:"${3}"},null," ")}],properties:{id:{type:"string",description:(0,n.localize)("sumiContributes.browserViews.view.id")},icon:{type:"string",markdownDescription:(0,n.localize)("sumiContributes.browserViews.view.icon")},iconPath:{type:"string",description:(0,n.localize)("sumiContributes.browserViews.view.iconPath")},title:{type:"string",description:(0,n.localize)("sumiContributes.browserViews.view.title")},titleComponentId:{type:"string",description:(0,n.localize)("sumiContributes.browserViews.view.titleComponentId")},expanded:{type:"boolean",description:(0,n.localize)("sumiContributes.browserViews.view.expanded")}}}}}},o.schema={description:(0,n.localize)("sumiContributes.browserViews"),type:"object",properties:{left:{...o.properties,description:(0,n.localize)("sumiContributes.browserViews.left")},right:{...o.properties,description:(0,n.localize)("sumiContributes.browserViews.right")},bottom:{...o.properties,description:(0,n.localize)("sumiContributes.browserViews.bottom")}}}})(r||(t.browserViews=r={}))},57559:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.menus=void 0;const n=e(43718),r=e(93899),o={type:"object",required:["command"],defaultSnippets:[{body:{command:"${1}"}}],properties:{command:{description:(0,n.localize)("sumiContributes.common.command"),type:"string"},when:{description:(0,n.localize)("sumiContributes.common.when"),type:"string"},group:{description:(0,n.localize)("sumiContributes.common.group"),type:"string"}}},l={type:"object",required:["id","title"],properties:{id:{description:(0,n.localize)("sumiContributes.submenus.id"),type:"string"},title:{description:(0,n.localize)("sumiContributes.submenus.title"),type:"string"},group:{description:(0,n.localize)("sumiContributes.common.group"),type:"string"},when:{type:"string",description:(0,n.localize)("sumiContributes.common.when")},icon:{description:(0,n.localize)("sumiContributes.submenus.icon"),anyOf:[{type:"string"},{type:"object",properties:{light:{description:(0,n.localize)("sumiContributes.submenus.icon.light"),type:"string"},dark:{description:(0,n.localize)("sumiContributes.submenus.dark"),type:"string"}}}]}}},p=[{id:r.MenuId.CommandPalette,description:(0,n.localize)("sumiContributes.menu.api.CommandPalette")},{id:r.MenuId.ActivityBarExtra,description:(0,n.localize)("sumiContributes.menu.api.ActivityBarExtra")},{id:r.MenuId.ActivityBarTopExtra,description:(0,n.localize)("sumiContributes.menu.api.ActivityBarTopExtra")},{id:r.MenuId.DebugBreakpointsContext,description:(0,n.localize)("sumiContributes.menu.api.DebugBreakpointsContext")},{id:r.MenuId.DebugCallStackContext,description:(0,n.localize)("sumiContributes.menu.api.DebugCallStackContext")},{id:r.MenuId.DebugConsoleContext,description:(0,n.localize)("sumiContributes.menu.api.DebugConsoleContext")},{id:r.MenuId.DebugVariablesContext,description:(0,n.localize)("sumiContributes.menu.api.DebugVariablesContext")},{id:r.MenuId.DebugWatchContext,description:(0,n.localize)("sumiContributes.menu.api.DebugWatchContext")},{id:r.MenuId.DebugToolBar,description:(0,n.localize)("sumiContributes.menu.api.DebugToolBar")},{id:r.MenuId.EditorContext,description:(0,n.localize)("sumiContributes.menu.api.EditorContext")},{id:r.MenuId.EditorTitle,description:(0,n.localize)("sumiContributes.menu.api.EditorTitle")},{id:r.MenuId.EditorTitleContext,description:(0,n.localize)("sumiContributes.menu.api.EditorTitleContext")},{id:r.MenuId.ExplorerContext,description:(0,n.localize)("sumiContributes.menu.api.ExplorerContext")},{id:r.MenuId.MenubarAppMenu,description:(0,n.localize)("sumiContributes.menu.api.MenubarAppMenu")},{id:r.MenuId.MenubarEditMenu,description:(0,n.localize)("sumiContributes.menu.api.MenubarEditMenu")},{id:r.MenuId.MenubarFileMenu,description:(0,n.localize)("sumiContributes.menu.api.MenubarFileMenu")},{id:r.MenuId.MenubarGoMenu,description:(0,n.localize)("sumiContributes.menu.api.MenubarGoMenu")},{id:r.MenuId.MenubarHelpMenu,description:(0,n.localize)("sumiContributes.menu.api.MenubarHelpMenu")},{id:r.MenuId.MenubarViewMenu,description:(0,n.localize)("sumiContributes.menu.api.MenubarViewMenu")},{id:r.MenuId.MenubarSelectionMenu,description:(0,n.localize)("sumiContributes.menu.api.MenubarSelectionMenu")},{id:r.MenuId.MenubarTerminalMenu,description:(0,n.localize)("sumiContributes.menu.api.MenubarTerminalMenu")},{id:r.MenuId.TerminalInstanceContext,description:(0,n.localize)("sumiContributes.menu.api.TerminalInstanceContext")},{id:r.MenuId.TerminalNewDropdownContext,description:(0,n.localize)("sumiContributes.menu.api.TerminalNewDropdownContext")},{id:r.MenuId.TerminalTabContext,description:(0,n.localize)("sumiContributes.menu.api.TerminalTabContext")},{id:r.MenuId.OpenEditorsContext,description:(0,n.localize)("sumiContributes.menu.api.OpenEditorsContext")},{id:r.MenuId.SCMResourceContext,description:(0,n.localize)("sumiContributes.menu.api.SCMResourceContext")},{id:r.MenuId.SCMResourceGroupContext,description:(0,n.localize)("sumiContributes.menu.api.SCMResourceGroupContext")},{id:r.MenuId.SCMResourceFolderContext,description:(0,n.localize)("sumiContributes.menu.api.SCMResourceFolderContext")},{id:r.MenuId.SCMTitle,description:(0,n.localize)("sumiContributes.menu.api.SCMTitle")},{id:r.MenuId.SCMInput,description:(0,n.localize)("sumiContributes.menu.api.SCMInput")},{id:r.MenuId.SearchContext,description:(0,n.localize)("sumiContributes.menu.api.SearchContext")},{id:r.MenuId.StatusBarContext,description:(0,n.localize)("sumiContributes.menu.api.StatusBarContext")},{id:r.MenuId.ViewItemContext,description:(0,n.localize)("sumiContributes.menu.api.ViewItemContext")},{id:r.MenuId.ViewTitle,description:(0,n.localize)("sumiContributes.menu.api.ViewTitle")},{id:r.MenuId.SettingsIconMenu,description:(0,n.localize)("sumiContributes.menu.api.SettingsIconMenu")}],v=(_,s,f)=>_.reduce((a,h)=>(a[s(h)]=f?f(h):h,a),Object.create(null));var m;(function(_){_.schema={description:(0,n.localize)("sumiContributes.menu"),type:"object",properties:v(p,s=>s.id,s=>({type:"array",description:s.description,items:o}))},_.subMenusSchema={description:(0,n.localize)("sumiContributes.submenus"),type:"object",additionalProperties:l}})(m||(t.menus=m={}))},14790:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OpenSumiExtensionPackageSchema=void 0;const n=e(43718);t.OpenSumiExtensionPackageSchema={properties:{sumiContributes:{description:(0,n.localize)("sumiContributes.contributes"),type:"object",properties:{},default:{}}}}},9905:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toolbar=void 0;const n=e(43718),r=(v,m)=>`${JSON.stringify(v)}: ${m}`,o={type:"object",properties:{title:{type:"string",description:(0,n.localize)("sumiContributes.toolbar.actions.title")},iconPath:{type:"string",description:(0,n.localize)("sumiContributes.toolbar.actions.iconPath")},iconMaskMode:{type:"boolean",description:(0,n.localize)("sumiContributes.toolbar.actions.iconMaskMode")},width:{type:"number",description:(0,n.localize)("sumiContributes.toolbar.actions.button.states.width")},height:{type:"number",description:(0,n.localize)("sumiContributes.toolbar.actions.button.states.height")},showTitle:{type:"boolean",description:(0,n.localize)("sumiContributes.toolbar.actions.button.states.showTitle")},iconForeground:{type:"string",description:(0,n.localize)("sumiContributes.toolbar.actions.button.states.iconForeground")},iconBackground:{type:"string",description:(0,n.localize)("sumiContributes.toolbar.actions.button.states.iconBackground")},titleForeground:{type:"string",description:(0,n.localize)("sumiContributes.toolbar.actions.button.states.titleForeground")},titleBackground:{type:"string",description:(0,n.localize)("sumiContributes.toolbar.actions.button.states.titleBackground")},titleSize:{type:"string",description:(0,n.localize)("sumiContributes.toolbar.actions.button.states.titleSize")},iconSize:{type:"string",description:(0,n.localize)("sumiContributes.toolbar.actions.button.states.iconSize")},background:{type:"string",description:(0,n.localize)("sumiContributes.toolbar.actions.button.states.background")},btnStyle:{type:"string",description:(0,n.localize)("sumiContributes.toolbar.actions.button.states.btnStyle"),enum:["inline","button"]},btnTitleStyle:{type:"string",description:(0,n.localize)("sumiContributes.toolbar.actions.button.states.btnTitleStyle"),enum:["vertical","horizontal"],enumDescriptions:[(0,n.localize)("sumiContributes.toolbar.actions.button.states.btnTitleStyle.vertical"),(0,n.localize)("sumiContributes.toolbar.actions.button.states.btnTitleStyle.horizontal")]}}},l={type:"object",properties:{backgroundColor:{type:"string",description:(0,n.localize)("sumiContributes.toolbar.actions.select.states.backgroundColor")},labelForegroundColor:{type:"string",description:(0,n.localize)("sumiContributes.toolbar.actions.select.states.labelForegroundColor")},iconForegroundColor:{type:"string",description:(0,n.localize)("sumiContributes.toolbar.actions.select.states.iconForegroundColor")},width:{type:"number",description:(0,n.localize)("sumiContributes.toolbar.actions.select.states.width")},minWidth:{type:"number",description:(0,n.localize)("sumiContributes.toolbar.actions.select.states.minWidth")}}};var p;(function(v){v.schema={type:"object",description:(0,n.localize)("sumiContributes.toolbar"),properties:{actions:{type:"array",markdownDescription:(0,n.localize)("sumiContributes.toolbar.actions"),items:{type:"object",required:["id","description"],defaultSnippets:[{label:r({type:"button"},(0,n.localize)("sumiContributes.toolbar.actions.type.button")),body:{id:"${2}",type:"button",description:"${3}",title:"${4}",iconPath:"${5}"}},{label:r({type:"select"},(0,n.localize)("sumiContributes.toolbar.actions.type.select")),body:{id:"${2}",type:"select",description:"${3}",options:["${4}"],defaultValue:"${5}"}}],properties:{id:{type:"string",description:(0,n.localize)("sumiContributes.toolbar.actions.id")},weight:{type:"number",description:(0,n.localize)("sumiContributes.toolbar.actions.weight")},preferredPosition:{type:"object",description:(0,n.localize)("sumiContributes.toolbar.actions.preferredPosition"),properties:{location:{type:"string",description:(0,n.localize)("sumiContributes.toolbar.actions.preferredPosition.location")},group:{type:"string",description:(0,n.localize)("sumiContributes.toolbar.actions.preferredPosition.group")}}},strictPosition:{type:"object",description:(0,n.localize)("sumiContributes.toolbar.actions.strictPosition"),required:["location","group"],defaultSnippets:[{body:{location:"${1}",group:"${2}"}}],properties:{location:{type:"string",description:(0,n.localize)("sumiContributes.toolbar.actions.preferredPosition.location")},group:{type:"string",description:(0,n.localize)("sumiContributes.toolbar.actions.preferredPosition.group")}}},description:{type:"string",description:(0,n.localize)("sumiContributes.toolbar.actions.description")},command:{type:"string",description:(0,n.localize)("sumiContributes.toolbar.actions.command")},defaultState:{type:"string",description:(0,n.localize)("sumiContributes.toolbar.actions.defaultState")}},oneOf:[{required:["type","title","iconPath"],properties:{type:{type:"string",description:(0,n.localize)("sumiContributes.toolbar.actions.type"),enum:["button"],enumDescriptions:[(0,n.localize)("sumiContributes.toolbar.actions.type.button")],default:"button"},title:{type:"string",description:(0,n.localize)("sumiContributes.toolbar.actions.title")},iconPath:{type:"string",description:(0,n.localize)("sumiContributes.toolbar.actions.iconPath")},iconMaskMode:{type:"boolean",description:(0,n.localize)("sumiContributes.toolbar.actions.iconMaskMode")},states:{type:"object",description:(0,n.localize)("sumiContributes.toolbar.actions.button.states"),additionalProperties:o,properties:{default:o}},popoverComponent:{type:"string",description:(0,n.localize)("sumiContributes.toolbar.actions.popoverComponent")},popoverStyle:{type:"object",description:(0,n.localize)("sumiContributes.toolbar.actions.popoverStyle"),properties:{position:{type:"string",description:(0,n.localize)("sumiContributes.toolbar.actions.popoverStyle.position"),enum:["top","bottom"],enumDescriptions:[(0,n.localize)("sumiContributes.toolbar.actions.popoverStyle.position.top"),(0,n.localize)("sumiContributes.toolbar.actions.popoverStyle.position.bottom")]},horizontalOffset:{type:"number",description:(0,n.localize)("sumiContributes.toolbar.actions.popoverStyle.horizontalOffset")},hideOnClickOutside:{type:"boolean",description:(0,n.localize)("sumiContributes.toolbar.actions.popoverStyle.hideOnClickOutside")},noContainerStyle:{type:"boolean",description:(0,n.localize)("sumiContributes.toolbar.actions.popoverStyle.noContainerStyle")},minWidth:{type:"number",description:(0,n.localize)("sumiContributes.toolbar.actions.popoverStyle.minWidth")},minHeight:{type:"number",description:(0,n.localize)("sumiContributes.toolbar.actions.popoverStyle.minHeight")}}},when:{type:"string",description:(0,n.localize)("sumiContributes.toolbar.actions.when")}}},{required:["type","options","defaultValue"],properties:{type:{type:"string",description:(0,n.localize)("sumiContributes.toolbar.actions.type"),enum:["select"],enumDescriptions:[(0,n.localize)("sumiContributes.toolbar.actions.type.select")],default:"select"},options:{type:"array",description:(0,n.localize)("sumiContributes.toolbar.actions.select.options"),required:["value"],items:{type:"object",defaultSnippets:[{label:r({value:""},(0,n.localize)("sumiContributes.toolbar.actions.select.options.value")),body:{value:"${1}"}}],properties:{iconPath:{type:"string",description:(0,n.localize)("sumiContributes.toolbar.actions.select.options.iconPath")},iconMaskMode:{type:"boolean",description:(0,n.localize)("sumiContributes.toolbar.actions.select.options.iconMaskMode")},label:{type:"string",description:(0,n.localize)("sumiContributes.toolbar.actions.select.options.label")},value:{type:"string",description:(0,n.localize)("sumiContributes.toolbar.actions.select.options.value")}}}},defaultValue:{type:"string",description:(0,n.localize)("sumiContributes.toolbar.actions.select.defaultValue")},optionEqualityKey:{type:"string",description:(0,n.localize)("sumiContributes.toolbar.actions.select.optionEqualityKey")},states:{type:"object",description:(0,n.localize)("sumiContributes.toolbar.actions.select.states"),additionalProperties:l}}}]}}}}})(p||(t.toolbar=p={}))},96702:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.VSCodeExtensionPackageSchema=t.EXTENSION_IDENTIFIER_PATTERN=void 0;const n=e(43718);t.EXTENSION_IDENTIFIER_PATTERN="^([a-z0-9A-Z][a-z0-9-A-Z]*)\\.([a-z0-9A-Z][a-z0-9-A-Z]*)$",t.VSCodeExtensionPackageSchema={properties:{engines:{type:"object",description:(0,n.localize)("vscode.extension.engines","Engine compatibility."),properties:{vscode:{type:"string",description:(0,n.localize)("vscode.extension.engines.vscode","For VS Code extensions, specifies the VS Code version that the extension is compatible with. Cannot be *. For example: ^0.10.5 indicates compatibility with a minimum VS Code version of 0.10.5."),default:"^1.22.0"}}},publisher:{description:(0,n.localize)("vscode.extension.publisher","The publisher of the VS Code extension."),type:"string"},displayName:{description:(0,n.localize)("vscode.extension.displayName","The display name for the extension used in the VS Code gallery."),type:"string"},categories:{description:(0,n.localize)("vscode.extension.categories","The categories used by the VS Code gallery to categorize the extension."),type:"array",uniqueItems:!0,items:{oneOf:[{type:"string",enum:["Programming Languages","Snippets","Linters","Themes","Debuggers","Other","Keymaps","Formatters","Extension Packs","SCM Providers","Azure","Language Packs"]},{type:"string",const:"Languages",deprecationMessage:(0,n.localize)("vscode.extension.category.languages.deprecated","Use 'Programming Languages' instead")}]}},galleryBanner:{type:"object",description:(0,n.localize)("vscode.extension.galleryBanner","Banner used in the VS Code marketplace."),properties:{color:{description:(0,n.localize)("vscode.extension.galleryBanner.color","The banner color on the VS Code marketplace page header."),type:"string"},theme:{description:(0,n.localize)("vscode.extension.galleryBanner.theme","The color theme for the font used in the banner."),type:"string",enum:["dark","light"]}}},contributes:{description:(0,n.localize)("vscode.extension.contributes","All contributions of the VS Code extension represented by this package."),type:"object",properties:{},default:{}},preview:{type:"boolean",description:(0,n.localize)("vscode.extension.preview","Sets the extension to be flagged as a Preview in the Marketplace.")},activationEvents:{description:(0,n.localize)("vscode.extension.activationEvents","Activation events for the VS Code extension."),type:"array",items:{type:"string",defaultSnippets:[{label:"onLanguage",description:(0,n.localize)("vscode.extension.activationEvents.onLanguage","An activation event emitted whenever a file that resolves to the specified language gets opened."),body:"onLanguage:${1:languageId}"},{label:"onCommand",description:(0,n.localize)("vscode.extension.activationEvents.onCommand","An activation event emitted whenever the specified command gets invoked."),body:"onCommand:${2:commandId}"},{label:"onDebug",description:(0,n.localize)("vscode.extension.activationEvents.onDebug","An activation event emitted whenever a user is about to start debugging or about to setup debug configurations."),body:"onDebug"},{label:"onDebugInitialConfigurations",description:(0,n.localize)("vscode.extension.activationEvents.onDebugInitialConfigurations",'An activation event emitted whenever a "launch.json" needs to be created (and all provideDebugConfigurations methods need to be called).'),body:"onDebugInitialConfigurations"},{label:"onDebugResolve",description:(0,n.localize)("vscode.extension.activationEvents.onDebugResolve","An activation event emitted whenever a debug session with the specific type is about to be launched (and a corresponding resolveDebugConfiguration method needs to be called)."),body:"onDebugResolve:${6:type}"},{label:"onDebugAdapterProtocolTracker",description:(0,n.localize)("vscode.extension.activationEvents.onDebugAdapterProtocolTracker","An activation event emitted whenever a debug session with the specific type is about to be launched and a debug protocol tracker might be needed."),body:"onDebugAdapterProtocolTracker:${6:type}"},{label:"workspaceContains",description:(0,n.localize)("vscode.extension.activationEvents.workspaceContains","An activation event emitted whenever a folder is opened that contains at least a file matching the specified glob pattern."),body:"workspaceContains:${4:filePattern}"},{label:"onFileSystem",description:(0,n.localize)("vscode.extension.activationEvents.onFileSystem","An activation event emitted whenever a file or folder is accessed with the given scheme."),body:"onFileSystem:${1:scheme}"},{label:"onSearch",description:(0,n.localize)("vscode.extension.activationEvents.onSearch","An activation event emitted whenever a search is started in the folder with the given scheme."),body:"onSearch:${7:scheme}"},{label:"onView",body:"onView:${5:viewId}",description:(0,n.localize)("vscode.extension.activationEvents.onView","An activation event emitted whenever the specified view is expanded.")},{label:"onUri",body:"onUri",description:(0,n.localize)("vscode.extension.activationEvents.onUri","An activation event emitted whenever a system-wide Uri directed towards this extension is open.")},{label:"*",description:(0,n.localize)("vscode.extension.activationEvents.star","An activation event emitted on VS Code startup. To ensure a great end user experience, please use this activation event in your extension only when no other activation events combination works in your use-case."),body:"*"}]}},badges:{type:"array",description:(0,n.localize)("vscode.extension.badges","Array of badges to display in the sidebar of the Marketplace's extension page."),items:{type:"object",required:["url","href","description"],properties:{url:{type:"string",description:(0,n.localize)("vscode.extension.badges.url","Badge image URL.")},href:{type:"string",description:(0,n.localize)("vscode.extension.badges.href","Badge link.")},description:{type:"string",description:(0,n.localize)("vscode.extension.badges.description","Badge description.")}}}},markdown:{type:"string",description:(0,n.localize)("vscode.extension.markdown","Controls the Markdown rendering engine used in the Marketplace. Either github (default) or standard."),enum:["github","standard"],default:"github"},qna:{default:"marketplace",description:(0,n.localize)("vscode.extension.qna","Controls the Q&A link in the Marketplace. Set to marketplace to enable the default Marketplace Q & A site. Set to a string to provide the URL of a custom Q & A site. Set to false to disable Q & A altogether."),anyOf:[{type:["string","boolean"],enum:["marketplace",!1]},{type:"string"}]},extensionDependencies:{description:(0,n.localize)("vscode.extension.extensionDependencies","Dependencies to other extensions. The identifier of an extension is always ${publisher}.${name}. For example: vscode.csharp."),type:"array",uniqueItems:!0,items:{type:"string",pattern:t.EXTENSION_IDENTIFIER_PATTERN}},extensionPack:{description:(0,n.localize)("vscode.extension.contributes.extensionPack","A set of extensions that can be installed together. The identifier of an extension is always ${publisher}.${name}. For example: vscode.csharp."),type:"array",uniqueItems:!0,items:{type:"string",pattern:t.EXTENSION_IDENTIFIER_PATTERN}},extensionKind:{description:(0,n.localize)("extensionKind","Define the kind of an extension. `ui` extensions are installed and run on the local machine while `workspace` extensions are run on the remote."),type:"string",enum:["ui","workspace"],enumDescriptions:[(0,n.localize)("ui","UI extension kind. In a remote window, such extensions are enabled only when available on the local machine."),(0,n.localize)("workspace","Workspace extension kind. In a remote window, such extensions are enabled only when available on the remote.")],default:"workspace"},scripts:{type:"object",properties:{"vscode:prepublish":{description:(0,n.localize)("vscode.extension.scripts.prepublish","Script executed before the package is published as a VS Code extension."),type:"string"},"vscode:uninstall":{description:(0,n.localize)("vscode.extension.scripts.uninstall","Uninstall hook for VS Code extension. Script that gets executed when the extension is completely uninstalled from VS Code which is when VS Code is restarted (shutdown and start) after the extension is uninstalled. Only Node scripts are supported."),type:"string"}}},icon:{type:"string",description:(0,n.localize)("vscode.extension.icon","The path to a 128x128 pixel icon.")}}}},53746:(x,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},77273:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FsProviderContribution=t.FilesChangeEvent=void 0;const n=e(43718);class r extends n.BasicEvent{}t.FilesChangeEvent=r,t.FsProviderContribution=Symbol("FsProviderContribution")},136:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HashCalculateContribution=void 0;const n=e(85608),r=e(76003),o=e(98295),l=e(96405),p=e(66549);let v=class{async initialize(){try{await this.hashCalculateService.initialize()}catch(_){throw new Error(`hashCalculateService init fail:
|
|
30261
30261
|
${_.message}`)}}};t.HashCalculateContribution=v,n.__decorate([(0,r.Autowired)(l.IHashCalculateService),n.__metadata("design:type",Object)],v.prototype,"hashCalculateService",void 0),t.HashCalculateContribution=v=n.__decorate([(0,o.Domain)(p.ClientAppContribution)],v)},41869:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(85608);n.__exportStar(e(43718),t),n.__exportStar(e(48560),t),n.__exportStar(e(38578),t),n.__exportStar(e(36206),t),n.__exportStar(e(32796),t),n.__exportStar(e(78132),t),n.__exportStar(e(41118),t),n.__exportStar(e(37015),t),n.__exportStar(e(16884),t),n.__exportStar(e(68456),t),n.__exportStar(e(77273),t),n.__exportStar(e(42637),t),n.__exportStar(e(89378),t),n.__exportStar(e(53746),t),n.__exportStar(e(95040),t),n.__exportStar(e(80832),t),n.__exportStar(e(75694),t),n.__exportStar(e(79951),t),n.__exportStar(e(17544),t),n.__exportStar(e(53736),t),n.__exportStar(e(66963),t),n.__exportStar(e(22689),t),n.__exportStar(e(74404),t),n.__exportStar(e(45670),t),n.__exportStar(e(22366),t),n.__exportStar(e(18193),t),n.__exportStar(e(67304),t),n.__exportStar(e(66894),t),n.__exportStar(e(90697),t),n.__exportStar(e(26542),t),n.__exportStar(e(5910),t),n.__exportStar(e(61943),t),n.__exportStar(e(23396),t),n.__exportStar(e(40827),t),n.__exportStar(e(53736),t)},41118:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),e(85608).__exportStar(e(95376),t)},95376:(x,t,e)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.NO_KEYBINDING_NAME=t.KeybindingRegistryImpl=t.KeybindingService=t.keybindingServicePath=t.KeybindingRegistry=t.KeybindingContribution=t.KeybindingsResultCollection=t.Keybinding=t.KeybindingWeight=t.KeybindingScope=void 0;const r=e(85608),o=e(76003),l=e(43718),p=e(53736),v=e(81331),m=e(7967),_=e(26542);var s;(function(d){d[d.DEFAULT=0]="DEFAULT",d[d.USER=1]="USER",d[d.WORKSPACE=2]="WORKSPACE",d[d.END=3]="END"})(s||(t.KeybindingScope=s={}));var f;(function(d){d[d.Default=0]="Default",d[d.EditorCore=1]="EditorCore",d[d.EditorContrib=100]="EditorContrib",d[d.WorkbenchContrib=200]="WorkbenchContrib",d[d.BuiltinExtension=300]="BuiltinExtension",d[d.ExternalExtension=400]="ExternalExtension"})(f||(t.KeybindingWeight=f={})),function(d){d.length=d.END-d.DEFAULT}(s||(t.KeybindingScope=s={}));var a;(function(d){function E(c){const b={command:c.command,keybinding:c.keybinding};return JSON.stringify(b)}d.stringify=E;function g(c){return!!c&&c===Object(c)&&"command"in c&&"keybinding"in c}d.is=g})(a||(t.Keybinding=a={}));var h;(function(d){class E{constructor(){this.full=[],this.partial=[],this.shadow=[]}merge(c){return this.full.push(...c.full),this.partial.push(...c.partial),this.shadow.push(...c.shadow),this}filter(c){const b=new E;return b.full=this.full.filter(c),b.partial=this.partial.filter(c),b.shadow=this.shadow.filter(c),b}}d.KeybindingsResult=E})(h||(t.KeybindingsResultCollection=h={})),t.KeybindingContribution=Symbol("KeybindingContribution"),t.KeybindingRegistry=Symbol("KeybindingRegistry"),t.keybindingServicePath="/services/keybindings",t.KeybindingService=Symbol("KeybindingService");let u=n=class{constructor(){this.keymaps=[...Array(s.length)].map(()=>[]),this.keySequence=[],this.convertKeySequence=[],this.modifierKeySequence=[],this.keybindingsChanged=new l.Emitter}async initialize(){await this.keyboardLayoutService.initialize(),this.keyboardLayoutService.onKeyboardLayoutChanged(()=>{this.clearResolvedKeybindings()});for(const E of this.keybindingContributionProvider.getContributions())E.registerKeybindings(this)}get onKeybindingsChanged(){return this.keybindingsChanged.event}registerKeybinding(E,g=s.DEFAULT){return this.doRegisterKeybinding(E,g)}registerKeybindings(E,g=s.DEFAULT){return this.doRegisterKeybindings(E,g)}convertMonacoWhen(E){return E?typeof E=="string"?E:E.serialize():""}unregisterKeybinding(E,g=s.DEFAULT){const c=a.is(E)?E.keybinding:E,b=this.keymaps[g];let y;a.is(E)&&E.when?y=b.filter(S=>this.isKeybindingEqual(S.keybinding,E.keybinding)&&this.isKeybindingWhenEqual(S.when,E.when)):y=b.filter(S=>this.isKeybindingEqual(S.keybinding,c)),y.forEach(S=>{const A=b.indexOf(S);A>=0&&b.splice(A,1)})}isKeybindingWhenEqual(E,g){return this.convertMonacoWhen(E)===this.convertMonacoWhen(g)}isKeybindingEqual(E,g){return this.acceleratorForSequenceKeyString(E)===this.acceleratorForSequenceKeyString(g)}acceleratorForSequenceKeyString(E){const c=E.split(" ").map(b=>m.KeyCode.parse(b));return this.acceleratorForSequence(c,"+").join(" ")}doRegisterKeybindings(E,g=s.DEFAULT){const c=new l.Disposable;for(const b of E)c.addDispose(this.doRegisterKeybinding(b,g));return c}doRegisterKeybinding(E,g=s.DEFAULT){try{this.resolveKeybinding(E,!0),this.keymaps[g].unshift(E)}catch(c){this.logger.warn(`Could not register keybinding:
|
|
@@ -30477,7 +30477,7 @@ Run with Automatic Debug Configurations
|
|
|
30477
30477
|
{1}
|
|
30478
30478
|
|
|
30479
30479
|
Sign out of these features?`,"authentication.signOutMessageSimple":"Sign out of {0}?","authentication.useOtherAccount":"Sign in to another account","authentication.selectAccount":"The extension '{0}' wants to access a {1} account","authentication.getSessionPlaceholder":"Select an account for '{0}' to use or Esc to cancel","authentication.confirmAuthenticationAccess":"The extension '{0}' wants to access the {1} account '{2}'.","authentication.confirmLogin":"The extension '{0}' wants to sign in using {1}.","authentication.confirmReLogin":"The extension '{0}' wants to sign in again using {1}.","authentication.signInRequests":"Sign in to use {0} (1)","authentication.signOut":"Sign out {0}","authentication.noAccounts":"You are not signed in to any accounts","authentication.signedOut":"Successfully signed out.","refactoring-changes.ask.1.create":"Extension '{0}' wants to make refactoring changes with this file creation","refactoring-changes.ask.1.copy":"Extension '{0}' wants to make refactoring changes with this file copy","refactoring-changes.ask.1.move":"Extension '{0}' wants to make refactoring changes with this file move","refactoring-changes.ask.1.delete":"Extension '{0}' wants to make refactoring changes with this file deletion","refactoring-changes.ask.N.create":"{0} extensions want to make refactoring changes with this file creation","refactoring-changes.ask.N.copy":"{0} extensions want to make refactoring changes with this file copy","refactoring-changes.ask.N.move":"{0} extensions want to make refactoring changes with this file move","refactoring-changes.ask.N.delete":"{0} extensions want to make refactoring changes with this file deletion","refactoring-changes.msg.showPreview":"Show Preview","refactoring-changes.msg.skipChanges":"Skip Changes","keyboard.chooseKeyboardLayout":"Choose keyboard layout","keyboard.autoDetect.label":"Auto Detect","keyboard.autoDetect.description":"(Current: '{0} ')","keyboard.autoDetect.detail":"Try to detect the keyboard layout from browser information and pressed keys.","editor.toggleWordWrap":"Toggle Word Wrap","editor.suggest.details.visible":"Controls whether editor code completion expands details by default","view.component.renderedError":"View Component Rendering Exception","view.component.tryAgain":"Refresh","test.title":"Testing","test.result.runFinished":"Test run at {0}","test.task.unnamed":"Unnamed Task","test.results":"Test Results","menu.missing.command":"menuId {0} register command not exist: {1}","menu.missing.altCommand":"menuId {0} register altCommand not exist: {1}","menu.dupe.command":"menuId {0} register command({1}) is duplicated with alt({2})","command.category.developerTools":"Developer Tool","connection.start.rtt":"Measure Connection RTT","connection.stop.rtt":"Stop Connection RTT","debug.terminal.label":"Javascript Debug Terminal","debug.terminal.title":"Debug Process","output.channel.clear":"Clear Output Panel","workbench.action.tasks.runTask":"Run Task","workbench.action.tasks.reRunTask":"Rerun Last Task","workbench.action.tasks.restartTask":"Restart Running Task","workbench.action.tasks.terminate":"Terminate Task","workbench.action.tasks.showTasks":"Show Running Tasks","workbench.action.tasks.showLog":"Show Task Log","task.contribute":"Contribute","task.cannotFindTask":"Cannot find task for {0}. Press Enter key to return.","comment.reply.count":"{0} comments","comment.reply.lastReply":"Last reply from {0}","walkthroughs.welcome":"Welcome","walkthroughs.get.started":"Open the 'Getting Started' walkthrough","mergeEditor.reset":"Reset","mergeEditor.workbench.tab.name":"Merging: {0}","mergeEditor.conflict.action.apply.confirm.title":"The file has unresolved conflicts or changes, whether to apply and save the changes?","mergeEditor.conflict.action.apply.confirm.continue":"Continue Merge","mergeEditor.conflict.action.apply.confirm.complete":"Apply Changes","mergeEditor.action.button.apply":"Apply","mergeEditor.action.button.apply-and-stash":"Apply and Stash","mergeEditor.action.button.accept.left":"Accept Left","mergeEditor.action.button.accept.right":"Accept Right","mergeEditor.open.3way":"3-Way Editor","mergeEditor.conflict.prev":"Previous Conflict","mergeEditor.conflict.next":"Next Conflict","mergeEditor.conflict.ai.resolve.all":"AI Resolution","mergeEditor.conflict.ai.resolve.all.stop":"Stop All","mergeEditor.open.tradition":"Text Editor","aiNative.chat.ai.assistant.name":"AI Assistant","aiNative.chat.input.placeholder.default":"Ask Copilot or type / for commands","aiNative.chat.stop.immediately":"I don\u2019t think about it anymore. If you need anything, you can ask me anytime.","aiNative.chat.error.response":"There are too many people interacting with me at the moment. Please try again later. Thank you for your understanding and support.","aiNative.chat.code.insert":"Insert code","aiNative.chat.code.copy":"Copy code","aiNative.chat.code.copy.success":"Copied successfully","aiNative.chat.expand.unfullscreen":"unfullscreen","aiNative.chat.expand.fullescreen":"fullescreen","aiNative.chat.enter.send":"Send (Enter)","aiNative.inline.chat.operate.chat.title":"Chat({0})","aiNative.inline.chat.operate.check.title":"Check","aiNative.inline.chat.operate.thumbsup.title":"Thumbs up","aiNative.inline.chat.operate.thumbsdown.title":"Thumbs down","aiNative.inline.chat.operate.loading.cancel":"Esc to cancel","aiNative.inline.chat.input.placeholder.default":"New code instructions...(\u2191\u2193 for history)","aiNative.inline.chat.generating.canceled":"Inline Chat Generating Canceled.","aiNative.inline.hint.widget.placeholder":"{0} to inline chat","aiNative.inline.problem.fix.title":"Fix with AI","aiNative.inline.diff.accept":"Accept","aiNative.inline.diff.reject":"Reject","aiNative.resolve.conflict.dialog.afresh":"Are you sure you want to regenerate?","aiNative.resolve.conflict.dialog.detection":`It is detected that you have made modifications. Regeneration will overwrite
|
|
30480
|
-
your modifications. Are you sure to regenerate?`,"aiNative.resolve.conflict.message.not.processed.yet":"AI has processed conflicts at {0}, but conflicts at {1} have not yet been processed (still marked as yellow) and require manual processing.","aiNative.operate.discard.title":"Discard","aiNative.operate.afresh.title":"Afresh","aiNative.operate.stop.title":"Stop","aiNative.operate.close.title":"Close","aiNative.operate.clear.title":"Clear","aiNative.operate.tools.title":"MCP Tools","aiNative.operate.newChat.title":"New Chat","aiNative.operate.chatHistory.title":"Chat History","aiNative.operate.chatHistory.searchPlaceholder":"Search Chats...","aiNative.operate.chatHistory.edit":"Edit","aiNative.operate.chatHistory.delete":"Delete","aiNative.chat.welcome.loading.text":"Initializing...","aiNative.chat.ai.assistant.limit.message":"{0} earliest messages are dropped due to the input token limit","aiNative.inlineDiff.acceptAll":"Accept All","aiNative.inlineDiff.rejectAll":"Reject All","preference.ai.native.inlineChat.title":"Inline Chat","preference.ai.native.chat.title":"Chat","preference.ai.native.interface.quick.title":"Interface Quick Navigation","preference.ai.native.interface.quick.navigation":"Click the icon on the left side of the editor to quickly jump to the interface implementation.","preference.ai.native.interface.quick.navigation.hover":"Go to implementation","preference.ai.native.inlineChat.auto.visible":"Does Inline Chat automatically appear when code are selected?","preference.ai.native.inlineChat.codeAction.enabled":"Does Inline Chat related code actions automatically appear when code are selected?","preference.ai.native.chat.visible.type":"Control how the chat panel is displayed by default","preference.ai.native.inlineDiff.preview.mode":"Inline Diff preview mode","preference.ai.native.inlineDiff.preview.mode.sideBySide":"Displayed in the editor as left and right diff panels","preference.ai.native.inlineDiff.preview.mode.inlineLive":"Displayed in the editor through streaming rendering","preference.ai.native.intelligentCompletions.title":"Intelligent Completions","preference.ai.native.intelligentCompletions.promptEngineering.enabled":"Whether to enable prompt engineering, some LLM models may not perform well on prompt engineering.","preference.ai.native.intelligentCompletions.debounceTime":"Debounce time for intelligent completions","preference.ai.native.intelligentCompletions.cache.enabled":"Whether to enable cache for intelligent completions","preference.ai.native.intelligentCompletions.alwaysVisible":"Whether to always show intelligent completions","preference.ai.native.codeEdits.title":"Code Edits","preference.ai.native.codeEdits.lintErrors":"Whether to trigger intelligent rewriting when Lint Error occurs","preference.ai.native.codeEdits.lineChange":"Whether to trigger intelligent rewriting when the cursor line number changes","preference.ai.native.codeEdits.typing":"Whether to trigger intelligent rewriting when the content changes","preference.ai.native.codeEdits.renderType":"Code Edits Render Type","preference.ai.native.chat.system.prompt":"Default Chat System Prompt","workbench.quickOpen.preserveInput":"Controls whether the last typed input to Quick Open(include Command Palette) should be preserved.","webview.webviewTagUnavailable":"webview is unsupported on non-electron env, please use iframe instead","notebook.kernel.panel.empty":"No content found.","notebook.kernel.panel.title":"Running Terminals and Kernels","notebook.kernel.panel.opened.pages":"Opened Pages","notebook.kernel.panel.running.kernels":"Running Kernels","notebook.kernel.close.all.confirmation":"Are you sure you want to close all?","notebook.variable.panel.title":"Variable Inspector","notebook.variable.panel.unsupported":"The file format is not supported for variable inspection","notebook.variable.panel.refresh.success":"Variable refresh successful","notebook.variable.panel.refresh.error":"Variable refresh failed","notebook.variable.panel.search.placeholder":"Please enter the variable name to search","notebook.variable.panel.show.detail":"View details",...r.browserViews,...o.editorLocalizations,...l.enUS,"preference.ai.native.llm.apiSettings.title":"LLM API Settings","preference.ai.native.llm.model.id":"Model ID","preference.ai.native.deepseek.apiKey":"Deepseek API Key","preference.ai.native.deepseek.apiKey.description":"API key for Deepseek language model","preference.ai.native.anthropic.apiKey":"Anthropic API Key","preference.ai.native.anthropic.apiKey.description":"API key for Anthropic language model","preference.ai.native.openai.apiKey":"OpenAI API Key","preference.ai.native.openai.apiKey.description":"API key for OpenAI Compatible language model","preference.ai.native.openai.baseURL":"OpenAI Base URL","preference.ai.native.openai.baseURL.description":"Base URL for OpenAI Compatible language model","preference.ai.native.mcp.settings.title":"MCP Server Settings","preference.ai.native.mcp.servers":"MCP Servers","preference.ai.native.mcp.servers.description":"Configure MCP (Model Context Protocol) servers","preference.ai.native.mcp.servers.name.description":"Name of the MCP server","preference.ai.native.mcp.servers.command.description":"Command to start the MCP server","preference.ai.native.mcp.servers.args.description":"Command line arguments for the MCP server","preference.ai.native.mcp.servers.env.description":"Environment variables for the MCP server","preference.ai.native.mcp.servers.type.description":"Type of the MCP server connection","preference.ai.native.mcp.servers.type.stdio":"Stdio connection","preference.ai.native.mcp.servers.type.sse":"SSE connection","ai.native.mcp.terminal.output":"Output","ai.native.mcp.terminal.allow-question":"Allow the terminal to run the command?","ai.native.mcp.terminal.allow":"Allow","ai.native.mcp.terminal.deny":"Reject"}}},32581:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(43718),r=e(20741),o=e(61647);(0,n.registerLocalizationBundle)(o.localizationBundle),(0,n.registerLocalizationBundle)(r.localizationBundle)},36942:(x,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.enUS=void 0,t.enUS={"merge-conflicts.merge.type.auto":"auto merged","merge-conflicts.merge.type.manual":"merged","merge-conflicts.conflicts.summary":"Total {0} conflicts ({1})","merge-conflicts.conflicts.all-resolved":"All resolved","merge-conflicts.conflicts.partial-resolved":"{0} conflicts resolved, {1} remaining","merge-conflicts.non-conflicts.summary":"Non-conflict changes {0} in total","merge-conflicts.non-conflicts.progress":"{0} non-conflict changes have been {1}","merge-conflicts.non-conflicts.from.left":"target branch: {0} places","merge-conflicts.non-conflicts.from.right":"source branch: {0} places","merge-conflicts.non-conflicts.from.base":"base branch: {0} places","merge-conflicts.merge.conflict.remain":"Unresolved conflicts {0} remaining"}},40028:(x,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.zhCN=void 0,t.zhCN={"merge-conflicts.merge.type.auto":"\u81EA\u52A8\u5408\u5E76","merge-conflicts.merge.type.manual":"\u5408\u5E76","merge-conflicts.conflicts.summary":"\u51B2\u7A81\u53D8\u66F4\u5171 {0} \u5904 ({1})","merge-conflicts.conflicts.all-resolved":"\u5DF2\u5168\u90E8\u89E3\u51B3","merge-conflicts.conflicts.partial-resolved":"\u5DF2\u89E3\u51B3 {0} \u5904, \u5269\u4F59 {1} \u5904","merge-conflicts.non-conflicts.summary":"\u975E\u51B2\u7A81\u53D8\u66F4\u5171 {0} \u5904","merge-conflicts.non-conflicts.progress":"{0} \u5904\u975E\u51B2\u7A81\u53D8\u66F4\u5DF2{1}","merge-conflicts.non-conflicts.from.left":"\u76EE\u6807\u5206\u652F: {0} \u5904","merge-conflicts.non-conflicts.from.right":"\u6765\u6E90\u5206\u652F: {0} \u5904","merge-conflicts.non-conflicts.from.base":"\u4E24\u8005: {0} \u5904","merge-conflicts.merge.conflict.remain":"\u5269\u4F59\u672A\u89E3\u51B3\u51B2\u7A81 {0} \u5904"}},61647:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.localizationBundle=void 0;const n=e(69734),r=e(21714),o=e(12651),l=e(40028);t.localizationBundle={languageId:n.LOCALE_TYPES.ZH_CN,languageName:"Chinese",localizedLanguageName:"\u4E2D\u6587(\u4E2D\u56FD)",contents:{ButtonAllow:"\u5141\u8BB8",ButtonOK:"\u786E\u5B9A",ButtonCancel:"\u53D6\u6D88","common.yes":"\u662F","common.no":"\u5426",extension:"\u63D2\u4EF6",editTtile:"\u7F16\u8F91","common.loading":"\u52A0\u8F7D\u4E2D...","tree.filter.placeholder":"\u8F93\u5165\u5173\u952E\u5B57\u6216\u8DEF\u5F84\u7B5B\u9009","file.new":"\u65B0\u5EFA\u6587\u4EF6","file.folder.new":"\u65B0\u5EFA\u6587\u4EF6\u5939","file.locate":"\u6587\u4EF6\u5B9A\u4F4D","file.save":"\u4FDD\u5B58\u6587\u4EF6","file.saveAll":"\u4FDD\u5B58\u5168\u90E8","file.autoSave":"\u81EA\u52A8\u4FDD\u5B58","file.open":"\u6253\u5F00\u6587\u4EF6","file.open.side":"\u4FA7\u8FB9\u680F\u6253\u5F00","file.open.type":"\u6253\u5F00\u65B9\u5F0F...","file.open.type.placeholder":'\u4E3A "{0}" \u9009\u62E9\u6253\u5F00\u65B9\u5F0F',"file.open.type.detail.active":"\u5F53\u524D","file.open.type.detail.and":"\u548C","file.open.type.detail.default":"\u9ED8\u8BA4","file.open.type.preference.default":'\u4E3A "{0}" \u914D\u7F6E\u9ED8\u8BA4\u7F16\u8F91\u5668...',"file.delete":"\u5220\u9664","file.rename":"\u91CD\u547D\u540D","file.compare":"\u4E0E\u7F16\u8F91\u5668\u4E2D\u7684\u6587\u4EF6\u6BD4\u8F83","file.close":"\u5173\u95ED\u6587\u4EF6","file.copy.path":"\u590D\u5236\u8DEF\u5F84","file.copy.relativepath":"\u590D\u5236\u76F8\u5BF9\u8DEF\u5F84","file.paste.file":"\u7C98\u8D34","file.copy.file":"\u590D\u5236","file.cut.file":"\u526A\u5207","file.move.existMessage":"\u8981\u7C98\u8D34\u7684\u6587\u4EF6\u540C\u65F6\u88AB\u5220\u9664\u6216\u79FB\u52A8\u3002\u65E0\u6CD5\u79FB\u52A8/\u590D\u5236\u3002\u6587\u4EF6\u5DF2\u5B58\u5728\u4E8E\u76EE\u6807\u4F4D\u7F6E\u3002","file.action.new.file":"\u65B0\u5EFA\u6587\u4EF6","file.action.new.folder":"\u65B0\u5EFA\u6587\u4EF6\u5939","file.action.refresh":"\u5237\u65B0\u6587\u4EF6","file.action.collapse":"\u5168\u90E8\u6298\u53E0","file.location":"\u5728\u6587\u4EF6\u6811\u4E2D\u5B9A\u4F4D","file.open.folder":"\u6253\u5F00\u6587\u4EF6\u5939","file.open.workspace":"\u4ECE\u6587\u4EF6\u6253\u5F00\u5DE5\u4F5C\u533A","file.confirm.delete":`###\u786E\u5B9A\u4ECE\u5DE5\u4F5C\u533A\u5220\u9664\u4E0B\u9762\u7684 {0} \u4E2A\u6587\u4EF6?
|
|
30480
|
+
your modifications. Are you sure to regenerate?`,"aiNative.resolve.conflict.message.not.processed.yet":"AI has processed conflicts at {0}, but conflicts at {1} have not yet been processed (still marked as yellow) and require manual processing.","aiNative.operate.discard.title":"Discard","aiNative.operate.afresh.title":"Afresh","aiNative.operate.stop.title":"Stop","aiNative.operate.close.title":"Close","aiNative.operate.clear.title":"Clear","aiNative.operate.tools.title":"MCP Tools","aiNative.operate.newChat.title":"New Chat","aiNative.operate.chatHistory.title":"Chat History","aiNative.operate.chatHistory.searchPlaceholder":"Search Chats...","aiNative.operate.chatHistory.edit":"Edit","aiNative.operate.chatHistory.delete":"Delete","aiNative.chat.welcome.loading.text":"Initializing...","aiNative.chat.ai.assistant.limit.message":"{0} earliest messages are dropped due to the input token limit","aiNative.inlineDiff.acceptAll":"Accept All","aiNative.inlineDiff.rejectAll":"Reject All","preference.ai.native.inlineChat.title":"Inline Chat","preference.ai.native.chat.title":"Chat","preference.ai.native.interface.quick.title":"Interface Quick Navigation","preference.ai.native.interface.quick.navigation":"Click the icon on the left side of the editor to quickly jump to the interface implementation.","preference.ai.native.interface.quick.navigation.hover":"Go to implementation","preference.ai.native.inlineChat.auto.visible":"Does Inline Chat automatically appear when code are selected?","preference.ai.native.inlineChat.codeAction.enabled":"Does Inline Chat related code actions automatically appear when code are selected?","preference.ai.native.chat.visible.type":"Control how the chat panel is displayed by default","preference.ai.native.inlineDiff.preview.mode":"Inline Diff preview mode","preference.ai.native.inlineDiff.preview.mode.sideBySide":"Displayed in the editor as left and right diff panels","preference.ai.native.inlineDiff.preview.mode.inlineLive":"Displayed in the editor through streaming rendering","preference.ai.native.intelligentCompletions.title":"Intelligent Completions","preference.ai.native.intelligentCompletions.promptEngineering.enabled":"Whether to enable prompt engineering, some LLM models may not perform well on prompt engineering.","preference.ai.native.intelligentCompletions.debounceTime":"Debounce time for intelligent completions","preference.ai.native.intelligentCompletions.cache.enabled":"Whether to enable cache for intelligent completions","preference.ai.native.intelligentCompletions.alwaysVisible":"Whether to always show intelligent completions","preference.ai.native.codeEdits.title":"Code Edits","preference.ai.native.codeEdits.lintErrors":"Whether to trigger intelligent rewriting when Lint Error occurs","preference.ai.native.codeEdits.lineChange":"Whether to trigger intelligent rewriting when the cursor line number changes","preference.ai.native.codeEdits.typing":"Whether to trigger intelligent rewriting when the content changes","preference.ai.native.codeEdits.renderType":"Code Edits Render Type","preference.ai.native.chat.system.prompt":"Default Chat System Prompt","workbench.quickOpen.preserveInput":"Controls whether the last typed input to Quick Open(include Command Palette) should be preserved.","webview.webviewTagUnavailable":"webview is unsupported on non-electron env, please use iframe instead","notebook.kernel.panel.empty":"No content found.","notebook.kernel.panel.title":"Running Terminals and Kernels","notebook.kernel.panel.opened.pages":"Opened Pages","notebook.kernel.panel.running.kernels":"Running Kernels","notebook.kernel.close.all.confirmation":"Are you sure you want to close all?","notebook.variable.panel.title":"Variable Inspector","notebook.variable.panel.unsupported":"The file format is not supported for variable inspection","notebook.variable.panel.refresh.success":"Variable refresh successful","notebook.variable.panel.refresh.error":"Variable refresh failed","notebook.variable.panel.search.placeholder":"Please enter the variable name to search","notebook.variable.panel.show.detail":"View details",...r.browserViews,...o.editorLocalizations,...l.enUS,"preference.ai.native.llm.apiSettings.title":"LLM API Settings","preference.ai.native.llm.model.id":"Model ID","preference.ai.native.deepseek.apiKey":"Deepseek API Key","preference.ai.native.deepseek.apiKey.description":"API key for Deepseek language model","preference.ai.native.anthropic.apiKey":"Anthropic API Key","preference.ai.native.anthropic.apiKey.description":"API key for Anthropic language model","preference.ai.native.openai.apiKey":"OpenAI API Key","preference.ai.native.openai.apiKey.description":"API key for OpenAI Compatible language model","preference.ai.native.openai.baseURL":"OpenAI Base URL","preference.ai.native.openai.baseURL.description":"Base URL for OpenAI Compatible language model","preference.ai.native.mcp.settings.title":"MCP Server Settings","preference.ai.native.mcp.servers":"MCP Servers","preference.ai.native.mcp.servers.description":"Configure MCP (Model Context Protocol) servers","preference.ai.native.mcp.servers.name.description":"Name of the MCP server","preference.ai.native.mcp.servers.command.description":"Command to start the MCP server","preference.ai.native.mcp.servers.args.description":"Command line arguments for the MCP server","preference.ai.native.mcp.servers.env.description":"Environment variables for the MCP server","preference.ai.native.mcp.servers.type.description":"Type of the MCP server connection","preference.ai.native.mcp.servers.type.stdio":"Stdio connection","preference.ai.native.mcp.servers.type.sse":"SSE connection","ai.native.mcp.terminal.command":"Command","ai.native.mcp.terminal.output":"Output","ai.native.mcp.terminal.allow-question":"Allow the terminal to run the command?","ai.native.mcp.terminal.allow":"Allow","ai.native.mcp.terminal.deny":"Reject"}}},32581:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(43718),r=e(20741),o=e(61647);(0,n.registerLocalizationBundle)(o.localizationBundle),(0,n.registerLocalizationBundle)(r.localizationBundle)},36942:(x,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.enUS=void 0,t.enUS={"merge-conflicts.merge.type.auto":"auto merged","merge-conflicts.merge.type.manual":"merged","merge-conflicts.conflicts.summary":"Total {0} conflicts ({1})","merge-conflicts.conflicts.all-resolved":"All resolved","merge-conflicts.conflicts.partial-resolved":"{0} conflicts resolved, {1} remaining","merge-conflicts.non-conflicts.summary":"Non-conflict changes {0} in total","merge-conflicts.non-conflicts.progress":"{0} non-conflict changes have been {1}","merge-conflicts.non-conflicts.from.left":"target branch: {0} places","merge-conflicts.non-conflicts.from.right":"source branch: {0} places","merge-conflicts.non-conflicts.from.base":"base branch: {0} places","merge-conflicts.merge.conflict.remain":"Unresolved conflicts {0} remaining"}},40028:(x,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.zhCN=void 0,t.zhCN={"merge-conflicts.merge.type.auto":"\u81EA\u52A8\u5408\u5E76","merge-conflicts.merge.type.manual":"\u5408\u5E76","merge-conflicts.conflicts.summary":"\u51B2\u7A81\u53D8\u66F4\u5171 {0} \u5904 ({1})","merge-conflicts.conflicts.all-resolved":"\u5DF2\u5168\u90E8\u89E3\u51B3","merge-conflicts.conflicts.partial-resolved":"\u5DF2\u89E3\u51B3 {0} \u5904, \u5269\u4F59 {1} \u5904","merge-conflicts.non-conflicts.summary":"\u975E\u51B2\u7A81\u53D8\u66F4\u5171 {0} \u5904","merge-conflicts.non-conflicts.progress":"{0} \u5904\u975E\u51B2\u7A81\u53D8\u66F4\u5DF2{1}","merge-conflicts.non-conflicts.from.left":"\u76EE\u6807\u5206\u652F: {0} \u5904","merge-conflicts.non-conflicts.from.right":"\u6765\u6E90\u5206\u652F: {0} \u5904","merge-conflicts.non-conflicts.from.base":"\u4E24\u8005: {0} \u5904","merge-conflicts.merge.conflict.remain":"\u5269\u4F59\u672A\u89E3\u51B3\u51B2\u7A81 {0} \u5904"}},61647:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.localizationBundle=void 0;const n=e(69734),r=e(21714),o=e(12651),l=e(40028);t.localizationBundle={languageId:n.LOCALE_TYPES.ZH_CN,languageName:"Chinese",localizedLanguageName:"\u4E2D\u6587(\u4E2D\u56FD)",contents:{ButtonAllow:"\u5141\u8BB8",ButtonOK:"\u786E\u5B9A",ButtonCancel:"\u53D6\u6D88","common.yes":"\u662F","common.no":"\u5426",extension:"\u63D2\u4EF6",editTtile:"\u7F16\u8F91","common.loading":"\u52A0\u8F7D\u4E2D...","tree.filter.placeholder":"\u8F93\u5165\u5173\u952E\u5B57\u6216\u8DEF\u5F84\u7B5B\u9009","file.new":"\u65B0\u5EFA\u6587\u4EF6","file.folder.new":"\u65B0\u5EFA\u6587\u4EF6\u5939","file.locate":"\u6587\u4EF6\u5B9A\u4F4D","file.save":"\u4FDD\u5B58\u6587\u4EF6","file.saveAll":"\u4FDD\u5B58\u5168\u90E8","file.autoSave":"\u81EA\u52A8\u4FDD\u5B58","file.open":"\u6253\u5F00\u6587\u4EF6","file.open.side":"\u4FA7\u8FB9\u680F\u6253\u5F00","file.open.type":"\u6253\u5F00\u65B9\u5F0F...","file.open.type.placeholder":'\u4E3A "{0}" \u9009\u62E9\u6253\u5F00\u65B9\u5F0F',"file.open.type.detail.active":"\u5F53\u524D","file.open.type.detail.and":"\u548C","file.open.type.detail.default":"\u9ED8\u8BA4","file.open.type.preference.default":'\u4E3A "{0}" \u914D\u7F6E\u9ED8\u8BA4\u7F16\u8F91\u5668...',"file.delete":"\u5220\u9664","file.rename":"\u91CD\u547D\u540D","file.compare":"\u4E0E\u7F16\u8F91\u5668\u4E2D\u7684\u6587\u4EF6\u6BD4\u8F83","file.close":"\u5173\u95ED\u6587\u4EF6","file.copy.path":"\u590D\u5236\u8DEF\u5F84","file.copy.relativepath":"\u590D\u5236\u76F8\u5BF9\u8DEF\u5F84","file.paste.file":"\u7C98\u8D34","file.copy.file":"\u590D\u5236","file.cut.file":"\u526A\u5207","file.move.existMessage":"\u8981\u7C98\u8D34\u7684\u6587\u4EF6\u540C\u65F6\u88AB\u5220\u9664\u6216\u79FB\u52A8\u3002\u65E0\u6CD5\u79FB\u52A8/\u590D\u5236\u3002\u6587\u4EF6\u5DF2\u5B58\u5728\u4E8E\u76EE\u6807\u4F4D\u7F6E\u3002","file.action.new.file":"\u65B0\u5EFA\u6587\u4EF6","file.action.new.folder":"\u65B0\u5EFA\u6587\u4EF6\u5939","file.action.refresh":"\u5237\u65B0\u6587\u4EF6","file.action.collapse":"\u5168\u90E8\u6298\u53E0","file.location":"\u5728\u6587\u4EF6\u6811\u4E2D\u5B9A\u4F4D","file.open.folder":"\u6253\u5F00\u6587\u4EF6\u5939","file.open.workspace":"\u4ECE\u6587\u4EF6\u6253\u5F00\u5DE5\u4F5C\u533A","file.confirm.delete":`###\u786E\u5B9A\u4ECE\u5DE5\u4F5C\u533A\u5220\u9664\u4E0B\u9762\u7684 {0} \u4E2A\u6587\u4EF6?
|
|
30481
30481
|
{1}`,"file.confirm.deleteTips":"\u4F60\u53EF\u4EE5\u4ECE\u56DE\u6536\u7AD9\u8FD8\u539F\u6587\u4EF6","file.confirm.moveToTrash.ok":"\u79FB\u5165\u56DE\u6536\u7AD9","file.confirm.delete.ok":"\u5220\u9664","file.confirm.delete.cancel":"\u53D6\u6D88","file.confirm.move":"\u786E\u5B9A\u79FB\u52A8\u6587\u4EF6 {0} \u5230 {1} ?","file.confirm.move.ok":"\u79FB\u52A8","file.confirm.move.cancel":"\u53D6\u6D88","file.confirm.paste":"\u786E\u5B9A\u62F7\u8D1D\u6587\u4EF6 {0} \u5230 {1} ?","file.confirm.paste.ok":"\u62F7\u8D1D","file.confirm.paste.cancel":"\u53D6\u6D88","file.confirm.replace":"\u786E\u5B9A\u66FF\u6362{0}\u6587\u4EF6?","file.confirm.replace.ok":"\u66FF\u6362","file.confirm.replace.cancel":"\u53D6\u6D88","file.empty.defaultTitle":"\u65E0\u6253\u5F00\u7684\u6587\u4EF6\u5939","file.empty.defaultMessage":"\u5C1A\u672A\u6253\u5F00\u6587\u4EF6\u5939","file.workspace.defaultTip":"\u65E0\u6807\u9898\uFF08\u5DE5\u4F5C\u533A\uFF09","file.workspace.defaultWorkspaceTip":"{0}\uFF08\u5DE5\u4F5C\u533A\uFF09","file.empty.openFolder":"\u6253\u5F00\u6587\u4EF6\u5939","file.collapse":"\u5168\u90E8\u6298\u53E0","file.refresh":"\u5237\u65B0","file.search.folder":"\u5728\u6587\u4EF6\u5939\u4E2D\u67E5\u627E","file.focus.files":"\u5728\u8D44\u6E90\u7BA1\u7406\u5668\u4E2D\u805A\u7126\u6587\u4EF6","file.filetree.filter":"\u57FA\u4E8E\u5F53\u524D\u6587\u4EF6\u6811\u7B5B\u9009\u6587\u4EF6","file.filetree.openTerminalWithPath":"\u5728\u7EC8\u7AEF\u4E2D\u6253\u5F00","file.tooltip.symbolicLink":"\u7B26\u53F7\u94FE\u63A5","file.resource-deleted":"\uFF08\u5DF2\u5220\u9664\uFF09","file.revealInExplorer":"\u5728\u6587\u4EF6\u6811\u4E2D\u5B9A\u4F4D","menu-bar.title.file":"\u6587\u4EF6","menu-bar.title.edit":"\u7F16\u8F91","menu-bar.title.selection":"\u9009\u62E9","menu-bar.title.view":"\u89C6\u56FE","menu-bar.title.go":"\u524D\u5F80","menu-bar.title.debug":"\u8C03\u8BD5","menu-bar.title.terminal":"\u7EC8\u7AEF","menu-bar.title.window":"\u7A97\u53E3","menu-bar.title.help":"\u5E2E\u52A9","menu-bar.file.open":"\u6253\u5F00\u6587\u4EF6","menu-bar.file.save-as":"\u53E6\u5B58\u4E3A","menu-bar.file.save-all":"\u5168\u90E8\u4FDD\u5B58","menu-bar.view.quick.command":"\u547D\u4EE4\u9762\u677F","menu-bar.go.jumpToBracket":"\u8DF3\u8F6C\u5230\u62EC\u53F7","menu-bar.go.nextProblemInFiles":"\u4E0B\u4E00\u4E2A\u95EE\u9898","menu-bar.go.prevProblemInFiles":"\u4E0A\u4E00\u4E2A\u95EE\u9898","menu-bar.file.pref":"\u8BBE\u7F6E","menu-bar.mode.compact":"\u7D27\u51D1\u6A21\u5F0F",editor:"\u7F16\u8F91\u5668","editor.undo":"\u64A4\u9500","editor.redo":"\u91CD\u505A","editor.saveCurrent":"\u4FDD\u5B58\u5F53\u524D\u6587\u4EF6","editor.title.context.close":"\u5173\u95ED","editor.closeTab.title":"\u5173\u95ED ({0})","editor.closeCurrent":"\u5173\u95ED\u5F53\u524D\u7F16\u8F91\u7A97\u53E3","editor.openExternal":"\u4F7F\u7528\u5916\u90E8\u8F6F\u4EF6\u6253\u5F00","editor.cannotOpenBinary":"\u65E0\u6CD5\u5728\u7F16\u8F91\u5668\u4E2D\u5C55\u793A\u4E8C\u8FDB\u5236\u6587\u4EF6\u3002","editor.splitToLeft":"\u5411\u5DE6\u62C6\u5206","editor.splitToRight":"\u5411\u53F3\u62C6\u5206","editor.splitToTop":"\u5411\u4E0A\u62C6\u5206","editor.splitToBottom":"\u5411\u4E0B\u62C6\u5206","editor.closeAllInGroup":"\u5173\u95ED\u5168\u90E8","editor.closeSaved":"\u5173\u95ED\u5DF2\u4FDD\u5B58","editor.closeOtherEditors":"\u5173\u95ED\u5176\u4ED6","editor.closeToRight":"\u5173\u95ED\u5230\u53F3\u4FA7","editor.cannotSaveWithoutDirectory":"\u8BF7\u9009\u62E9\u8981\u4FDD\u5B58\u7684\u8DEF\u5F84","editor.failToOpen":"\u6253\u5F00\u6587\u4EF6 {0} \u5931\u8D25, \u8BF7\u786E\u8BA4\u6587\u4EF6\u662F\u5426\u5B58\u5728\u3002\u8BE6\u7EC6\u9519\u8BEF\u4FE1\u606F: {1}","editor.lineHeight":"\u884C\u9AD8","editor.lineHeight.description":`\u63A7\u5236\u884C\u9AD8\u3002
|
|
30482
30482
|
|
|
30483
30483
|
- \u4F7F\u7528 0 \u6839\u636E\u5B57\u53F7\u81EA\u52A8\u8BA1\u7B97\u884C\u9AD8\u3002
|
|
@@ -30498,7 +30498,7 @@ your modifications. Are you sure to regenerate?`,"aiNative.resolve.conflict.mess
|
|
|
30498
30498
|
{1}
|
|
30499
30499
|
|
|
30500
30500
|
\u662F\u5426\u8981\u9000\u51FA?`,"authentication.signOutMessageSimple":"\u662F\u5426\u8981\u9000\u51FA {0}?","authentication.useOtherAccount":"\u4F7F\u7528\u5176\u4ED6\u8D26\u6237\u767B\u5F55","authentication.selectAccount":"\u6269\u5C55 '{0}' \u5C06\u8981\u8BBF\u95EE {1} \u8D26\u6237","authentication.getSessionPlaceholder":"\u9009\u62E9\u4E00\u4E2A\u8D26\u6237\u7ED9 '{0}' \u4F7F\u7528","authentication.confirmAuthenticationAccess":"\u6269\u5C55 '{0}' \u5C06\u8981\u4F7F\u7528 '{2}' \u8BBF\u95EE {1}","authentication.confirmLogin":"\u6269\u5C55 '{0}' \u5C06\u8981\u4F7F\u7528 {1} \u767B\u5F55","authentication.confirmReLogin":"\u6269\u5C55 '{0}' \u5C06\u8981\u4F7F\u7528 {1} \u518D\u6B21\u767B\u5F55","authentication.signInRequests":"\u767B\u5F55 {0}","authentication.signOut":"\u9000\u51FA {0}","authentication.noAccounts":"\u76EE\u524D\u6CA1\u6709\u767B\u5F55\u4EFB\u4F55\u8D26\u6237","authentication.signedOut":"\u6210\u529F\u9000\u51FA","refactoring-changes.ask.1.create":"\u6269\u5C55 '{0} ' \u5E0C\u671B\u901A\u8FC7\u65B0\u5EFA\u6B64\u6587\u4EF6\u6765\u8FDB\u884C\u91CD\u6784\u66F4\u6539","refactoring-changes.ask.1.copy":"\u6269\u5C55 '{0} ' \u5E0C\u671B\u901A\u8FC7\u590D\u5236\u6B64\u6587\u4EF6\u6765\u8FDB\u884C\u91CD\u6784\u66F4\u6539","refactoring-changes.ask.1.move":"\u6269\u5C55 '{0} ' \u5E0C\u671B\u901A\u8FC7\u79FB\u52A8\u6B64\u6587\u4EF6\u6765\u8FDB\u884C\u91CD\u6784\u66F4\u6539","refactoring-changes.ask.1.delete":"\u6269\u5C55 '{0} ' \u5E0C\u671B\u901A\u8FC7\u5220\u9664\u6B64\u6587\u4EF6\u6765\u8FDB\u884C\u91CD\u6784\u66F4\u6539","refactoring-changes.ask.N.create":"{0} \u4E2A\u63D2\u4EF6\u5E0C\u671B\u901A\u8FC7\u65B0\u5EFA\u6B64\u6587\u4EF6\u6765\u8FDB\u884C\u91CD\u6784\u66F4\u6539","refactoring-changes.ask.N.copy":"{0} \u4E2A\u63D2\u4EF6\u5E0C\u671B\u901A\u8FC7\u590D\u5236\u6B64\u6587\u4EF6\u6765\u8FDB\u884C\u91CD\u6784\u66F4\u6539","refactoring-changes.ask.N.move":"{0} \u4E2A\u63D2\u4EF6\u5E0C\u671B\u901A\u8FC7\u79FB\u52A8\u6B64\u6587\u4EF6\u6765\u8FDB\u884C\u91CD\u6784\u66F4\u6539","refactoring-changes.ask.N.delete":"{0} \u4E2A\u63D2\u4EF6\u5E0C\u671B\u901A\u8FC7\u5220\u9664\u6B64\u6587\u4EF6\u6765\u8FDB\u884C\u91CD\u6784\u66F4\u6539","refactoring-changes.msg.showPreview":"\u663E\u793A\u9884\u89C8","refactoring-changes.msg.skipChanges":"\u8DF3\u8FC7\u66F4\u6539","keyboard.chooseKeyboardLayout":"\u9009\u62E9\u5E03\u5C40\u6587\u4EF6\u914D\u7F6E","keyboard.autoDetect.label":"\u81EA\u52A8\u68C0\u6D4B","keyboard.autoDetect.description":"\uFF08\u5F53\u524D\uFF1A'{0} '\uFF09","keyboard.autoDetect.detail":"\u5C1D\u8BD5\u901A\u8FC7\u6D4F\u89C8\u5668\u53CA\u6309\u952E\u4FE1\u606F\u8FDB\u884C\u5E03\u5C40\u81EA\u52A8\u68C0\u6D4B","editor.configuration.suggest.filterGraceful":"\u63A7\u5236\u5BF9\u5EFA\u8BAE\u7684\u7B5B\u9009\u548C\u6392\u5E8F\u662F\u5426\u8003\u8651\u5C0F\u7684\u62FC\u5199\u9519\u8BEF\u3002","editor.configuration.suggest.insertMode":"\u63A7\u5236\u63A5\u53D7\u8865\u5168\u65F6\u662F\u5426\u8986\u76D6\u5355\u8BCD\u3002\u8BF7\u6CE8\u610F\uFF0C\u8FD9\u53D6\u51B3\u4E8E\u6269\u5C55\u9009\u62E9\u4F7F\u7528\u6B64\u529F\u80FD\u3002","editor.configuration.suggest.insertMode.insert":"\u63D2\u5165\u5EFA\u8BAE\u800C\u4E0D\u8986\u76D6\u5149\u6807\u53F3\u4FA7\u7684\u6587\u672C\u3002","editor.configuration.suggest.insertMode.replace":"\u63D2\u5165\u5EFA\u8BAE\u5E76\u8986\u76D6\u5149\u6807\u53F3\u4FA7\u7684\u6587\u672C\u3002","editor.configuration.suggest.localityBonus":"\u63A7\u5236\u6392\u5E8F\u65F6\u662F\u5426\u9996\u9009\u5149\u6807\u9644\u8FD1\u7684\u5B57\u8BCD\u3002","editor.configuration.suggest.maxVisibleSuggestions.dep":"\u6B64\u8BBE\u7F6E\u5DF2\u5F03\u7528\u3002\u73B0\u5728\u53EF\u4EE5\u8C03\u6574\u5EFA\u8BAE\u5C0F\u7EC4\u4EF6\u7684\u5927\u5C0F\u3002","editor.configuration.suggest.preview":"\u63A7\u5236\u662F\u5426\u5728\u7F16\u8F91\u5668\u4E2D\u9884\u89C8\u5EFA\u8BAE\u7ED3\u679C\u3002","editor.configuration.suggest.shareSuggestSelections":"\u63A7\u5236\u662F\u5426\u5728\u591A\u4E2A\u5DE5\u4F5C\u533A\u548C\u7A97\u53E3\u95F4\u5171\u4EAB\u8BB0\u5FC6\u7684\u5EFA\u8BAE\u9009\u9879(\u9700\u8981 `#editor.suggestSelection#`)\u3002","editor.configuration.suggest.showIcons":"\u63A7\u5236\u662F\u5426\u5728\u5EFA\u8BAE\u4E2D\u663E\u793A\u6216\u9690\u85CF\u56FE\u6807\u3002","editor.configuration.suggest.showInlineDetails":"\u63A7\u5236\u5EFA\u8BAE\u8BE6\u7EC6\u4FE1\u606F\u662F\u968F\u6807\u7B7E\u4E00\u8D77\u663E\u793A\u8FD8\u662F\u4EC5\u663E\u793A\u5728\u8BE6\u7EC6\u4FE1\u606F\u5C0F\u7EC4\u4EF6\u4E2D","editor.configuration.suggest.showStatusBar":"\u63A7\u5236\u5EFA\u8BAE\u5C0F\u90E8\u4EF6\u5E95\u90E8\u7684\u72B6\u6001\u680F\u7684\u53EF\u89C1\u6027\u3002","editor.configuration.suggest.snippetsPreventQuickSuggestions":"\u63A7\u5236\u6D3B\u52A8\u4EE3\u7801\u6BB5\u662F\u5426\u963B\u6B62\u5FEB\u901F\u5EFA\u8BAE\u3002","editor.configuration.suggestFontSize":"\u5EFA\u8BAE\u5C0F\u90E8\u4EF6\u7684\u5B57\u53F7\u3002\u5982\u679C\u8BBE\u7F6E\u4E3A `0`\uFF0C\u5219\u4F7F\u7528 `#editor.fontSize#` \u7684\u503C\u3002","editor.configuration.suggestLineHeight":"\u5EFA\u8BAE\u5C0F\u90E8\u4EF6\u7684\u884C\u9AD8\u3002\u5982\u679C\u8BBE\u7F6E\u4E3A `0`\uFF0C\u5219\u4F7F\u7528 `#editor.lineHeight#` \u7684\u503C\u3002\u6700\u5C0F\u503C\u4E3A 8\u3002","editor.configuration.suggestOnTriggerCharacters":"\u63A7\u5236\u5728\u952E\u5165\u89E6\u53D1\u5B57\u7B26\u540E\u662F\u5426\u81EA\u52A8\u663E\u793A\u5EFA\u8BAE\u3002","editor.configuration.acceptSuggestionOnEnterSmart":"\u4EC5\u5728\u5EFA\u8BAE\u505A\u51FA\u6587\u672C\u66F4\u6539\u65F6\uFF0C\u624D\u4F7F\u7528 `Enter` \u63A5\u53D7\u5EFA\u8BAE\u3002","editor.configuration.acceptSuggestionOnEnter":"\u63A7\u5236\u7F16\u8F91\u5668\u662F\u5426\u5E94\u8BE5\u5728 `Tab` \u952E\u4E4B\u5916\uFF0C\u8FD8\u4F7F\u7528 `Enter` \u952E\u6765\u63A5\u53D7\u5EFA\u8BAE\u3002\u8FD9\u6709\u52A9\u4E8E\u907F\u514D\u5728\u63D2\u5165\u65B0\u884C\u6216\u63A5\u53D7\u5EFA\u8BAE\u4E4B\u95F4\u7684\u6B67\u4E49\u3002","editor.configuration.acceptSuggestionOnCommitCharacter":"\u63A7\u5236\u662F\u5426\u5728\u4F7F\u7528\u63D0\u4EA4\u5B57\u7B26\u65F6\u63A5\u53D7\u5EFA\u8BAE\u3002\u4F8B\u5982\uFF0C\u5728 JavaScript \u4E2D\uFF0C\u5206\u53F7 (`;`) \u662F\u4E00\u4E2A\u63D0\u4EA4\u5B57\u7B26\uFF0C\u53EF\u4EE5\u63A5\u53D7\u4E00\u4E2A\u5EFA\u8BAE\u5E76\u952E\u5165\u8BE5\u5B57\u7B26\u3002","editor.configuration.snippetSuggestions.top":"\u5C06\u4EE3\u7801\u7247\u6BB5\u7684\u5EFA\u8BAE\u653E\u5728\u5176\u4ED6\u5EFA\u8BAE\u7684\u9876\u90E8\u3002","editor.configuration.snippetSuggestions.bottom":"\u5C06\u4EE3\u7801\u7247\u6BB5\u7684\u5EFA\u8BAE\u653E\u5728\u5176\u4ED6\u5EFA\u8BAE\u7684\u5E95\u90E8\u3002","editor.configuration.snippetSuggestions.inline":"\u5C06\u4EE3\u7801\u7247\u6BB5\u7684\u5EFA\u8BAE\u6DF7\u5408\u5728\u5176\u4ED6\u5EFA\u8BAE\u7684\u4E2D\u95F4\u3002","editor.configuration.snippetSuggestions.none":"\u4E0D\u5C55\u793A\u4EE3\u7801\u7247\u6BB5\u5EFA\u8BAE\u3002","editor.configuration.snippetSuggestions":"\u63A7\u5236\u4EE3\u7801\u7247\u6BB5\u662F\u5426\u4E0E\u5176\u4ED6\u5EFA\u8BAE\u4E00\u540C\u663E\u793A\u4EE5\u53CA\u5B83\u4EEC\u7684\u6392\u5E8F\u65B9\u5F0F\u3002","editor.configuration.wordBasedSuggestions":"\u63A7\u5236\u662F\u5426\u6839\u636E\u6587\u6863\u4E2D\u7684\u5B57\u8BCD\u8BA1\u7B97\u81EA\u52A8\u8865\u5168\u5217\u8868\u3002","editor.configuration.suggestSelection":"\u63A7\u5236\u5728\u5EFA\u8BAE\u5217\u8868\u4E2D\u5982\u4F55\u9884\u5148\u9009\u62E9\u5EFA\u8BAE\u3002","editor.configuration.suggestSelection.first":"\u59CB\u7EC8\u9009\u62E9\u7B2C\u4E00\u4E2A\u5EFA\u8BAE\u3002","editor.configuration.suggestSelection.recentlyUsed":"\u9009\u62E9\u6700\u8FD1\u7684\u5EFA\u8BAE\uFF0C\u9664\u975E\u8FDB\u4E00\u6B65\u952E\u5165\u9009\u62E9\u5176\u4ED6\u9879\u3002\u4F8B\u5982 `console. -> console.log`\uFF0C\u56E0\u4E3A\u6700\u8FD1\u8865\u5168\u8FC7 `log`\u3002","editor.configuration.suggestSelection.recentlyUsedByPrefix":"\u6839\u636E\u4E4B\u524D\u8865\u5168\u8FC7\u7684\u5EFA\u8BAE\u7684\u524D\u7F00\u6765\u8FDB\u884C\u9009\u62E9\u3002\u4F8B\u5982\uFF0C`co -> console`\u3001`con -> const`\u3002","editor.configuration.tabCompletion":"\u542F\u7528 Tab \u8865\u5168\u3002","editor.configuration.tabCompletion.off":"\u7981\u7528 Tab \u8865\u5168\u3002","editor.configuration.tabCompletion.on":"\u5728\u6309\u4E0B Tab \u952E\u65F6\u8FDB\u884C Tab \u8865\u5168\uFF0C\u5C06\u63D2\u5165\u6700\u4F73\u5339\u914D\u5EFA\u8BAE\u3002","editor.configuration.tabCompletion.onlySnippets":'\u5728\u524D\u7F00\u5339\u914D\u65F6\u8FDB\u884C Tab \u8865\u5168\u3002\u5728 "quickSuggestions" \u672A\u542F\u7528\u65F6\u4F53\u9A8C\u6700\u597D\u3002',"editor.configuration.editor.guides.bracketPairs":"\u63A7\u5236\u662F\u5426\u542F\u7528\u62EC\u53F7\u5BF9\u6307\u5357\u3002","editor.configuration.editor.guides.bracketPairsHorizontal":"\u63A7\u5236\u662F\u5426\u542F\u7528\u6C34\u5E73\u62EC\u53F7\u5BF9\u6307\u5357\u3002","editor.configuration.renderLineHighlight":"\u63A7\u5236\u7F16\u8F91\u5668\u7684\u5F53\u524D\u884C\u8FDB\u884C\u9AD8\u4EAE\u663E\u793A\u7684\u65B9\u5F0F\u3002","editor.configuration.renderLineHighlight.all":"\u540C\u65F6\u7A81\u51FA\u663E\u793A\u5BFC\u822A\u7EBF\u548C\u5F53\u524D\u884C\u3002","editor.configuration.renderLineHighlightOnlyWhenFocus":"\u63A7\u5236\u7F16\u8F91\u5668\u662F\u5426\u4EC5\u5728\u7126\u70B9\u5728\u7F16\u8F91\u5668\u65F6\u7A81\u51FA\u663E\u793A\u5F53\u524D\u884C\u3002","editor.configuration.codeLens":"\u63A7\u5236\u662F\u5426\u5728\u7F16\u8F91\u5668\u4E2D\u663E\u793A CodeLens\u3002","editor.configuration.suggest.showClasss":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u663E\u793A\u201C\u7C7B\u201D\u5EFA\u8BAE\u3002","editor.configuration.suggest.showColors":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u663E\u793A\u201C\u989C\u8272\u201D\u5EFA\u8BAE\u3002","editor.configuration.suggest.showConstants":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u663E\u793A\u201C\u5E38\u91CF\u201D\u5EFA\u8BAE\u3002","editor.configuration.suggest.showConstructors":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u663E\u793A\u201C\u6784\u9020\u51FD\u6570\u201D\u5EFA\u8BAE\u3002","editor.configuration.suggest.showCustomcolors":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u663E\u793A\u201C\u81EA\u5B9A\u4E49\u989C\u8272\u201D\u5EFA\u8BAE\u3002","editor.configuration.suggest.showDeprecated":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u663E\u793A\u201C\u5DF2\u542F\u7528\u201D\u5EFA\u8BAE\u3002","editor.configuration.suggest.showEnumMembers":'\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u663E\u793A "enumMember" \u5EFA\u8BAE\u3002',"editor.configuration.suggest.showEnums":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u663E\u793A\u201C\u679A\u4E3E\u201D\u5EFA\u8BAE\u3002","editor.configuration.suggest.showEvents":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u663E\u793A\u201C\u4E8B\u4EF6\u201D\u5EFA\u8BAE\u3002","editor.configuration.suggest.showFields":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u663E\u793A\u201C\u5B57\u6BB5\u201D\u5EFA\u8BAE\u3002","editor.configuration.suggest.showFiles":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u663E\u793A\u201C\u6587\u4EF6\u201D\u5EFA\u8BAE\u3002","editor.configuration.suggest.showFolders":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u663E\u793A\u201C\u6587\u4EF6\u5939\u201D\u5EFA\u8BAE\u3002","editor.configuration.suggest.showFunctions":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u663E\u793A\u201C\u51FD\u6570\u201D\u5EFA\u8BAE\u3002","editor.configuration.suggest.showInterfaces":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u663E\u793A\u201C\u63A5\u53E3\u201D\u5EFA\u8BAE\u3002","editor.configuration.suggest.showIssues":'\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u663E\u793A"\u95EE\u9898"\u5EFA\u8BAE\u3002',"editor.configuration.suggest.showKeywords":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u663E\u793A\u201C\u5173\u952E\u5B57\u201D\u5EFA\u8BAE\u3002","editor.configuration.suggest.showMethods":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u663E\u793A\u201C\u65B9\u6CD5\u201D\u5EFA\u8BAE\u3002","editor.configuration.suggest.showModules":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u663E\u793A\u201C\u6A21\u5757\u201D\u5EFA\u8BAE\u3002","editor.configuration.suggest.showOperators":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u663E\u793A\u201C\u64CD\u4F5C\u7B26\u201D\u5EFA\u8BAE\u3002","editor.configuration.suggest.showPropertys":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u663E\u793A\u201C\u5C5E\u6027\u201D\u5EFA\u8BAE\u3002","editor.configuration.suggest.showReferences":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u663E\u793A\u201C\u53C2\u8003\u201D\u5EFA\u8BAE\u3002","editor.configuration.suggest.showSnippets":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u663E\u793A\u201C\u7247\u6BB5\u201D\u5EFA\u8BAE\u3002","editor.configuration.suggest.showStructs":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u663E\u793A\u201C\u7ED3\u6784\u201D\u5EFA\u8BAE\u3002","editor.configuration.suggest.showTexts":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u663E\u793A\u201C\u6587\u672C\u201D\u5EFA\u8BAE\u3002","editor.configuration.suggest.showTypeParameters":'\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u663E\u793A "typeParameter" \u5EFA\u8BAE\u3002',"editor.configuration.suggest.showUnits":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u663E\u793A\u201C\u5355\u4F4D\u201D\u5EFA\u8BAE\u3002","editor.configuration.suggest.showUsers":'\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u663E\u793A"\u7528\u6237"\u5EFA\u8BAE\u3002',"editor.configuration.suggest.showValues":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u663E\u793A\u201C\u503C\u201D\u5EFA\u8BAE\u3002","editor.configuration.suggest.showVariables":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u663E\u793A\u201C\u53D8\u91CF\u201D\u5EFA\u8BAE\u3002","editor.configuration.suggest.maxVisibleSuggestions":"\u63A7\u5236 IntelliSense \u5728\u663E\u793A\u6EDA\u52A8\u6761\u4E4B\u524D\u5C06\u663E\u793A\u7684\u5EFA\u8BAE\u6570\u91CF\uFF08\u6700\u591A 15 \u4E2A\uFF09\u3002","editor.configuration.suggest.details.visible":"\u63A7\u5236\u7F16\u8F91\u5668\u4EE3\u7801\u8865\u5168\u662F\u5426\u9ED8\u8BA4\u5C55\u5F00\u8BE6\u60C5\u4FE1\u606F","editor.configuration.suggest.filtered":"\u63A7\u5236\u662F\u5426\u5E94\u4ECE IntelliSense \u4E2D\u8FC7\u6EE4\u6389\u67D0\u4E9B\u5EFA\u8BAE\u7C7B\u578B\u3002\u53EF\u4EE5\u5728\u6B64\u5904\u627E\u5230\u4E00\u4EFD\u5EFA\u8BAE\u7C7B\u578B\u5217\u8868: https://code.visualstudio.com/docs/editor/intellisense#_types-of-completions.","editor.configuration.suggest.filtered.method":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u4F1A\u5C55\u793A `method` \u7C7B\u578B\u7684\u5EFA\u8BAE\u3002","editor.configuration.suggest.filtered.function":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u4F1A\u5C55\u793A `function` \u7C7B\u578B\u7684\u5EFA\u8BAE\u3002","editor.configuration.suggest.filtered.constructor":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u4F1A\u5C55\u793A `constructor` \u7C7B\u578B\u7684\u5EFA\u8BAE\u3002","editor.configuration.suggest.filtered.field":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u4F1A\u5C55\u793A `field` \u7C7B\u578B\u7684\u5EFA\u8BAE\u3002","editor.configuration.suggest.filtered.variable":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u4F1A\u5C55\u793A `variable` \u7C7B\u578B\u7684\u5EFA\u8BAE\u3002","editor.configuration.suggest.filtered.class":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u4F1A\u5C55\u793A `class` \u7C7B\u578B\u7684\u5EFA\u8BAE\u3002","editor.configuration.suggest.filtered.struct":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u4F1A\u5C55\u793A `struct` \u7C7B\u578B\u7684\u5EFA\u8BAE\u3002","editor.configuration.suggest.filtered.interface":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u4F1A\u5C55\u793A `interface` \u7C7B\u578B\u7684\u5EFA\u8BAE\u3002","editor.configuration.suggest.filtered.module":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u4F1A\u5C55\u793A `module` \u7C7B\u578B\u7684\u5EFA\u8BAE\u3002","editor.configuration.suggest.filtered.property":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u4F1A\u5C55\u793A `property` \u7C7B\u578B\u7684\u5EFA\u8BAE\u3002","editor.configuration.suggest.filtered.event":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u4F1A\u5C55\u793A `event` \u7C7B\u578B\u7684\u5EFA\u8BAE\u3002","editor.configuration.suggest.filtered.operator":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u4F1A\u5C55\u793A `operator` \u7C7B\u578B\u7684\u5EFA\u8BAE\u3002","editor.configuration.suggest.filtered.unit":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u4F1A\u5C55\u793A `unit` \u7C7B\u578B\u7684\u5EFA\u8BAE\u3002","editor.configuration.suggest.filtered.value":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u4F1A\u5C55\u793A `value` \u7C7B\u578B\u7684\u5EFA\u8BAE\u3002","editor.configuration.suggest.filtered.constant":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u4F1A\u5C55\u793A `constant` \u7C7B\u578B\u7684\u5EFA\u8BAE\u3002","editor.configuration.suggest.filtered.enum":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u4F1A\u5C55\u793A `enum` \u7C7B\u578B\u7684\u5EFA\u8BAE\u3002","editor.configuration.suggest.filtered.enumMember":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u4F1A\u5C55\u793A `enumMember` \u7C7B\u578B\u7684\u5EFA\u8BAE\u3002","editor.configuration.suggest.filtered.keyword":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u4F1A\u5C55\u793A `keyword` \u7C7B\u578B\u7684\u5EFA\u8BAE\u3002","editor.configuration.suggest.filtered.text":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u4F1A\u5C55\u793A `text` \u7C7B\u578B\u7684\u5EFA\u8BAE\u3002","editor.configuration.suggest.filtered.color":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u4F1A\u5C55\u793A `color` \u7C7B\u578B\u7684\u5EFA\u8BAE\u3002","editor.configuration.suggest.filtered.file":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u4F1A\u5C55\u793A `file` \u7C7B\u578B\u7684\u5EFA\u8BAE\u3002","editor.configuration.suggest.filtered.reference":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u4F1A\u5C55\u793A `reference` \u7C7B\u578B\u7684\u5EFA\u8BAE\u3002","editor.configuration.suggest.filtered.customcolor":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u4F1A\u5C55\u793A `customcolor` \u7C7B\u578B\u7684\u5EFA\u8BAE\u3002","editor.configuration.suggest.filtered.folder":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u4F1A\u5C55\u793A `folder` \u7C7B\u578B\u7684\u5EFA\u8BAE\u3002","editor.configuration.suggest.filtered.typeParameter":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u4F1A\u5C55\u793A `typeParameter` \u7C7B\u578B\u7684\u5EFA\u8BAE\u3002","editor.configuration.suggest.filtered.snippet":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u4F1A\u5C55\u793A `snippet` \u7C7B\u578B\u7684\u5EFA\u8BAE\u3002","editor.configuration.editor.gotoLocation.multiple":'\u63A7\u5236 "\u8F6C\u5230" \u547D\u4EE4\uFF08\u4F8B\u5982\u8F6C\u5230\u5B9A\u4E49\uFF09\u5728\u5B58\u5728\u591A\u4E2A\u76EE\u6807\u4F4D\u7F6E\u65F6\u7684\u884C\u4E3A\u3002',"editor.configuration.gotoLocation.multiple.peek":"\u5728\u901F\u89C8\u89C6\u56FE(Peek View)\u4E2D\u663E\u793A\u7ED3\u679C\u3002(\u9ED8\u8BA4)","editor.configuration.gotoLocation.multiple.gotoAndPeek":"\u8F6C\u5230\u4E3B\u7ED3\u679C\u5E76\u663E\u793A\u901F\u89C8\u89C6\u56FE(Peek View)\u3002","editor.configuration.gotoLocation.multiple.goto":"\u8F6C\u5230\u4E3B\u7ED3\u679C\uFF0C\u5E76\u5BF9\u5176\u4ED6\u7ED3\u679C\u542F\u7528\u65E0\u901F\u89C8\u5BFC\u822A","editor.configuration.experimental.stickyScroll.enabled":"\u5728\u7F16\u8F91\u5668\u9876\u90E8\u7684\u6EDA\u52A8\u8FC7\u7A0B\u4E2D\u663E\u793A\u5D4C\u5957\u7684\u5F53\u524D\u4F5C\u7528\u57DF\u3002","editor.configuration.maxTokenizationLineLength":"\u7531\u4E8E\u6027\u80FD\u539F\u56E0\uFF0C\u8D85\u8FC7\u8FD9\u4E2A\u957F\u5EA6\u7684\u884C\u5C06\u4E0D\u4F1A\u88AB\u6807\u8BC6\u3002","editor.configuration.codeActionsOnSave.organizeImports":"\u63A7\u5236\u662F\u5426\u5E94\u5728\u6587\u4EF6\u4FDD\u5B58\u65F6\u6574\u7406\u5BFC\u5165\uFF08Import\uFF09\u8BED\u53E5\u3002","editor.configuration.codeActionsOnSave.fixAll":"\u63A7\u5236\u662F\u5426\u5E94\u5728\u6587\u4EF6\u4FDD\u5B58\u65F6\u8FD0\u884C\u81EA\u52A8\u4FEE\u590D\u64CD\u4F5C\u3002","editor.configuration.codeActionsOnSave":"\u5728\u4FDD\u5B58\u65F6\u8FD0\u884C\u7684\u4EE3\u7801\u64CD\u4F5C\u7C7B\u578B","editor.configuration.codeActionsOnSaveTimeout":"\u5728\u6B64\u8D85\u65F6\u65F6\u95F4(\u6BEB\u79D2)\u4E4B\u540E\u4EE3\u7801\u64CD\u4F5C\u5C06\u88AB\u53D6\u6D88\u3002","editor.configuration.codeActionsOnSaveNotification":"\u4EE3\u7801\u64CD\u4F5C\u6267\u884C\u65F6\u662F\u5426\u5C55\u793A\u901A\u77E5\u4FE1\u606F","editor.configuration.quickSuggestionsDelay":"\u63A7\u5236\u663E\u793A\u667A\u80FD\u63D0\u793A\u7684\u5EF6\u8FDF\u65F6\u957F (\u6BEB\u79D2)\u3002","editor.configuration.tabSize":"\u63A7\u5236 Tab \u7F29\u8FDB\u7B49\u4E8E\u7684\u7A7A\u683C\u6570\u3002\u82E5\u542F\u7528 `#editor.detectIndentation#`\uFF0C\u8BE5\u8BBE\u7F6E\u53EF\u80FD\u4F1A\u88AB\u8986\u76D6","editor.configuration.fontWeight":'\u63A7\u5236\u5B57\u4F53\u7C97\u7EC6\uFF0C\u63A5\u6536 "normal" \u548C "bold" \u5173\u952E\u8BCD\u6216\u8005 1 \u5230 1000 \u6570\u503C\u3002',"editor.configuration.largeFileSize":"\u63A7\u5236\u8D85\u5927\u6587\u4EF6\u7684\u81EA\u5B9A\u4E49\u4F53\u79EF\u3002(\u5355\u4F4D\uFF1AB)","editor.configuration.preferredFormatter":"\u914D\u7F6E\u4F18\u5148\u4F7F\u7528\u7684\u683C\u5F0F\u5316\u5668\u3002","editor.configuration.wrapTab":"\u63A7\u5236\u5F53\u7F16\u8F91\u5668 Tab \u8D85\u8FC7\u53EF\u7528\u7A7A\u95F4\u65F6\uFF0C\u662F\u5426\u4F7F\u7528\u6362\u884C\u6765\u4EE3\u66FF\u6EDA\u52A8\u6A21\u5F0F\u3002","editor.configuration.enablePreviewFromCodeNavigation":"\u63A7\u5236\u5F53\u4EE3\u7801\u5BFC\u822A\u4ECE\u5176\u51FA\u53D1\u65F6\uFF0C\u7F16\u8F91\u5668\u662F\u5426\u4ECD\u5904\u4E8E\u9884\u89C8\u6A21\u5F0F\u3002","editor.configuration.formatOnSaveTimeout":"\u63A7\u5236\u4FDD\u5B58\u65F6\u683C\u5F0F\u5316\u7684\u8D85\u65F6\u65F6\u95F4\uFF08\u6BEB\u79D2\uFF09\u3002\u4EC5\u5F53 `#editor.formatOnSave#` \u542F\u7528\u65F6\u751F\u6548\u3002","editor.configuration.inlineSuggest.enabled":"\u63A7\u5236\u662F\u5426\u5728\u7F16\u8F91\u5668\u4E2D\u81EA\u52A8\u663E\u793A\u5185\u8054\u5EFA\u8BAE\u3002","editor.configuration.inlineSuggest.showToolbar":"\u63A7\u5236\u4F55\u65F6\u663E\u793A\u5185\u8054\u5EFA\u8BAE\u5DE5\u5177\u680F\u3002","editor.configuration.inlineSuggest.showToolbar.always":"\u6BCF\u5F53\u663E\u793A\u5185\u8054\u5EFA\u8BAE\u65F6\uFF0C\u5C31\u663E\u793A\u5185\u8054\u5EFA\u8BAE\u5DE5\u5177\u680F\u3002","editor.configuration.inlineSuggest.showToolbar.onHover":"\u5C06\u9F20\u6807\u60AC\u505C\u5728\u5185\u8054\u5EFA\u8BAE\u4E0A\u65F6\u663E\u793A\u5185\u8054\u5EFA\u8BAE\u5DE5\u5177\u680F\u3002","editor.configuration.inlineSuggest.showToolbar.never":"\u6C38\u4E0D\u663E\u793A\u5185\u8054\u5EFA\u8BAE\u5DE5\u5177\u680F\u3002","editor.configuration.hover.enabled":"\u63A7\u5236\u662F\u5426\u5728\u7F16\u8F91\u5668\u4E2D\u542F\u7528\u4EE3\u7801\u63D0\u793A\u3002","editor.configuration.hover.delay":"\u63A7\u5236\u4EE3\u7801\u63D0\u793A\u663E\u793A\u7684\u5EF6\u8FDF\u65F6\u95F4\uFF08\u6BEB\u79D2\uFF09\u3002","editor.configuration.hover.sticky":"\u63A7\u5236\u4EE3\u7801\u63D0\u793A\u662F\u5426\u5728\u9F20\u6807\u60AC\u505C\u65F6\u4FDD\u6301\u53EF\u89C1\u3002","editor.configuration.hover.hidingDelay":"\u63A7\u5236\u4EE3\u7801\u63D0\u793A\u9690\u85CF\u7684\u5EF6\u8FDF\u65F6\u95F4\uFF08\u6BEB\u79D2\uFF09\u3002\u9700\u8981 `editor.hover.sticky` \u8BBE\u7F6E\u4E3A true \u65F6\u751F\u6548\u3002","editor.configuration.hover.above":"\u4F18\u5148\u663E\u793A\u4EE3\u7801\u63D0\u793A\u5728\u884C\u4E0A\u65B9\uFF0C\u5982\u679C\u884C\u6709\u7A7A\u95F4\u3002","editor.configuration.autoSave":"\u63A7\u5236\u5982\u4F55\u81EA\u52A8\u4FDD\u5B58\u6587\u4EF6\u3002","editor.configuration.formatOnSave":"\u5728\u4FDD\u5B58\u65F6\u683C\u5F0F\u5316\u6587\u4EF6","editor.configuration.formatOnType":"\u63A7\u5236\u7F16\u8F91\u5668\u662F\u5728\u952E\u5165\u540E\u81EA\u52A8\u683C\u5F0F\u5316\u8BE5\u884C\u3002","editor.configuration.formatOnPaste":"\u63A7\u5236\u7F16\u8F91\u5668\u662F\u5426\u81EA\u52A8\u683C\u5F0F\u5316\u7C98\u8D34\u7684\u5185\u5BB9\u3002\u9700\u8981\u5F53\u524D\u6587\u4EF6\u6709\u4E00\u4E2A\u683C\u5F0F\u5316\u5DE5\u5177\u5E76\u4E14\u8BE5\u683C\u5F0F\u5316\u683C\u5C40\u5FC5\u987B\u80FD\u591F\u5728\u6587\u6863\u4E2D\u683C\u5F0F\u5316\u4E00\u4E2A\u8303\u56F4\u3002","editor.configuration.autoIndent":"\u63A7\u5236\u7F16\u8F91\u5668\u662F\u5426\u5E94\u8BE5\u5728\u7528\u6237\u952E\u5165\u3001\u7C98\u8D34\u6216\u79FB\u52A8\u884C\u65F6\u81EA\u52A8\u8C03\u6574\u7F29\u8FDB\u3002\u5FC5\u987B\u63D0\u4F9B\u5E26\u6709\u8BE5\u8BED\u8A00\u7F29\u8FDB\u89C4\u5219\u7684\u6269\u5C55\u3002","editor.configuration.autoSaveDelay":"\u63A7\u5236\u81EA\u52A8\u4FDD\u5B58\u7684\u5EF6\u8FDF\u65F6\u957F\uFF08\u6BEB\u79D2\uFF09\u3002\u4EC5\u5F53 `#editor.autoSave#` \u8BBE\u7F6E\u4E3A\u201C\u7F16\u8F91\u540E\u81EA\u52A8\u4FDD\u5B58\u201D\u65F6\u751F\u6548\u3002","editor.configuration.askIfDiff":"\u4FDD\u5B58\u6587\u4EF6\u65F6\u5982\u679C\u78C1\u76D8\u4E0A\u7684\u6587\u4EF6\u8F83\u65B0\uFF0C\u8FDB\u884C\u63D0\u793A\u624B\u52A8\u89E3\u51B3\u4FDD\u5B58\u51B2\u7A81\u3002","editor.configuration.forceReadOnly":"\u662F\u5426\u542F\u7528 \u53EA\u8BFB\u6A21\u5F0F","editor.configuration.bracketPairColorization.enabled":"\u63A7\u5236\u662F\u5426\u542F\u7528\u62EC\u53F7\u5BF9\u7740\u8272\u3002\u4F7F\u7528 \u201Cworkbench.colorCustomizations\u201D \u66FF\u4EE3\u62EC\u53F7\u7A81\u51FA\u663E\u793A\u989C\u8272\u3002","editor.configuration.guides.bracketPairs":"\u63A7\u5236\u662F\u5426\u542F\u7528\u62EC\u53F7\u5BF9\u6307\u5357\u3002","editor.configuration.mouseBackForwardToNavigate":"\u5141\u8BB8\u4F7F\u7528\u9F20\u6807\u6309\u94AE 4 \u548C 5 \u6765\u6267\u884C\u547D\u4EE4\u201CGo Back\u201D\u548C\u201CGo Forward\u201D\u3002","editor.configuration.previewMode":"\u4F7F\u7528\u9884\u89C8\u6A21\u5F0F\u6253\u5F00","editor.configuration.tokenColorCustomizations":"\u8986\u76D6\u5F53\u524D\u6240\u9009\u989C\u8272\u4E3B\u9898\u4E2D\u7684\u7F16\u8F91\u5668\u989C\u8272\u548C\u5B57\u4F53\u6837\u5F0F","editor.configuration.workbench.editorAssociations":'\u5C06 glob \u6A21\u5F0F\u914D\u7F6E\u5230\u7F16\u8F91\u5668(\u4F8B\u5982 `"*\u5341\u516D\u8FDB\u5236": "hexEditor.hexEdit"`)\u3002\u8FD9\u4E9B\u4F18\u5148\u987A\u5E8F\u9AD8\u4E8E\u9ED8\u8BA4\u884C\u4E3A\u3002',"editor.configuration.guides.indentation":"\u63A7\u5236\u7F16\u8F91\u5668\u662F\u5426\u663E\u793A\u7F29\u8FDB\u53C2\u8003\u7EBF\u3002","editor.configuration.guides.highlightActiveIndentation":"\u63A7\u5236\u662F\u5426\u7A81\u51FA\u663E\u793A\u7F16\u8F91\u5668\u4E2D\u6D3B\u52A8\u7684\u7F29\u8FDB\u53C2\u8003\u7EBF\u3002","editor.configuration.trimAutoWhitespace":"\u5220\u9664\u81EA\u52A8\u63D2\u5165\u7684\u5C3E\u968F\u7A7A\u767D\u7B26\u53F7\u3002","editor.configuration.unicodeHighlight.ambiguousCharacters":"\u63A7\u5236\u662F\u5426\u7A81\u51FA\u663E\u793A\u53EF\u80FD\u4E0E\u57FA\u672C ASCII \u5B57\u7B26\u6DF7\u6DC6\u7684\u5B57\u7B26\uFF0C\u4F46\u5F53\u524D\u7528\u6237\u533A\u57DF\u8BBE\u7F6E\u4E2D\u5E38\u89C1\u7684\u5B57\u7B26\u9664\u5916\u3002","editor.configuration.lightbulb.enabled":"\u5728\u7F16\u8F91\u5668\u4E2D\u542F\u7528\u4EE3\u7801\u64CD\u4F5C\u83DC\u5355\u3002","editor.configuration.lightbulb.enabled.off":"\u7981\u7528\u4EE3\u7801\u64CD\u4F5C\u83DC\u5355\u3002","editor.configuration.lightbulb.enabled.onCode":"\u5F53\u5149\u6807\u4E0E\u4EE3\u7801\u4E00\u8D77\u6392\u5217\u65F6\uFF0C\u663E\u793A\u4EE3\u7801\u64CD\u4F5C\u83DC\u5355\u3002","editor.configuration.lightbulb.enabled.on":"\u5F53\u5149\u6807\u4E0E\u4EE3\u7801\u4E00\u8D77\u6392\u5217\u6216\u5728\u7A7A\u7684\u884C\u65F6\uFF0C\u663E\u793A\u4EE3\u7801\u64CD\u4F5C\u83DC\u5355\u3002","diffEditor.configuration.renderSideBySide":"\u63A7\u5236\u5DEE\u5F02\u7F16\u8F91\u5668\u7684\u663E\u793A\u65B9\u5F0F\u3002","diffEditor.configuration.ignoreTrimWhitespace":"\u542F\u7528\u540E\uFF0C\u5DEE\u5F02\u7F16\u8F91\u5668\u7684\u524D\u5BFC\u548C\u5C3E\u968F\u7A7A\u767D\u5B57\u7B26\u5C06\u4F1A\u5FFD\u7565","diffEditor.action.toggleCollapseUnchangedRegions":"\u6298\u53E0\u672A\u66F4\u6539\u7684\u4EE3\u7801\u533A\u57DF","inlineSuggest.enabled":"\u63A7\u5236\u662F\u5426\u5728\u7F16\u8F91\u5668\u4E2D\u81EA\u52A8\u663E\u793A\u5185\u8054\u5EFA\u8BAE\u3002","view.component.renderedError":"\u89C6\u56FE\u7EC4\u4EF6\u6E32\u67D3\u5F02\u5E38","view.component.tryAgain":"\u91CD\u65B0\u52A0\u8F7D","test.title":"\u6D4B\u8BD5\u7BA1\u7406\u5668","test.result.runFinished":"\u6D4B\u8BD5\u8FD0\u884C\u5B8C\u6210\u4E8E {0}","test.task.unnamed":"\u672A\u547D\u540D\u4EFB\u52A1","test.results":"\u6D4B\u8BD5\u7ED3\u679C","menu.missing.command":"\u83DC\u5355{0} \u8981\u6267\u884C\u7684\u547D\u4EE4\u4E0D\u5B58\u5728\uFF1A{1}","menu.missing.altCommand":"\u83DC\u5355{0} \u8981\u6267\u884C\u7684\u547D\u4EE4(altCommand)\u4E0D\u5B58\u5728\uFF1A{1}","menu.dupe.command":"\u83DC\u5355{0} command({1}) \u548C alt({2}) \u6CE8\u518C\u91CD\u590D","command.category.developerTools":"\u5F00\u53D1\u4EBA\u5458\u5DE5\u5177","connection.start.rtt":"\u67E5\u770B\u901A\u4FE1\u5EF6\u8FDF","connection.stop.rtt":"\u5173\u95ED\u901A\u4FE1\u5EF6\u8FDF\u68C0\u67E5","debug.terminal.label":"\u521B\u5EFA Javascript Debug Terminal","debug.terminal.title":"\u8C03\u8BD5\u8FDB\u7A0B","workbench.action.tasks.runTask":"\u8FD0\u884C\u4EFB\u52A1","workbench.action.tasks.reRunTask":"\u6267\u884C\u4E0A\u6B21\u8FD0\u884C\u7684\u4EFB\u52A1","workbench.action.tasks.restartTask":"\u91CD\u65B0\u5F00\u59CB\u8FD0\u884C\u4E2D\u7684\u4EFB\u52A1","workbench.action.tasks.terminate":"\u7EC8\u6B62\u4EFB\u52A1","workbench.action.tasks.showTasks":"\u5C55\u793A\u4EFB\u52A1","workbench.action.tasks.showLog":"\u5C55\u793A\u4EFB\u52A1\u65E5\u5FD7","task.contribute":"\u8D21\u732E","task.cannotFindTask":"\u672A\u627E\u5230 {0} \u7684\u4EFB\u52A1\uFF0C\u6309\u56DE\u8F66\u952E\u8FD4\u56DE","comment.reply.count":"{0} \u4E2A\u8BC4\u8BBA","comment.reply.lastReply":"\u6700\u540E\u7531 {0} \u8BC4\u8BBA","walkthroughs.welcome":"\u6B22\u8FCE\u4F7F\u7528","walkthroughs.get.started":"\u6253\u5F00 `\u5165\u95E8` \u6F14\u793A","mergeEditor.reset":"\u91CD\u7F6E","mergeEditor.workbench.tab.name":"\u6B63\u5728\u5408\u5E76: {0}","mergeEditor.conflict.action.apply.confirm.title":"\u5F53\u524D\u6587\u4EF6\u8FD8\u6709\u672A\u5904\u7406\u7684\u51B2\u7A81\u6216\u53D8\u66F4\uFF0C\u662F\u5426\u5E94\u7528\u5E76\u4FDD\u5B58\u66F4\u6539\uFF1F","mergeEditor.conflict.action.apply.confirm.continue":"\u7EE7\u7EED\u5408\u5E76","mergeEditor.conflict.action.apply.confirm.complete":"\u786E\u8BA4\u4FDD\u5B58\u5E76\u66F4\u6539","mergeEditor.action.button.apply":"\u5E94\u7528\u66F4\u6539","mergeEditor.action.button.apply-and-stash":"\u5E94\u7528\u5E76\u6682\u5B58","mergeEditor.action.button.accept.left":"\u63A5\u53D7\u5DE6\u8FB9","mergeEditor.action.button.accept.right":"\u63A5\u53D7\u53F3\u8FB9","mergeEditor.open.3way":"3-way \u7F16\u8F91\u5668","mergeEditor.conflict.prev":"\u4E0A\u4E00\u5904\u51B2\u7A81","mergeEditor.conflict.next":"\u4E0B\u4E00\u5904\u51B2\u7A81","mergeEditor.conflict.ai.resolve.all":"AI \u89E3\u51B3","mergeEditor.conflict.ai.resolve.all.stop":"\u5168\u90E8\u505C\u6B62","mergeEditor.open.tradition":"\u6587\u672C\u7F16\u8F91\u5668","workbench.quickOpen.preserveInput":"\u662F\u5426\u5728 QuickOpen \u7684\u8F93\u5165\u6846\uFF08\u5305\u62EC\u547D\u4EE4\u9762\u677F\uFF09\u4E2D\u4FDD\u7559\u4E0A\u6B21\u8F93\u5165\u7684\u5185\u5BB9","aiNative.chat.ai.assistant.name":"AI \u7814\u53D1\u52A9\u624B","aiNative.chat.input.placeholder.default":'\u53EF\u4EE5\u95EE\u6211\u4EFB\u4F55\u95EE\u9898\uFF0C\u6216\u952E\u5165\u4E3B\u9898 "/" ',"aiNative.chat.stop.immediately":"\u6211\u5148\u4E0D\u60F3\u4E86\uFF0C\u6709\u9700\u8981\u53EF\u4EE5\u968F\u65F6\u95EE\u6211","aiNative.chat.error.response":"\u5F53\u524D\u4E0E\u6211\u4E92\u52A8\u7684\u4EBA\u592A\u591A\uFF0C\u8BF7\u7A0D\u540E\u518D\u8BD5\uFF0C\u611F\u8C22\u60A8\u7684\u7406\u89E3\u4E0E\u652F\u6301","aiNative.chat.code.insert":"\u63D2\u5165\u4EE3\u7801","aiNative.chat.code.copy":"\u590D\u5236\u4EE3\u7801","aiNative.chat.code.copy.success":"\u590D\u5236\u6210\u529F","aiNative.chat.expand.unfullscreen":"\u6536\u8D77","aiNative.chat.expand.fullescreen":"\u5C55\u5F00\u5168\u5C4F","aiNative.chat.enter.send":"Enter \u53D1\u9001","aiNative.inline.chat.operate.chat.title":"Chat({0})","aiNative.inline.chat.operate.check.title":"\u91C7\u7EB3","aiNative.inline.chat.operate.thumbsup.title":"\u8D5E","aiNative.inline.chat.operate.thumbsdown.title":"\u8E29","aiNative.inline.chat.operate.loading.cancel":"\u6309 ESC \u53D6\u6D88","aiNative.inline.chat.input.placeholder.default":"\u8BF7\u8F93\u5165\u4F60\u7684\u610F\u56FE...(\u2191\u2193 \u5207\u6362\u5386\u53F2)","aiNative.inline.chat.generating.canceled":"Inline Chat \u5DF2\u505C\u6B62\u751F\u6210","aiNative.inline.hint.widget.placeholder":"\u6309 {0} \u5524\u8D77 Inline Chat","aiNative.inline.problem.fix.title":"AI \u4FEE\u590D","aiNative.inline.diff.accept":"\u91C7\u7EB3","aiNative.inline.diff.reject":"\u62D2\u7EDD","aiNative.resolve.conflict.dialog.afresh":"\u4F60\u786E\u5B9A\u8981\u91CD\u65B0\u751F\u6210\u5417\uFF1F","aiNative.resolve.conflict.dialog.detection":`\u68C0\u6D4B\u5230\u60A8\u5DF2\u505A\u4E86\u4FEE\u6539\uFF0C\u91CD\u65B0\u751F\u6210\u4F1A\u8986\u76D6\u6389
|
|
30501
|
-
\u60A8\u4FEE\u6539\u7684\u90E8\u5206\uFF0C\u662F\u5426\u786E\u8BA4\u8FDB\u884C\u91CD\u65B0\u751F\u6210\u3002`,"aiNative.resolve.conflict.message.not.processed.yet":"AI \u5DF2\u5904\u7406 {0} \u5904\u51B2\u7A81\uFF0C{1} \u5904\u51B2\u7A81\u6682\u672A\u5904\u7406\uFF08\u4ECD\u6807\u8BB0\u4E3A\u9EC4\u8272\u90E8\u5206\uFF09\uFF0C\u9700\u4EBA\u5DE5\u5904\u7406","aiNative.operate.discard.title":"\u4E22\u5F03","aiNative.operate.afresh.title":"\u91CD\u65B0\u751F\u6210","aiNative.operate.stop.title":"\u505C\u6B62","aiNative.operate.close.title":"\u5173\u95ED","aiNative.operate.clear.title":"\u6E05\u7A7A","aiNative.operate.tools.title":"MCP \u5DE5\u5177","aiNative.operate.newChat.title":"\u65B0\u5EFA\u804A\u5929","aiNative.operate.chatHistory.title":"\u804A\u5929\u5386\u53F2","aiNative.operate.chatHistory.searchPlaceholder":"\u8BF7\u641C\u7D22...","aiNative.operate.chatHistory.edit":"\u7F16\u8F91","aiNative.operate.chatHistory.delete":"\u5220\u9664","aiNative.chat.welcome.loading.text":"\u521D\u59CB\u5316\u4E2D...","aiNative.chat.ai.assistant.limit.message":"{0} \u6761\u6700\u65E9\u7684\u6D88\u606F\u56E0\u8F93\u5165 Tokens \u9650\u5236\u800C\u88AB\u4E22\u5F03","aiNative.inlineDiff.acceptAll":"\u63A5\u53D7\u5168\u90E8","aiNative.inlineDiff.rejectAll":"\u62D2\u7EDD\u5168\u90E8","preference.ai.native.inlineChat.title":"Inline Chat","preference.ai.native.chat.title":"Chat","preference.ai.native.interface.quick.title":"\u63A5\u53E3\u5FEB\u901F\u8DF3\u8F6C","preference.ai.native.interface.quick.navigation":"\u70B9\u51FB\u7F16\u8F91\u5668\u5DE6\u4FA7\u56FE\u6807\u5FEB\u901F\u8DF3\u8F6C\u5230\u63A5\u53E3\u5B9E\u73B0","preference.ai.native.interface.quick.navigation.hover":"\u8DF3\u8F6C\u5230\u5B9E\u73B0","preference.ai.native.inlineChat.auto.visible":"\u662F\u5426\u5728\u9009\u4E2D\u4EE3\u7801\u7247\u6BB5\u65F6\u81EA\u52A8\u663E\u793A Inline Chat?","preference.ai.native.inlineChat.codeAction.enabled":"\u662F\u5426\u542F\u7528\u5728\u9009\u4E2D\u4EE3\u7801\u7247\u6BB5\u65F6\u663E\u793A Inline Chat \u76F8\u5173\u7684 Code Actions?","preference.ai.native.chat.visible.type":"\u63A7\u5236 Chat \u9762\u677F\u9ED8\u8BA4\u7684\u5C55\u793A\u65B9\u5F0F","preference.ai.native.inlineDiff.preview.mode":"Inline Diff \u7684\u9884\u89C8\u6A21\u5F0F","preference.ai.native.inlineDiff.preview.mode.sideBySide":"\u5728\u7F16\u8F91\u5668\u5F53\u4E2D\u4EE5\u5DE6\u53F3 diff \u9762\u677F\u7684\u65B9\u5F0F\u5C55\u793A","preference.ai.native.inlineDiff.preview.mode.inlineLive":"\u5728\u7F16\u8F91\u5668\u5F53\u4E2D\u4EE5\u6D41\u5F0F\u6E32\u67D3\u7684\u65B9\u5F0F\u5C55\u793A","preference.ai.native.intelligentCompletions.title":"\u667A\u80FD\u8865\u5168","preference.ai.native.intelligentCompletions.promptEngineering.enabled":"\u662F\u5426\u542F\u7528\u63D0\u793A\u8BCD\u5DE5\u7A0B\uFF0C\u4E00\u4E9B LLM \u6A21\u578B\u5728\u63D0\u793A\u8BCD\u5DE5\u7A0B\u4E0A\u53EF\u80FD\u8868\u73B0\u4E0D\u4F73\u3002","preference.ai.native.intelligentCompletions.debounceTime":"\u667A\u80FD\u8865\u5168\u7684\u5EF6\u8FDF\u65F6\u95F4\uFF08\u6BEB\u79D2\uFF09","preference.ai.native.intelligentCompletions.cache.enabled":"\u662F\u5426\u542F\u7528\u667A\u80FD\u8865\u5168\u7684\u7F13\u5B58","preference.ai.native.intelligentCompletions.alwaysVisible":"\u662F\u5426\u603B\u662F\u5C55\u793A\u667A\u80FD\u8865\u5168","preference.ai.native.codeEdits.title":"\u667A\u80FD\u6539\u5199","preference.ai.native.codeEdits.lintErrors":"\u662F\u5426\u5728\u53D1\u751F Lint Error \u65F6\u89E6\u53D1\u667A\u80FD\u6539\u5199","preference.ai.native.codeEdits.lineChange":"\u662F\u5426\u5728\u5149\u6807\u884C\u53F7\u53D1\u751F\u53D8\u5316\u65F6\u89E6\u53D1\u667A\u80FD\u6539\u5199","preference.ai.native.codeEdits.typing":"\u662F\u5426\u5728\u5185\u5BB9\u53D1\u751F\u53D8\u5316\u65F6\u89E6\u53D1\u667A\u80FD\u6539\u5199","preference.ai.native.codeEdits.renderType":"\u667A\u80FD\u6539\u5199\u6E32\u67D3\u65B9\u5F0F","preference.ai.native.chat.system.prompt":"\u9ED8\u8BA4\u804A\u5929\u7CFB\u7EDF\u63D0\u793A\u8BCD","webview.webviewTagUnavailable":"\u975E Electron \u73AF\u5883\u4E0D\u652F\u6301 webview \u6807\u7B7E\uFF0C\u8BF7\u4F7F\u7528 iframe \u6807\u7B7E","notebook.kernel.panel.empty":"\u6682\u65E0\u5185\u5BB9","notebook.kernel.panel.title":"\u8FD0\u884C\u7684\u7EC8\u7AEF\u548C\u5185\u6838","notebook.kernel.panel.opened.pages":"\u5DF2\u5F00\u542F\u7684\u6807\u7B7E\u9875","notebook.kernel.panel.running.kernels":"\u8FD0\u884C\u7684\u5185\u6838","notebook.kernel.close.all.confirmation":"\u4F60\u786E\u5B9A\u8981\u5173\u95ED\u5168\u90E8\u5417\uFF1F","notebook.variable.panel.title":"\u53D8\u91CF\u68C0\u67E5\u5668","notebook.variable.panel.unsupported":"\u8BE5\u6587\u4EF6\u683C\u5F0F\u6682\u4E0D\u652F\u6301\u53D8\u91CF\u68C0\u67E5","notebook.variable.panel.refresh.success":"\u53D8\u91CF\u5237\u65B0\u6210\u529F","notebook.variable.panel.refresh.error":"\u53D8\u91CF\u5237\u65B0\u5931\u8D25","notebook.variable.panel.search.placeholder":"\u8BF7\u8F93\u5165\u53D8\u91CF\u540D\u79F0\u641C\u7D22","notebook.variable.panel.show.detail":"\u67E5\u770B\u8BE6\u60C5",...r.browserViews,...o.editorLocalizations,...l.zhCN,"preference.ai.native.llm.apiSettings.title":"\u5927\u6A21\u578B API \u8BBE\u7F6E","preference.ai.native.llm.model.id":"\u6A21\u578B ID","preference.ai.native.deepseek.apiKey":"Deepseek API \u5BC6\u94A5","preference.ai.native.deepseek.apiKey.description":"Deepseek \u8BED\u8A00\u6A21\u578B\u7684 API \u5BC6\u94A5","preference.ai.native.anthropic.apiKey":"Anthropic API \u5BC6\u94A5","preference.ai.native.anthropic.apiKey.description":"Anthropic \u8BED\u8A00\u6A21\u578B\u7684 API \u5BC6\u94A5","preference.ai.native.openai.apiKey":"OpenAI API \u5BC6\u94A5","preference.ai.native.openai.apiKey.description":"OpenAI \u517C\u5BB9\u8BED\u8A00\u6A21\u578B\u7684 API \u5BC6\u94A5","preference.ai.native.openai.baseURL":"OpenAI Base URL","preference.ai.native.openai.baseURL.description":"OpenAI \u517C\u5BB9\u8BED\u8A00\u6A21\u578B\u7684 Base URL","preference.ai.native.mcp.settings.title":"MCP \u670D\u52A1\u5668\u8BBE\u7F6E","preference.ai.native.mcp.servers":"MCP \u670D\u52A1\u5668","preference.ai.native.mcp.servers.description":"\u914D\u7F6E MCP (Model Context Protocol) \u670D\u52A1\u5668","preference.ai.native.mcp.servers.name.description":"MCP \u670D\u52A1\u5668\u540D\u79F0","preference.ai.native.mcp.servers.command.description":"\u542F\u52A8 MCP \u670D\u52A1\u5668\u7684\u547D\u4EE4","preference.ai.native.mcp.servers.args.description":"MCP \u670D\u52A1\u5668\u7684\u547D\u4EE4\u884C\u53C2\u6570","preference.ai.native.mcp.servers.env.description":"MCP \u670D\u52A1\u5668\u7684\u73AF\u5883\u53D8\u91CF","preference.ai.native.mcp.servers.type.description":"MCP \u670D\u52A1\u5668\u8FDE\u63A5\u7C7B\u578B","preference.ai.native.mcp.servers.type.stdio":"Stdio \u8FDE\u63A5","preference.ai.native.mcp.servers.type.sse":"SSE \u8FDE\u63A5","ai.native.mcp.terminal.output":"\u8F93\u51FA","ai.native.mcp.terminal.allow-question":"\u662F\u5426\u5141\u8BB8\u8FD0\u884C\u547D\u4EE4?","ai.native.mcp.terminal.allow":"\u5141\u8BB8","ai.native.mcp.terminal.deny":"\u62D2\u7EDD"}}},10199:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),e(85608).__exportStar(e(32581),t)},21774:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.KeymapsModule=void 0;const n=e(85608),r=e(76003),o=e(41869),l=e(25067),p=e(48644),v=e(85448);let m=class extends o.BrowserModule{constructor(){super(...arguments),this.providers=[{token:l.IKeymapService,useClass:v.KeymapService},p.KeymapsContribution]}};t.KeymapsModule=m,t.KeymapsModule=m=n.__decorate([(0,r.Injectable)()],m)},2312:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.KeymapsParser=t.keymapsSchema=void 0;const n=e(85608),r=n.__importDefault(e(82174)),o=n.__importStar(e(23304)),l=e(76003);t.keymapsSchema={type:"array",items:{type:"object",properties:{key:{type:"string"},keybinding:{type:"string",deprecated:!0},command:{type:"string"},context:{type:"string"},when:{type:"string"},args:{}},required:["command"],optional:["key","keybinding","when","args"],additionalProperties:!1}};let p=class{constructor(){this.validate=new r.default({jsonPointers:!0}).compile(t.keymapsSchema)}parse(m,_){const s=o.stripComments(m),f=_?[]:void 0,a=o.parse(s,f);if(f&&_)for(const h of f)_.push(`${this.printParseErrorCode(h.error)} at ${h.offset} offset of ${h.length} length`);if(this.validate(a))return a;if(_&&this.validate.errors)for(const h of this.validate.errors)_.push(`${h.message} at ${h.dataPath}`);return[]}printParseErrorCode(m){return o.printParseErrorCode(m)}};t.KeymapsParser=p,t.KeymapsParser=p=n.__decorate([(0,l.Injectable)(),n.__metadata("design:paramtypes",[])],p)},48644:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.KeymapsContribution=t.KEYMAP_COMMANDS=t.KeymapsContextMenu=t.KeymapsResourceProvider=void 0;const n=e(85608),r=e(76003),o=e(41869),l=e(93899),p=e(57517),v=e(42933),m=e(97821),_=e(25067),s=e(34879),f="keymaps-preview";let a=class extends o.WithEventBus{constructor(){super(),this.scheme=_.KEYMAPS_SCHEME}provideResource(g){return{supportsRevive:!0,name:(0,o.localize)("keymaps.tab.name"),icon:(0,o.getIcon)("setting"),uri:g}}provideResourceSubname(g,c){return null}async shouldCloseResource(g,c){return!0}};t.KeymapsResourceProvider=a,t.KeymapsResourceProvider=a=n.__decorate([(0,r.Injectable)(),n.__metadata("design:paramtypes",[])],a);var h;(function(E){E.KEYMAPS="2_keymaps"})(h||(t.KeymapsContextMenu=h={}));var u;(function(E){const g="keymaps";E.OPEN_SOURCE_FILE={id:"keymaps.open.source",label:"%keymaps.editorTitle.openSource%",category:g}})(u||(t.KEYMAP_COMMANDS=u={}));let d=class{registerCommands(g){g.registerCommand(o.COMMON_COMMANDS.OPEN_KEYMAPS,{isEnabled:()=>!0,execute:async()=>{await this.keymapService.open()}}),g.registerCommand(u.OPEN_SOURCE_FILE,{execute:async()=>{this.keymapService.openResource()}}),g.registerCommand(o.KEYBOARD_COMMANDS.CHOOSE_KEYBOARD_LAYOUT,{execute:()=>{this.chooseLayout()}})}registerMenus(g){g.registerMenuItem(l.MenuId.SettingsIconMenu,{command:o.COMMON_COMMANDS.OPEN_KEYMAPS.id,group:h.KEYMAPS}),g.registerMenuItem(l.MenuId.EditorTitle,{command:u.OPEN_SOURCE_FILE.id,iconClass:(0,o.getIcon)("open"),group:"navigation",order:4,when:`resourceScheme == ${_.KEYMAPS_SCHEME}`}),g.registerMenuItem(l.MenuId.EditorTitle,{command:o.COMMON_COMMANDS.OPEN_KEYMAPS.id,iconClass:(0,o.getIcon)("open"),group:"navigation",order:4,when:"resourceFilename =~ /keymaps.json/"})}registerKeybindings(g){g.registerKeybinding({command:o.COMMON_COMMANDS.OPEN_KEYMAPS.id,keybinding:"ctrlcmd+K ctrlcmd+S"})}onStart(){this.keymapService.init()}registerResource(g){g.registerResourceProvider(this.keymapsResourceProvider)}registerEditorComponent(g){g.registerEditorComponent({component:s.KeymapsView,uid:f,scheme:_.KEYMAPS_SCHEME}),g.registerEditorComponentResolver(_.KEYMAPS_SCHEME,(c,b,y)=>{y([{type:p.EditorOpenType.component,componentId:f}])})}async chooseLayout(){const g=this.layoutProvider.currentLayoutData,c={label:(0,o.localize)("keyboard.autoDetect.label"),description:g&&this.layoutProvider.currentLayoutSource!=="user-choice"?(0,o.formatLocalize)("keyboard.autoDetect.description",(0,o.getKeyboardLayoutId)(g.layout)):void 0,detail:(0,o.localize)("keyboard.autoDetect.detail"),value:"autodetect"},b=this.layoutProvider.allLayoutData.map(A=>this.toQuickPickValue(A,g===A));let y;y=[c,...b];const S=await this.quickPickService.show(y,{placeholder:"Choose a keyboard layout"});if(S)return this.layoutProvider.setLayoutData(S)}toQuickPickValue(g,c){return{label:(0,o.getKeyboardLayoutId)(g.layout),value:g}}};t.KeymapsContribution=d,n.__decorate([(0,r.Autowired)(m.QuickPickService),n.__metadata("design:type",Object)],d.prototype,"quickPickService",void 0),n.__decorate([(0,r.Autowired)(o.KeyboardNativeLayoutService),n.__metadata("design:type",Object)],d.prototype,"layoutProvider",void 0),n.__decorate([(0,r.Autowired)(v.IFileServiceClient),n.__metadata("design:type",Object)],d.prototype,"filesystem",void 0),n.__decorate([(0,r.Autowired)(a),n.__metadata("design:type",a)],d.prototype,"keymapsResourceProvider",void 0),n.__decorate([(0,r.Autowired)(_.IKeymapService),n.__metadata("design:type",Object)],d.prototype,"keymapService",void 0),t.KeymapsContribution=d=n.__decorate([(0,o.Domain)(o.CommandContribution,o.KeybindingContribution,o.ClientAppContribution,p.BrowserEditorContribution,l.MenuContribution)],d)},85448:(x,t,e)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.KeymapService=void 0;const r=e(85608),o=r.__importStar(e(39050)),l=e(76003),p=e(41869),v=e(68969),m=e(14951),_=e(25067),s=e(2312);let f=n=class{constructor(){this.keymapChangeEmitter=new p.Emitter,this.convertKeySequence=[],this.toUnregisterUserKeybindingMap=new Map,this.toRestoreDefaultKeybindingMap=new Map,this.searchDelayer=new p.ThrottledDelayer(n.DEFAULT_SEARCH_DELAY),this.disposableCollection=new p.DisposableCollection,this._whenReadyDeferred=new p.Deferred,this.fuzzyOptions={pre:"<match>",post:"</match>"},this.reconcileQueue=new p.Throttler,this.keybindings=[],this.updateKeybindings=()=>{this.currentSearchValue?this.doSearchKeybindings(this.currentSearchValue):(0,p.runWhenIdle)(()=>{this.keybindings=this.getKeybindingItems(),this.keymapChangeEmitter.fire(this.keybindings)})},this.setKeybinding=(h,u)=>this.progressService.withProgress({location:p.ProgressLocation.Notification},d=>new Promise((E,g)=>{d.report({message:(0,p.localize)("keymaps.keybinding.loading"),increment:0,total:100});const c=this.storeKeybindings||[];let b=!1;for(const y of c){const S={when:y.when,command:y.command,keybinding:y.key};if(y.command===u.command){b=!0,this.unregisterUserKeybinding(S);const A=this.toUniqueKey(h),w=this.toRestoreDefaultKeybindingMap.get(A);if(w){const T=this.toUniqueKey(u);this.toRestoreDefaultKeybindingMap.delete(A),this.toRestoreDefaultKeybindingMap.set(T,w)}y.key=u.keybinding,this.registerUserKeybinding({...S,priority:p.KeybindingWeight.WorkbenchContrib*100})}}if(!b){const y=this.keybindings.find(A=>A.id===u.command&&this.getRaw(A.when)===u.when);if(y&&y.keybinding){this.unregisterDefaultKeybinding({when:this.getRaw(y.when),command:y.id,keybinding:this.getRaw(y.keybinding)});const A=this.toUniqueKey(h),w=this.toRestoreDefaultKeybindingMap.get(A);if(w){const T=this.toUniqueKey(u);this.toRestoreDefaultKeybindingMap.delete(A),this.toRestoreDefaultKeybindingMap.set(T,w)}}const S={when:this.getWhen(u),command:u.command,key:u.keybinding};c.push(S),this.registerUserKeybinding(u)}return this.saveKeybinding(c).then(()=>{E(void 0),d.report({message:(0,p.localize)("keymaps.keybinding.success"),increment:99})}).catch(y=>{g(y),d.report({message:(0,p.localize)("keymaps.keybinding.fail"),increment:99})}).finally(()=>{setTimeout(()=>{d.report({increment:100})},3e3)})}),()=>{}),this.covert=h=>this.keybindingService.convert(h," "),this.clearCovert=()=>this.keybindingService.clearConvert(),this.resetKeybinding=async h=>{if(!this.resource)return;const d=this.storeKeybindings.filter(E=>E.command!==h.command);return this.unregisterUserKeybinding(h),this.restoreDefaultKeybinding(h),this.saveKeybinding(d)},this.fixed=async()=>{this.commandService.executeCommand(p.EDITOR_COMMANDS.OPEN_RESOURCE.id,new p.URI().withScheme(_.KEYMAPS_SCHEME),{preview:!1})},this.searchKeybindings=h=>{this.currentSearchValue=h,this.searchDelayer.isTriggered()||this.searchDelayer.cancel(),this.searchDelayer.trigger(async()=>{this.doSearchKeybindings(this.currentSearchValue)})},this.isSearching=!1,this.doSearchKeybindings=h=>{h?this.isSearching=!0:this.isSearching=!1;const u=this.getKeybindingItems(),d=[];u.forEach(E=>{const g=["id","command","keybinding","when","context","source"];let c=!1;for(const b of g){const y=E[b];if(y){const S=o.match(h,y,this.fuzzyOptions);if(S)E[b]=S.rendered,c=!0;else if(b==="keybinding"){const A=h.split("+"),w=y.split(" "),T=[0];let D=[];w.length>1?w.forEach(M=>{const O=M.split("+");T.push(O.length+T[-1]),D.push(...O)}):D=y.split("+"),T.shift();const I=[...D];let R=0;if(A.forEach(M=>{let O={rendered:"",score:0},P=-1;if(y){D.forEach(F=>{const L=o.match(M,F,this.fuzzyOptions);L&&L.score>O.score&&(O=L,P=I.indexOf(F))});const k=O.rendered;k&&(P>-1&&(I[P]=k),D.splice(P,1,""),R+=1)}}),R===A.length){if(T.length>0){const M="";I.forEach((O,P)=>{P===0?M.concat(O):T.indexOf(P)!==-1?M.concat(" "+O):M.concat("+"+O)}),E[b]=M}E[b]=I.join("+"),c=!0}}}}c&&d.push(E)}),this.keybindings=d,this.keymapChangeEmitter.fire(this.keybindings)},this.validateKeybinding=(h,u)=>{if(!u)return(0,p.localize)("keymaps.keybinding.require");try{const d={command:this.isSearching?this.getRaw(h.command):h.command,when:this.isSearching?this.getRaw(h.when):h.when,keybinding:this.isSearching?this.getRaw(u):u};return h.keybinding===u?" ":this.keybindingRegistry.validateKeybindingInScope(d)}catch(d){return d}},this.detectKeybindings=(h,u)=>{if(!u)return[];try{if(h.keybinding===u)return[];const d=this.keybindings.filter(E=>this.getRaw(E.keybinding)===u);if(d.length>0)return d.map(E=>{const g=this.commandRegistry.getCommand(this.getRaw(E.command)),c=this.storeKeybindings.find(b=>g&&b.command===g.id);return E.when=this.getRaw(E.when),E.keybinding=this.getRaw(E.keybinding),{id:g?g.id:this.getRaw(E.command),command:(g?g.label||g.id:E.command)||"",when:this.keybindingService.convertMonacoWhen(E.when),keybinding:this.getRaw(E.keybinding),source:c?this.getScope(p.KeybindingScope.USER):this.getScope(p.KeybindingScope.DEFAULT)}})}catch(d){this.logger.error(d)}return[]}}get onDidKeymapChanges(){return this.keymapChangeEmitter.event}get storeKeybindings(){return this._storeKeybindings&&this._storeKeybindings.map(h=>({...h,command:this.getValidateCommand(h.command),key:h.key||h.keybinding}))}set storeKeybindings(h){this._storeKeybindings=h}get whenReady(){return this._whenReadyDeferred.promise}async init(){await this.reconcile();const h=await this.filesystem.watchFileChanges(n.KEYMAP_FILE_URI);this.disposableCollection.push(h),h.onFilesChanged(()=>{this.reconcileQueue.queue(this.reconcile.bind(this))}),this._whenReadyDeferred.resolve()}async openResource(){if(!this.resource||!this.resource.uri)return;const h=await this.resource.uri;if(!h)return;if(!await this.filesystem.access(h)){const d=await this.filesystem.createFile(h),E=await this.filesystem.setContent(d,`{
|
|
30501
|
+
\u60A8\u4FEE\u6539\u7684\u90E8\u5206\uFF0C\u662F\u5426\u786E\u8BA4\u8FDB\u884C\u91CD\u65B0\u751F\u6210\u3002`,"aiNative.resolve.conflict.message.not.processed.yet":"AI \u5DF2\u5904\u7406 {0} \u5904\u51B2\u7A81\uFF0C{1} \u5904\u51B2\u7A81\u6682\u672A\u5904\u7406\uFF08\u4ECD\u6807\u8BB0\u4E3A\u9EC4\u8272\u90E8\u5206\uFF09\uFF0C\u9700\u4EBA\u5DE5\u5904\u7406","aiNative.operate.discard.title":"\u4E22\u5F03","aiNative.operate.afresh.title":"\u91CD\u65B0\u751F\u6210","aiNative.operate.stop.title":"\u505C\u6B62","aiNative.operate.close.title":"\u5173\u95ED","aiNative.operate.clear.title":"\u6E05\u7A7A","aiNative.operate.tools.title":"MCP \u5DE5\u5177","aiNative.operate.newChat.title":"\u65B0\u5EFA\u804A\u5929","aiNative.operate.chatHistory.title":"\u804A\u5929\u5386\u53F2","aiNative.operate.chatHistory.searchPlaceholder":"\u8BF7\u641C\u7D22...","aiNative.operate.chatHistory.edit":"\u7F16\u8F91","aiNative.operate.chatHistory.delete":"\u5220\u9664","aiNative.chat.welcome.loading.text":"\u521D\u59CB\u5316\u4E2D...","aiNative.chat.ai.assistant.limit.message":"{0} \u6761\u6700\u65E9\u7684\u6D88\u606F\u56E0\u8F93\u5165 Tokens \u9650\u5236\u800C\u88AB\u4E22\u5F03","aiNative.inlineDiff.acceptAll":"\u63A5\u53D7\u5168\u90E8","aiNative.inlineDiff.rejectAll":"\u62D2\u7EDD\u5168\u90E8","preference.ai.native.inlineChat.title":"Inline Chat","preference.ai.native.chat.title":"Chat","preference.ai.native.interface.quick.title":"\u63A5\u53E3\u5FEB\u901F\u8DF3\u8F6C","preference.ai.native.interface.quick.navigation":"\u70B9\u51FB\u7F16\u8F91\u5668\u5DE6\u4FA7\u56FE\u6807\u5FEB\u901F\u8DF3\u8F6C\u5230\u63A5\u53E3\u5B9E\u73B0","preference.ai.native.interface.quick.navigation.hover":"\u8DF3\u8F6C\u5230\u5B9E\u73B0","preference.ai.native.inlineChat.auto.visible":"\u662F\u5426\u5728\u9009\u4E2D\u4EE3\u7801\u7247\u6BB5\u65F6\u81EA\u52A8\u663E\u793A Inline Chat?","preference.ai.native.inlineChat.codeAction.enabled":"\u662F\u5426\u542F\u7528\u5728\u9009\u4E2D\u4EE3\u7801\u7247\u6BB5\u65F6\u663E\u793A Inline Chat \u76F8\u5173\u7684 Code Actions?","preference.ai.native.chat.visible.type":"\u63A7\u5236 Chat \u9762\u677F\u9ED8\u8BA4\u7684\u5C55\u793A\u65B9\u5F0F","preference.ai.native.inlineDiff.preview.mode":"Inline Diff \u7684\u9884\u89C8\u6A21\u5F0F","preference.ai.native.inlineDiff.preview.mode.sideBySide":"\u5728\u7F16\u8F91\u5668\u5F53\u4E2D\u4EE5\u5DE6\u53F3 diff \u9762\u677F\u7684\u65B9\u5F0F\u5C55\u793A","preference.ai.native.inlineDiff.preview.mode.inlineLive":"\u5728\u7F16\u8F91\u5668\u5F53\u4E2D\u4EE5\u6D41\u5F0F\u6E32\u67D3\u7684\u65B9\u5F0F\u5C55\u793A","preference.ai.native.intelligentCompletions.title":"\u667A\u80FD\u8865\u5168","preference.ai.native.intelligentCompletions.promptEngineering.enabled":"\u662F\u5426\u542F\u7528\u63D0\u793A\u8BCD\u5DE5\u7A0B\uFF0C\u4E00\u4E9B LLM \u6A21\u578B\u5728\u63D0\u793A\u8BCD\u5DE5\u7A0B\u4E0A\u53EF\u80FD\u8868\u73B0\u4E0D\u4F73\u3002","preference.ai.native.intelligentCompletions.debounceTime":"\u667A\u80FD\u8865\u5168\u7684\u5EF6\u8FDF\u65F6\u95F4\uFF08\u6BEB\u79D2\uFF09","preference.ai.native.intelligentCompletions.cache.enabled":"\u662F\u5426\u542F\u7528\u667A\u80FD\u8865\u5168\u7684\u7F13\u5B58","preference.ai.native.intelligentCompletions.alwaysVisible":"\u662F\u5426\u603B\u662F\u5C55\u793A\u667A\u80FD\u8865\u5168","preference.ai.native.codeEdits.title":"\u667A\u80FD\u6539\u5199","preference.ai.native.codeEdits.lintErrors":"\u662F\u5426\u5728\u53D1\u751F Lint Error \u65F6\u89E6\u53D1\u667A\u80FD\u6539\u5199","preference.ai.native.codeEdits.lineChange":"\u662F\u5426\u5728\u5149\u6807\u884C\u53F7\u53D1\u751F\u53D8\u5316\u65F6\u89E6\u53D1\u667A\u80FD\u6539\u5199","preference.ai.native.codeEdits.typing":"\u662F\u5426\u5728\u5185\u5BB9\u53D1\u751F\u53D8\u5316\u65F6\u89E6\u53D1\u667A\u80FD\u6539\u5199","preference.ai.native.codeEdits.renderType":"\u667A\u80FD\u6539\u5199\u6E32\u67D3\u65B9\u5F0F","preference.ai.native.chat.system.prompt":"\u9ED8\u8BA4\u804A\u5929\u7CFB\u7EDF\u63D0\u793A\u8BCD","webview.webviewTagUnavailable":"\u975E Electron \u73AF\u5883\u4E0D\u652F\u6301 webview \u6807\u7B7E\uFF0C\u8BF7\u4F7F\u7528 iframe \u6807\u7B7E","notebook.kernel.panel.empty":"\u6682\u65E0\u5185\u5BB9","notebook.kernel.panel.title":"\u8FD0\u884C\u7684\u7EC8\u7AEF\u548C\u5185\u6838","notebook.kernel.panel.opened.pages":"\u5DF2\u5F00\u542F\u7684\u6807\u7B7E\u9875","notebook.kernel.panel.running.kernels":"\u8FD0\u884C\u7684\u5185\u6838","notebook.kernel.close.all.confirmation":"\u4F60\u786E\u5B9A\u8981\u5173\u95ED\u5168\u90E8\u5417\uFF1F","notebook.variable.panel.title":"\u53D8\u91CF\u68C0\u67E5\u5668","notebook.variable.panel.unsupported":"\u8BE5\u6587\u4EF6\u683C\u5F0F\u6682\u4E0D\u652F\u6301\u53D8\u91CF\u68C0\u67E5","notebook.variable.panel.refresh.success":"\u53D8\u91CF\u5237\u65B0\u6210\u529F","notebook.variable.panel.refresh.error":"\u53D8\u91CF\u5237\u65B0\u5931\u8D25","notebook.variable.panel.search.placeholder":"\u8BF7\u8F93\u5165\u53D8\u91CF\u540D\u79F0\u641C\u7D22","notebook.variable.panel.show.detail":"\u67E5\u770B\u8BE6\u60C5",...r.browserViews,...o.editorLocalizations,...l.zhCN,"preference.ai.native.llm.apiSettings.title":"\u5927\u6A21\u578B API \u8BBE\u7F6E","preference.ai.native.llm.model.id":"\u6A21\u578B ID","preference.ai.native.deepseek.apiKey":"Deepseek API \u5BC6\u94A5","preference.ai.native.deepseek.apiKey.description":"Deepseek \u8BED\u8A00\u6A21\u578B\u7684 API \u5BC6\u94A5","preference.ai.native.anthropic.apiKey":"Anthropic API \u5BC6\u94A5","preference.ai.native.anthropic.apiKey.description":"Anthropic \u8BED\u8A00\u6A21\u578B\u7684 API \u5BC6\u94A5","preference.ai.native.openai.apiKey":"OpenAI API \u5BC6\u94A5","preference.ai.native.openai.apiKey.description":"OpenAI \u517C\u5BB9\u8BED\u8A00\u6A21\u578B\u7684 API \u5BC6\u94A5","preference.ai.native.openai.baseURL":"OpenAI Base URL","preference.ai.native.openai.baseURL.description":"OpenAI \u517C\u5BB9\u8BED\u8A00\u6A21\u578B\u7684 Base URL","preference.ai.native.mcp.settings.title":"MCP \u670D\u52A1\u5668\u8BBE\u7F6E","preference.ai.native.mcp.servers":"MCP \u670D\u52A1\u5668","preference.ai.native.mcp.servers.description":"\u914D\u7F6E MCP (Model Context Protocol) \u670D\u52A1\u5668","preference.ai.native.mcp.servers.name.description":"MCP \u670D\u52A1\u5668\u540D\u79F0","preference.ai.native.mcp.servers.command.description":"\u542F\u52A8 MCP \u670D\u52A1\u5668\u7684\u547D\u4EE4","preference.ai.native.mcp.servers.args.description":"MCP \u670D\u52A1\u5668\u7684\u547D\u4EE4\u884C\u53C2\u6570","preference.ai.native.mcp.servers.env.description":"MCP \u670D\u52A1\u5668\u7684\u73AF\u5883\u53D8\u91CF","preference.ai.native.mcp.servers.type.description":"MCP \u670D\u52A1\u5668\u8FDE\u63A5\u7C7B\u578B","preference.ai.native.mcp.servers.type.stdio":"Stdio \u8FDE\u63A5","preference.ai.native.mcp.servers.type.sse":"SSE \u8FDE\u63A5","ai.native.mcp.terminal.command":"\u547D\u4EE4","ai.native.mcp.terminal.output":"\u8F93\u51FA","ai.native.mcp.terminal.allow-question":"\u662F\u5426\u5141\u8BB8\u8FD0\u884C\u547D\u4EE4?","ai.native.mcp.terminal.allow":"\u5141\u8BB8","ai.native.mcp.terminal.deny":"\u62D2\u7EDD"}}},10199:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),e(85608).__exportStar(e(32581),t)},21774:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.KeymapsModule=void 0;const n=e(85608),r=e(76003),o=e(41869),l=e(25067),p=e(48644),v=e(85448);let m=class extends o.BrowserModule{constructor(){super(...arguments),this.providers=[{token:l.IKeymapService,useClass:v.KeymapService},p.KeymapsContribution]}};t.KeymapsModule=m,t.KeymapsModule=m=n.__decorate([(0,r.Injectable)()],m)},2312:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.KeymapsParser=t.keymapsSchema=void 0;const n=e(85608),r=n.__importDefault(e(82174)),o=n.__importStar(e(23304)),l=e(76003);t.keymapsSchema={type:"array",items:{type:"object",properties:{key:{type:"string"},keybinding:{type:"string",deprecated:!0},command:{type:"string"},context:{type:"string"},when:{type:"string"},args:{}},required:["command"],optional:["key","keybinding","when","args"],additionalProperties:!1}};let p=class{constructor(){this.validate=new r.default({jsonPointers:!0}).compile(t.keymapsSchema)}parse(m,_){const s=o.stripComments(m),f=_?[]:void 0,a=o.parse(s,f);if(f&&_)for(const h of f)_.push(`${this.printParseErrorCode(h.error)} at ${h.offset} offset of ${h.length} length`);if(this.validate(a))return a;if(_&&this.validate.errors)for(const h of this.validate.errors)_.push(`${h.message} at ${h.dataPath}`);return[]}printParseErrorCode(m){return o.printParseErrorCode(m)}};t.KeymapsParser=p,t.KeymapsParser=p=n.__decorate([(0,l.Injectable)(),n.__metadata("design:paramtypes",[])],p)},48644:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.KeymapsContribution=t.KEYMAP_COMMANDS=t.KeymapsContextMenu=t.KeymapsResourceProvider=void 0;const n=e(85608),r=e(76003),o=e(41869),l=e(93899),p=e(57517),v=e(42933),m=e(97821),_=e(25067),s=e(34879),f="keymaps-preview";let a=class extends o.WithEventBus{constructor(){super(),this.scheme=_.KEYMAPS_SCHEME}provideResource(g){return{supportsRevive:!0,name:(0,o.localize)("keymaps.tab.name"),icon:(0,o.getIcon)("setting"),uri:g}}provideResourceSubname(g,c){return null}async shouldCloseResource(g,c){return!0}};t.KeymapsResourceProvider=a,t.KeymapsResourceProvider=a=n.__decorate([(0,r.Injectable)(),n.__metadata("design:paramtypes",[])],a);var h;(function(E){E.KEYMAPS="2_keymaps"})(h||(t.KeymapsContextMenu=h={}));var u;(function(E){const g="keymaps";E.OPEN_SOURCE_FILE={id:"keymaps.open.source",label:"%keymaps.editorTitle.openSource%",category:g}})(u||(t.KEYMAP_COMMANDS=u={}));let d=class{registerCommands(g){g.registerCommand(o.COMMON_COMMANDS.OPEN_KEYMAPS,{isEnabled:()=>!0,execute:async()=>{await this.keymapService.open()}}),g.registerCommand(u.OPEN_SOURCE_FILE,{execute:async()=>{this.keymapService.openResource()}}),g.registerCommand(o.KEYBOARD_COMMANDS.CHOOSE_KEYBOARD_LAYOUT,{execute:()=>{this.chooseLayout()}})}registerMenus(g){g.registerMenuItem(l.MenuId.SettingsIconMenu,{command:o.COMMON_COMMANDS.OPEN_KEYMAPS.id,group:h.KEYMAPS}),g.registerMenuItem(l.MenuId.EditorTitle,{command:u.OPEN_SOURCE_FILE.id,iconClass:(0,o.getIcon)("open"),group:"navigation",order:4,when:`resourceScheme == ${_.KEYMAPS_SCHEME}`}),g.registerMenuItem(l.MenuId.EditorTitle,{command:o.COMMON_COMMANDS.OPEN_KEYMAPS.id,iconClass:(0,o.getIcon)("open"),group:"navigation",order:4,when:"resourceFilename =~ /keymaps.json/"})}registerKeybindings(g){g.registerKeybinding({command:o.COMMON_COMMANDS.OPEN_KEYMAPS.id,keybinding:"ctrlcmd+K ctrlcmd+S"})}onStart(){this.keymapService.init()}registerResource(g){g.registerResourceProvider(this.keymapsResourceProvider)}registerEditorComponent(g){g.registerEditorComponent({component:s.KeymapsView,uid:f,scheme:_.KEYMAPS_SCHEME}),g.registerEditorComponentResolver(_.KEYMAPS_SCHEME,(c,b,y)=>{y([{type:p.EditorOpenType.component,componentId:f}])})}async chooseLayout(){const g=this.layoutProvider.currentLayoutData,c={label:(0,o.localize)("keyboard.autoDetect.label"),description:g&&this.layoutProvider.currentLayoutSource!=="user-choice"?(0,o.formatLocalize)("keyboard.autoDetect.description",(0,o.getKeyboardLayoutId)(g.layout)):void 0,detail:(0,o.localize)("keyboard.autoDetect.detail"),value:"autodetect"},b=this.layoutProvider.allLayoutData.map(A=>this.toQuickPickValue(A,g===A));let y;y=[c,...b];const S=await this.quickPickService.show(y,{placeholder:"Choose a keyboard layout"});if(S)return this.layoutProvider.setLayoutData(S)}toQuickPickValue(g,c){return{label:(0,o.getKeyboardLayoutId)(g.layout),value:g}}};t.KeymapsContribution=d,n.__decorate([(0,r.Autowired)(m.QuickPickService),n.__metadata("design:type",Object)],d.prototype,"quickPickService",void 0),n.__decorate([(0,r.Autowired)(o.KeyboardNativeLayoutService),n.__metadata("design:type",Object)],d.prototype,"layoutProvider",void 0),n.__decorate([(0,r.Autowired)(v.IFileServiceClient),n.__metadata("design:type",Object)],d.prototype,"filesystem",void 0),n.__decorate([(0,r.Autowired)(a),n.__metadata("design:type",a)],d.prototype,"keymapsResourceProvider",void 0),n.__decorate([(0,r.Autowired)(_.IKeymapService),n.__metadata("design:type",Object)],d.prototype,"keymapService",void 0),t.KeymapsContribution=d=n.__decorate([(0,o.Domain)(o.CommandContribution,o.KeybindingContribution,o.ClientAppContribution,p.BrowserEditorContribution,l.MenuContribution)],d)},85448:(x,t,e)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.KeymapService=void 0;const r=e(85608),o=r.__importStar(e(39050)),l=e(76003),p=e(41869),v=e(68969),m=e(14951),_=e(25067),s=e(2312);let f=n=class{constructor(){this.keymapChangeEmitter=new p.Emitter,this.convertKeySequence=[],this.toUnregisterUserKeybindingMap=new Map,this.toRestoreDefaultKeybindingMap=new Map,this.searchDelayer=new p.ThrottledDelayer(n.DEFAULT_SEARCH_DELAY),this.disposableCollection=new p.DisposableCollection,this._whenReadyDeferred=new p.Deferred,this.fuzzyOptions={pre:"<match>",post:"</match>"},this.reconcileQueue=new p.Throttler,this.keybindings=[],this.updateKeybindings=()=>{this.currentSearchValue?this.doSearchKeybindings(this.currentSearchValue):(0,p.runWhenIdle)(()=>{this.keybindings=this.getKeybindingItems(),this.keymapChangeEmitter.fire(this.keybindings)})},this.setKeybinding=(h,u)=>this.progressService.withProgress({location:p.ProgressLocation.Notification},d=>new Promise((E,g)=>{d.report({message:(0,p.localize)("keymaps.keybinding.loading"),increment:0,total:100});const c=this.storeKeybindings||[];let b=!1;for(const y of c){const S={when:y.when,command:y.command,keybinding:y.key};if(y.command===u.command){b=!0,this.unregisterUserKeybinding(S);const A=this.toUniqueKey(h),w=this.toRestoreDefaultKeybindingMap.get(A);if(w){const T=this.toUniqueKey(u);this.toRestoreDefaultKeybindingMap.delete(A),this.toRestoreDefaultKeybindingMap.set(T,w)}y.key=u.keybinding,this.registerUserKeybinding({...S,priority:p.KeybindingWeight.WorkbenchContrib*100})}}if(!b){const y=this.keybindings.find(A=>A.id===u.command&&this.getRaw(A.when)===u.when);if(y&&y.keybinding){this.unregisterDefaultKeybinding({when:this.getRaw(y.when),command:y.id,keybinding:this.getRaw(y.keybinding)});const A=this.toUniqueKey(h),w=this.toRestoreDefaultKeybindingMap.get(A);if(w){const T=this.toUniqueKey(u);this.toRestoreDefaultKeybindingMap.delete(A),this.toRestoreDefaultKeybindingMap.set(T,w)}}const S={when:this.getWhen(u),command:u.command,key:u.keybinding};c.push(S),this.registerUserKeybinding(u)}return this.saveKeybinding(c).then(()=>{E(void 0),d.report({message:(0,p.localize)("keymaps.keybinding.success"),increment:99})}).catch(y=>{g(y),d.report({message:(0,p.localize)("keymaps.keybinding.fail"),increment:99})}).finally(()=>{setTimeout(()=>{d.report({increment:100})},3e3)})}),()=>{}),this.covert=h=>this.keybindingService.convert(h," "),this.clearCovert=()=>this.keybindingService.clearConvert(),this.resetKeybinding=async h=>{if(!this.resource)return;const d=this.storeKeybindings.filter(E=>E.command!==h.command);return this.unregisterUserKeybinding(h),this.restoreDefaultKeybinding(h),this.saveKeybinding(d)},this.fixed=async()=>{this.commandService.executeCommand(p.EDITOR_COMMANDS.OPEN_RESOURCE.id,new p.URI().withScheme(_.KEYMAPS_SCHEME),{preview:!1})},this.searchKeybindings=h=>{this.currentSearchValue=h,this.searchDelayer.isTriggered()||this.searchDelayer.cancel(),this.searchDelayer.trigger(async()=>{this.doSearchKeybindings(this.currentSearchValue)})},this.isSearching=!1,this.doSearchKeybindings=h=>{h?this.isSearching=!0:this.isSearching=!1;const u=this.getKeybindingItems(),d=[];u.forEach(E=>{const g=["id","command","keybinding","when","context","source"];let c=!1;for(const b of g){const y=E[b];if(y){const S=o.match(h,y,this.fuzzyOptions);if(S)E[b]=S.rendered,c=!0;else if(b==="keybinding"){const A=h.split("+"),w=y.split(" "),T=[0];let D=[];w.length>1?w.forEach(M=>{const O=M.split("+");T.push(O.length+T[-1]),D.push(...O)}):D=y.split("+"),T.shift();const I=[...D];let R=0;if(A.forEach(M=>{let O={rendered:"",score:0},P=-1;if(y){D.forEach(F=>{const L=o.match(M,F,this.fuzzyOptions);L&&L.score>O.score&&(O=L,P=I.indexOf(F))});const k=O.rendered;k&&(P>-1&&(I[P]=k),D.splice(P,1,""),R+=1)}}),R===A.length){if(T.length>0){const M="";I.forEach((O,P)=>{P===0?M.concat(O):T.indexOf(P)!==-1?M.concat(" "+O):M.concat("+"+O)}),E[b]=M}E[b]=I.join("+"),c=!0}}}}c&&d.push(E)}),this.keybindings=d,this.keymapChangeEmitter.fire(this.keybindings)},this.validateKeybinding=(h,u)=>{if(!u)return(0,p.localize)("keymaps.keybinding.require");try{const d={command:this.isSearching?this.getRaw(h.command):h.command,when:this.isSearching?this.getRaw(h.when):h.when,keybinding:this.isSearching?this.getRaw(u):u};return h.keybinding===u?" ":this.keybindingRegistry.validateKeybindingInScope(d)}catch(d){return d}},this.detectKeybindings=(h,u)=>{if(!u)return[];try{if(h.keybinding===u)return[];const d=this.keybindings.filter(E=>this.getRaw(E.keybinding)===u);if(d.length>0)return d.map(E=>{const g=this.commandRegistry.getCommand(this.getRaw(E.command)),c=this.storeKeybindings.find(b=>g&&b.command===g.id);return E.when=this.getRaw(E.when),E.keybinding=this.getRaw(E.keybinding),{id:g?g.id:this.getRaw(E.command),command:(g?g.label||g.id:E.command)||"",when:this.keybindingService.convertMonacoWhen(E.when),keybinding:this.getRaw(E.keybinding),source:c?this.getScope(p.KeybindingScope.USER):this.getScope(p.KeybindingScope.DEFAULT)}})}catch(d){this.logger.error(d)}return[]}}get onDidKeymapChanges(){return this.keymapChangeEmitter.event}get storeKeybindings(){return this._storeKeybindings&&this._storeKeybindings.map(h=>({...h,command:this.getValidateCommand(h.command),key:h.key||h.keybinding}))}set storeKeybindings(h){this._storeKeybindings=h}get whenReady(){return this._whenReadyDeferred.promise}async init(){await this.reconcile();const h=await this.filesystem.watchFileChanges(n.KEYMAP_FILE_URI);this.disposableCollection.push(h),h.onFilesChanged(()=>{this.reconcileQueue.queue(this.reconcile.bind(this))}),this._whenReadyDeferred.resolve()}async openResource(){if(!this.resource||!this.resource.uri)return;const h=await this.resource.uri;if(!h)return;if(!await this.filesystem.access(h)){const d=await this.filesystem.createFile(h),E=await this.filesystem.setContent(d,`{
|
|
30502
30502
|
}`);this.resource=E||void 0}h&&this.commandService.executeCommand(p.EDITOR_COMMANDS.OPEN_RESOURCE.id,new p.URI(h),{preview:!1})}disposeRegistedKeybinding(){for(const[,h]of this.toUnregisterUserKeybindingMap)h.dispose();for(const[,h]of this.toRestoreDefaultKeybindingMap)h.dispose()}dispose(){this.disposeRegistedKeybinding(),this.disposableCollection.dispose()}getValidateCommand(h){return h.replace(/^monaco.editor/,"editor")}async reconcile(h){const u=n.KEYMAP_FILE_URI.toString();this.resource=await this.filesystem.getFileStat(u),this.resource||(this.resource=await this.filesystem.createFile(u,{content:JSON.stringify([])}));const E=(h?h.slice(0):await this.parseKeybindings()).map(b=>({when:b.when,command:this.getValidateCommand(b.command),keybinding:b.key||b.keybinding})),g=[],c=[];this.disposeRegistedKeybinding(),E.forEach(b=>{b.command.startsWith("-")?c.push(b):g.push(b)}),g.map(b=>{this.unregisterDefaultKeybinding(b,!0),this.registerUserKeybinding(b)}),c.map(b=>{b.command=b.command.slice(1),this.unregisterDefaultKeybinding(b,!0)})}unregisterUserKeybinding(h){const u=this.toUniqueKey(h);if(this.toUnregisterUserKeybindingMap.has(u)){const d=this.toUnregisterUserKeybindingMap.get(u);d?.dispose(),this.toUnregisterUserKeybindingMap.delete(u)}}registerUserKeybinding(h){const u=this.toUniqueKey(h);this.toUnregisterUserKeybindingMap.set(u,this.keybindingRegistry.registerKeybinding(h,p.KeybindingScope.USER))}unregisterDefaultKeybinding(h,u=!1){if(u)this.keybindingRegistry.getKeybindingsForCommand(h.command).map(E=>{const g={...h,keybinding:E.keybinding};this.keybindingRegistry.unregisterKeybinding(g);const c=this.toUniqueKey(h);this.toRestoreDefaultKeybindingMap.set(c,p.Disposable.create(()=>{this.keybindingRegistry.registerKeybinding(g)}))});else{this.keybindingRegistry.unregisterKeybinding(h);const d=this.toUniqueKey(h);this.toRestoreDefaultKeybindingMap.set(d,p.Disposable.create(()=>{this.keybindingRegistry.registerKeybinding(h)}))}}restoreDefaultKeybinding(h){const u=this.toUniqueKey(h),d=this.toRestoreDefaultKeybindingMap.get(u);d&&(d?.dispose(),this.toRestoreDefaultKeybindingMap.delete(u))}toUniqueKey(h){return`${h.command}${h.when?`-${h.when}`:"-"}${h.keybinding?`-${h.keybinding}`:"-"}`}async parseKeybindings(){try{const h=await this.resource;if(!h)return[];const{content:u}=await this.filesystem.readFile(h.uri);this.storeKeybindings=this.parser.parse(u.toString())}catch(h){this.logger.warn(`ParseKeybindings fail: ${h.stack}`),this.storeKeybindings=[]}return this.storeKeybindings}async saveKeybinding(h){this.storeKeybindings=h,this.updateKeybindings(),this.resource||(this.resource=await this.filesystem.createFile(n.KEYMAP_FILE_URI.toString()));const u=await this.filesystem.setContent(this.resource,JSON.stringify(h,void 0,2));this.resource=u||void 0}async getKeybindings(){return this.storeKeybindings.map(h=>({command:h.command,keybinding:h.key,when:h.when,args:h.args}))}async open(){this.commandService.executeCommand(p.EDITOR_COMMANDS.OPEN_RESOURCE.id,new p.URI().withScheme(_.KEYMAPS_SCHEME),{preview:!0})}getWhen(h){return h?this.keybindingService.convertMonacoWhen(h.when):""}getScope(h){return h===p.KeybindingScope.DEFAULT?(0,p.localize)("keymaps.source.default"):h===p.KeybindingScope.USER?(0,p.localize)("keymaps.source.user"):h===p.KeybindingScope.WORKSPACE?(0,p.localize)("keymaps.source.workspace"):""}getKeybindingItems(){const h=this.commandRegistry.getCommands(),u=[];for(const y of h){const S=this.keybindingRegistry.getKeybindingsForCommand(y.id);!S||!S.length?y.label&&u.push({id:y.id,command:y.label,hasCommandLabel:!0}):S.forEach(A=>{let w;if(this.storeKeybindings){const T=this.storeKeybindings.find(D=>y&&D.command===y.id);w={id:y.id,command:y.label||y.id,keybinding:T?T.key:A?this.keybindingRegistry.acceleratorFor(A,"+").join(" "):"",when:T?this.getWhen(T):this.getWhen(S&&A),source:T?this.getScope(p.KeybindingScope.USER):this.getScope(p.KeybindingScope.DEFAULT),hasCommandLabel:!!y.label}}else w={id:y.id,command:y.label||y.id,keybinding:S&&A?this.keybindingRegistry.acceleratorFor(A,"+").join(" "):"",when:this.getWhen(S&&A),source:S&&A&&typeof A.scope<"u"?this.getScope(A.scope):"",hasCommandLabel:!!y.label};u.push(w)})}const d=u.sort((y,S)=>this.compareItem(y,S)),E=d.filter(y=>!!y.keybinding),g=d.filter(y=>!y.keybinding&&y.hasCommandLabel),c=E.filter(y=>y.hasCommandLabel),b=E.filter(y=>!y.hasCommandLabel);return[...c,...b,...g]}compareItem(h,u){return h&&u?h.source===u.source?h.command.toLowerCase().localeCompare(u.command.toLowerCase()):h.source===this.getScope(p.KeybindingScope.USER)?-1:1:0}getRaw(h){return h?h.replace(new RegExp(/<(\/)?match>/gi),""):""}};t.KeymapService=f,f.DEFAULT_SEARCH_DELAY=100,f.KEYMAP_FILE_URI=new p.URI().withScheme(p.Schemes.userStorage).withPath(_.KEYMAPS_FILE_NAME),r.__decorate([(0,l.Autowired)(p.KeybindingRegistry),r.__metadata("design:type",Object)],f.prototype,"keyBindingRegistry",void 0),r.__decorate([(0,l.Autowired)(s.KeymapsParser),r.__metadata("design:type",s.KeymapsParser)],f.prototype,"parser",void 0),r.__decorate([(0,l.Autowired)(p.CommandService),r.__metadata("design:type",Object)],f.prototype,"commandService",void 0),r.__decorate([(0,l.Autowired)(p.CommandRegistry),r.__metadata("design:type",Object)],f.prototype,"commandRegistry",void 0),r.__decorate([(0,l.Autowired)(p.KeybindingRegistry),r.__metadata("design:type",Object)],f.prototype,"keybindingRegistry",void 0),r.__decorate([(0,l.Autowired)(p.KeybindingService),r.__metadata("design:type",Object)],f.prototype,"keybindingService",void 0),r.__decorate([(0,l.Autowired)(m.IFileServiceClient),r.__metadata("design:type",Object)],f.prototype,"filesystem",void 0),r.__decorate([(0,l.Autowired)(p.ILogger),r.__metadata("design:type",Object)],f.prototype,"logger",void 0),r.__decorate([(0,l.Autowired)(v.IProgressService),r.__metadata("design:type",Object)],f.prototype,"progressService",void 0),t.KeymapService=f=n=r.__decorate([(0,l.Injectable)()],f)},34879:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.KeymapsView=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importStar(e(14041)),l=e(97267),p=e(41869),v=e(25067),m=n.__importDefault(e(78541)),_=()=>{const{keybindings:s,searchKeybindings:f,validateKeybinding:a,detectKeybindings:h,setKeybinding:u,resetKeybinding:d,getRaw:E,getScope:g,covert:c,clearCovert:b,fixed:y,onDidKeymapChanges:S,updateKeybindings:A}=(0,p.useInjectable)(v.IKeymapService),[w,T]=o.default.useState(!1),[D,I]=o.default.useState(""),[R,M]=o.default.useState(s),O=({data:X,index:V})=>{const{id:$,command:Y,when:z,source:H,keybinding:K}=X,[Z,Q]=o.default.useState(!1),[oe,ne]=o.default.useState(K||""),[he,_e]=o.default.useState(!1),[q,Oe]=o.default.useState(),[ye,ie]=o.default.useState([]),fe=()=>{he||(y(),_e(!0)),b(),ne(E(K)),Q(!0)},Me=We=>{const pe=a(X,We);pe?pe!==" "?Oe({message:pe,type:l.VALIDATE_TYPE.ERROR}):Q(!1):(u({command:E($),when:E(z)||"",keybinding:E(K)},{command:E($),when:E(z)||"",keybinding:We}),Q(!1),b())},Le=()=>{Q(!1)},Ce=We=>{We.stopPropagation(),We.preventDefault();const{key:pe}=p.KeyCode.createKeyCode(We.nativeEvent),re=We.nativeEvent.shiftKey||We.nativeEvent.metaKey||We.nativeEvent.altKey||We.nativeEvent.ctrlKey;pe&&p.Key.ENTER.keyCode===pe.keyCode&&!re?oe&&Me(oe):ne(c(We.nativeEvent))},Ae=()=>{const We=()=>{Oe(void 0),oe&&ne(""),b()},pe=re=>{re.stopPropagation(),re.preventDefault()};return o.default.createElement("div",{className:m.default.keybinding_optional_actions,onMouseDown:pe},o.default.createElement("span",{className:(0,r.default)((0,p.getIcon)("close-circle-fill"),m.default.keybinding_optional_action),onClick:We,title:(0,p.localize)("keymaps.action.clear")}))},ve=()=>o.default.createElement("div",{className:m.default.keybinding_key_input_placeholder},"\u23CE"),ge=We=>{const pe=re=>{re.preventDefault(),he||(y(),_e(!0)),d({command:E($),when:E(z)||"",keybinding:oe})};if(We&&E(We)===g(p.KeybindingScope.USER))return o.default.createElement("span",{className:(0,r.default)((0,p.getIcon)("rollback"),m.default.keybinding_inline_action),onClick:pe,title:(0,p.localize)("keymaps.action.reset")})},xe=()=>{if(!q&&ye.length>0)return o.default.createElement("div",{className:m.default.keybinding_detective_messages},o.default.createElement("div",{className:m.default.keybinding_detective_messages_label},(0,p.formatLocalize)("keymaps.keybinding.duplicate",ye.length)),o.default.createElement("ul",{className:m.default.keybinding_detective_messages_container},ye.map((We,pe)=>o.default.createElement("li",{className:m.default.keybinding_detective_messages_item,key:`${We.id}_${pe}`,title:`${We.command}-${We.when}`},o.default.createElement("div",{className:m.default.title},(0,p.localize)("keymaps.header.command.title"),": ",E(We.command)||"-"),o.default.createElement("div",{className:m.default.description},o.default.createElement("div",{style:{marginRight:4}},(0,p.localize)("keymaps.header.source.title"),": ",E(We.source)||"-"),o.default.createElement("div",null,(0,p.localize)("keymaps.header.when.title"),": ",E(We.when)||"\u2014"))))))},Ie=()=>{if(Z)return o.default.createElement("div",{className:m.default.keybinding_key_input_container},Ae(),o.default.createElement(l.ValidateInput,{placeholder:(0,p.localize)("keymaps.edit.placeholder"),validateMessage:q,className:m.default.keybinding_key_input,size:"small",autoFocus:!0,name:p.NO_KEYBINDING_NAME,value:oe,onKeyDown:Ce,onBlur:Le}),ve(),xe());{const We=K?.split(" ");return o.default.createElement("div",{className:m.default.keybinding_key,title:E(K),onDoubleClick:fe},o.default.createElement("div",{className:m.default.keybinding_action,onClick:fe},o.default.createElement("span",{className:(0,r.default)(K?(0,p.getIcon)("edit"):(0,p.getIcon)("plus"),m.default.keybinding_inline_action),title:K?(0,p.localize)("keymaps.action.edit"):(0,p.localize)("keymaps.action.add")}),ge(H)),We&&We[0]?We.map((pe,re)=>{const le=pe.split("+");return o.default.createElement("div",{className:m.default.keybinding_key_block,key:`${pe}_${re}`},le.map((Te,Se)=>o.default.createElement("div",{className:m.default.keybinding_key_item,key:`${Te}_${Se}`,dangerouslySetInnerHTML:{__html:Te||""}})))}):"\u2014")}};return(0,o.useEffect)(()=>{q&&Oe(void 0),ie(oe&&Z?h(X,oe):[])},[oe]),o.default.createElement("div",{className:(0,r.default)(m.default.keybinding_list_item,V%2===1&&m.default.odd)},o.default.createElement("div",{className:(0,r.default)(m.default.keybinding_list_item_box,m.default.keybinding_command)},o.default.createElement("div",{className:m.default.command_name,title:E(Y),dangerouslySetInnerHTML:{__html:Y}}),o.default.createElement("div",{className:(0,r.default)(m.default.limit_warp,m.default.command_id),title:E($),dangerouslySetInnerHTML:{__html:(0,p.formatLocalize)("keymaps.commandId.title",$)}})),o.default.createElement("div",{className:(0,r.default)(m.default.keybinding_list_item_box)},Ie()),o.default.createElement("div",{className:m.default.keybinding_list_item_box},o.default.createElement("div",{className:m.default.limit_warp,title:E(z||"\u2014"),dangerouslySetInnerHTML:{__html:z||"\u2014"}})),o.default.createElement("div",{className:m.default.keybinding_list_item_box},o.default.createElement("div",{title:E(H),dangerouslySetInnerHTML:{__html:H||""}})))},P=()=>{const X=()=>{T(!w)};return o.default.createElement("div",{className:m.default.search_inline_action},o.default.createElement("span",{className:(0,r.default)((0,p.getIcon)("keyboard"),m.default.search_inline_action_icon,w&&m.default.active),onClick:X}))},k=(0,o.useCallback)(X=>{I(X),f(X)},[D]),F=X=>{if(!w){const V=X.target&&X.target.value?X.target.value.toLocaleLowerCase():"";k(V)}},L=X=>{if(w){X.stopPropagation(),X.preventDefault();const{key:V}=p.KeyCode.createKeyCode(X.nativeEvent);if(V&&p.Key.ENTER.keyCode===V.keyCode)return;k(c(X.nativeEvent))}},B=()=>{D&&(I(""),f("")),b()},j=()=>o.default.createElement("div",{className:m.default.keybinding_optional_actions},o.default.createElement("span",{className:(0,r.default)((0,p.getIcon)("close-circle-fill"),m.default.keybinding_optional_action),onClick:B,title:(0,p.localize)("keymaps.action.reset")})),W=()=>o.default.createElement("div",{className:m.default.search_container},o.default.createElement(l.Input,{className:m.default.search_input,placeholder:(0,p.localize)(w?"keymaps.search.keyboard.placeholder":"keymaps.search.placeholder"),type:"text",value:D,name:p.NO_KEYBINDING_NAME,onChange:F,onKeyDown:L,addonBefore:P()}),j()),U=(0,o.useMemo)(()=>{const X=[{title:(0,p.localize)("keymaps.header.command.title"),classname:m.default.keybinding_header_item},{title:(0,p.localize)("keymaps.header.keybinding.title"),classname:m.default.keybinding_header_item},{title:(0,p.localize)("keymaps.header.when.title"),classname:m.default.keybinding_header_item},{title:(0,p.localize)("keymaps.header.source.title"),classname:m.default.keybinding_header_item}];return o.default.createElement("div",{className:m.default.keybinding_header},X.map((V,$)=>o.default.createElement("div",{className:V.classname,key:`${V.title}_${$}`},V.title)))},[]);return(0,o.useEffect)(()=>{const X=S(V=>{M(V)});return A(),()=>{X.dispose()}},[]),o.default.createElement("div",{className:m.default.keybinding_container},o.default.createElement("div",{className:m.default.keybinding_searchbar},W()),o.default.createElement("div",{className:m.default.keybinding_body},U,o.default.createElement("div",{className:m.default.keybinding_list},o.default.createElement(l.RecycleList,{itemHeight:40,data:R,template:O,className:m.default.keybinding_list_container}))))};t.KeymapsView=_},79312:(x,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.KEYMAPS_FILE_NAME=t.KEYMAPS_SCHEME=void 0,t.KEYMAPS_SCHEME="keymaps",t.KEYMAPS_FILE_NAME="keymaps.json"},25067:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(85608);n.__exportStar(e(79312),t),n.__exportStar(e(88811),t)},88811:(x,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IKeymapService=void 0,t.IKeymapService=Symbol("IKeymapService")},83507:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LogModule=t.LogServiceClient=void 0;const n=e(85608),r=e(76003),o=e(41869),l=e(47548),p=e(49187);n.__exportStar(e(47548),t);var v=e(1700);Object.defineProperty(t,"LogServiceClient",{enumerable:!0,get:function(){return v.LogServiceClient}});let m=class extends o.BrowserModule{constructor(){super(...arguments),this.providers=[{token:l.ILoggerManagerClient,useClass:p.LoggerManagerClient}],this.backServices=[{servicePath:l.LogServiceForClientPath,clientToken:l.ILoggerManagerClient}]}};t.LogModule=m,t.LogModule=m=n.__decorate([(0,r.Injectable)()],m)},49187:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LoggerManagerClient=void 0;const n=e(85608),r=e(76003),o=e(43718),l=e(47548),p=e(1700);let v=class{constructor(){this.logLevelChangeEmitter=new o.Emitter}getLogger(_,s){const f=new p.LogServiceClient(_);return f.setup(this.logServiceForClient,s),f}getBrowserLogger(_){return new p.LogServiceClient(_)}async getLogFolder(){return await this.logServiceForClient.getLogFolder()}async setGlobalLogLevel(_){return await this.logServiceForClient.setGlobalLogLevel(_)}async getGlobalLogLevel(){return await this.logServiceForClient.getGlobalLogLevel()}async dispose(){return this.logLevelChangeEmitter.dispose(),await this.logServiceForClient.disposeAll()}get onDidChangeLogLevel(){return this.logLevelChangeEmitter.event}onDidLogLevelChanged(_){this.logLevelChangeEmitter.fire(_)}};t.LoggerManagerClient=v,n.__decorate([(0,r.Autowired)(l.LogServiceForClientPath),n.__metadata("design:type",Object)],v.prototype,"logServiceForClient",void 0),t.LoggerManagerClient=v=n.__decorate([(0,r.Injectable)()],v)},1700:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LogServiceClient=void 0;const n=e(43718),r=e(47548);class o{constructor(p){this.level=r.LogLevel.Verbose,this.ready=new n.Deferred,this.namespace=p,this.debugLog=new r.DebugLog(p)}async setup(p,v){this.logServiceForClient=p,this.pid=v;const m=await this.logServiceForClient.getGlobalLogLevel();this.level=m,this.ready.resolve()}async getLevel(){return this.logServiceForClient?await this.logServiceForClient.getLevel(this.namespace):this.level}async setLevel(p){this.level=p,this.logServiceForClient&&await this.logServiceForClient.setLevel(this.namespace,p)}async verbose(...p){this.debugLog.verbose(...p),this.logServiceForClient&&await this.logServiceForClient.verbose(this.namespace,(0,r.format)(p),this.pid)}async debug(...p){this.debugLog.debug(...p),this.logServiceForClient&&(await this.ready.promise,!(this.level>r.LogLevel.Debug)&&await this.logServiceForClient.debug(this.namespace,(0,r.format)(p),this.pid))}async log(...p){this.debugLog.log(...p),this.logServiceForClient&&(await this.ready.promise,!(this.level>r.LogLevel.Info)&&await this.logServiceForClient.log(this.namespace,(0,r.format)(p),this.pid))}async warn(...p){this.debugLog.warn(...p),this.logServiceForClient&&(await this.ready.promise,!(this.level>r.LogLevel.Warning)&&await this.logServiceForClient.warn(this.namespace,(0,r.format)(p),this.pid))}async error(...p){this.debugLog.error(...p),this.logServiceForClient&&(await this.ready.promise,!(this.level>r.LogLevel.Error)&&await this.logServiceForClient.error(this.namespace,(0,r.format)(p),this.pid))}async critical(...p){this.debugLog.error(...p),this.logServiceForClient&&(await this.ready.promise,!(this.level>r.LogLevel.Critical)&&await this.logServiceForClient.critical(this.namespace,(0,r.format)(p),this.pid))}async dispose(){this.debugLog.destroy(),this.logServiceForClient&&await this.logServiceForClient.disposeLogger(this.namespace)}}t.LogServiceClient=o},47548:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(85608);n.__exportStar(e(4892),t),n.__exportStar(e(46196),t)},46196:(x,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ILogServiceForClient=void 0,t.format=e,t.ILogServiceForClient=Symbol("LogServiceForClient");function e(n){let r="";for(let o=0;o<n.length;o++){let l=n[o];if(l instanceof Error){const p=Array.prototype.slice.call(arguments);p[0]=l.stack,l=e(p)}else if(typeof l=="object")try{l=JSON.stringify(l)}catch{}else if(typeof l=="symbol")try{l=l.toString()}catch{}r+=(o>0?" ":"")+l}return r}},73344:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),e(85608).__exportStar(e(47548),t)},9522:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AccordionServiceFactory=t.AccordionService=void 0;const n=e(85608),r=n.__importDefault(e(12784)),o=n.__importDefault(e(46343)),l=e(76003),p=e(41869),v=e(81878),m=e(71707),_=e(95416),s=e(93899),f=e(68969),a=e(28423),h=e(17793);let u=class extends p.WithEventBus{get views(){return this.viewsObservable.get()}get state(){return this.stateObservable.get()}constructor(E,g){super(),this.containerId=E,this.noRestore=g,this.forceRevealContextKeys=new Map,this.viewWhenContextkeys=new Set,this.appendedViewSet=new Set,this.viewsWithContextKey=new Set,this.viewsObservable=(0,a.observableValue)(this,[]),this.stateObservable=(0,a.observableValue)(this,{}),this.visibleViews=(0,a.derived)(this,c=>{const b=this.viewsObservable.read(c);return this.stateObservable.read(c),b.filter(y=>!this.getViewState(y.id).hidden)}),this.rendered=!1,this.menuId=`${s.MenuId.AccordionContext}/${this.containerId}`,this.toDispose=new Map,this.didChangeViewTitleEmitter=this.registerDispose(new p.Emitter),this.onDidChangeViewTitle=this.didChangeViewTitleEmitter.event,this.beforeAppendViewEmitter=this.registerDispose(new p.Emitter),this.onBeforeAppendViewEvent=this.beforeAppendViewEmitter.event,this.afterAppendViewEmitter=this.registerDispose(new p.Emitter),this.onAfterAppendViewEvent=this.afterAppendViewEmitter.event,this.afterDisposeViewEmitter=this.registerDispose(new p.Emitter),this.onAfterDisposeViewEvent=this.afterDisposeViewEmitter.event,this.doUpdateResize=(0,r.default)(()=>{var c,b;let y;if(Object.keys(this.state).forEach(S=>{this.state[S].hidden||this.state[S].collapsed||(y?(this.state[S].size||0)>(this.state[y].size||0)&&(y=S):y=S)}),y&&this.splitPanelService.isVisible&&this.expandedViews.length>1&&!((c=this.splitPanelService.rootNode)===null||c===void 0)&&c.clientHeight){const S=((b=this.splitPanelService.rootNode)===null||b===void 0?void 0:b.clientHeight)-this.getPanelFullHeight();if(S){const A=this.state;A[y].size+=S,(0,a.transaction)(w=>{this.stateObservable.set({...A},w)}),this.toggleOpen(y,!1)}}},16),this.storeState=()=>{this.noRestore||!this.rendered||this.layoutState.setState(_.LAYOUT_STATE.getContainerSpace(this.containerId),this.state)},this.handleSectionClick=(c,b,y)=>{this.doToggleOpen(c,b,y)},this.handleContextMenu=(c,b)=>{c.preventDefault();const y=this.ctxMenuService.createMenu({id:this.menuId,config:{args:[{viewId:b}]},contextKeyService:b?this.viewContextKeyRegistry.getContextKeyService(b):void 0}),S=y.getGroupedMenuNodes();y.dispose(),this.contextMenuRenderer.show({menuNodes:S[1],anchor:{x:c.clientX,y:c.clientY}})},this.addDispose((0,a.recomputeInitiallyAndOnChange)(this.visibleViews)),this.splitPanelService=this.splitPanelManager.getService(E),this.addDispose(this.splitPanelService),this.scopedCtxKeyService=this.contextKeyService.createScoped(),this.scopedCtxKeyService.createKey("triggerWithSection",!0),this.menuRegistry.registerMenuItem(this.menuId,{command:{id:this.registerGlobalToggleCommand(),label:(0,p.localize)("layout.view.hide","Hide")},group:"0_global",when:"triggerWithSection == true"}),this.viewContextKeyRegistry.afterContextKeyServiceRegistered(this.containerId,c=>{this.topViewKey=c.createKey("view",E),setTimeout(()=>{this.popViewKeyIfOnlyOneViewVisible()})}),this.addDispose(p.Event.debounce(this.contextKeyService.onDidChangeContext,(c,b)=>c||b.payload.affectsSome(this.viewWhenContextkeys),50)(c=>c&&this.handleContextKeyChange(),this)),this.splitPanelService.whenReady.then(()=>{this.listenWindowResize()})}updateViewTitle(E,g){const c=this.views.find(b=>b.id===E);c?(c.name=g,this.didChangeViewTitleEmitter.fire({id:E,title:g})):this.logger.error(`No target view \`${E}\` found, unable to update accordion title`)}updateViewDesciption(E,g){const c=this.views.find(b=>b.id===E);c?(c.description=g,this.didChangeViewTitleEmitter.fire({id:E,description:g})):this.logger.error(`No target view \`${E}\` found, unable to update accordion description`)}updateViewMessage(E,g){const c=this.views.find(b=>b.id===E);c?(c.message=g,this.didChangeViewTitleEmitter.fire({id:E,message:g})):this.logger.error(`No target view \`${E}\` found, unable to update accordion message`)}updateViewBadge(E,g){const c=this.views.find(b=>b.id===E);c?(c.badge=g,this.didChangeViewTitleEmitter.fire({id:E,badge:g})):this.logger.error(`No target view \`${E}\` found, unable to update accordion message`)}tryUpdateResize(){this.doUpdateResize()}restoreState(){if(this.noRestore)return;const E={};this.visibleViews.get().forEach(c=>E[c.id]={collapsed:!1,hidden:!1});const g=this.layoutState.getState(_.LAYOUT_STATE.getContainerSpace(this.containerId),E);(0,o.default)(g,E)||(0,a.transaction)(c=>{this.stateObservable.set({...g},c)}),this.popViewKeyIfOnlyOneViewVisible(),this.splitPanelService.whenReady.then(()=>{this.restoreSize(),this.rendered=!0})}restoreSize(){var E;let g=((E=this.splitPanelService.rootNode)===null||E===void 0?void 0:E.clientHeight)||0,c;if(this.visibleViews.get().forEach((b,y)=>{const S=this.state[b.id];S.collapsed?(this.setSize(y,0,!1,!0),g-=this.headerSize):!S.collapsed&&S.size&&(this.setSize(y,S.size,!1,!0),g-=S.size,c=y)}),c){const b=this.visibleViews.get()[c];this.setSize(c,this.state[b.id].size+g)}}initConfig(E){const{headerSize:g,minSize:c}=E;this.headerSize=g,this.minSize=c}registerContextService(E){let g=this.viewContextKeyRegistry.getContextKeyService(E);return g||(g=this.contextKeyService.createScoped(),g.createKey("view",E),this.viewContextKeyRegistry.registerContextKeyService(E,g)),g}getSectionToolbarMenu(E){const g=this.registerContextService(E),c=this.menuService.createMenu(s.MenuId.ViewTitle,g),b=this.views.find(y=>y.id===E);return b&&(b.titleMenu=c),c}updateView(E){(0,a.transaction)(g=>{const c=this.views;if(E.priority){const b=c.findIndex(y=>(y.priority||0)<(E.priority||0));c.splice(b===-1?c.length:b,0,E),this.viewsObservable.set([...c],g)}else this.viewsObservable.set([...c,E],g)})}appendView(E,g){if(this.appendedViewSet.has(E.id)&&!g)return;const c=new p.DisposableCollection;c.push(this.progressService.registerProgressIndicator(E.id));const b=this.views.findIndex(y=>y.id===E.id);if(b!==-1){(0,a.transaction)(y=>{const S=this.views;S[b]=Object.assign({},S[b],E),this.viewsObservable.set([...S],y)});return}if(E.when){this.viewsWithContextKey.add(E);const y=this.createRevealContextKey(E.id);if(this.fillKeysInWhenExpr(this.viewWhenContextkeys,E.when),!this.contextKeyService.match(E.when)&&!this.contextKeyService.match(y))return;this.appendedViewSet.add(E.id)}this.beforeAppendViewEmitter.fire(E.id),this.updateView(E),this.registerContextService(E.id),c.push(this.menuRegistry.registerMenuItem(this.menuId,{command:{id:this.registerVisibleToggleCommand(E.id,c),label:(E.name||E.id).toUpperCase()},group:"1_widgets"})),this.toDispose.set(E.id,c),this.popViewKeyIfOnlyOneViewVisible(),this.afterAppendViewEmitter.fire(E.id)}disposeView(E){const g=this.views.findIndex(b=>b.id===E);g>-1&&(0,a.transaction)(b=>{const y=this.views;y.splice(g,1),this.viewsObservable.set([...y],b)});const c=this.toDispose.get(E);c&&c.dispose(),this.appendedViewSet.delete(E),this.popViewKeyIfOnlyOneViewVisible(),this.afterDisposeViewEmitter.fire(E)}revealView(E){const g=this.forceRevealContextKeys.get(E);g&&g.key.set(!0)}disposeAll(){(0,a.transaction)(E=>{this.viewsObservable.set([],E)}),this.toDispose.forEach(E=>{E.dispose()})}onResize(E){if(E.payload.slotLocation&&this.state[E.payload.slotLocation]){const g=E.payload.slotLocation;p.fastdom.measureAtNextFrame(()=>{const c=document.getElementById(g);if(c){const b=this.state;b[g].size=c.clientHeight,(0,a.transaction)(y=>{this.stateObservable.set({...b},y)}),this.storeState()}})}}getPanelFullHeight(E){return Object.keys(this.state).filter(g=>this.views.find(c=>c.id===g)&&g!==E).reduce((g,c)=>g+(this.state[c].collapsed?this.headerSize:this.state[c].hidden?0:this.state[c].size),0)}listenWindowResize(){window.addEventListener("resize",this.doUpdateResize),this.addDispose({dispose:()=>window.removeEventListener("resize",this.doUpdateResize)})}createRevealContextKey(E){const g=`forceShow.${E}`;return this.forceRevealContextKeys.set(E,{when:`${g} == true`,key:this.contextKeyService.createKey(g,!1)}),this.viewWhenContextkeys.add(g),`${g} == true`}registerGlobalToggleCommand(){const E=`view-container.hide.${this.containerId}`;return this.commandRegistry.registerCommand({id:E},{execute:({viewId:g})=>{this.doToggleView(g)},isEnabled:()=>this.visibleViews.get().length>1}),E}registerVisibleToggleCommand(E,g){const c=`view-container.hide.${E}`;return g.push(this.commandRegistry.registerCommand({id:c},{execute:({forceShow:b}={})=>{this.doToggleView(E,b)},isToggled:()=>!this.getViewState(E).hidden,isEnabled:()=>this.getViewState(E).hidden||this.visibleViews.get().length>1})),c}doToggleView(E,g){const c=this.getViewState(E);let b;g===void 0?b=!c.hidden:b=!g,c.hidden=b,this.updateViewState(E,c),this.popViewKeyIfOnlyOneViewVisible(),this.storeState()}popViewKeyIfOnlyOneViewVisible(){if(!this.topViewKey)return;const E=this.visibleViews.get();E.length===1?this.topViewKey.set(E[0].id):this.topViewKey.reset()}toggleViewVisibility(E,g){this.doToggleView(E,g)}get expandedViews(){return this.views.filter(E=>{const g=this.state[E.id];return!g||g&&!g.hidden&&!g.collapsed})}toggleOpen(E,g){const c=this.visibleViews.get().findIndex(b=>b.id===E);c>-1&&this.doToggleOpen(E,g,c,!0)}getViewState(E){let g=this.state[E];const c=this.views.find(b=>b.id===E);return g||(this.updateViewState(E,{collapsed:c?.collapsed||!1,hidden:c?.hidden||!1}),g=this.state[E]),g}updateViewState(E,g){const c=this.state;c[E]=g,(0,a.transaction)(b=>{this.stateObservable.set({...c},b)})}doToggleOpen(E,g,c,b){var y;const S=this.getViewState(E);this.updateViewState(E,{...S,collapsed:g});const A=this.mainLayoutService.getContainer(this.containerId);if(((y=A?.options)===null||y===void 0?void 0:y.alignment)!=="horizontal"){let w;g?w=this.setSize(c,0,!1,b):w=this.setSize(c,this.expandedViews.length===1?this.getAvailableSize():S.size||this.minSize,!1,b);for(let T=this.visibleViews.get().length-1;T>c;T--)this.getViewState(this.visibleViews.get()[T].id).collapsed!==!0?w=this.setSize(T,w,!0,b):this.setSize(T,0,!1,b);for(let T=c-1;T>=0;T--)(this.state[this.visibleViews.get()[T].id]||{}).collapsed!==!0?w=this.setSize(T,w,!0,b):this.setSize(T,0,!1,b)}this.eventBus.fire(new h.ViewCollapseChangedEvent({viewId:E,collapsed:g}))}setSize(E,g,c,b){var y;const S=this.visibleViews.get()[E],A=(y=this.splitPanelService.rootNode)===null||y===void 0?void 0:y.clientHeight,w=this.splitPanelService.panels[E];if(!w)return 0;b||w.classList.add("resize-ease"),!g&&!c?(g=this.headerSize,w.classList.add(v.RESIZE_LOCK)):w.classList.remove(v.RESIZE_LOCK);const T=w.clientHeight,D=this.getViewState(S.id);let I=g;if(c&&(I=Math.max(T-g,this.minSize)),E===this.expandedViews.length-1&&(0,p.isDefined)(A))if(I+E*this.minSize>A)I-=I+E*this.minSize-A;else{const R=this.getPanelFullHeight(S.id);I+R<A&&(I+=A-(I+R))}if(this.rendered){let R;g===this.headerSize?R=T:R=I,R!==this.headerSize&&(D.size=R)}return this.storeState(),D.nextSize=I,b||setTimeout(()=>{w.classList.remove("resize-ease")},200),c?I-(T-g):g-T}getAvailableSize(){var E;const g=(E=this.splitPanelService.rootNode)===null||E===void 0?void 0:E.clientHeight;return g?g-(this.visibleViews.get().length-1)*this.headerSize:0}handleContextKeyChange(){Array.from(this.viewsWithContextKey.values()).forEach(E=>{this.contextKeyService.match(E.when)||this.contextKeyService.match(this.forceRevealContextKeys.get(E.id).when)?this.appendView(E):this.disposeView(E.id)})}fillKeysInWhenExpr(E,g){this.contextKeyService.getKeysInWhen(g).forEach(b=>{E.add(b)})}};t.AccordionService=u,n.__decorate([(0,l.Autowired)(),n.__metadata("design:type",m.SplitPanelManager)],u.prototype,"splitPanelManager",void 0),n.__decorate([(0,l.Autowired)(s.AbstractMenuService),n.__metadata("design:type",s.AbstractMenuService)],u.prototype,"menuService",void 0),n.__decorate([(0,l.Autowired)(s.AbstractContextMenuService),n.__metadata("design:type",s.AbstractContextMenuService)],u.prototype,"ctxMenuService",void 0),n.__decorate([(0,l.Autowired)(s.IMenuRegistry),n.__metadata("design:type",s.IMenuRegistry)],u.prototype,"menuRegistry",void 0),n.__decorate([(0,l.Autowired)(p.CommandRegistry),n.__metadata("design:type",Object)],u.prototype,"commandRegistry",void 0),n.__decorate([(0,l.Autowired)(s.ICtxMenuRenderer),n.__metadata("design:type",s.ICtxMenuRenderer)],u.prototype,"contextMenuRenderer",void 0),n.__decorate([(0,l.Autowired)(),n.__metadata("design:type",p.ViewContextKeyRegistry)],u.prototype,"viewContextKeyRegistry",void 0),n.__decorate([(0,l.Autowired)(h.IMainLayoutService),n.__metadata("design:type",Object)],u.prototype,"mainLayoutService",void 0),n.__decorate([(0,l.Autowired)(p.IContextKeyService),n.__metadata("design:type",Object)],u.prototype,"contextKeyService",void 0),n.__decorate([(0,l.Autowired)(_.LayoutState),n.__metadata("design:type",_.LayoutState)],u.prototype,"layoutState",void 0),n.__decorate([(0,l.Autowired)(f.IProgressService),n.__metadata("design:type",Object)],u.prototype,"progressService",void 0),n.__decorate([(0,l.Autowired)(p.ILogger),n.__metadata("design:type",Object)],u.prototype,"logger",void 0),n.__decorate([(0,p.OnEvent)(p.ResizeEvent),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[p.ResizeEvent]),n.__metadata("design:returntype",void 0)],u.prototype,"onResize",null),t.AccordionService=u=n.__decorate([(0,l.Injectable)({multiple:!0}),n.__metadata("design:paramtypes",[String,Boolean])],u),t.AccordionServiceFactory=Symbol("AccordionServiceFactory")},70936:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Panel=t.AccordionContainer=void 0;const r=e(85608).__importStar(e(14041)),o=e(41869),l=e(81878),p=e(1149),v=e(43718),m=e(9522),_=e(95867),s=({alignment:a="vertical",views:h,containerId:u,headerSize:d=24,minSize:E=120,className:g,noRestore:c,style:b})=>{const y=(0,o.useInjectable)(p.LayoutViewSizeConfig),S=(0,o.useInjectable)(m.AccordionServiceFactory)(u,c),A=(0,o.useAutorun)(S.visibleViews);(0,o.useAutorun)(S.stateObservable);const w=(0,r.useMemo)(()=>d||y.accordionHeaderSizeHeight,[d]);return r.default.useEffect(()=>{if(h.length)for(const T of h)S.appendView(T)},[h]),r.default.useEffect(()=>{S.initConfig({headerSize:w,minSize:E})},[]),r.default.createElement(l.SplitPanel,{className:g,style:b,headerSize:d,dynamicTarget:!0,id:u,resizeKeep:!1,direction:a==="horizontal"?"left-to-right":"top-to-bottom"},A.map((T,D)=>{const I=S.getViewState(T.id),R=T.titleMenu||S.getSectionToolbarMenu(T.id),{collapsed:M,nextSize:O}=I;return r.default.createElement(_.AccordionSection,{noHeader:A.length===1,onItemClick:()=>{S.handleSectionClick(T.id,!M,D)},onContextMenuHandler:S.handleContextMenu,alignment:a,header:T.name&&(0,v.replaceLocalizePlaceholder)(T.name)||T.id,viewId:T.id,key:T.id,message:T.message,description:T.description,badge:T.badge,title:T.name,expanded:!M,accordionService:S,index:D,headerSize:d,minSize:d,initialProps:T.initialProps,titleMenu:R,titleMenuContext:T.titleMenuContext,savedSize:M?d:O,flex:T.weight||1},T.component)}))};t.AccordionContainer=s,t.AccordionContainer.displayName="AccordionContainer";const f=({children:a})=>r.default.createElement("div",null,a);t.Panel=f,t.Panel.displayName="Panel"},95867:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AccordionSection=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importDefault(e(14041)),l=e(41869),p=e(25918),v=e(93899),m=e(68969),_=e(68974),s=e(69589),f=e(52416),a=n.__importDefault(e(81388)),h={tabIndex:0},u=({header:d,description:E,message:g,headerClass:c,onItemClick:b,noHeader:y,children:S,badge:A,headerSize:w,viewId:T,initialProps:D,titleMenu:I,titleMenuContext:R,expanded:M,accordionService:O,onContextMenuHandler:P,alignment:k})=>{const F=(0,l.useInjectable)(f.IIconService),L=(0,l.useDesignStyles)(a.default.actions_wrap,"actions_wrap"),B=(0,l.useDesignStyles)(a.default.kt_split_panel,"kt_split_panel"),j=(0,l.useDesignStyles)(a.default.kt_split_panel_header,"kt_split_panel_header"),W=(0,l.useDesignStyles)(a.default.kt_split_panel_body,"kt_split_panel_body"),U=(0,l.useDesignStyles)(a.default.section_badge,"section_badge"),X=o.default.useRef(null),[V,$]=o.default.useState({header:d,description:E,message:g,badge:A});o.default.useEffect(()=>{const ne=O.onDidChangeViewTitle(({id:he,title:_e,description:q,message:Oe,badge:ye})=>{let ie=!1;const fe={...V};T===he&&_e&&_e!==V.header&&(fe.header=_e,ie=!0),T===he&&ye!==V.badge&&(fe.badge=ye,ie=!0),T===he&&q&&q!==V.description&&(fe.description=q,ie=!0),T===he&&Oe&&Oe!==V.message&&(fe.message=Oe,ie=!0),ie&&$(fe)});return()=>{ne.dispose()}},[]);const Y=o.default.useCallback(()=>{b()},[b]),z=o.default.useMemo(()=>({overflow:M?"auto":"hidden"}),[M]),H=(0,l.useViewState)(T,X,!0),Z=(0,l.useInjectable)(m.IProgressService).getIndicator(T),Q=S,oe=o.default.useMemo(()=>M?`${w}px`:k==="horizontal"?"100%":`${w}px`,[M,w,k]);return o.default.createElement("div",{className:B,"data-view-id":T,draggable:!1},!y&&o.default.createElement("div",{...h,className:(0,r.default)(j,c),onClick:Y,onContextMenu:ne=>P(ne,T),style:{height:oe,lineHeight:oe}},o.default.createElement("div",{className:a.default.label_wrap},o.default.createElement("i",{className:(0,r.default)((0,l.getIcon)("arrow-down"),a.default.arrow_icon,M?"":a.default.kt_mod_collapsed)}),o.default.createElement("div",{className:a.default.section_label,style:{lineHeight:w+"px"}},V.header),V.description&&o.default.createElement("div",{className:a.default.section_description,style:{lineHeight:w+"px"}},typeof V.description=="string"?(0,s.transformLabelWithCodicon)(V.description,{},F.fromString.bind(F)):V.description),V.badge&&o.default.createElement("div",{className:U},typeof V.badge=="string"?V.badge:V.badge.value)),M&&I&&o.default.createElement("div",{className:L},(0,v.isIMenu)(I)?o.default.createElement(p.InlineActionBar,{menus:I,context:R}):o.default.createElement(p.InlineMenuBar,{menus:I,context:R}))),o.default.createElement("div",{className:(0,r.default)([W,{[a.default.hide]:!M}]),style:z,ref:X},o.default.createElement(_.ProgressBar,{className:a.default.progressBar,progressModel:Z.progressModel}),o.default.createElement(l.ErrorBoundary,null,V.message&&o.default.createElement("div",{className:a.default.kt_split_panel_message},V.message),o.default.createElement(Q,{...D,viewState:{height:H.height-(V.message?22:0),width:H.width}}))))};t.AccordionSection=u},91527:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TitleBar=void 0;const n=e(85608),r=n.__importDefault(e(14041)),o=e(41869),l=e(752),p=n.__importDefault(e(81388));t.TitleBar=r.default.memo(v=>{const m=(0,o.useDesignStyles)(p.default.titlebar,"titlebar"),_=(0,o.useInjectable)(l.TabbarServiceFactory)(v.side),s=r.default.useCallback(a=>{v.containerId&&v.side&&_.handleDragStart(a,v.containerId)},[v.containerId,v.side,_]),f=r.default.useCallback(a=>{_.handleDragEnd(a)},[_]);return r.default.createElement("div",{className:m,style:{height:v.height}},!v.draggable&&r.default.createElement("h1",null,v.title),!!v.draggable&&r.default.createElement("h1",{draggable:!0,style:{cursor:"pointer"},onDragStart:s,onDragEnd:f},v.title),v.menubar||null)}),t.TitleBar.displayName="TitleBar"},25072:(x,t,e)=>{"use strict";var n;n={value:!0},t.s=void 0;const r=e(41869),o=e(17793);t.s={[r.SlotLocation.top]:{modules:["@opensumi/ide-menu-bar"]},[r.SlotLocation.action]:{modules:["@opensumi/ide-toolbar-action"]},[r.SlotLocation.left]:{modules:["@opensumi/ide-explorer","@opensumi/ide-search","@opensumi/ide-scm","@opensumi/ide-extension-manager","@opensumi/ide-debug","@opensumi/ide-notebook"]},[r.SlotLocation.right]:{modules:[o.DROP_RIGHT_CONTAINER]},[r.SlotLocation.main]:{modules:["@opensumi/ide-editor"]},[r.SlotLocation.bottom]:{modules:[o.DROP_BOTTOM_CONTAINER,"@opensumi/ide-terminal-next","@opensumi/ide-output","debug-console","@opensumi/ide-markers"]},[r.SlotLocation.statusBar]:{modules:["@opensumi/ide-status-bar"]},[r.SlotLocation.extra]:{modules:["breadcrumb-menu"]}}},45395:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BottomDropArea=t.RightDropArea=void 0;const n=e(85608),r=n.__importDefault(e(14041)),o=e(41869),l=e(17793),p=n.__importDefault(e(36623)),v=s=>{const{location:f}=s,a=(0,o.useInjectable)(l.IMainLayoutService),h=r.default.useCallback(u=>{var d;const E=(d=u.dataTransfer)===null||d===void 0?void 0:d.getData("containerId");a.moveContainerTo(E,f)},[a,f]);return r.default.createElement("div",{className:p.default.drop_area,onDrop:h,onDragOver:u=>{u.preventDefault()}},(0,o.localize)("main-layout.drop-area.tip"))},m=()=>r.default.createElement(v,{location:"right"});t.RightDropArea=m;const _=()=>r.default.createElement(v,{location:"bottom"});t.BottomDropArea=_},7480:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MainLayoutModule=void 0;const n=e(85608),r=e(76003),o=e(41869),l=e(17793),p=e(9522),v=e(22537),m=e(53576),_=e(752),s=e(58296);let f=class extends o.BrowserModule{constructor(){super(...arguments),this.providers=[m.MainLayoutModuleContribution,{token:l.IMainLayoutService,useClass:v.LayoutService},{token:l.IViewsRegistry,useClass:s.ViewsRegistry},{token:_.TabbarServiceFactory,useFactory:_.TabbarServiceFactoryFn},{token:p.AccordionServiceFactory,useFactory:h=>(u,d)=>h.get(l.IMainLayoutService).getAccordionService(u,d)}],this.contributionProvider=l.MainLayoutContribution}};t.MainLayoutModule=f,t.MainLayoutModule=f=n.__decorate([(0,r.Injectable)()],f)},5567:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AutoFocusedInput=void 0;const r=e(85608).__importStar(e(14041)),o=e(97267),l=e(48560),p=e(17793),v=({containerId:m,..._})=>{const s=(0,l.useInjectable)(p.IMainLayoutService),f=(0,r.useRef)(null),a=r.default.useCallback(()=>{f&&f.current&&queueMicrotask(()=>{var h;return(h=f.current)===null||h===void 0?void 0:h.focus()})},[f.current]);return(0,r.useEffect)(()=>{a();const h=s.getTabbarHandler(m),u=h?.onActivate(a);return()=>{u?.dispose()}},[s]),r.default.createElement(o.Input,{ref:f,..._})};t.AutoFocusedInput=v},22537:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LayoutService=void 0;const n=e(85608),r=n.__importDefault(e(12784)),o=e(76003),l=e(41869),p=e(81878),v=e(95416),m=e(93899),_=e(43718),s=e(52416),f=e(17793),a=e(9522),h=e(752),u=e(58999),d={[l.SlotLocation.left]:{currentId:void 0,size:void 0},[l.SlotLocation.right]:{currentId:"",size:void 0},[l.SlotLocation.bottom]:{currentId:void 0,size:void 0}};let E=class extends l.WithEventBus{constructor(){super(...arguments),this.handleMap=new Map,this.tabbarServices=new Map,this.accordionServices=new Map,this.pendingViewsMap=new Map,this.viewToContainerMap=new Map,this.disposableMap=new Map,this.state={},this.customViews=new Map,this.debug=(0,_.getDebugLogger)(),this.viewReady=new _.Deferred,this.restoreTabbarService=async c=>{var b;this.state=(0,p.fixLayout)(this.layoutState.getState(v.LAYOUT_STATE.MAIN,d));const{currentId:y,size:S}=this.state[c.location]||{};c.prevSize=S;let A=c.visibleContainers[0]&&c.visibleContainers[0].options.containerId;const w=this.appConfig.defaultPanels,T=w&&w[c.location];if(w&&T!==void 0)if(T)if(c.containersMap.has(T))A=T;else{const D=this.componentRegistry.getComponentRegistryInfo(T);D&&(!((b=this.appConfig.layoutConfig[c.location])===null||b===void 0)&&b.modules)&&~this.appConfig.layoutConfig[c.location].modules.indexOf(T)?A=D.options.containerId:this.logger.warn(`[defaultPanels] No \`${T}\` view found!`)}else A="";(0,_.isUndefined)(y)?(0,_.isUndefined)(A)?c.updateNextContainerId():c.updateCurrentContainerId(A):y&&!this.isDropContainer(y)?c.containersMap.has(y)?c.updateCurrentContainerId(y):this.findTabbarServiceByContainerId(y)?(this.moveContainerTo(y,c.location),c.updateCurrentContainerId(y)):(c.updateCurrentContainerId(A),c.updateNextContainerId(y)):(y===""||this.isDropContainer(y))&&c.updateCurrentContainerId("")},this.holdTabbarComponent=new Map,this.tabbarUpdateSet=new Set}didMount(){for(const[b,y]of this.pendingViewsMap.entries())y.forEach(({view:S,props:A})=>{this.collectViewComponent(S,b,A)});for(const b of this.contributions.getContributions())b.onDidRender&&b.onDidRender();const c=[];this.tabbarServices.forEach(b=>{l.slotRendererRegistry.isTabbar(b.location)&&b.containersMap.size>0&&c.push(b.viewReady.promise)}),Promise.all(c).then(()=>{this.viewReady.resolve()})}storeState(c,b){this.state[c.location]={currentId:b,size:c.prevSize},this.layoutState.setState(v.LAYOUT_STATE.MAIN,this.state)}onThemeChange(c){var b,y,S,A,w;const T=c.payload.theme;localStorage.setItem("theme",JSON.stringify({menuBarBackground:(b=T.getColor("kt.menubar.background"))===null||b===void 0?void 0:b.toString(),sideBarBackground:(y=T.getColor("sideBar.background"))===null||y===void 0?void 0:y.toString(),editorBackground:(S=T.getColor("editor.background"))===null||S===void 0?void 0:S.toString(),panelBackground:(A=T.getColor("panel.background"))===null||A===void 0?void 0:A.toString(),statusBarBackground:(w=T.getColor("statusBar.background"))===null||w===void 0?void 0:w.toString()}))}findTabbarServiceByContainerId(c){let b;for(const y of this.tabbarServices.values())if(y.containersMap.has(c)){b=y;break}return b}moveContainerTo(c,b){var y;const S=this.findTabbarServiceByContainerId(c);if(!S){this.logger.error(`cannot find container: ${c}`);return}const A=S.getContainer(c);if(!A){this.logger.error(`cannot find container: ${c}`);return}if(!(!((y=A.options)===null||y===void 0)&&y.draggable)){this.logger.warn(`container: ${c} is not draggable`);return}const w=this.getTabbarService(b);S.removeContainer(c),(!S.visibleContainers.length||S.currentContainerId.get()===c)&&this.toggleSlot(S.location,!1),w.dynamicAddContainer(c,A);const T=this.injector.get(u.TabBarHandler,[c,this.getTabbarService(w.location)]);this.handleMap.set(c,T)}showDropAreaForContainer(c){const b=this.findTabbarServiceByContainerId(c),y=this.tabbarServices.get("bottom"),S=this.tabbarServices.get("right");if(!b){this.logger.error(`cannot find container: ${c}`);return}b?.location==="right"&&y?.updateCurrentContainerId(f.DROP_BOTTOM_CONTAINER),b?.location==="bottom"&&S?.updateCurrentContainerId(f.DROP_RIGHT_CONTAINER)}hideDropArea(){const c=this.tabbarServices.get("bottom"),b=this.tabbarServices.get("right");c?.currentContainerId.get()===f.DROP_BOTTOM_CONTAINER&&c.updateCurrentContainerId(c.previousContainerId||""),b?.currentContainerId.get()===f.DROP_RIGHT_CONTAINER&&b.updateCurrentContainerId(b.previousContainerId||"")}isVisible(c){return!!this.getTabbarService(c).currentContainerId.get()}isViewVisible(c){const b=this.getTabbarHandler(c);if(!b||!b.isActivated())return!1;const y=b.accordionService.getViewState(c);return!y.collapsed&&!y.hidden}toggleSlot(c,b,y){var S;const A=this.getTabbarService(c);if(!A){this.debug.error(`Unable to switch panels because no TabbarService corresponding to \`${c}\` was found.`);return}b===!0?A.updateCurrentContainerId(this.findNonDropContainerId(A)):b===!1?A.updateCurrentContainerId(""):A.updateCurrentContainerId(A.currentContainerId.get()?"":this.findNonDropContainerId(A)),A.currentContainerId.get()&&y&&((S=A.resizeHandle)===null||S===void 0||S.setSize(y))}isDropContainer(c){return[f.DROP_BOTTOM_CONTAINER,f.DROP_RIGHT_CONTAINER].includes(c)}findNonDropContainerId(c){const b=c.currentContainerId.get();if(b&&!this.isDropContainer(b))return b;if(c.previousContainerId&&!this.isDropContainer(c.previousContainerId))return c.previousContainerId;for(const y of c.containersMap.keys())if(!this.isDropContainer(y))return y;return""}getTabbarService(c){const b=this.tabbarServices.get(c)||this.injector.get(h.TabbarService,[c]);if(!this.tabbarServices.get(c)){b.addDispose(b.onCurrentChange(({currentId:S})=>{if(this.storeState(b,S),this.eventBus.fire(new l.ExtensionActivateEvent({topic:"onView",data:S})),S&&f.SUPPORT_ACCORDION_LOCATION.has(b.location)){const A=this.getAccordionService(S);A?.tryUpdateResize(),A?.expandedViews.forEach(w=>{this.eventBus.fire(new l.ExtensionActivateEvent({topic:"onView",data:w.id}))})}})),b.viewReady.promise.then(()=>b.restoreState()).then(()=>this.restoreTabbarService(b)).catch(S=>{this.logger.error(`[TabbarService:${c}] restore state error`,S)});const y=(0,r.default)(()=>this.storeState(b,b.currentContainerId.get()),100);if(b.addDispose(b.onSizeChange(y)),c===l.SlotLocation.bottom){const S=(0,r.default)(()=>void this.bottomExpanded,100);b.addDispose(b.onSizeChange(()=>S))}this.tabbarServices.set(c,b)}return b}getAllAccordionService(){return this.accordionServices}getAccordionService(c,b){let y=this.accordionServices.get(c);return y||(y=this.injector.get(a.AccordionService,[c,b]),this.accordionServices.set(c,y)),y}getTabbarHandler(c){let b=this.doGetTabbarHandler(c);if(!b){const y=this.viewToContainerMap.get(c);y?b=this.doGetTabbarHandler(y||""):this.debug.warn(`${c} view tabbar not found.`)}return b}getContainer(c){for(const b of this.tabbarServices.values()){const y=b.getContainer(c);if(y)return y}}getExtraTopMenu(){return this.contextmenuService.createMenu({id:m.MenuId.ActivityBarTopExtra})}getExtraMenu(){return this.contextmenuService.createMenu({id:m.MenuId.ActivityBarExtra})}doGetTabbarHandler(c){let b=this.handleMap.get(c);if(!b){let y;for(const S of this.tabbarServices.values())if(S.getContainer(c)){y=S.location;break}y&&(b=this.injector.get(u.TabBarHandler,[c,this.getTabbarService(y)]),this.handleMap.set(c,b))}return b}collectTabbarComponent(c,b,y,S){if(S&&this.debug.warn("collectTabbarComponent api warning: Please move react component into options.component!"),b.hideIfEmpty&&!c.length&&!b.component){this.holdTabbarComponent.set(b.containerId,{views:c,options:b,side:y}),this.tabbarUpdateSet.has(b.containerId)&&this.tryUpdateTabbar(b.containerId);const w=this.getAccordionService(b.containerId);return w.addDispose(w.onBeforeAppendViewEvent(()=>{this.tryUpdateTabbar(b.containerId)})),w.addDispose(w.onAfterDisposeViewEvent(()=>{w.views.length===0&&(this.disposeContainer(b.containerId),this.holdTabbarComponent.set(b.containerId,{views:c,options:b,side:y}))})),b.containerId}return this.getTabbarService(y).registerContainer(b.containerId,{views:c,options:b}),c.forEach(w=>{this.viewToContainerMap.set(w.id,b.containerId)}),b.containerId}getViewAccordionService(c){const b=this.viewToContainerMap.get(c);if(b)return this.getAccordionService(b)}collectViewComponent(c,b,y={},S){this.customViews.set(c.id,c),this.viewToContainerMap.set(c.id,b);const A=this.getAccordionService(b);return y&&(c.initialProps=y),A.appendView(c,S?.isReplace),A.views.length===1&&(this.tabbarUpdateSet.add(b),this.tryUpdateTabbar(b)),S?.fromExtension&&this.disposableMap.set(c.id,this.commandRegistry.registerCommand({id:`${c.id}.focus`},{execute:async()=>(await this.ensureViewReady(c.id),this.commandService.executeCommand(`workbench.view.extension.${b}`,{forceShow:!0}))})),b}ensureViewReady(c){const b=this.viewToContainerMap.get(c),y=new _.Deferred,S=this.getAccordionService(b);return S.visibleViews.get().find(A=>A.id===c)?y.resolve():S.addDispose(S.onAfterAppendViewEvent(A=>{A===c&&y.resolve()})),y.promise}tryUpdateTabbar(c){const b=this.holdTabbarComponent.get(c);b&&(this.getTabbarService(b.side).registerContainer(c,{views:b.views,options:b.options}),this.tabbarUpdateSet.delete(c),this.holdTabbarComponent.delete(c))}replaceViewComponent(c,b){const y=this.viewToContainerMap.get(c.id);if(!y){this.debug.warn(`The container corresponding to \`${c.id}\` was not found, please check the incoming parameters!`);return}const S=this.customViews.get(c.id);S&&(c=Object.assign(S,c)),this.collectViewComponent(c,y,b,{isReplace:!0})}disposeViewComponent(c){const b=this.disposableMap.get(c);b&&b.dispose();const y=this.viewToContainerMap.get(c);if(!y){this.debug.warn(`The container corresponding to \`${c}\` was not found, please check the incoming parameters!`);return}this.getAccordionService(y).disposeView(c)}revealView(c){const b=this.viewToContainerMap.get(c);if(!b){this.debug.warn(`The container corresponding to \`${c}\` was not found, please check the incoming parameters!`);return}this.getAccordionService(b).revealView(c)}disposeContainer(c){let b;for(const y of this.tabbarServices.values())if(y.getContainer(c)){b=y.location;break}b?this.getTabbarService(b).disposeContainer(c):this.debug.warn(`The Tabbar to the \`${c}\` was not found.`)}expandBottom(c){const b=this.getTabbarService(l.SlotLocation.bottom);b.currentContainerId.get()||b.updateCurrentContainerId(b.currentContainerId.get()||b.previousContainerId||b.containersMap.keys().next().value),b.doExpand(c),this.contextKeyService.createKey("bottomFullExpanded",b.isExpanded)}get bottomExpanded(){const c=this.getTabbarService(l.SlotLocation.bottom);return this.contextKeyService.createKey("bottomFullExpanded",c.isExpanded),c.isExpanded}};t.LayoutService=E,n.__decorate([(0,o.Autowired)(o.INJECTOR_TOKEN),n.__metadata("design:type",o.Injector)],E.prototype,"injector",void 0),n.__decorate([(0,o.Autowired)(f.MainLayoutContribution),n.__metadata("design:type",Object)],E.prototype,"contributions",void 0),n.__decorate([(0,o.Autowired)(m.IMenuRegistry),n.__metadata("design:type",m.IMenuRegistry)],E.prototype,"menus",void 0),n.__decorate([(0,o.Autowired)(l.CommandRegistry),n.__metadata("design:type",Object)],E.prototype,"commandRegistry",void 0),n.__decorate([(0,o.Autowired)(l.CommandService),n.__metadata("design:type",Object)],E.prototype,"commandService",void 0),n.__decorate([(0,o.Autowired)(),n.__metadata("design:type",v.LayoutState)],E.prototype,"layoutState",void 0),n.__decorate([(0,o.Autowired)(l.AppConfig),n.__metadata("design:type",Object)],E.prototype,"appConfig",void 0),n.__decorate([(0,o.Autowired)(l.IContextKeyService),n.__metadata("design:type",Object)],E.prototype,"contextKeyService",void 0),n.__decorate([(0,o.Autowired)(l.ComponentRegistry),n.__metadata("design:type",Object)],E.prototype,"componentRegistry",void 0),n.__decorate([(0,o.Autowired)(l.ILogger),n.__metadata("design:type",Object)],E.prototype,"logger",void 0),n.__decorate([(0,o.Autowired)(m.AbstractMenuService),n.__metadata("design:type",m.AbstractMenuService)],E.prototype,"menuService",void 0),n.__decorate([(0,o.Autowired)(m.AbstractContextMenuService),n.__metadata("design:type",m.AbstractContextMenuService)],E.prototype,"contextmenuService",void 0),n.__decorate([(0,l.OnEvent)(s.ThemeChangedEvent),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[s.ThemeChangedEvent]),n.__metadata("design:returntype",void 0)],E.prototype,"onThemeChange",null),t.LayoutService=E=n.__decorate([(0,o.Injectable)()],E)},53576:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MainLayoutModuleContribution=t.RETRACT_BOTTOM_PANEL=t.EXPAND_BOTTOM_PANEL=t.IS_VISIBLE_RIGHT_PANEL_COMMAND=t.IS_VISIBLE_LEFT_PANEL_COMMAND=t.IS_VISIBLE_BOTTOM_PANEL_COMMAND=t.TOGGLE_BOTTOM_PANEL_COMMAND=t.SHOW_BOTTOM_PANEL_COMMAND=t.WORKBENCH_ACTION_CLOSEPANEL=t.HIDE_BOTTOM_PANEL_COMMAND=t.TOGGLE_RIGHT_PANEL_COMMAND=t.SHOW_RIGHT_PANEL_COMMAND=t.HIDE_RIGHT_PANEL_COMMAND=t.TOGGLE_LEFT_PANEL_COMMAND=t.SHOW_LEFT_PANEL_COMMAND=t.WORKBENCH_ACTION_CLOSESIDECAR=t.HIDE_LEFT_PANEL_COMMAND=void 0;const n=e(85608),r=e(76003),o=e(41869),l=e(30144),p=e(68456),v=e(95416),m=e(93899),_=e(43718),s=e(92323),f=e(17793),a=e(45395),h=e(68988),u=e(19951);t.HIDE_LEFT_PANEL_COMMAND={id:"main-layout.left-panel.hide",label:"%main-layout.left-panel.hide%"},t.WORKBENCH_ACTION_CLOSESIDECAR={id:"workbench.action.closeSidebar",label:"%main-layout.sidebar.hide%"},t.SHOW_LEFT_PANEL_COMMAND={id:"main-layout.left-panel.show",label:"%main-layout.left-panel.show%"},t.TOGGLE_LEFT_PANEL_COMMAND={id:"main-layout.left-panel.toggle",label:"%main-layout.left-panel.toggle%"},t.HIDE_RIGHT_PANEL_COMMAND={id:"main-layout.right-panel.hide",label:"%main-layout.right-panel.hide%"},t.SHOW_RIGHT_PANEL_COMMAND={id:"main-layout.right-panel.show",label:"%main-layout.right-panel.show%"},t.TOGGLE_RIGHT_PANEL_COMMAND={id:"main-layout.right-panel.toggle",label:"%main-layout.right-panel.toggle%"},t.HIDE_BOTTOM_PANEL_COMMAND={id:"main-layout.bottom-panel.hide",label:"%main-layout.bottom-panel.hide%"},t.WORKBENCH_ACTION_CLOSEPANEL={id:"workbench.action.closePanel",delegate:t.HIDE_BOTTOM_PANEL_COMMAND.id},t.SHOW_BOTTOM_PANEL_COMMAND={id:"main-layout.bottom-panel.show",label:"%main-layout.bottom-panel.show%"},t.TOGGLE_BOTTOM_PANEL_COMMAND={id:"main-layout.bottom-panel.toggle",iconClass:(0,o.getIcon)("minus"),label:"%layout.tabbar.toggle%"},t.IS_VISIBLE_BOTTOM_PANEL_COMMAND={id:"main-layout.bottom-panel.is-visible"},t.IS_VISIBLE_LEFT_PANEL_COMMAND={id:"main-layout.left-panel.is-visible"},t.IS_VISIBLE_RIGHT_PANEL_COMMAND={id:"main-layout.right-panel.is-visible"},t.EXPAND_BOTTOM_PANEL={id:"main-layout.bottom-panel.expand",label:"%layout.tabbar.expand%",iconClass:(0,o.getIcon)("expand")},t.RETRACT_BOTTOM_PANEL={id:"main-layout.bottom-panel.retract",label:"%layout.tabbar.retract%",iconClass:(0,o.getIcon)("shrink")};let d=class extends _.WithEventBus{async initialize(){await this.layoutState.initStorage();const g=this.contributionProvider.getContributions();for(const y of g)y.registerComponent&&y.registerComponent(this.componentRegistry);const c=this.rendererContributionProvider.getContributions();for(const y of c)y.registerRenderer&&y.registerRenderer(o.slotRendererRegistry);const b=this.toolBarContributionProvider.getContributions();for(const y of b)y.registerToolbarItems&&y.registerToolbarItems(this.toolBarRegistry)}registerComponent(g){g.register(f.DROP_RIGHT_CONTAINER,[],{component:a.RightDropArea,hideTab:!0,containerId:f.DROP_RIGHT_CONTAINER}),g.register(f.DROP_BOTTOM_CONTAINER,[],{component:a.BottomDropArea,hideTab:!0,containerId:f.DROP_BOTTOM_CONTAINER})}async onStart(){this.registerSideToggleKey()}async onDidStart(){this.mainLayoutService.didMount()}registerRenderer(g){g.registerSlotRenderer(o.SlotLocation.right,u.RightTabRenderer),g.registerSlotRenderer(o.SlotLocation.left,u.LeftTabRenderer),g.registerSlotRenderer(o.SlotLocation.bottom,u.BottomTabRenderer)}registerCommands(g){g.registerCommand(t.HIDE_LEFT_PANEL_COMMAND,{execute:()=>{this.mainLayoutService.toggleSlot(o.SlotLocation.left,!1)}}),g.registerCommand(t.SHOW_LEFT_PANEL_COMMAND,{execute:c=>{this.mainLayoutService.toggleSlot(o.SlotLocation.left,!0,c)}}),g.registerCommand(t.TOGGLE_LEFT_PANEL_COMMAND,{execute:(c,b)=>{this.mainLayoutService.toggleSlot(o.SlotLocation.left,c,b)}}),g.registerCommand(t.HIDE_RIGHT_PANEL_COMMAND,{execute:()=>{this.mainLayoutService.toggleSlot(o.SlotLocation.right,!1)}}),g.registerCommand(t.SHOW_RIGHT_PANEL_COMMAND,{execute:c=>{this.mainLayoutService.toggleSlot(o.SlotLocation.right,!0,c)}}),g.registerCommand(t.TOGGLE_RIGHT_PANEL_COMMAND,{execute:(c,b)=>{this.mainLayoutService.toggleSlot(o.SlotLocation.right,c,b)}}),g.registerCommand(t.WORKBENCH_ACTION_CLOSESIDECAR,{execute:()=>Promise.all([this.mainLayoutService.toggleSlot(o.SlotLocation.left,!1),this.mainLayoutService.toggleSlot(o.SlotLocation.right,!1)])}),g.registerCommand(t.SHOW_BOTTOM_PANEL_COMMAND,{execute:()=>{this.mainLayoutService.toggleSlot(o.SlotLocation.bottom,!0)}}),g.registerCommand(t.HIDE_BOTTOM_PANEL_COMMAND,{execute:()=>{this.mainLayoutService.toggleSlot(o.SlotLocation.bottom,!1)}}),g.registerCommand(t.WORKBENCH_ACTION_CLOSEPANEL),g.registerCommand(t.IS_VISIBLE_BOTTOM_PANEL_COMMAND,{execute:()=>this.mainLayoutService.getTabbarService("bottom").currentContainerId.get()!==""}),g.registerCommand(t.IS_VISIBLE_LEFT_PANEL_COMMAND,{execute:()=>this.mainLayoutService.isVisible(o.SlotLocation.left)}),g.registerCommand(t.IS_VISIBLE_RIGHT_PANEL_COMMAND,{execute:()=>this.mainLayoutService.isVisible(o.SlotLocation.left)}),g.registerCommand({id:"view.outward.right-panel.hide"},{execute:()=>{this.commandService.executeCommand("main-layout.right-panel.toggle",!1)}}),g.registerCommand({id:"view.outward.right-panel.show"},{execute:c=>{this.commandService.executeCommand("main-layout.right-panel.toggle",!0,c)}}),g.registerCommand({id:"view.outward.left-panel.hide"},{execute:()=>{this.commandService.executeCommand("main-layout.left-panel.toggle",!1)}}),g.registerCommand({id:"view.outward.left-panel.show"},{execute:c=>{this.commandService.executeCommand("main-layout.left-panel.toggle",!0,c)}}),g.registerCommand({id:o.LAYOUT_COMMANDS.MAXIMIZE_EDITOR.id},{execute:()=>{this.commandService.executeCommand(t.TOGGLE_RIGHT_PANEL_COMMAND.id,!1),this.commandService.executeCommand(t.TOGGLE_LEFT_PANEL_COMMAND.id,!1)}}),g.registerCommand(o.LAYOUT_COMMANDS.OPEN_VIEW,{execute:()=>{this.commandService.executeCommand(o.QUICK_OPEN_COMMANDS.OPEN_VIEW.id)}})}registerMenus(g){g.registerMenuItem(m.MenuId.ActivityBarExtra,{submenu:m.MenuId.SettingsIconMenu,iconClass:(0,o.getIcon)("setting"),label:(0,_.localize)("layout.tabbar.setting"),order:1,group:"navigation"}),Object.entries({[o.SlotLocation.left]:[l.EXPLORER_CONTAINER_ID,l.SEARCH_CONTAINER_ID,l.SCM_CONTAINER_ID,l.DEBUG_CONTAINER_ID,l.EXTENSION_CONTAINER_ID],[o.SlotLocation.bottom]:[l.MARKER_CONTAINER_ID,l.OUTPUT_CONTAINER_ID,l.DEBUG_CONSOLE_CONTAINER_ID,l.TERMINAL_CONTAINER_ID]}).forEach(([c,b],y)=>{const S=this.mainLayoutService.getTabbarService(c);S.viewReady.promise.then(()=>{b.forEach(A=>{var w,T;const D=S.getContainer(A);D&&g.registerMenuItem(m.MenuId.MenubarViewMenu,{command:{id:`container.toggle.${A}`,label:(T=(w=D.options)===null||w===void 0?void 0:w.title)!==null&&T!==void 0?T:A},group:`${3+y}_${c}`})})})}),g.registerMenuItem(m.MenuId.MenubarViewMenu,{command:t.TOGGLE_LEFT_PANEL_COMMAND,group:"5_panel"}),g.registerMenuItem(m.MenuId.MenubarViewMenu,{command:t.TOGGLE_RIGHT_PANEL_COMMAND,group:"5_panel"}),g.registerMenuItem(m.MenuId.MenubarViewMenu,{command:t.TOGGLE_BOTTOM_PANEL_COMMAND,group:"5_panel"}),g.registerMenuItem(m.MenuId.MenubarViewMenu,{command:t.EXPAND_BOTTOM_PANEL,group:"5_panel",when:"!bottomFullExpanded"}),g.registerMenuItem(m.MenuId.MenubarViewMenu,{command:t.RETRACT_BOTTOM_PANEL,group:"5_panel",when:"bottomFullExpanded"}),g.registerMenuItem(m.MenuId.MenubarViewMenu,{command:{id:o.EDITOR_COMMANDS.TOGGLE_WORD_WRAP.id,label:"%preference.editor.wordWrap%"},group:"6_capability",toggledWhen:"config.editor.wordWrap == on"})}registerSideToggleKey(){this.keybindingRegistry.registerKeybinding({keybinding:"ctrlcmd+b",command:t.TOGGLE_LEFT_PANEL_COMMAND.id}),this.keybindingRegistry.registerKeybinding({keybinding:"ctrlcmd+j",command:t.TOGGLE_BOTTOM_PANEL_COMMAND.id}),this.keybindingRegistry.registerKeybinding({keybinding:"ctrlcmd+shift+j",command:t.EXPAND_BOTTOM_PANEL.id,when:"!bottomFullExpanded"}),this.keybindingRegistry.registerKeybinding({keybinding:"ctrlcmd+shift+j",command:t.RETRACT_BOTTOM_PANEL.id,when:"bottomFullExpanded"})}registerQuickOpenHandlers(g){g.registerHandler(this.quickOpenViewHandler,{title:(0,_.localize)("layout.action.openView"),commandId:o.LAYOUT_COMMANDS.QUICK_OPEN_VIEW.id,order:5,hideTab:!0})}};t.MainLayoutModuleContribution=d,n.__decorate([(0,r.Autowired)(f.IMainLayoutService),n.__metadata("design:type",Object)],d.prototype,"mainLayoutService",void 0),n.__decorate([(0,r.Autowired)(o.IContextKeyService),n.__metadata("design:type",Object)],d.prototype,"contextKeyService",void 0),n.__decorate([(0,r.Autowired)(_.IEventBus),n.__metadata("design:type",Object)],d.prototype,"eventBus",void 0),n.__decorate([(0,r.Autowired)(p.ComponentContribution),n.__metadata("design:type",Object)],d.prototype,"contributionProvider",void 0),n.__decorate([(0,r.Autowired)(o.SlotRendererContribution),n.__metadata("design:type",Object)],d.prototype,"rendererContributionProvider",void 0),n.__decorate([(0,r.Autowired)(p.ComponentRegistry),n.__metadata("design:type",Object)],d.prototype,"componentRegistry",void 0),n.__decorate([(0,r.Autowired)(s.CommandService),n.__metadata("design:type",Object)],d.prototype,"commandService",void 0),n.__decorate([(0,r.Autowired)(),n.__metadata("design:type",v.LayoutState)],d.prototype,"layoutState",void 0),n.__decorate([(0,r.Autowired)(p.TabBarToolbarContribution),n.__metadata("design:type",Object)],d.prototype,"toolBarContributionProvider",void 0),n.__decorate([(0,r.Autowired)(),n.__metadata("design:type",p.ToolbarRegistry)],d.prototype,"toolBarRegistry",void 0),n.__decorate([(0,r.Autowired)(o.KeybindingRegistry),n.__metadata("design:type",Object)],d.prototype,"keybindingRegistry",void 0),n.__decorate([(0,r.Autowired)(h.ViewQuickOpenHandler),n.__metadata("design:type",h.ViewQuickOpenHandler)],d.prototype,"quickOpenViewHandler",void 0),t.MainLayoutModuleContribution=d=n.__decorate([(0,_.Domain)(s.CommandContribution,o.ClientAppContribution,o.SlotRendererContribution,m.MenuContribution,o.QuickOpenContribution,p.ComponentContribution)],d)},68988:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ViewQuickOpenItem=t.ContainerQuickOpenItem=t.ViewQuickOpenHandler=void 0;const n=e(85608),r=e(76003),o=e(41869),l=e(74404),p=e(17793);let v=class{constructor(){this.prefix="view ",this.description=(0,o.localize)("layout.action.openView")}getModel(){return{onType:(f,a)=>a(this.getViewQuickOpenItems())}}getViewQuickOpenItems(){var f;const a=this.layoutService.getAllAccordionService(),h=Array.from(a.keys());let u=[];u=u.concat(h.map((d,E)=>this.injector.get(m,[d,{groupLabel:E===0?(0,o.localize)("layout.openView.containerTitle"):"",showBorder:!1}])));for(const d of h){const E=(f=a.get(d))===null||f===void 0?void 0:f.views;if(E)for(let g=0,c=E.length;g<c;g++)u.push(this.injector.get(_,[d,E[g],{groupLabel:g===0?(0,o.formatLocalize)("layout.openView.viewTitle",String(d).toUpperCase()):"",showBorder:!1}]))}return u}getOptions(){return{}}onClose(){}};t.ViewQuickOpenHandler=v,n.__decorate([(0,r.Autowired)(l.PrefixQuickOpenService),n.__metadata("design:type",Object)],v.prototype,"quickOpenService",void 0),n.__decorate([(0,r.Autowired)(p.IMainLayoutService),n.__metadata("design:type",Object)],v.prototype,"layoutService",void 0),n.__decorate([(0,r.Autowired)(r.INJECTOR_TOKEN),n.__metadata("design:type",r.Injector)],v.prototype,"injector",void 0),t.ViewQuickOpenHandler=v=n.__decorate([(0,r.Injectable)()],v);let m=class extends l.QuickOpenItem{constructor(f,a){super(a),this.containerId=f,this.options=a}getLabel(){return String(this.containerId).toLocaleUpperCase()}isHidden(){return super.isHidden()}run(f){if(f!==l.Mode.OPEN)return!1;const a=this.layoutService.getTabbarHandler(this.containerId);return a?.activate(),!0}};t.ContainerQuickOpenItem=m,n.__decorate([(0,r.Autowired)(p.IMainLayoutService),n.__metadata("design:type",Object)],m.prototype,"layoutService",void 0),t.ContainerQuickOpenItem=m=n.__decorate([(0,r.Injectable)({multiple:!0}),n.__metadata("design:paramtypes",[Object,Object])],m);let _=class extends l.QuickOpenItem{constructor(f,a,h){super(h),this.containerId=f,this.view=a,this.options=h}getLabel(){var f;return(f=this.view.name)===null||f===void 0?void 0:f.toUpperCase()}isHidden(){return super.isHidden()}run(f){if(f!==l.Mode.OPEN)return!1;const a=this.layoutService.getTabbarHandler(this.containerId);return a&&(a.activate(),a.isCollapsed(this.view.id)&&a?.setCollapsed(this.view.id,!1)),!0}};t.ViewQuickOpenItem=_,n.__decorate([(0,r.Autowired)(p.IMainLayoutService),n.__metadata("design:type",Object)],_.prototype,"layoutService",void 0),t.ViewQuickOpenItem=_=n.__decorate([(0,r.Injectable)({multiple:!0}),n.__metadata("design:paramtypes",[String,Object,Object])],_)},58999:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TabBarHandler=void 0;const n=e(85608),r=e(76003),o=e(43718),l=e(17793),p=e(752);let v=class{constructor(_,s){this.containerId=_,this.tabbarService=s,this.onActivateEmitter=new o.Emitter,this.onActivate=this.onActivateEmitter.event,this.onInActivateEmitter=new o.Emitter,this.onInActivate=this.onInActivateEmitter.event,this.onCollapseEmitter=new o.Emitter,this.onCollapse=this.onCollapseEmitter.event,this.isVisible=!1,this.accordionService=this.layoutService.getAccordionService(this.containerId),s.currentContainerId.get()===this.containerId&&(this.onActivateEmitter.fire(),this.isVisible=!0),this.tabbarService.onCurrentChange(f=>{f.currentId===this.containerId?(this.onActivateEmitter.fire(),this.isVisible=!0):f.previousId===this.containerId&&(this.onInActivateEmitter.fire(),this.isVisible=!1)})}dispose(){this.tabbarService.containersMap.delete(this.containerId),this.tabbarService.disposeContainer(this.containerId)}disposeView(_){this.layoutService.disposeViewComponent(_)}activate(){this.tabbarService.updateCurrentContainerId(this.containerId)}deactivate(){this.tabbarService.updateCurrentContainerId("")}isActivated(){return this.tabbarService.currentContainerId.get()===this.containerId}show(){this.tabbarService.showContainer(this.containerId)}hide(){this.tabbarService.hideContainer(this.containerId)}setTitleComponent(_,s){const f=this.tabbarService.getContainer(this.containerId);f&&f.options&&(f.options.titleProps=s,f.options.titleComponent=_,f.fireChange(f))}setSize(_){this.layoutService.toggleSlot(this.tabbarService.location,!0,_+this.tabbarService.getBarSize())}setBadge(_){this.tabbarService.updateBadge(this.containerId,_)}getBadge(){return this.tabbarService.getContainer(this.containerId).options.badge}setIconClass(_){this.tabbarService.getContainer(this.containerId).options.iconClass=_}isCollapsed(_){return this.accordionService.getViewState(_).collapsed}setCollapsed(_,s){this.accordionService.toggleOpen(_,s)}toggleViews(_,s){for(const f of _){const a=this.accordionService.getViewState(f);this.accordionService.updateViewState(f,{...a,hidden:!s})}}updateViewTitle(_,s){this.accordionService.updateViewTitle(_,s)}updateViewDescription(_,s){this.accordionService.updateViewDesciption(_,s)}updateViewMessage(_,s){this.accordionService.updateViewMessage(_,s)}updateTitle(_){this.tabbarService.updateTitle(this.containerId,_)}setResizeLock(_){this.tabbarService.resizeHandle.lockSize(_)}};t.TabBarHandler=v,n.__decorate([(0,r.Autowired)(l.IMainLayoutService),n.__metadata("design:type",Object)],v.prototype,"layoutService",void 0),t.TabBarHandler=v=n.__decorate([(0,r.Injectable)({multiple:!0}),n.__metadata("design:paramtypes",[String,p.TabbarService])],v)},46245:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ChatTabbarRenderer2=t.BottomTabbarRenderer=t.LeftTabbarRenderer=t.RightTabbarRenderer=t.TextElipses=t.IconElipses=t.TextTabView=t.IconTabView=t.TabbarViewBase=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importStar(e(14041)),l=e(97267),p=e(41869),v=e(25918),m=e(25719),_=e(63373),s=e(68969),f=e(17793),a=e(19951),h=n.__importDefault(e(5330)),u=e(752);function d(I,R){return R>=I.length?[I,[]]:R<=1?[[],I]:[I.slice(0,R-1),I.slice(R-1)]}function E(I){return typeof I=="string"?parseInt(I,10)>99?"99+":I:typeof I=="object"&&I.value?I.value>99?"99+":I.value:""}const g=I=>{var R;const{TabView:M,MoreTabView:O,forbidCollapse:P,barSize:k=48,panelBorderSize:F=0,tabClassName:L,className:B,margin:j,tabSize:W,canHideTabbar:U,renderOtherVisibleContainers:X=()=>null,disableAutoAdjust:V}=I,{side:$,direction:Y,fullSize:z}=o.default.useContext(a.TabbarConfig),H=(0,p.useInjectable)(u.TabbarServiceFactory)($),K=(0,p.useDesignStyles)(h.default.tab_bar,"tab_bar"),Z=(0,p.useDesignStyles)(h.default.bar_content,"bar_content");o.default.useEffect(()=>{H.updateBarSize(k+F)},[]);const Q=(0,p.useAutorun)(H.currentContainerId),oe=(0,p.usePreference)("workbench.hideSlotTabBarWhenHidePanel",!1),ne=U&&oe;ne&&!Q&&((R=H.resizeHandle)===null||R===void 0||R.setSize(0));const he=V?Number.MAX_SAFE_INTEGER:Math.floor(z-(j||0)/W),[_e,q]=d(H.visibleContainers.filter(ye=>{var ie;return!(!((ie=ye.options)===null||ie===void 0)&&ie.hideTab)}),he);q.forEach(ye=>{H.updateTabInMoreKey(ye.options.containerId,!0)});const Oe=o.default.useCallback((ye,ie,fe,Me)=>{var Le,Ce,Ae;const ve=(Le=ye.options)===null||Le===void 0?void 0:Le.containerId;if(!ve||Me&&(!((Ae=(Ce=ye.options)===null||Ce===void 0?void 0:Ce.hideLocationTab)===null||Ae===void 0)&&Ae.includes(Me)))return null;ie.updateTabInMoreKey(ve,!1);let ge;return o.default.createElement("li",{draggable:!0,onDragStart:xe=>{if(ge){const Ie=ge.cloneNode(!0);Ie.classList.add(h.default.dragging),L&&(0,p.addClassName)(Ie,L),document.body.appendChild(Ie),xe.persist(),requestAnimationFrame(()=>{xe.dataTransfer.setDragImage(Ie,0,0),document.body.removeChild(Ie)})}ie.handleDragStart(xe,ve)},onDragOver:xe=>{xe.preventDefault(),ge&&ge.classList.add("on-drag-over")},onDragLeave:()=>{ge&&ge.classList.remove("on-drag-over")},onDrop:xe=>{ge&&ge.classList.remove("on-drag-over"),ie.handleDrop(xe,ve)},onDragEnd:xe=>{ie.handleDragEnd(xe)},key:ve,id:ve,onContextMenu:xe=>ie.handleContextMenu(xe,ve),onClick:xe=>ie.handleTabClick(xe,ne||P),ref:xe=>ge=xe,className:(0,r.default)({active:fe===ve},L)},o.default.createElement(M,{component:ye}))},[]);return o.default.createElement("div",{className:(0,r.default)([K,B])},o.default.createElement("div",{className:Z,style:{flexDirection:m.Layout.getTabbarDirection(Y)}},_e.map(ye=>Oe(ye,H,Q,$)),X({props:I,renderContainers:Oe}),q.length?o.default.createElement("li",{key:"tab-more",onClick:ye=>{var ie;return H.showMoreMenu(ye,_e[_e.length-1]&&((ie=_e[_e.length-1].options)===null||ie===void 0?void 0:ie.containerId))},className:L},o.default.createElement(O,null)):null))};t.TabbarViewBase=g;const c=({component:I})=>{var R,M,O;const P=(0,p.useInjectable)(s.IProgressService),k=(0,p.useInjectable)(p.KeybindingRegistry),F=(0,p.useDesignStyles)(h.default.icon_tab,"icon_tab"),[L,B]=o.default.useState(I),j=P.getIndicator(((R=L.options)===null||R===void 0?void 0:R.containerId)||""),W=(0,p.useAutorun)(j.progressModel.show),U=o.default.useMemo(()=>{const X=L.options;return X?.activateKeyBinding?`${X?.title} (${k.acceleratorForKeyString(X.activateKeyBinding,"+")})`:X?.title},[L]);return(0,o.useEffect)(()=>{const X=L.onChange(V=>{B({...V})});return()=>{X.dispose()}},[L]),o.default.createElement("div",{className:F},o.default.createElement("div",{className:(0,r.default)((M=L.options)===null||M===void 0?void 0:M.iconClass,"activity-icon"),title:U}),W?o.default.createElement(l.Badge,{className:h.default.tab_badge},o.default.createElement("span",{className:h.default.icon_wrapper},o.default.createElement(l.Icon,{icon:"time-circle"}))):((O=L.options)===null||O===void 0?void 0:O.badge)&&o.default.createElement(l.Badge,{className:h.default.tab_badge},E(L.options.badge)))};t.IconTabView=c;const b=({component:I})=>{var R,M,O;const[P,k]=o.default.useState(I);return(0,o.useEffect)(()=>{const F=P.onChange(L=>{k({...L})});return()=>{F.dispose()}},[P]),o.default.createElement("div",{className:h.default.text_tab},o.default.createElement("div",{className:h.default.bottom_tab_title},(M=(R=P.options)===null||R===void 0?void 0:R.title)===null||M===void 0?void 0:M.toUpperCase()),((O=P.options)===null||O===void 0?void 0:O.badge)&&o.default.createElement(l.Badge,{className:h.default.tab_badge},E(P.options.badge)))};t.TextTabView=b;const y=()=>{const I=(0,p.useDesignStyles)(h.default.icon_tab,"icon_tab");return o.default.createElement("div",{className:I},o.default.createElement("div",{className:(0,r.default)((0,p.getIcon)("ellipsis"),"activity-icon"),title:"extra tabs"}))};t.IconElipses=y;const S=()=>o.default.createElement("div",{className:h.default.text_tab},o.default.createElement("div",{className:h.default.bottom_tab_title},o.default.createElement("i",{className:(0,p.getIcon)("doubleright")})));t.TextElipses=S;const A=I=>{const{barSize:R=48,style:M}=I,{side:O}=o.default.useContext(a.TabbarConfig),P=(0,p.useInjectable)(u.TabbarServiceFactory)(O),k=(0,p.useDesignStyles)(h.default.right_tab_bar,"right_tab_bar"),F=(0,p.useDesignStyles)(h.default.right_tab,"right_tab");return o.default.createElement("div",{id:_.VIEW_CONTAINERS.RIGHT_TABBAR,className:k,style:M,onContextMenu:P.handleContextMenu},o.default.createElement(t.TabbarViewBase,{tabSize:48,MoreTabView:t.IconElipses,tabClassName:F,TabView:t.IconTabView,barSize:R,panelBorderSize:1}))};t.RightTabbarRenderer=A;const w=({renderOtherVisibleContainers:I,isRenderExtraTopMenus:R=!0,renderExtraMenus:M,tabbarViewProps:O})=>{const{side:P}=o.default.useContext(a.TabbarConfig),k=(0,p.useInjectable)(f.IMainLayoutService),F=(0,p.useInjectable)(u.TabbarServiceFactory)(P),L=o.default.useMemo(()=>k.getExtraTopMenu(),[k]),B=o.default.useMemo(()=>k.getExtraMenu(),[k]),j=(0,p.useDesignStyles)(h.default.left_tab_bar,"left_tab_bar"),W=(0,p.useDesignStyles)(h.default.left_tab,"left_tab");return o.default.createElement("div",{id:_.VIEW_CONTAINERS.LEFT_TABBAR,className:j,onContextMenu:F.handleContextMenu},R&&o.default.createElement(v.InlineMenuBar,{className:(0,r.default)(h.default.vertical_icons,h.default.extra_top_menus),menus:L}),o.default.createElement(t.TabbarViewBase,{tabSize:48,MoreTabView:t.IconElipses,className:h.default.left_tab_content,tabClassName:W,TabView:t.IconTabView,barSize:48,margin:90,panelBorderSize:1,renderOtherVisibleContainers:I,...O}),M||o.default.createElement(v.InlineMenuBar,{className:h.default.vertical_icons,menus:B}))};t.LeftTabbarRenderer=w;const T=()=>{const{side:I}=o.default.useContext(a.TabbarConfig),R=(0,p.useInjectable)(u.TabbarServiceFactory)(I),M=(0,p.useDesignStyles)(h.default.bottom_bar_container,"bottom_bar_container"),O=(0,p.useDesignStyles)(h.default.bottom_tab,"bottom_tab");return o.default.createElement("div",{id:_.VIEW_CONTAINERS.BOTTOM_TABBAR,onContextMenu:R.handleContextMenu,className:(0,r.default)(M,"next_bottom_bar")},o.default.createElement(t.TabbarViewBase,{tabSize:80,MoreTabView:t.TextElipses,tabClassName:O,TabView:t.TextTabView,barSize:24,panelBorderSize:1,canHideTabbar:!0}))};t.BottomTabbarRenderer=T;const D=I=>{const{barSize:R=32,style:M}=I,{side:O}=o.default.useContext(a.TabbarConfig),P=(0,p.useInjectable)(u.TabbarServiceFactory)(O);(0,o.useEffect)(()=>{P.setIsLatter(!0)},[P]);const k=(0,p.useDesignStyles)(h.default.ai_right_tab_bar,"ai_right_tab_bar"),F=(0,p.useDesignStyles)(h.default.ai_right_tab,"ai_right_tab");return o.default.createElement("div",{id:O,className:k,style:M,onContextMenu:P.handleContextMenu},o.default.createElement(t.TabbarViewBase,{tabSize:32,MoreTabView:t.IconElipses,tabClassName:F,TabView:t.IconTabView,barSize:R,panelBorderSize:1}))};t.ChatTabbarRenderer2=D},66368:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BottomTabPanelRenderer=t.LeftTabPanelRenderer=t.RightTabPanelRenderer=t.ContainerView=t.BaseTabPanelView=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importStar(e(14041)),l=e(76003),p=e(41869),v=e(25918),m=e(1149),_=e(68969),s=e(68974),f=e(9522),a=e(70936),h=e(91527),u=e(19951),d=n.__importDefault(e(5330)),E=e(752),g=o.default.memo(({children:I})=>I,(I,R)=>!(I.visible||R.visible)),c={display:"block"},b={display:"none"},y=I=>{const{PanelView:R,panelSize:M,id:O,PanelViewProps:P}=I,{side:k}=o.default.useContext(u.TabbarConfig),F=(0,p.useInjectable)(p.AppConfig),L=F.panelSizes&&F.panelSizes[k],B=(0,p.useInjectable)(E.TabbarServiceFactory)(k),j=(0,p.useAutorun)(B.currentContainerId),W=(0,p.useDesignStyles)(d.default.tab_panel,"tab_panel"),U=(0,p.useDesignStyles)(d.default.tab_panel_hidden,"tab_panel_hidden");return o.default.useEffect(()=>{B.updatePanelSize(L||M||335)},[]),o.default.createElement("div",{id:O,className:(0,r.default)("kt-tab-panel",W,{[U]:!j})},B.visibleContainers.map(X=>{var V;const $=(V=X.options)===null||V===void 0?void 0:V.containerId;if(!$)return null;const Y=B.getTitleToolbarMenu($);return o.default.createElement("div",{key:$,className:(0,r.default)(d.default.panel_wrap,$),"data-viewlet-id":$,style:j===$?c:b,id:O},o.default.createElement(p.ErrorBoundary,null,o.default.createElement(g,{visible:j===$},o.default.createElement(R,{titleMenu:Y,side:k,component:X,...P}))))}))};t.BaseTabPanelView=y;const S=({component:I,titleMenu:R,side:M,renderContainerWrap:O,className:P,customTitleBar:k})=>{var F,L;const B=o.default.useRef(),j=o.default.useRef(null),W=(0,p.useInjectable)(p.AppConfig),{title:U,titleComponent:X,component:V,containerId:$,draggable:Y}=I.options||{},z=(0,p.useInjectable)(l.INJECTOR_TOKEN),H=(0,p.useInjectable)(m.LayoutViewSizeConfig),K=(0,o.useCallback)(he=>{z.get(f.AccordionServiceFactory)($).handleContextMenu(he)},[$]);if(!$)return null;const Q=(0,p.useInjectable)(_.IProgressService).getIndicator($);if(!Q)return null;const oe=(0,p.useViewState)(M,j),ne=o.default.useCallback(he=>O?O({children:he}):he,[O]);return o.default.createElement("div",{ref:j,className:(0,r.default)(d.default.view_container,P)},!!k&&k,!V&&o.default.createElement("div",{onContextMenu:K,className:d.default.panel_titlebar},U?o.default.createElement(h.TitleBar,{containerId:$,side:M,title:U,draggable:Y,height:H.panelTitleBarHeight,menubar:o.default.createElement(v.InlineActionBar,{menus:R})}):null,X&&o.default.createElement("div",{className:d.default.panel_component},o.default.createElement(p.ConfigProvider,{value:W},o.default.createElement(p.ComponentRenderer,{Component:X,initialProps:(F=I.options)===null||F===void 0?void 0:F.titleProps})))),o.default.createElement("div",{className:d.default.container_wrap,ref:he=>B.current=he},o.default.createElement(s.ProgressBar,{progressModel:Q.progressModel}),ne(V?o.default.createElement(p.ConfigProvider,{value:W},o.default.createElement(p.ComponentRenderer,{initialProps:{viewState:oe,...(L=I.options)===null||L===void 0?void 0:L.initialProps},Component:V})):o.default.createElement(a.AccordionContainer,{views:I.views,minSize:I.options.miniSize,containerId:I.options.containerId}))))};t.ContainerView=S;const A=({component:I,titleMenu:R,side:M})=>{var O,P,k,F;const L=o.default.useRef(),B=o.default.useRef(null),j=(0,p.useInjectable)(p.AppConfig),W=(0,p.useInjectable)(E.TabbarServiceFactory)(M),U=(0,p.useDesignStyles)(d.default.panel_title_bar,"panel_title_bar"),X=(0,p.useDesignStyles)(d.default.panel_toolbar_container,"panel_toolbar_container"),V=(0,p.useViewState)(M,B),$=(0,p.useInjectable)(m.LayoutViewSizeConfig),Y=(0,p.useInjectable)(_.IProgressService),{component:z,containerId:H}=I.options||{},K=I.options&&I.options.titleComponent;if(!H)return null;const Z=Y.getIndicator(H);return Z?o.default.createElement("div",{ref:B,className:d.default.panel_container},o.default.createElement("div",{className:U,style:{height:$.panelTitleBarHeight}},o.default.createElement("h1",null,(P=(O=I.options)===null||O===void 0?void 0:O.title)===null||P===void 0?void 0:P.toUpperCase()),o.default.createElement("div",{className:d.default.title_component_container},K&&o.default.createElement(p.ComponentRenderer,{Component:K,initialProps:(k=I.options)===null||k===void 0?void 0:k.titleProps})),o.default.createElement("div",{className:X},R&&o.default.createElement(v.InlineActionBar,{menus:R}),o.default.createElement(v.InlineMenuBar,{menus:W.commonTitleMenu,moreAtFirst:!0}))),o.default.createElement("div",{className:d.default.container_wrap,ref:Q=>L.current=Q},o.default.createElement(s.ProgressBar,{progressModel:Z.progressModel}),z?o.default.createElement(p.ConfigProvider,{value:j},o.default.createElement(p.ComponentRenderer,{initialProps:{viewState:V,...(F=I.options)===null||F===void 0?void 0:F.initialProps},Component:z})):o.default.createElement(a.AccordionContainer,{views:I.views,alignment:"horizontal",minSize:I.options.miniSize,containerId:I.options.containerId}))):null},w=()=>o.default.createElement(t.BaseTabPanelView,{PanelView:t.ContainerView});t.RightTabPanelRenderer=w;const T=()=>o.default.createElement(t.BaseTabPanelView,{PanelView:t.ContainerView});t.LeftTabPanelRenderer=T;const D=()=>o.default.createElement(t.BaseTabPanelView,{PanelView:A,panelSize:280});t.BottomTabPanelRenderer=D},19951:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BottomTabRenderer=t.LeftTabRenderer=t.RightTabRenderer=t.TabRendererBase=t.TabbarConfig=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importStar(e(14041)),l=e(41869),p=e(81878),v=e(25719),m=e(63373),_=e(46245),s=e(66368),f=n.__importDefault(e(5330)),a=e(752);t.TabbarConfig=(0,o.createContext)({side:l.SlotLocation.left,direction:"left-to-right",fullSize:0}),t.TabRendererBase=(0,o.memo)(({id:E,className:g,components:c,direction:b="left-to-right",TabbarView:y,side:S,TabpanelView:A})=>{const w=(0,l.useInjectable)(a.TabbarServiceFactory)(S),T=(0,l.useInjectable)(l.IEventBus),D=(0,o.useContext)(p.PanelContext),I=(0,o.useRef)(null),[R,M]=(0,o.useState)(0);(0,o.useLayoutEffect)(()=>{w.registerResizeHandle(D),c.forEach(P=>{w.registerContainer(P.options.containerId,P)}),w.updatePanelVisibility(),w.ensureViewReady()},[c]);const O=(0,o.useCallback)(()=>{I.current&&M(I.current[v.Layout.getDomSizeProperty(b)])},[]);return(0,o.useEffect)(()=>{l.fastdom.measure(()=>{O()});let P;T.onDirective(l.ResizeEvent.createDirective(S),()=>{P&&P.dispose(),P=l.fastdom.measureAtNextFrame(()=>{O()})})},[]),o.default.createElement("div",{ref:I,id:E,className:(0,r.default)(f.default.tab_container,g),style:{flexDirection:v.Layout.getFlexDirection(b)}},o.default.createElement(t.TabbarConfig.Provider,{value:{side:S,direction:b,fullSize:R}},o.default.createElement(y,null),o.default.createElement(A,null)))});const h=({className:E,components:g,tabbarView:c,tabpanelView:b})=>o.default.createElement(t.TabRendererBase,{side:l.SlotLocation.right,direction:"right-to-left",id:m.VIEW_CONTAINERS.RIGHT_TABBAR_PANEL,className:(0,r.default)(E,"right-slot"),components:g,TabbarView:c??_.RightTabbarRenderer,TabpanelView:b??s.RightTabPanelRenderer});t.RightTabRenderer=h;const u=({className:E,components:g,tabbarView:c})=>o.default.createElement(t.TabRendererBase,{side:l.SlotLocation.left,direction:"left-to-right",id:m.VIEW_CONTAINERS.LEFT_TABBAR_PANEL,className:(0,r.default)(E,"left-slot"),components:g,TabbarView:c??_.LeftTabbarRenderer,TabpanelView:s.LeftTabPanelRenderer});t.LeftTabRenderer=u;const d=({className:E,components:g,tabbarView:c})=>o.default.createElement(t.TabRendererBase,{side:l.SlotLocation.bottom,id:m.VIEW_CONTAINERS.BOTTOM_TABBAR_PANEL,direction:"bottom-to-top",className:(0,r.default)(E,"bottom-slot"),components:g,TabbarView:c??_.BottomTabbarRenderer,TabpanelView:s.BottomTabPanelRenderer});t.BottomTabRenderer=d},752:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TabbarService=t.TabbarServiceFactoryFn=t.TabbarServiceFactory=void 0;const n=e(85608),r=n.__importDefault(e(12784)),o=e(76003),l=e(41869),p=e(30144),v=e(95416),m=e(93899),_=e(68969),s=e(28423),f=e(17793),a=e(53576);t.TabbarServiceFactory=Symbol("TabbarServiceFactory");const h=g=>c=>g.get(f.IMainLayoutService).getTabbarService(c);t.TabbarServiceFactoryFn=h;const u={left:"view",right:"extendView",bottom:"panel"},d=void 0;let E=class extends l.WithEventBus{constructor(c){super(),this.location=c,this.doChangeViewEmitter=new l.Emitter,this.shouldChangeView=(0,s.observableFromEventOpts)({owner:this,equalsFn:()=>!1},this.doChangeViewEmitter.event,()=>{}),this.containerIdObs=(0,s.observableValue)(this,d),this.currentContainerId=(0,s.derivedOpts)({owner:this,equalsFn:()=>!1},b=>(this.shouldChangeView.read(b),this.containerIdObs.read(b))),this.nextContainerId="",this.useFirstContainerId=!1,this.previousContainerId=void 0,this.containersMap=new Map,this.viewReady=new l.Deferred,this.state=new Map,this.storedState={},this.accordionRestored=new Set,this.onCurrentChangeEmitter=new l.Emitter,this.onCurrentChange=this.onCurrentChangeEmitter.event,this.onSizeChangeEmitter=new l.Emitter,this.onSizeChange=this.onSizeChangeEmitter.event,this.menuId=`tabbar/${this.location}`,this.moreMenuId=`tabbar/${this.location}/more`,this.sortedContainers=[],this.disposableMap=new Map,this.tabInMoreKeyMap=new Map,this.shouldWaitForViewRender=!1,this.onDidRegisterContainerEmitter=new l.Emitter,this.isEmptyTabbar=!0,this.updatePanel=(0,r.default)(b=>{this.resizeHandle&&this.resizeHandle.hidePanel(b)},60),this._menuMap=new Map,this.setIsLatter(c===l.SlotLocation.right||c===l.SlotLocation.bottom),this.scopedCtxKeyService=this.contextKeyService.createScoped(),this.scopedCtxKeyService.createKey("triggerWithTab",!0),this.menuRegistry.registerMenuItem(this.menuId,{command:{id:this.registerGlobalToggleCommand(),label:(0,l.localize)("layout.tabbar.toggle")},group:"0_global",when:"triggerWithTab == true"}),this.activatedKey=this.contextKeyService.createKey((0,l.getTabbarCtxKey)(this.location),""),this.location==="bottom"&&(this.registerPanelCommands(),this.registerPanelMenus()),this.eventBus.onDirective(l.ResizeEvent.createDirective(this.location),()=>{this.onResize()})}get onDidRegisterContainer(){return this.onDidRegisterContainerEmitter.event}setIsLatter(c){this.isLatter=c}updateNextContainerId(c){(0,l.isUndefined)(c)?this.useFirstContainerId=!0:this.nextContainerId=c}updateCurrentContainerId(c){(0,s.transaction)(b=>{this.containerIdObs.set(c,b)})}updateBadge(c,b){const y=this.getContainer(c);y&&y.options&&(y.options.badge=b),y?.fireChange(y)}registerPanelCommands(){this.commandRegistry.registerCommand(a.EXPAND_BOTTOM_PANEL,{execute:()=>{this.layoutService.expandBottom(!0)}}),this.commandRegistry.registerCommand(a.RETRACT_BOTTOM_PANEL,{execute:()=>{this.layoutService.expandBottom(!1)}}),this.commandRegistry.registerCommand(a.TOGGLE_BOTTOM_PANEL_COMMAND,{execute:(c,b)=>{this.layoutService.toggleSlot(l.SlotLocation.bottom,c,b)}})}getContainerState(c){return this.state.get(c)}hideContainer(c){const b=this.state.get(c);b&&(b.hidden=!0)}showContainer(c){const b=this.state.get(c);b&&(b.hidden=!1)}updatePanelVisibility(c){c===void 0&&(c=this.containersMap.size>0),this.updatePanel(c)}ensureViewReady(){(0,l.isDefined)(this.barSize)&&(0,l.isDefined)(this.panelSize)?this.resolveViewReady():this.shouldWaitForViewRender=!0}updatePanelSize(c){this.panelSize=c,(0,l.isDefined)(this.barSize)&&this.shouldWaitForViewRender&&this.resolveViewReady()}updateBarSize(c){this.barSize=c,(0,l.isDefined)(this.panelSize)&&this.shouldWaitForViewRender&&this.resolveViewReady()}resolveViewReady(){this.isEmptyTabbar?l.Event.once(this.onDidRegisterContainer)(()=>{this.viewReady.resolve()}):this.viewReady.resolve()}getBarSize(){return this.barSize}updateTabInMoreKey(c,b){const y=this.tabInMoreKeyMap.get(c);y&&y.set(b)}get visibleContainers(){const c=[];return this.containersMap.forEach(b=>{const y=b.options&&this.state.get(b.options.containerId);(!y||!y.hidden)&&c.push(b)}),c.sort((b,y)=>this.getContainerState(b.options.containerId).priority-this.getContainerState(y.options.containerId).priority)}registerResizeHandle(c){const{setSize:b,setRelativeSize:y,getSize:S,getRelativeSize:A,lockSize:w,setMaxSize:T,hidePanel:D}=c;return this.resizeHandle={setSize:I=>b(I,this.isLatter),setRelativeSize:(I,R)=>y(I,R,this.isLatter),getSize:()=>S(this.isLatter),getRelativeSize:()=>A(this.isLatter),setMaxSize:I=>T(I,this.isLatter),lockSize:I=>w(I,this.isLatter),hidePanel:I=>D(I)},this.listenCurrentChange()}registerContainer(c,b){var y;if(this.containersMap.has(c))return;this.useFirstContainerId&&(this.useFirstContainerId=!1,this.updateCurrentContainerId(c)),this.nextContainerId===c&&this.updateCurrentContainerId(c);const S=new l.DisposableCollection,A=b.options||{containerId:c};b.options=A;const w=new l.Emitter;this.containersMap.set(c,{fireChange:D=>w.fire(D),onChange:w.event,views:b.views,options:A}),S.push({dispose:()=>{this.containersMap.delete(c),this.state.delete(c)}}),this.updatePanelVisibility(this.containersMap.size>0);let T=this.sortedContainers.findIndex(D=>{var I,R;return(((I=D.options)===null||I===void 0?void 0:I.priority)||1)<=(((R=b.options)===null||R===void 0?void 0:R.priority)||1)});T===-1&&(T=this.sortedContainers.length),this.sortedContainers.splice(T,0,b);for(let D=T;D<this.sortedContainers.length;D++){const R=(y=this.sortedContainers[D].options)===null||y===void 0?void 0:y.containerId;if(R){const M=this.storedState[R]||this.getContainerState(R)||{};this.state.set(R,{hidden:M.hidden,priority:D})}}S.push(this.registerSideEffects(b)),this.eventBus.fire(new f.TabBarRegistrationEvent({tabBarId:c})),c===this.currentContainerId.get()&&this.handleChange(c,""),this.viewContextKeyRegistry.registerContextKeyService(c,this.contextKeyService.createScoped()).createKey("view",c),this.isEmptyTabbar&&(this.isEmptyTabbar=!1),this.disposableMap.set(c,S),this.onDidRegisterContainerEmitter.fire(c)}registerSideEffects(c){var b;const y=new l.DisposableCollection;!((b=c.options)===null||b===void 0)&&b.hideTab||(y.push(this.registerHideMenu(c)),y.push(this.registerMoreMenu(c))),y.push(this.registerActivateKeyBinding(c,c.options.fromExtension));const S=this.contextKeyService.createKey(`workbench.${u[this.location]||"view"}.${c.options.containerId}`,!0);return y.push({dispose:()=>{S.set(!1)}}),y.push(this.progressService.registerProgressIndicator(c.options.containerId)),y.push(this.registerContainerPanelRelatedCommand(c)),y}registerContainerPanelRelatedCommand(c){var b,y,S,A,w;const T=new l.DisposableCollection,D=(b=c.options)===null||b===void 0?void 0:b.containerId;return T.push(this.commandRegistry.registerCommand({id:"container.show."+D,label:(0,l.formatLocalize)("view.command.show",(S=(y=c.options)===null||y===void 0?void 0:y.title)!==null&&S!==void 0?S:D),labelLocalized:(0,l.createFormatLocalizedStr)("view.command.show",(w=(A=c.options)===null||A===void 0?void 0:A.title)!==null&&w!==void 0?w:D),category:"View"},{execute:()=>{this.updateCurrentContainerId(D)}})),T.push(this.commandRegistry.registerCommand({id:"container.hide."+D},{execute:()=>{this.updateCurrentContainerId("")}})),T.push(this.commandRegistry.registerCommand({id:"container.toggle."+D},{execute:()=>{this.currentContainerId.get()===D?this.updateCurrentContainerId(""):this.updateCurrentContainerId(D)}})),T}registerHideMenu(c){const b=new l.DisposableCollection,y=c.options.containerId;return b.push(this.menuRegistry.registerMenuItem(this.menuId,{command:{id:this.registerVisibleToggleCommand(y,b),label:c.options.title||y},group:"1_widgets"})),b}registerMoreMenu(c){const b=new l.DisposableCollection,y=c.options.containerId,S=this.scopedCtxKeyService.createKey(this.getTabInMoreCtxKey(y),!1);return this.tabInMoreKeyMap.set(y,S),b.push({dispose:()=>this.tabInMoreKeyMap.delete(y)}),b.push(this.menuRegistry.registerMenuItem(this.moreMenuId,{command:{id:this.registerMoreToggleCommand(c,b),label:c.options.title||y},group:"inline",when:`${this.getTabInMoreCtxKey(y)} == true`,toggledWhen:`${(0,l.getTabbarCtxKey)(this.location)} == ${y}`,iconClass:c.options.iconClass})),b}disposeContainer(c){var b;const y=this.disposableMap.get(c);y&&y.dispose(),this.currentContainerId.get()===c&&this.updateCurrentContainerId(((b=this.visibleContainers[0].options)===null||b===void 0?void 0:b.containerId)||"")}updateTitle(c,b){const y=this.getContainer(c);y&&(y.options.title=b)}getContainer(c){return c?this.containersMap.get(c):void 0}getTitleToolbarMenu(c){const b=this._menuMap.get(c);if(b)return b;const y=this.menuService.createMenu(m.MenuId.ViewTitle,this.viewContextKeyRegistry.getContextKeyService(c));this._menuMap.set(c,y);const S=this.disposableMap.get(c),A=[y,(0,l.toDisposable)(()=>{this._menuMap.delete(c)})];return S?S.pushAll(A):this.addDispose(A),y}doExpand(c){if(this.resizeHandle){const{setRelativeSize:b}=this.resizeHandle;c?this.isLatter?b(0,1):b(1,0):b(2,1)}}get isExpanded(){if(this.resizeHandle){const{getRelativeSize:c}=this.resizeHandle,b=c().join(",");return this.isLatter?b==="0,1":b==="1,0"}return!1}handleTabClick(c,b){const y=c.currentTarget.id;y===this.currentContainerId.get()&&!b?this.updateCurrentContainerId(""):this.updateCurrentContainerId(y)}handleContextMenu(c,b){c.preventDefault(),c.stopPropagation();const y=this.menuService.createMenu(this.menuId,b?this.scopedCtxKeyService:this.contextKeyService),S=(0,m.generateCtxMenu)({menus:y,args:[{containerId:b}]});this.contextMenuRenderer.show({menuNodes:S[1],anchor:{x:c.clientX,y:c.clientY}})}showMoreMenu(c,b){const y=this.menuService.createMenu(this.moreMenuId,this.scopedCtxKeyService),S=(0,m.generateCtxMenu)({menus:y,args:[{lastContainerId:b}]});this.contextMenuRenderer.show({menuNodes:S[1],anchor:{x:c.clientX,y:c.clientY}})}handleDragStart(c,b){c.dataTransfer.setData("containerId",b),this.layoutService.showDropAreaForContainer(b)}handleDrop(c,b){if(c.dataTransfer.getData("containerId")){const y=c.dataTransfer.getData("containerId"),S=this.visibleContainers,A=S.findIndex(T=>y===T.options.containerId),w=S.findIndex(T=>b===T.options.containerId);this.doInsertTab(S,A,w),this.storeState()}}handleDragEnd(c){this.layoutService.hideDropArea()}restoreState(){this.storedState=this.layoutState.getState(v.LAYOUT_STATE.getTabbarSpace(this.location),{});for(const c of this.state.keys())this.storedState[c]&&this.state.set(c,this.storedState[c]);this.visibleContainers.forEach(c=>{f.SUPPORT_ACCORDION_LOCATION.has(this.location)&&this.tryRestoreAccordionSize(c.options.containerId)})}removeContainer(c){const b=this.disposableMap.get(c);b?.dispose(),this.updateCurrentContainerId(""),this.doChangeViewEmitter.fire()}dynamicAddContainer(c,b){this.registerContainer(c,b),this.updateCurrentContainerId(c),this.doChangeViewEmitter.fire()}doInsertTab(c,b,y){const S=this.getContainerState(c[y].options.containerId).priority,A=(T,D)=>{const I=this.getContainerState(c[T].options.containerId),R=this.getContainerState(c[D].options.containerId);I.priority=R.priority};let w;if(b>y)for(w=y;w<b;w++)A(w,w+1);else for(w=y;w>b;w--)A(w,w-1);this.getContainerState(c[w].options.containerId).priority=S,this.doChangeViewEmitter.fire()}storeState(){const c={};this.state.forEach((b,y)=>{c[y]=b}),this.layoutState.setState(v.LAYOUT_STATE.getTabbarSpace(this.location),c)}registerActivateKeyBinding(c,b){const y=c.options,S=y.containerId,A=b?`workbench.view.extension.${S}`:`workbench.view.${S}`,w=new l.DisposableCollection;return w.push(this.commandRegistry.registerCommand({id:A},{execute:({forceShow:T}={})=>{this.location==="bottom"&&!T?this.updateCurrentContainerId(this.currentContainerId.get()===S?"":S):this.updateCurrentContainerId(S)}})),y.activateKeyBinding&&w.push(this.keybindingRegistry.registerKeybinding({command:A,keybinding:y.activateKeyBinding})),w}registerGlobalToggleCommand(){const c=`activity.bar.toggle.${this.location}`;return this.commandRegistry.registerCommand({id:c},{execute:({containerId:b})=>{this.doToggleTab(b)},isEnabled:()=>this.visibleContainers.length>1}),c}registerVisibleToggleCommand(c,b){const y=`activity.bar.toggle.${c}`;return b.push(this.commandRegistry.registerCommand({id:y},{execute:({forceShow:S}={})=>{this.doToggleTab(c,S)},isToggled:()=>!this.getContainerState(c).hidden,isEnabled:()=>this.getContainerState(c).hidden||this.visibleContainers.length!==1})),y}registerMoreToggleCommand(c,b){const{options:y}=c,{containerId:S}=y,A=`activity.bar.activate.more.${S}`;return b.push(this.commandRegistry.registerCommand({id:A},{execute:({lastContainerId:w})=>{if(this.updateCurrentContainerId(S),w){const T=this.getContainerState(S),D=this.getContainerState(w),I=T.priority;T.priority=D.priority,D.priority=I,this.storeState()}}})),A}getTabInMoreCtxKey(c){return`${c}.isInMore`}registerPanelMenus(){this.menuRegistry.registerMenuItems((0,m.getTabbarCommonMenuId)("bottom"),[{command:a.EXPAND_BOTTOM_PANEL.id,group:"navigation",when:"!bottomFullExpanded",order:1},{command:a.RETRACT_BOTTOM_PANEL.id,group:"navigation",when:"bottomFullExpanded",order:1},{command:a.TOGGLE_BOTTOM_PANEL_COMMAND.id,group:"navigation",order:2}]),this.commonTitleMenu=this.ctxMenuService.createMenu({id:"tabbar/bottom/common"})}doToggleTab(c,b){const y=this.getContainerState(c);b===void 0?y.hidden=!y.hidden:y.hidden=!b,y.hidden&&this.currentContainerId.get()===c&&this.updateCurrentContainerId(this.visibleContainers[0].options.containerId),this.storeState()}shouldExpand(c){const b=this.getContainer(c);return b&&b.options&&b.options.expanded}onResize(){l.fastdom.measureAtNextFrame(()=>{if(!this.currentContainerId||!this.resizeHandle)return;const c=this.resizeHandle.getSize();c!==this.barSize&&!this.shouldExpand(this.currentContainerId.get())&&(this.prevSize=c,this.onSizeChangeEmitter.fire({size:c}))})}listenCurrentChange(){return(0,s.autorunDelta)(this.currentContainerId,({lastValue:c,newValue:b})=>{this.previousContainerId=c===d?"":c,this.handleChange(b,c)})}handleChange(c,b){var y;if(!this.resizeHandle)return;const{getSize:S,setSize:A,lockSize:w}=this.resizeHandle;this.onCurrentChangeEmitter.fire({previousId:b,currentId:c});const T=this.shouldExpand(c);if(this.shouldExpand(this.previousContainerId)||T)this.handleFullExpanded(c,T);else if(c){b&&c!==b&&(this.prevSize=S());const D=this.getContainer(c);A(this.prevSize||this.panelSize+this.barSize),w(!!(!((y=D?.options)===null||y===void 0)&&y.noResize)),this.activatedKey.set(c)}else A(this.barSize),w(!0)}tryRestoreAccordionSize(c){var b,y;if(this.accordionRestored.has(c))return;const S=this.containersMap.get(c);if((!S||!((b=S.options)===null||b===void 0)&&b.component)&&((y=S?.options)===null||y===void 0?void 0:y.containerId)!==p.SCM_CONTAINER_ID)return;this.layoutService.getAccordionService(c).restoreState(),this.accordionRestored.add(c)}handleFullExpanded(c,b){if(!this.resizeHandle)return;const{setRelativeSize:y,setSize:S}=this.resizeHandle;c?b?this.isLatter?y(0,1):y(1,0):S(this.prevSize||this.panelSize+this.barSize):S(this.barSize)}};t.TabbarService=E,n.__decorate([(0,o.Autowired)(m.AbstractMenuService),n.__metadata("design:type",m.AbstractMenuService)],E.prototype,"menuService",void 0),n.__decorate([(0,o.Autowired)(m.AbstractContextMenuService),n.__metadata("design:type",m.AbstractContextMenuService)],E.prototype,"ctxMenuService",void 0),n.__decorate([(0,o.Autowired)(m.IMenuRegistry),n.__metadata("design:type",m.IMenuRegistry)],E.prototype,"menuRegistry",void 0),n.__decorate([(0,o.Autowired)(l.CommandRegistry),n.__metadata("design:type",Object)],E.prototype,"commandRegistry",void 0),n.__decorate([(0,o.Autowired)(m.ICtxMenuRenderer),n.__metadata("design:type",m.ICtxMenuRenderer)],E.prototype,"contextMenuRenderer",void 0),n.__decorate([(0,o.Autowired)(l.KeybindingRegistry),n.__metadata("design:type",Object)],E.prototype,"keybindingRegistry",void 0),n.__decorate([(0,o.Autowired)(),n.__metadata("design:type",l.ViewContextKeyRegistry)],E.prototype,"viewContextKeyRegistry",void 0),n.__decorate([(0,o.Autowired)(l.IContextKeyService),n.__metadata("design:type",Object)],E.prototype,"contextKeyService",void 0),n.__decorate([(0,o.Autowired)(f.IMainLayoutService),n.__metadata("design:type",Object)],E.prototype,"layoutService",void 0),n.__decorate([(0,o.Autowired)(),n.__metadata("design:type",v.LayoutState)],E.prototype,"layoutState",void 0),n.__decorate([(0,o.Autowired)(_.IProgressService),n.__metadata("design:type",Object)],E.prototype,"progressService",void 0),t.TabbarService=E=n.__decorate([(0,o.Injectable)({multiple:!0}),n.__metadata("design:paramtypes",[String])],E)},58296:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ViewsRegistry=t.ViewsController=t.ViewContentGroups=void 0;const n=e(85608),r=e(76003),o=e(41869),l=e(43718),p=e(17793);var v;(function(f){f.Open="2_open",f.Debug="4_debug",f.SCM="5_scm",f.More="9_more"})(v||(t.ViewContentGroups=v={}));function m(f,a){var h,u,d,E;const g=(h=f.group)!==null&&h!==void 0?h:v.More,c=(u=a.group)!==null&&u!==void 0?u:v.More;return g!==c?g.localeCompare(c):((d=f.order)!==null&&d!==void 0?d:5)-((E=a.order)!==null&&E!==void 0?E:5)}let _=class{get contents(){const a=this.items.filter(h=>h.visible);return a.length===0&&this.defaultItem?[this.defaultItem.descriptor]:a.map(h=>h.descriptor)}constructor(a){this.id=a,this._onDidChange=new o.Emitter,this.onDidChange=this._onDidChange.event,this.items=[],this.disposables=[],this.contextKeyService.onDidChangeContext(this.onDidChangeContext,this,this.disposables),o.Event.filter(this.viewsRegistry.onDidChangeViewWelcomeContent,h=>h===this.id)(this.onDidChangeViewWelcomeContent,this,this.disposables),this.onDidChangeViewWelcomeContent()}onDidChangeViewWelcomeContent(){const a=this.viewsRegistry.getViewWelcomeContent(this.id);this.items=[];for(const h of a)if(h.when==="default")this.defaultItem={descriptor:h,visible:!0};else{const u=h.when?this.contextKeyService.match(h.when):!0;this.items.push({descriptor:h,visible:u})}this._onDidChange.fire()}onDidChangeContext(){let a=!1;for(const h of this.items){if(!h.descriptor.when||h.descriptor.when==="default")continue;const u=this.contextKeyService.match(h.descriptor.when);h.visible!==u&&(h.visible=u,a=!0)}a&&this._onDidChange.fire()}dispose(){this.disposables.forEach(a=>a.dispose()),this.disposables=[]}};t.ViewsController=_,n.__decorate([(0,r.Autowired)(o.IContextKeyService),n.__metadata("design:type",Object)],_.prototype,"contextKeyService",void 0),n.__decorate([(0,r.Autowired)(p.IViewsRegistry),n.__metadata("design:type",Object)],_.prototype,"viewsRegistry",void 0),t.ViewsController=_=n.__decorate([(0,r.Injectable)({multiple:!0}),n.__metadata("design:paramtypes",[String])],_);let s=class{constructor(){this.viewWelcomeContent=new l.SetMap,this._onDidChangeViewWelcomeContent=new o.Emitter,this.onDidChangeViewWelcomeContent=this._onDidChangeViewWelcomeContent.event}registerViewWelcomeContent(a,h){return this.viewWelcomeContent.add(a,h),this._onDidChangeViewWelcomeContent.fire(a),{dispose:()=>{this.viewWelcomeContent.delete(a,h),this._onDidChangeViewWelcomeContent.fire(a)}}}registerViewWelcomeContent2(a,h){const u=new Map;for(const[d,E]of h)this.viewWelcomeContent.add(a,E),u.set(d,(0,o.toDisposable)(()=>{this.viewWelcomeContent.delete(a,E),this._onDidChangeViewWelcomeContent.fire(a)}));return this._onDidChangeViewWelcomeContent.fire(a),u}getViewWelcomeContent(a){const h=[];return this.viewWelcomeContent.forEach(a,u=>h.push(u)),h.sort(m),h}};t.ViewsRegistry=s,t.ViewsRegistry=s=n.__decorate([(0,r.Injectable)()],s)},24429:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WelcomeView=t.CSSIcon=void 0,t.renderLabelWithIcons=a;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importDefault(e(14041)),l=e(48412),p=e(41869),v=e(43718),m=n.__importDefault(e(81388)),_=e(58296);var s;(function(d){d.iconNameSegment="[A-Za-z0-9]+",d.iconNameExpression="[A-Za-z0-9\\-]+",d.iconModifierExpression="~[A-Za-z]+"})(s||(t.CSSIcon=s={}));const f=new RegExp(`(\\\\)?\\$\\((${s.iconNameExpression}(?:${s.iconModifierExpression})?)\\)`,"g");function a(d){const E=new Array;let g,c=0,b=0;for(;(g=f.exec(d))!==null;){b=g.index||0,E.push(d.substring(c,b)),c=(g.index||0)+g[0].length;const[,y,S]=g;E.push(y?`$(${S})`:o.default.createElement("span",{className:(0,p.getExternalIcon)(S)}))}return c<d.length&&E.push(d.substring(c)),E}const h=d=>{const{contents:E}=d,[g,c]=o.default.useState(E.map(S=>S.precondition?!1:null)),b=(0,p.useInjectable)(p.IContextKeyService),y=(0,p.useInjectable)(p.IOpenerService);return o.default.useEffect(()=>{const S=E.map(w=>{if(w.precondition){const T=new Set;return w.precondition.keys().forEach(D=>T.add(D)),T}return null}),A=b.onDidChangeContext(w=>{S.forEach((T,D)=>{T&&w.payload.affectsSome(T)&&c(g.map((I,R)=>R===D?b.match(E[D].precondition):I))})});return()=>A.dispose()},[E]),E.length===0?null:o.default.createElement(o.default.Fragment,null,E.map(({content:S,precondition:A},w)=>{const T=S.split(`
|
|
30503
30503
|
`),D=[];for(let I of T){if(I=I.trim(),!I)continue;const R=(0,v.parseLinkedText)(I);if(R.nodes.length===1&&typeof R.nodes[0]!="string"){const M=R.nodes[0];D.push(o.default.createElement("div",{key:D.length,title:M.title,className:"button-container"},o.default.createElement(l.Button,{disabled:g[w]===!1,onClick:()=>y.open(M.href)},a(M.label))))}else{const M=R.nodes.map((O,P)=>typeof O=="string"?O:o.default.createElement("a",{key:P,className:(0,r.default)({disabled:O.href.startsWith("command:")&&g[w]===!1}),title:O.title,onClick:()=>y.open(O.href)},O.label));D.push(o.default.createElement("p",{key:D.length},M))}}return o.default.createElement(o.default.Fragment,{key:w},D)}))};function u(d,E){return d.viewId===E.viewId}t.WelcomeView=o.default.memo(d=>{const E=(0,p.useInjectable)(_.ViewsController,[d.viewId]),[g,c]=o.default.useState(E.contents);return o.default.useEffect(()=>{E.onDidChange(()=>{const b=E.contents;c(b)})},[]),g.length?o.default.createElement("div",{className:m.default.welcome},o.default.createElement(h,{contents:g})):null},u)},17793:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),e(85608).__exportStar(e(72260),t)},72260:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DROP_RIGHT_CONTAINER=t.DROP_BOTTOM_CONTAINER=t.SUPPORT_ACCORDION_LOCATION=t.ViewCollapseChangedEvent=t.IViewsRegistry=t.TabBarRegistrationEvent=t.MainLayoutContribution=t.IMainLayoutService=void 0;const n=e(41869);t.IMainLayoutService=Symbol("IMainLayoutService"),t.MainLayoutContribution=Symbol("MainLayoutContribution");class r extends n.BasicEvent{}t.TabBarRegistrationEvent=r,t.IViewsRegistry=Symbol("IViewsRegistry");class o extends n.BasicEvent{}t.ViewCollapseChangedEvent=o,t.SUPPORT_ACCORDION_LOCATION=new Set([n.SlotLocation.left,n.SlotLocation.right]),t.DROP_BOTTOM_CONTAINER="drop-bottom",t.DROP_RIGHT_CONTAINER="drop-right"},63067:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),e(85608).__exportStar(e(17793),t)},93835:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EmbeddedMarkdownEditorContribution=t.MARKDOWN_EDITOR_COMPONENT_ID=void 0;const n=e(85608),r=e(76003),o=e(41869),l=e(43718),p=e(57517),v=e(21066),m=e(81001);t.MARKDOWN_EDITOR_COMPONENT_ID="MARKDOWN_EDITOR_COMPONENT_ID";let _=class{registerEditorComponent(f){f.registerEditorComponent({uid:t.MARKDOWN_EDITOR_COMPONENT_ID,component:m.MarkdownEditorComponent,scheme:l.Schemes.file}),f.registerEditorComponentResolver(l.Schemes.file,(a,h)=>{a.uri.path.ext===".md"&&h.push({type:p.EditorOpenType.component,componentId:t.MARKDOWN_EDITOR_COMPONENT_ID,title:(0,l.localize)("editorOpenType.preview"),weight:this.preferenceService.get("application.preferMarkdownPreview")?10:-1})})}};t.EmbeddedMarkdownEditorContribution=_,n.__decorate([(0,r.Autowired)(v.IMarkdownService),n.__metadata("design:type",Object)],_.prototype,"markdownService",void 0),n.__decorate([(0,r.Autowired)(o.PreferenceService),n.__metadata("design:type",Object)],_.prototype,"preferenceService",void 0),t.EmbeddedMarkdownEditorContribution=_=n.__decorate([(0,l.Domain)(p.BrowserEditorContribution)],_)},81001:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MarkdownEditorComponent=void 0;const r=e(85608).__importDefault(e(14041)),o=e(41869),l=e(57517),p=e(21066),v=({resource:m})=>{let _=null;const s=(0,o.useInjectable)(p.IMarkdownService),f=(0,o.useInjectable)(l.IEditorDocumentModelService);return r.default.useEffect(()=>{if(_){const a=new o.Disposable,h=new o.CancellationTokenSource;return a.addDispose({dispose:()=>{h.cancel()}}),f.createModelReference(m.uri,"markdown-preview").then(u=>{if(h.token.isCancellationRequested){u&&u.dispose();return}const d=new o.Emitter;a.addDispose(d),a.addDispose(u.instance.getMonacoModel().onDidChangeContent(E=>{d.fire(u.instance.getText())})),_&&s.previewMarkdownInContainer(u.instance.getText(),_,h.token,void 0,d.event).then(E=>{a.addDispose(E)}),a.addDispose(u)}),()=>{a.dispose()}}}),r.default.createElement("div",{ref:a=>{_=a},style:{height:"100%"}})};t.MarkdownEditorComponent=v},31101:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MarkdownModule=t.Markdown=void 0;const n=e(85608),r=e(76003),o=e(41869),l=e(21066),p=e(89637);var v=e(6001);Object.defineProperty(t,"Markdown",{enumerable:!0,get:function(){return v.Markdown}});let m=class extends o.BrowserModule{constructor(){super(...arguments),this.providers=[{token:l.IMarkdownService,useClass:p.MarkdownServiceImpl}]}};t.MarkdownModule=m,t.MarkdownModule=m=n.__decorate([(0,r.Injectable)()],m)},86422:(x,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.markdownCss=void 0,t.markdownCss=`
|
|
30504
30504
|
/*---------------------------------------------------------------------------------------------
|