@opensumi/cli-engine 3.8.3-next-1745835843.0 → 3.8.3-next-1745897368.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.
@@ -31401,7 +31401,7 @@ and limitations under the License.
31401
31401
  `)[0];let c,y=f.match(QUERY_WORD_REGEX)[0];switch(u){case 2:c=new RangeError(`Bad node name '${y}'`);break;case 3:c=new RangeError(`Bad field name '${y}'`);break;case 4:c=new RangeError(`Bad capture name @${y}`);break;case 5:c=new TypeError(`Bad pattern structure at offset ${E}: '${f}'...`),y="";break;default:c=new SyntaxError(`Bad syntax at offset ${E}: '${f}'...`),y=""}throw c.index=E,c.length=y.length,C._free(n),c}const o=C._ts_query_string_count(r),d=C._ts_query_capture_count(r),_=C._ts_query_pattern_count(r),v=new Array(d),m=new Array(o);for(let u=0;u<d;u++){const l=C._ts_query_capture_name_for_id(r,u,TRANSFER_BUFFER),E=getValue(TRANSFER_BUFFER,"i32");v[u]=UTF8ToString(l,E)}for(let u=0;u<o;u++){const l=C._ts_query_string_value_for_id(r,u,TRANSFER_BUFFER),E=getValue(TRANSFER_BUFFER,"i32");m[u]=UTF8ToString(l,E)}const p=new Array(_),s=new Array(_),g=new Array(_),a=new Array(_),h=new Array(_);for(let u=0;u<_;u++){const l=C._ts_query_predicates_for_pattern(r,u,TRANSFER_BUFFER),E=getValue(TRANSFER_BUFFER,"i32");a[u]=[],h[u]=[];const f=[];let c=l;for(let y=0;y<E;y++){const b=getValue(c,"i32");c+=SIZE_OF_INT;const A=getValue(c,"i32");if(c+=SIZE_OF_INT,b===PREDICATE_STEP_TYPE_CAPTURE)f.push({type:"capture",name:v[A]});else if(b===PREDICATE_STEP_TYPE_STRING)f.push({type:"string",value:m[A]});else if(f.length>0){if(f[0].type!=="string")throw new Error("Predicates must begin with a literal value");const S=f[0].value;let w,T=!0,D=!0;switch(S){case"any-not-eq?":case"not-eq?":T=!1;case"any-eq?":case"eq?":if(f.length!==3)throw new Error(`Wrong number of arguments to \`#${S}\` predicate. Expected 2, got ${f.length-1}`);if(f[1].type!=="capture")throw new Error(`First argument of \`#${S}\` predicate must be a capture. Got "${f[1].value}"`);if(D=!S.startsWith("any-"),f[2].type==="capture"){const R=f[1].name,P=f[2].name;h[u].push(k=>{const F=[],L=[];for(const j of k)j.name===R&&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=f[1].name;const R=f[2].value,P=F=>F.text===R,k=F=>F.text!==R;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(f.length!==3)throw new Error(`Wrong number of arguments to \`#${S}\` predicate. Expected 2, got ${f.length-1}.`);if(f[1].type!=="capture")throw new Error(`First argument of \`#${S}\` predicate must be a capture. Got "${f[1].value}".`);if(f[2].type!=="string")throw new Error(`Second argument of \`#${S}\` predicate must be a string. Got @${f[2].value}.`);w=f[1].name;const I=new RegExp(f[2].value);D=!S.startsWith("any-"),h[u].push(R=>{const P=[];for(const F of R)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(f.length<2||f.length>3)throw new Error(`Wrong number of arguments to \`#set!\` predicate. Expected 1 or 2. Got ${f.length-1}.`);if(f.some(R=>R.type!=="string"))throw new Error('Arguments to `#set!` predicate must be a strings.".');p[u]||(p[u]={}),p[u][f[1].value]=f[2]?f[2].value:null;break;case"is?":case"is-not?":if(f.length<2||f.length>3)throw new Error(`Wrong number of arguments to \`#${S}\` predicate. Expected 1 or 2. Got ${f.length-1}.`);if(f.some(R=>R.type!=="string"))throw new Error(`Arguments to \`#${S}\` predicate must be a strings.".`);const O=S==="is?"?s:g;O[u]||(O[u]={}),O[u][f[1].value]=f[2]?f[2].value:null;break;case"not-any-of?":T=!1;case"any-of?":if(f.length<2)throw new Error(`Wrong number of arguments to \`#${S}\` predicate. Expected at least 1. Got ${f.length-1}.`);if(f[1].type!=="capture")throw new Error(`First argument of \`#${S}\` predicate must be a capture. Got "${f[1].value}".`);for(let R=2;R<f.length;R++)if(f[R].type!=="string")throw new Error(`Arguments to \`#${S}\` predicate must be a strings.".`);w=f[1].name;const M=f.slice(2).map(R=>R.value);h[u].push(R=>{const P=[];for(const k of R)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:S,operands:f.slice(1)})}f.length=0}}Object.freeze(p[u]),Object.freeze(s[u]),Object.freeze(g[u])}return C._free(n),new Query(INTERNAL,r,v,h,a,Object.freeze(p),Object.freeze(s),Object.freeze(g))}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 d=new TextDecoder("utf-8").decode(o);throw new Error(`Language.load failed with status ${r.status}.
31402
31402
 
31403
31403
  ${d}`)}}))}return e.then(n=>loadWebAssemblyModule(n,{loadAsync:!0})).then(n=>{const r=Object.keys(n),o=r.find(_=>LANGUAGE_FUNCTION_REGEX.test(_)&&!_.includes("external_scanner_"));o||console.log(`Couldn't find language function in WASM file. Symbols:
31404
- ${JSON.stringify(r,null,2)}`);const d=n[o]();return new Language(INTERNAL,d)})}}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,d,_,v){assertInternal(t),this[0]=e,this.captureNames=n,this.textPredicates=r,this.predicates=o,this.setProperties=d,this.assertedProperties=_,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:d=4294967295,maxStartDepth:_=4294967295}={}){if(typeof d!="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,d,_);const v=getValue(TRANSFER_BUFFER,"i32"),m=getValue(TRANSFER_BUFFER+SIZE_OF_INT,"i32"),p=getValue(TRANSFER_BUFFER+2*SIZE_OF_INT,"i32"),s=new Array(v);this.exceededMatchLimit=!!p;let g=0,a=m;for(let h=0;h<v;h++){const u=getValue(a,"i32");a+=SIZE_OF_INT;const l=getValue(a,"i32");a+=SIZE_OF_INT;const E=new Array(l);if(a=unmarshalCaptures(this,t.tree,a,E),this.textPredicates[u].every(f=>f(E))){s[g]={pattern:u,captures:E};const f=this.setProperties[u];f&&(s[g].setProperties=f);const c=this.assertedProperties[u];c&&(s[g].assertedProperties=c);const y=this.refutedProperties[u];y&&(s[g].refutedProperties=y),g++}}return s.length=g,C._free(m),s}captures(t,{startPosition:e=ZERO_POINT,endPosition:n=ZERO_POINT,startIndex:r=0,endIndex:o=0,matchLimit:d=4294967295,maxStartDepth:_=4294967295}={}){if(typeof d!="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,d,_);const v=getValue(TRANSFER_BUFFER,"i32"),m=getValue(TRANSFER_BUFFER+SIZE_OF_INT,"i32"),p=getValue(TRANSFER_BUFFER+2*SIZE_OF_INT,"i32"),s=[];this.exceededMatchLimit=!!p;const g=[];let a=m;for(let h=0;h<v;h++){const u=getValue(a,"i32");a+=SIZE_OF_INT;const l=getValue(a,"i32");a+=SIZE_OF_INT;const E=getValue(a,"i32");if(a+=SIZE_OF_INT,g.length=l,a=unmarshalCaptures(this,t.tree,a,g),this.textPredicates[u].every(f=>f(g))){const f=g[E],c=this.setProperties[u];c&&(f.setProperties=c);const y=this.assertedProperties[u];y&&(f.assertedProperties=y);const b=this.refutedProperties[u];b&&(f.refutedProperties=b),s.push(f)}}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 d=getValue(e,"i32"),_=unmarshalNode(t,e+=SIZE_OF_INT);e+=SIZE_OF_NODE,n[r]={name:x.captureNames[d],node:_}}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"),d=getValue(t+=SIZE_OF_INT,"i32"),_=new Node(INTERNAL,x);return _.id=e,_.startIndex=n,_.startPosition={row:r,column:o},_[0]=d,_}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),d=e(79818),_=e(69336),v=d("Object.prototype.toString"),m=e(51913)(),p=typeof globalThis>"u"?e.g:globalThis,s=r(),g=d("String.prototype.slice"),a=Object.getPrototypeOf,h=d("Array.prototype.indexOf",!0)||function(c,y){for(var b=0;b<c.length;b+=1)if(c[b]===y)return b;return-1},u={__proto__:null};m&&_&&a?n(s,function(f){var c=new p[f];if(Symbol.toStringTag in c){var y=a(c),b=_(y,Symbol.toStringTag);if(!b){var A=a(y);b=_(A,Symbol.toStringTag)}u["$"+f]=o(b.get)}}):n(s,function(f){var c=new p[f],y=c.slice||c.set;y&&(u["$"+f]=o(y))});var l=function(c){var y=!1;return n(u,function(b,A){if(!y)try{"$"+b(c)===A&&(y=g(A,1))}catch{}}),y},E=function(c){var y=!1;return n(u,function(b,A){if(!y)try{b(c),y=g(A,1)}catch{}}),y};x.exports=function(c){if(!c||typeof c!="object")return!1;if(!m){var y=g(v(c),8,-1);return h(s,y)>-1?y:y!=="Object"?!1:E(c)}return _?l(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=d=>JSON.stringify(d,null,2).replace(/"([^"]+)":/g,"$1:");t.quotelessJson=r;class o extends Error{get errors(){return this.issues}constructor(_){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=_}format(_){const v=_||function(s){return s.message},m={_errors:[]},p=s=>{for(const g of s.issues)if(g.code==="invalid_union")g.unionErrors.map(p);else if(g.code==="invalid_return_type")p(g.returnTypeError);else if(g.code==="invalid_arguments")p(g.argumentsError);else if(g.path.length===0)m._errors.push(v(g));else{let a=m,h=0;for(;h<g.path.length;){const u=g.path[h];h===g.path.length-1?(a[u]=a[u]||{_errors:[]},a[u]._errors.push(v(g))):a[u]=a[u]||{_errors:[]},a=a[u],h++}}};return p(this),m}static assert(_){if(!(_ instanceof o))throw new Error(`Not a ZodError: ${_}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,n.util.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(_=v=>v.message){const v={},m=[];for(const p of this.issues)p.path.length>0?(v[p.path[0]]=v[p.path[0]]||[],v[p.path[0]].push(_(p))):m.push(_(p));return{formErrors:m,fieldErrors:v}}get formErrors(){return this.flatten()}}t.ZodError=o,o.create=d=>new o(d)},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 d(v){o=v}t.setErrorMap=d;function _(){return o}t.getErrorMap=_},86340:function(x,t,e){"use strict";var n=this&&this.__createBinding||(Object.create?function(o,d,_,v){v===void 0&&(v=_);var m=Object.getOwnPropertyDescriptor(d,_);(!m||("get"in m?!d.__esModule:m.writable||m.configurable))&&(m={enumerable:!0,get:function(){return d[_]}}),Object.defineProperty(o,v,m)}:function(o,d,_,v){v===void 0&&(v=_),o[v]=d[_]}),r=this&&this.__exportStar||function(o,d){for(var _ in o)_!=="default"&&!Object.prototype.hasOwnProperty.call(d,_)&&n(d,o,_)};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)),d=u=>{const{data:l,path:E,errorMaps:f,issueData:c}=u,y=[...E,...c.path||[]],b={...c,path:y};if(c.message!==void 0)return{...c,path:y,message:c.message};let A="";const S=f.filter(w=>!!w).slice().reverse();for(const w of S)A=w(b,{data:l,defaultError:A}).message;return{...c,path:y,message:A}};t.makeIssue=d,t.EMPTY_PATH=[];function _(u,l){const E=(0,r.getErrorMap)(),f=(0,t.makeIssue)({issueData:l,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(f)}t.addIssueToContext=_;class v{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(l,E){const f=[];for(const c of E){if(c.status==="aborted")return t.INVALID;c.status==="dirty"&&l.dirty(),f.push(c.value)}return{status:l.value,value:f}}static async mergeObjectAsync(l,E){const f=[];for(const c of E){const y=await c.key,b=await c.value;f.push({key:y,value:b})}return v.mergeObjectSync(l,f)}static mergeObjectSync(l,E){const f={};for(const c of E){const{key:y,value:b}=c;if(y.status==="aborted"||b.status==="aborted")return t.INVALID;y.status==="dirty"&&l.dirty(),b.status==="dirty"&&l.dirty(),y.value!=="__proto__"&&(typeof b.value<"u"||c.alwaysSet)&&(f[y.value]=b.value)}return{status:l.value,value:f}}}t.ParseStatus=v,t.INVALID=Object.freeze({status:"aborted"});const m=u=>({status:"dirty",value:u});t.DIRTY=m;const p=u=>({status:"valid",value:u});t.OK=p;const s=u=>u.status==="aborted";t.isAborted=s;const g=u=>u.status==="dirty";t.isDirty=g;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 d(m){}o.assertIs=d;function _(m){throw new Error}o.assertNever=_,o.arrayToEnum=m=>{const p={};for(const s of m)p[s]=s;return p},o.getValidEnumValues=m=>{const p=o.objectKeys(m).filter(g=>typeof m[m[g]]!="number"),s={};for(const g of p)s[g]=m[g];return o.objectValues(s)},o.objectValues=m=>o.objectKeys(m).map(function(p){return m[p]}),o.objectKeys=typeof Object.keys=="function"?m=>Object.keys(m):m=>{const p=[];for(const s in m)Object.prototype.hasOwnProperty.call(m,s)&&p.push(s);return p},o.find=(m,p)=>{for(const s of m)if(p(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,p=" | "){return m.map(s=>typeof s=="string"?`'${s}'`:s).join(p)}o.joinValues=v,o.jsonStringifyReplacer=(m,p)=>typeof p=="bigint"?p.toString():p})(e||(t.util=e={}));var n;(function(o){o.mergeShapes=(d,_)=>({...d,..._})})(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,p,s){s===void 0&&(s=p);var g=Object.getOwnPropertyDescriptor(m,p);(!g||("get"in g?!m.__esModule:g.writable||g.configurable))&&(g={enumerable:!0,get:function(){return m[p]}}),Object.defineProperty(v,s,g)}:function(v,m,p,s){s===void 0&&(s=p),v[s]=m[p]}),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 p in v)p!=="default"&&Object.prototype.hasOwnProperty.call(v,p)&&n(m,v,p);return r(m,v),m},d=this&&this.__exportStar||function(v,m){for(var p in v)p!=="default"&&!Object.prototype.hasOwnProperty.call(m,p)&&n(m,v,p)};Object.defineProperty(t,"__esModule",{value:!0}),t.z=void 0;const _=o(e(86340));t.z=_,d(e(86340),t),t.default=_},28412:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(94705),r=e(97442),o=(d,_)=>{let v;switch(d.code){case r.ZodIssueCode.invalid_type:d.received===n.ZodParsedType.undefined?v="Required":v=`Expected ${d.expected}, received ${d.received}`;break;case r.ZodIssueCode.invalid_literal:v=`Invalid literal value, expected ${JSON.stringify(d.expected,n.util.jsonStringifyReplacer)}`;break;case r.ZodIssueCode.unrecognized_keys:v=`Unrecognized key(s) in object: ${n.util.joinValues(d.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(d.options)}`;break;case r.ZodIssueCode.invalid_enum_value:v=`Invalid enum value. Expected ${n.util.joinValues(d.options)}, received '${d.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 d.validation=="object"?"includes"in d.validation?(v=`Invalid input: must include "${d.validation.includes}"`,typeof d.validation.position=="number"&&(v=`${v} at one or more positions greater than or equal to ${d.validation.position}`)):"startsWith"in d.validation?v=`Invalid input: must start with "${d.validation.startsWith}"`:"endsWith"in d.validation?v=`Invalid input: must end with "${d.validation.endsWith}"`:n.util.assertNever(d.validation):d.validation!=="regex"?v=`Invalid ${d.validation}`:v="Invalid";break;case r.ZodIssueCode.too_small:d.type==="array"?v=`Array must contain ${d.exact?"exactly":d.inclusive?"at least":"more than"} ${d.minimum} element(s)`:d.type==="string"?v=`String must contain ${d.exact?"exactly":d.inclusive?"at least":"over"} ${d.minimum} character(s)`:d.type==="number"?v=`Number must be ${d.exact?"exactly equal to ":d.inclusive?"greater than or equal to ":"greater than "}${d.minimum}`:d.type==="date"?v=`Date must be ${d.exact?"exactly equal to ":d.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(d.minimum))}`:v="Invalid input";break;case r.ZodIssueCode.too_big:d.type==="array"?v=`Array must contain ${d.exact?"exactly":d.inclusive?"at most":"less than"} ${d.maximum} element(s)`:d.type==="string"?v=`String must contain ${d.exact?"exactly":d.inclusive?"at most":"under"} ${d.maximum} character(s)`:d.type==="number"?v=`Number must be ${d.exact?"exactly":d.inclusive?"less than or equal to":"less than"} ${d.maximum}`:d.type==="bigint"?v=`BigInt must be ${d.exact?"exactly":d.inclusive?"less than or equal to":"less than"} ${d.maximum}`:d.type==="date"?v=`Date must be ${d.exact?"exactly":d.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(d.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 ${d.multipleOf}`;break;case r.ZodIssueCode.not_finite:v="Number must be finite";break;default:v=_.defaultError,n.util.assertNever(d)}return{message:v}};t.default=o},75226:function(x,t,e){"use strict";var n=this&&this.__classPrivateFieldGet||function(nn,nt,jt,qt){if(jt==="a"&&!qt)throw new TypeError("Private accessor was defined without a getter");if(typeof nt=="function"?nn!==nt||!qt:!nt.has(nn))throw new TypeError("Cannot read private member from an object whose class did not declare it");return jt==="m"?qt:jt==="a"?qt.call(nn):qt?qt.value:nt.get(nn)},r=this&&this.__classPrivateFieldSet||function(nn,nt,jt,qt,In){if(qt==="m")throw new TypeError("Private method is not writable");if(qt==="a"&&!In)throw new TypeError("Private accessor was defined without a setter");if(typeof nt=="function"?nn!==nt||!In:!nt.has(nn))throw new TypeError("Cannot write private member to an object whose class did not declare it");return qt==="a"?In.call(nn,jt):In?In.value=jt:nt.set(nn,jt),jt},o,d;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 _=e(30548),v=e(15759),m=e(66258),p=e(94705),s=e(97442);class g{constructor(nt,jt,qt,In){this._cachedPath=[],this.parent=nt,this.data=jt,this._path=qt,this._key=In}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=(nn,nt)=>{if((0,m.isValid)(nt))return{success:!0,data:nt.value};if(!nn.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const jt=new s.ZodError(nn.common.issues);return this._error=jt,this._error}}};function h(nn){if(!nn)return{};const{errorMap:nt,invalid_type_error:jt,required_error:qt,description:In}=nn;if(nt&&(jt||qt))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return nt?{errorMap:nt,description:In}:{errorMap:(Bi,Mi)=>{var Xi,yi;const{message:Zi}=nn;return Bi.code==="invalid_enum_value"?{message:Zi??Mi.defaultError}:typeof Mi.data>"u"?{message:(Xi=Zi??qt)!==null&&Xi!==void 0?Xi:Mi.defaultError}:Bi.code!=="invalid_type"?{message:Mi.defaultError}:{message:(yi=Zi??jt)!==null&&yi!==void 0?yi:Mi.defaultError}},description:In}}class u{get description(){return this._def.description}_getType(nt){return(0,p.getParsedType)(nt.data)}_getOrReturnCtx(nt,jt){return jt||{common:nt.parent.common,data:nt.data,parsedType:(0,p.getParsedType)(nt.data),schemaErrorMap:this._def.errorMap,path:nt.path,parent:nt.parent}}_processInputParams(nt){return{status:new m.ParseStatus,ctx:{common:nt.parent.common,data:nt.data,parsedType:(0,p.getParsedType)(nt.data),schemaErrorMap:this._def.errorMap,path:nt.path,parent:nt.parent}}}_parseSync(nt){const jt=this._parse(nt);if((0,m.isAsync)(jt))throw new Error("Synchronous parse encountered promise.");return jt}_parseAsync(nt){const jt=this._parse(nt);return Promise.resolve(jt)}parse(nt,jt){const qt=this.safeParse(nt,jt);if(qt.success)return qt.data;throw qt.error}safeParse(nt,jt){var qt;const In={common:{issues:[],async:(qt=jt?.async)!==null&&qt!==void 0?qt:!1,contextualErrorMap:jt?.errorMap},path:jt?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:nt,parsedType:(0,p.getParsedType)(nt)},jn=this._parseSync({data:nt,path:In.path,parent:In});return a(In,jn)}"~validate"(nt){var jt,qt;const In={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:nt,parsedType:(0,p.getParsedType)(nt)};if(!this["~standard"].async)try{const jn=this._parseSync({data:nt,path:[],parent:In});return(0,m.isValid)(jn)?{value:jn.value}:{issues:In.common.issues}}catch(jn){!((qt=(jt=jn?.message)===null||jt===void 0?void 0:jt.toLowerCase())===null||qt===void 0)&&qt.includes("encountered")&&(this["~standard"].async=!0),In.common={issues:[],async:!0}}return this._parseAsync({data:nt,path:[],parent:In}).then(jn=>(0,m.isValid)(jn)?{value:jn.value}:{issues:In.common.issues})}async parseAsync(nt,jt){const qt=await this.safeParseAsync(nt,jt);if(qt.success)return qt.data;throw qt.error}async safeParseAsync(nt,jt){const qt={common:{issues:[],contextualErrorMap:jt?.errorMap,async:!0},path:jt?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:nt,parsedType:(0,p.getParsedType)(nt)},In=this._parse({data:nt,path:qt.path,parent:qt}),jn=await((0,m.isAsync)(In)?In:Promise.resolve(In));return a(qt,jn)}refine(nt,jt){const qt=In=>typeof jt=="string"||typeof jt>"u"?{message:jt}:typeof jt=="function"?jt(In):jt;return this._refinement((In,jn)=>{const Bi=nt(In),Mi=()=>jn.addIssue({code:s.ZodIssueCode.custom,...qt(In)});return typeof Promise<"u"&&Bi instanceof Promise?Bi.then(Xi=>Xi?!0:(Mi(),!1)):Bi?!0:(Mi(),!1)})}refinement(nt,jt){return this._refinement((qt,In)=>nt(qt)?!0:(In.addIssue(typeof jt=="function"?jt(qt,In):jt),!1))}_refinement(nt){return new Ge({schema:this,typeName:bt.ZodEffects,effect:{type:"refinement",refinement:nt}})}superRefine(nt){return this._refinement(nt)}constructor(nt){this.spa=this.safeParseAsync,this._def=nt,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:jt=>this["~validate"](jt)}}optional(){return je.create(this,this._def)}nullable(){return gt.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Se.create(this)}promise(){return Fe.create(this,this._def)}or(nt){return ue.create([this,nt],this._def)}and(nt){return Ae.create(this,nt,this._def)}transform(nt){return new Ge({...h(this._def),schema:this,typeName:bt.ZodEffects,effect:{type:"transform",transform:nt}})}default(nt){const jt=typeof nt=="function"?nt:()=>nt;return new ot({...h(this._def),innerType:this,defaultValue:jt,typeName:bt.ZodDefault})}brand(){return new At({typeName:bt.ZodBranded,type:this,...h(this._def)})}catch(nt){const jt=typeof nt=="function"?nt:()=>nt;return new Mt({...h(this._def),innerType:this,catchValue:jt,typeName:bt.ZodCatch})}describe(nt){const jt=this.constructor;return new jt({...this._def,description:nt})}pipe(nt){return rt.create(this,nt)}readonly(){return st.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 l=/^c[^\s-]{8,}$/i,E=/^[0-9a-z]+$/,f=/^[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,y=/^[a-z0-9_-]{21}$/i,b=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,A=/^[-+]?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)?)??$/,S=/^(?!\.)(?!.*\.\.)([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])$/,O=/^(([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])$/,R=/^([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(nn){let nt="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return nn.precision?nt=`${nt}\\.\\d{${nn.precision}}`:nn.precision==null&&(nt=`${nt}(\\.\\d+)?`),nt}function B(nn){return new RegExp(`^${L(nn)}$`)}function j(nn){let nt=`${k}T${L(nn)}`;const jt=[];return jt.push(nn.local?"Z?":"Z"),nn.offset&&jt.push("([+-]\\d{2}:?\\d{2})"),nt=`${nt}(${jt.join("|")})`,new RegExp(`^${nt}$`)}t.datetimeRegex=j;function W(nn,nt){return!!((nt==="v4"||!nt)&&D.test(nn)||(nt==="v6"||!nt)&&O.test(nn))}function U(nn,nt){if(!b.test(nn))return!1;try{const[jt]=nn.split("."),qt=jt.replace(/-/g,"+").replace(/_/g,"/").padEnd(jt.length+(4-jt.length%4)%4,"="),In=JSON.parse(atob(qt));return!(typeof In!="object"||In===null||!In.typ||!In.alg||nt&&In.alg!==nt)}catch{return!1}}function Q(nn,nt){return!!((nt==="v4"||!nt)&&I.test(nn)||(nt==="v6"||!nt)&&M.test(nn))}class V extends u{_parse(nt){if(this._def.coerce&&(nt.data=String(nt.data)),this._getType(nt)!==p.ZodParsedType.string){const jn=this._getOrReturnCtx(nt);return(0,m.addIssueToContext)(jn,{code:s.ZodIssueCode.invalid_type,expected:p.ZodParsedType.string,received:jn.parsedType}),m.INVALID}const qt=new m.ParseStatus;let In;for(const jn of this._def.checks)if(jn.kind==="min")nt.data.length<jn.value&&(In=this._getOrReturnCtx(nt,In),(0,m.addIssueToContext)(In,{code:s.ZodIssueCode.too_small,minimum:jn.value,type:"string",inclusive:!0,exact:!1,message:jn.message}),qt.dirty());else if(jn.kind==="max")nt.data.length>jn.value&&(In=this._getOrReturnCtx(nt,In),(0,m.addIssueToContext)(In,{code:s.ZodIssueCode.too_big,maximum:jn.value,type:"string",inclusive:!0,exact:!1,message:jn.message}),qt.dirty());else if(jn.kind==="length"){const Bi=nt.data.length>jn.value,Mi=nt.data.length<jn.value;(Bi||Mi)&&(In=this._getOrReturnCtx(nt,In),Bi?(0,m.addIssueToContext)(In,{code:s.ZodIssueCode.too_big,maximum:jn.value,type:"string",inclusive:!0,exact:!0,message:jn.message}):Mi&&(0,m.addIssueToContext)(In,{code:s.ZodIssueCode.too_small,minimum:jn.value,type:"string",inclusive:!0,exact:!0,message:jn.message}),qt.dirty())}else if(jn.kind==="email")S.test(nt.data)||(In=this._getOrReturnCtx(nt,In),(0,m.addIssueToContext)(In,{validation:"email",code:s.ZodIssueCode.invalid_string,message:jn.message}),qt.dirty());else if(jn.kind==="emoji")T||(T=new RegExp(w,"u")),T.test(nt.data)||(In=this._getOrReturnCtx(nt,In),(0,m.addIssueToContext)(In,{validation:"emoji",code:s.ZodIssueCode.invalid_string,message:jn.message}),qt.dirty());else if(jn.kind==="uuid")c.test(nt.data)||(In=this._getOrReturnCtx(nt,In),(0,m.addIssueToContext)(In,{validation:"uuid",code:s.ZodIssueCode.invalid_string,message:jn.message}),qt.dirty());else if(jn.kind==="nanoid")y.test(nt.data)||(In=this._getOrReturnCtx(nt,In),(0,m.addIssueToContext)(In,{validation:"nanoid",code:s.ZodIssueCode.invalid_string,message:jn.message}),qt.dirty());else if(jn.kind==="cuid")l.test(nt.data)||(In=this._getOrReturnCtx(nt,In),(0,m.addIssueToContext)(In,{validation:"cuid",code:s.ZodIssueCode.invalid_string,message:jn.message}),qt.dirty());else if(jn.kind==="cuid2")E.test(nt.data)||(In=this._getOrReturnCtx(nt,In),(0,m.addIssueToContext)(In,{validation:"cuid2",code:s.ZodIssueCode.invalid_string,message:jn.message}),qt.dirty());else if(jn.kind==="ulid")f.test(nt.data)||(In=this._getOrReturnCtx(nt,In),(0,m.addIssueToContext)(In,{validation:"ulid",code:s.ZodIssueCode.invalid_string,message:jn.message}),qt.dirty());else if(jn.kind==="url")try{new URL(nt.data)}catch{In=this._getOrReturnCtx(nt,In),(0,m.addIssueToContext)(In,{validation:"url",code:s.ZodIssueCode.invalid_string,message:jn.message}),qt.dirty()}else jn.kind==="regex"?(jn.regex.lastIndex=0,jn.regex.test(nt.data)||(In=this._getOrReturnCtx(nt,In),(0,m.addIssueToContext)(In,{validation:"regex",code:s.ZodIssueCode.invalid_string,message:jn.message}),qt.dirty())):jn.kind==="trim"?nt.data=nt.data.trim():jn.kind==="includes"?nt.data.includes(jn.value,jn.position)||(In=this._getOrReturnCtx(nt,In),(0,m.addIssueToContext)(In,{code:s.ZodIssueCode.invalid_string,validation:{includes:jn.value,position:jn.position},message:jn.message}),qt.dirty()):jn.kind==="toLowerCase"?nt.data=nt.data.toLowerCase():jn.kind==="toUpperCase"?nt.data=nt.data.toUpperCase():jn.kind==="startsWith"?nt.data.startsWith(jn.value)||(In=this._getOrReturnCtx(nt,In),(0,m.addIssueToContext)(In,{code:s.ZodIssueCode.invalid_string,validation:{startsWith:jn.value},message:jn.message}),qt.dirty()):jn.kind==="endsWith"?nt.data.endsWith(jn.value)||(In=this._getOrReturnCtx(nt,In),(0,m.addIssueToContext)(In,{code:s.ZodIssueCode.invalid_string,validation:{endsWith:jn.value},message:jn.message}),qt.dirty()):jn.kind==="datetime"?j(jn).test(nt.data)||(In=this._getOrReturnCtx(nt,In),(0,m.addIssueToContext)(In,{code:s.ZodIssueCode.invalid_string,validation:"datetime",message:jn.message}),qt.dirty()):jn.kind==="date"?F.test(nt.data)||(In=this._getOrReturnCtx(nt,In),(0,m.addIssueToContext)(In,{code:s.ZodIssueCode.invalid_string,validation:"date",message:jn.message}),qt.dirty()):jn.kind==="time"?B(jn).test(nt.data)||(In=this._getOrReturnCtx(nt,In),(0,m.addIssueToContext)(In,{code:s.ZodIssueCode.invalid_string,validation:"time",message:jn.message}),qt.dirty()):jn.kind==="duration"?A.test(nt.data)||(In=this._getOrReturnCtx(nt,In),(0,m.addIssueToContext)(In,{validation:"duration",code:s.ZodIssueCode.invalid_string,message:jn.message}),qt.dirty()):jn.kind==="ip"?W(nt.data,jn.version)||(In=this._getOrReturnCtx(nt,In),(0,m.addIssueToContext)(In,{validation:"ip",code:s.ZodIssueCode.invalid_string,message:jn.message}),qt.dirty()):jn.kind==="jwt"?U(nt.data,jn.alg)||(In=this._getOrReturnCtx(nt,In),(0,m.addIssueToContext)(In,{validation:"jwt",code:s.ZodIssueCode.invalid_string,message:jn.message}),qt.dirty()):jn.kind==="cidr"?Q(nt.data,jn.version)||(In=this._getOrReturnCtx(nt,In),(0,m.addIssueToContext)(In,{validation:"cidr",code:s.ZodIssueCode.invalid_string,message:jn.message}),qt.dirty()):jn.kind==="base64"?R.test(nt.data)||(In=this._getOrReturnCtx(nt,In),(0,m.addIssueToContext)(In,{validation:"base64",code:s.ZodIssueCode.invalid_string,message:jn.message}),qt.dirty()):jn.kind==="base64url"?P.test(nt.data)||(In=this._getOrReturnCtx(nt,In),(0,m.addIssueToContext)(In,{validation:"base64url",code:s.ZodIssueCode.invalid_string,message:jn.message}),qt.dirty()):p.util.assertNever(jn);return{status:qt.value,value:nt.data}}_regex(nt,jt,qt){return this.refinement(In=>nt.test(In),{validation:jt,code:s.ZodIssueCode.invalid_string,...v.errorUtil.errToObj(qt)})}_addCheck(nt){return new V({...this._def,checks:[...this._def.checks,nt]})}email(nt){return this._addCheck({kind:"email",...v.errorUtil.errToObj(nt)})}url(nt){return this._addCheck({kind:"url",...v.errorUtil.errToObj(nt)})}emoji(nt){return this._addCheck({kind:"emoji",...v.errorUtil.errToObj(nt)})}uuid(nt){return this._addCheck({kind:"uuid",...v.errorUtil.errToObj(nt)})}nanoid(nt){return this._addCheck({kind:"nanoid",...v.errorUtil.errToObj(nt)})}cuid(nt){return this._addCheck({kind:"cuid",...v.errorUtil.errToObj(nt)})}cuid2(nt){return this._addCheck({kind:"cuid2",...v.errorUtil.errToObj(nt)})}ulid(nt){return this._addCheck({kind:"ulid",...v.errorUtil.errToObj(nt)})}base64(nt){return this._addCheck({kind:"base64",...v.errorUtil.errToObj(nt)})}base64url(nt){return this._addCheck({kind:"base64url",...v.errorUtil.errToObj(nt)})}jwt(nt){return this._addCheck({kind:"jwt",...v.errorUtil.errToObj(nt)})}ip(nt){return this._addCheck({kind:"ip",...v.errorUtil.errToObj(nt)})}cidr(nt){return this._addCheck({kind:"cidr",...v.errorUtil.errToObj(nt)})}datetime(nt){var jt,qt;return typeof nt=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:nt}):this._addCheck({kind:"datetime",precision:typeof nt?.precision>"u"?null:nt?.precision,offset:(jt=nt?.offset)!==null&&jt!==void 0?jt:!1,local:(qt=nt?.local)!==null&&qt!==void 0?qt:!1,...v.errorUtil.errToObj(nt?.message)})}date(nt){return this._addCheck({kind:"date",message:nt})}time(nt){return typeof nt=="string"?this._addCheck({kind:"time",precision:null,message:nt}):this._addCheck({kind:"time",precision:typeof nt?.precision>"u"?null:nt?.precision,...v.errorUtil.errToObj(nt?.message)})}duration(nt){return this._addCheck({kind:"duration",...v.errorUtil.errToObj(nt)})}regex(nt,jt){return this._addCheck({kind:"regex",regex:nt,...v.errorUtil.errToObj(jt)})}includes(nt,jt){return this._addCheck({kind:"includes",value:nt,position:jt?.position,...v.errorUtil.errToObj(jt?.message)})}startsWith(nt,jt){return this._addCheck({kind:"startsWith",value:nt,...v.errorUtil.errToObj(jt)})}endsWith(nt,jt){return this._addCheck({kind:"endsWith",value:nt,...v.errorUtil.errToObj(jt)})}min(nt,jt){return this._addCheck({kind:"min",value:nt,...v.errorUtil.errToObj(jt)})}max(nt,jt){return this._addCheck({kind:"max",value:nt,...v.errorUtil.errToObj(jt)})}length(nt,jt){return this._addCheck({kind:"length",value:nt,...v.errorUtil.errToObj(jt)})}nonempty(nt){return this.min(1,v.errorUtil.errToObj(nt))}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(nt=>nt.kind==="datetime")}get isDate(){return!!this._def.checks.find(nt=>nt.kind==="date")}get isTime(){return!!this._def.checks.find(nt=>nt.kind==="time")}get isDuration(){return!!this._def.checks.find(nt=>nt.kind==="duration")}get isEmail(){return!!this._def.checks.find(nt=>nt.kind==="email")}get isURL(){return!!this._def.checks.find(nt=>nt.kind==="url")}get isEmoji(){return!!this._def.checks.find(nt=>nt.kind==="emoji")}get isUUID(){return!!this._def.checks.find(nt=>nt.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(nt=>nt.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(nt=>nt.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(nt=>nt.kind==="cuid2")}get isULID(){return!!this._def.checks.find(nt=>nt.kind==="ulid")}get isIP(){return!!this._def.checks.find(nt=>nt.kind==="ip")}get isCIDR(){return!!this._def.checks.find(nt=>nt.kind==="cidr")}get isBase64(){return!!this._def.checks.find(nt=>nt.kind==="base64")}get isBase64url(){return!!this._def.checks.find(nt=>nt.kind==="base64url")}get minLength(){let nt=null;for(const jt of this._def.checks)jt.kind==="min"&&(nt===null||jt.value>nt)&&(nt=jt.value);return nt}get maxLength(){let nt=null;for(const jt of this._def.checks)jt.kind==="max"&&(nt===null||jt.value<nt)&&(nt=jt.value);return nt}}t.ZodString=V,V.create=nn=>{var nt;return new V({checks:[],typeName:bt.ZodString,coerce:(nt=nn?.coerce)!==null&&nt!==void 0?nt:!1,...h(nn)})};function $(nn,nt){const jt=(nn.toString().split(".")[1]||"").length,qt=(nt.toString().split(".")[1]||"").length,In=jt>qt?jt:qt,jn=parseInt(nn.toFixed(In).replace(".","")),Bi=parseInt(nt.toFixed(In).replace(".",""));return jn%Bi/Math.pow(10,In)}class Y extends u{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(nt){if(this._def.coerce&&(nt.data=Number(nt.data)),this._getType(nt)!==p.ZodParsedType.number){const jn=this._getOrReturnCtx(nt);return(0,m.addIssueToContext)(jn,{code:s.ZodIssueCode.invalid_type,expected:p.ZodParsedType.number,received:jn.parsedType}),m.INVALID}let qt;const In=new m.ParseStatus;for(const jn of this._def.checks)jn.kind==="int"?p.util.isInteger(nt.data)||(qt=this._getOrReturnCtx(nt,qt),(0,m.addIssueToContext)(qt,{code:s.ZodIssueCode.invalid_type,expected:"integer",received:"float",message:jn.message}),In.dirty()):jn.kind==="min"?(jn.inclusive?nt.data<jn.value:nt.data<=jn.value)&&(qt=this._getOrReturnCtx(nt,qt),(0,m.addIssueToContext)(qt,{code:s.ZodIssueCode.too_small,minimum:jn.value,type:"number",inclusive:jn.inclusive,exact:!1,message:jn.message}),In.dirty()):jn.kind==="max"?(jn.inclusive?nt.data>jn.value:nt.data>=jn.value)&&(qt=this._getOrReturnCtx(nt,qt),(0,m.addIssueToContext)(qt,{code:s.ZodIssueCode.too_big,maximum:jn.value,type:"number",inclusive:jn.inclusive,exact:!1,message:jn.message}),In.dirty()):jn.kind==="multipleOf"?$(nt.data,jn.value)!==0&&(qt=this._getOrReturnCtx(nt,qt),(0,m.addIssueToContext)(qt,{code:s.ZodIssueCode.not_multiple_of,multipleOf:jn.value,message:jn.message}),In.dirty()):jn.kind==="finite"?Number.isFinite(nt.data)||(qt=this._getOrReturnCtx(nt,qt),(0,m.addIssueToContext)(qt,{code:s.ZodIssueCode.not_finite,message:jn.message}),In.dirty()):p.util.assertNever(jn);return{status:In.value,value:nt.data}}gte(nt,jt){return this.setLimit("min",nt,!0,v.errorUtil.toString(jt))}gt(nt,jt){return this.setLimit("min",nt,!1,v.errorUtil.toString(jt))}lte(nt,jt){return this.setLimit("max",nt,!0,v.errorUtil.toString(jt))}lt(nt,jt){return this.setLimit("max",nt,!1,v.errorUtil.toString(jt))}setLimit(nt,jt,qt,In){return new Y({...this._def,checks:[...this._def.checks,{kind:nt,value:jt,inclusive:qt,message:v.errorUtil.toString(In)}]})}_addCheck(nt){return new Y({...this._def,checks:[...this._def.checks,nt]})}int(nt){return this._addCheck({kind:"int",message:v.errorUtil.toString(nt)})}positive(nt){return this._addCheck({kind:"min",value:0,inclusive:!1,message:v.errorUtil.toString(nt)})}negative(nt){return this._addCheck({kind:"max",value:0,inclusive:!1,message:v.errorUtil.toString(nt)})}nonpositive(nt){return this._addCheck({kind:"max",value:0,inclusive:!0,message:v.errorUtil.toString(nt)})}nonnegative(nt){return this._addCheck({kind:"min",value:0,inclusive:!0,message:v.errorUtil.toString(nt)})}multipleOf(nt,jt){return this._addCheck({kind:"multipleOf",value:nt,message:v.errorUtil.toString(jt)})}finite(nt){return this._addCheck({kind:"finite",message:v.errorUtil.toString(nt)})}safe(nt){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:v.errorUtil.toString(nt)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:v.errorUtil.toString(nt)})}get minValue(){let nt=null;for(const jt of this._def.checks)jt.kind==="min"&&(nt===null||jt.value>nt)&&(nt=jt.value);return nt}get maxValue(){let nt=null;for(const jt of this._def.checks)jt.kind==="max"&&(nt===null||jt.value<nt)&&(nt=jt.value);return nt}get isInt(){return!!this._def.checks.find(nt=>nt.kind==="int"||nt.kind==="multipleOf"&&p.util.isInteger(nt.value))}get isFinite(){let nt=null,jt=null;for(const qt of this._def.checks){if(qt.kind==="finite"||qt.kind==="int"||qt.kind==="multipleOf")return!0;qt.kind==="min"?(jt===null||qt.value>jt)&&(jt=qt.value):qt.kind==="max"&&(nt===null||qt.value<nt)&&(nt=qt.value)}return Number.isFinite(jt)&&Number.isFinite(nt)}}t.ZodNumber=Y,Y.create=nn=>new Y({checks:[],typeName:bt.ZodNumber,coerce:nn?.coerce||!1,...h(nn)});class z extends u{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(nt){if(this._def.coerce)try{nt.data=BigInt(nt.data)}catch{return this._getInvalidInput(nt)}if(this._getType(nt)!==p.ZodParsedType.bigint)return this._getInvalidInput(nt);let qt;const In=new m.ParseStatus;for(const jn of this._def.checks)jn.kind==="min"?(jn.inclusive?nt.data<jn.value:nt.data<=jn.value)&&(qt=this._getOrReturnCtx(nt,qt),(0,m.addIssueToContext)(qt,{code:s.ZodIssueCode.too_small,type:"bigint",minimum:jn.value,inclusive:jn.inclusive,message:jn.message}),In.dirty()):jn.kind==="max"?(jn.inclusive?nt.data>jn.value:nt.data>=jn.value)&&(qt=this._getOrReturnCtx(nt,qt),(0,m.addIssueToContext)(qt,{code:s.ZodIssueCode.too_big,type:"bigint",maximum:jn.value,inclusive:jn.inclusive,message:jn.message}),In.dirty()):jn.kind==="multipleOf"?nt.data%jn.value!==BigInt(0)&&(qt=this._getOrReturnCtx(nt,qt),(0,m.addIssueToContext)(qt,{code:s.ZodIssueCode.not_multiple_of,multipleOf:jn.value,message:jn.message}),In.dirty()):p.util.assertNever(jn);return{status:In.value,value:nt.data}}_getInvalidInput(nt){const jt=this._getOrReturnCtx(nt);return(0,m.addIssueToContext)(jt,{code:s.ZodIssueCode.invalid_type,expected:p.ZodParsedType.bigint,received:jt.parsedType}),m.INVALID}gte(nt,jt){return this.setLimit("min",nt,!0,v.errorUtil.toString(jt))}gt(nt,jt){return this.setLimit("min",nt,!1,v.errorUtil.toString(jt))}lte(nt,jt){return this.setLimit("max",nt,!0,v.errorUtil.toString(jt))}lt(nt,jt){return this.setLimit("max",nt,!1,v.errorUtil.toString(jt))}setLimit(nt,jt,qt,In){return new z({...this._def,checks:[...this._def.checks,{kind:nt,value:jt,inclusive:qt,message:v.errorUtil.toString(In)}]})}_addCheck(nt){return new z({...this._def,checks:[...this._def.checks,nt]})}positive(nt){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:v.errorUtil.toString(nt)})}negative(nt){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:v.errorUtil.toString(nt)})}nonpositive(nt){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:v.errorUtil.toString(nt)})}nonnegative(nt){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:v.errorUtil.toString(nt)})}multipleOf(nt,jt){return this._addCheck({kind:"multipleOf",value:nt,message:v.errorUtil.toString(jt)})}get minValue(){let nt=null;for(const jt of this._def.checks)jt.kind==="min"&&(nt===null||jt.value>nt)&&(nt=jt.value);return nt}get maxValue(){let nt=null;for(const jt of this._def.checks)jt.kind==="max"&&(nt===null||jt.value<nt)&&(nt=jt.value);return nt}}t.ZodBigInt=z,z.create=nn=>{var nt;return new z({checks:[],typeName:bt.ZodBigInt,coerce:(nt=nn?.coerce)!==null&&nt!==void 0?nt:!1,...h(nn)})};class H extends u{_parse(nt){if(this._def.coerce&&(nt.data=!!nt.data),this._getType(nt)!==p.ZodParsedType.boolean){const qt=this._getOrReturnCtx(nt);return(0,m.addIssueToContext)(qt,{code:s.ZodIssueCode.invalid_type,expected:p.ZodParsedType.boolean,received:qt.parsedType}),m.INVALID}return(0,m.OK)(nt.data)}}t.ZodBoolean=H,H.create=nn=>new H({typeName:bt.ZodBoolean,coerce:nn?.coerce||!1,...h(nn)});class K extends u{_parse(nt){if(this._def.coerce&&(nt.data=new Date(nt.data)),this._getType(nt)!==p.ZodParsedType.date){const jn=this._getOrReturnCtx(nt);return(0,m.addIssueToContext)(jn,{code:s.ZodIssueCode.invalid_type,expected:p.ZodParsedType.date,received:jn.parsedType}),m.INVALID}if(isNaN(nt.data.getTime())){const jn=this._getOrReturnCtx(nt);return(0,m.addIssueToContext)(jn,{code:s.ZodIssueCode.invalid_date}),m.INVALID}const qt=new m.ParseStatus;let In;for(const jn of this._def.checks)jn.kind==="min"?nt.data.getTime()<jn.value&&(In=this._getOrReturnCtx(nt,In),(0,m.addIssueToContext)(In,{code:s.ZodIssueCode.too_small,message:jn.message,inclusive:!0,exact:!1,minimum:jn.value,type:"date"}),qt.dirty()):jn.kind==="max"?nt.data.getTime()>jn.value&&(In=this._getOrReturnCtx(nt,In),(0,m.addIssueToContext)(In,{code:s.ZodIssueCode.too_big,message:jn.message,inclusive:!0,exact:!1,maximum:jn.value,type:"date"}),qt.dirty()):p.util.assertNever(jn);return{status:qt.value,value:new Date(nt.data.getTime())}}_addCheck(nt){return new K({...this._def,checks:[...this._def.checks,nt]})}min(nt,jt){return this._addCheck({kind:"min",value:nt.getTime(),message:v.errorUtil.toString(jt)})}max(nt,jt){return this._addCheck({kind:"max",value:nt.getTime(),message:v.errorUtil.toString(jt)})}get minDate(){let nt=null;for(const jt of this._def.checks)jt.kind==="min"&&(nt===null||jt.value>nt)&&(nt=jt.value);return nt!=null?new Date(nt):null}get maxDate(){let nt=null;for(const jt of this._def.checks)jt.kind==="max"&&(nt===null||jt.value<nt)&&(nt=jt.value);return nt!=null?new Date(nt):null}}t.ZodDate=K,K.create=nn=>new K({checks:[],coerce:nn?.coerce||!1,typeName:bt.ZodDate,...h(nn)});class Z extends u{_parse(nt){if(this._getType(nt)!==p.ZodParsedType.symbol){const qt=this._getOrReturnCtx(nt);return(0,m.addIssueToContext)(qt,{code:s.ZodIssueCode.invalid_type,expected:p.ZodParsedType.symbol,received:qt.parsedType}),m.INVALID}return(0,m.OK)(nt.data)}}t.ZodSymbol=Z,Z.create=nn=>new Z({typeName:bt.ZodSymbol,...h(nn)});class X extends u{_parse(nt){if(this._getType(nt)!==p.ZodParsedType.undefined){const qt=this._getOrReturnCtx(nt);return(0,m.addIssueToContext)(qt,{code:s.ZodIssueCode.invalid_type,expected:p.ZodParsedType.undefined,received:qt.parsedType}),m.INVALID}return(0,m.OK)(nt.data)}}t.ZodUndefined=X,X.create=nn=>new X({typeName:bt.ZodUndefined,...h(nn)});class oe extends u{_parse(nt){if(this._getType(nt)!==p.ZodParsedType.null){const qt=this._getOrReturnCtx(nt);return(0,m.addIssueToContext)(qt,{code:s.ZodIssueCode.invalid_type,expected:p.ZodParsedType.null,received:qt.parsedType}),m.INVALID}return(0,m.OK)(nt.data)}}t.ZodNull=oe,oe.create=nn=>new oe({typeName:bt.ZodNull,...h(nn)});class ie extends u{constructor(){super(...arguments),this._any=!0}_parse(nt){return(0,m.OK)(nt.data)}}t.ZodAny=ie,ie.create=nn=>new ie({typeName:bt.ZodAny,...h(nn)});class ge extends u{constructor(){super(...arguments),this._unknown=!0}_parse(nt){return(0,m.OK)(nt.data)}}t.ZodUnknown=ge,ge.create=nn=>new ge({typeName:bt.ZodUnknown,...h(nn)});class me extends u{_parse(nt){const jt=this._getOrReturnCtx(nt);return(0,m.addIssueToContext)(jt,{code:s.ZodIssueCode.invalid_type,expected:p.ZodParsedType.never,received:jt.parsedType}),m.INVALID}}t.ZodNever=me,me.create=nn=>new me({typeName:bt.ZodNever,...h(nn)});class q extends u{_parse(nt){if(this._getType(nt)!==p.ZodParsedType.undefined){const qt=this._getOrReturnCtx(nt);return(0,m.addIssueToContext)(qt,{code:s.ZodIssueCode.invalid_type,expected:p.ZodParsedType.void,received:qt.parsedType}),m.INVALID}return(0,m.OK)(nt.data)}}t.ZodVoid=q,q.create=nn=>new q({typeName:bt.ZodVoid,...h(nn)});class Se extends u{_parse(nt){const{ctx:jt,status:qt}=this._processInputParams(nt),In=this._def;if(jt.parsedType!==p.ZodParsedType.array)return(0,m.addIssueToContext)(jt,{code:s.ZodIssueCode.invalid_type,expected:p.ZodParsedType.array,received:jt.parsedType}),m.INVALID;if(In.exactLength!==null){const Bi=jt.data.length>In.exactLength.value,Mi=jt.data.length<In.exactLength.value;(Bi||Mi)&&((0,m.addIssueToContext)(jt,{code:Bi?s.ZodIssueCode.too_big:s.ZodIssueCode.too_small,minimum:Mi?In.exactLength.value:void 0,maximum:Bi?In.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:In.exactLength.message}),qt.dirty())}if(In.minLength!==null&&jt.data.length<In.minLength.value&&((0,m.addIssueToContext)(jt,{code:s.ZodIssueCode.too_small,minimum:In.minLength.value,type:"array",inclusive:!0,exact:!1,message:In.minLength.message}),qt.dirty()),In.maxLength!==null&&jt.data.length>In.maxLength.value&&((0,m.addIssueToContext)(jt,{code:s.ZodIssueCode.too_big,maximum:In.maxLength.value,type:"array",inclusive:!0,exact:!1,message:In.maxLength.message}),qt.dirty()),jt.common.async)return Promise.all([...jt.data].map((Bi,Mi)=>In.type._parseAsync(new g(jt,Bi,jt.path,Mi)))).then(Bi=>m.ParseStatus.mergeArray(qt,Bi));const jn=[...jt.data].map((Bi,Mi)=>In.type._parseSync(new g(jt,Bi,jt.path,Mi)));return m.ParseStatus.mergeArray(qt,jn)}get element(){return this._def.type}min(nt,jt){return new Se({...this._def,minLength:{value:nt,message:v.errorUtil.toString(jt)}})}max(nt,jt){return new Se({...this._def,maxLength:{value:nt,message:v.errorUtil.toString(jt)}})}length(nt,jt){return new Se({...this._def,exactLength:{value:nt,message:v.errorUtil.toString(jt)}})}nonempty(nt){return this.min(1,nt)}}t.ZodArray=Se,Se.create=(nn,nt)=>new Se({type:nn,minLength:null,maxLength:null,exactLength:null,typeName:bt.ZodArray,...h(nt)});function _e(nn){if(nn instanceof ne){const nt={};for(const jt in nn.shape){const qt=nn.shape[jt];nt[jt]=je.create(_e(qt))}return new ne({...nn._def,shape:()=>nt})}else return nn instanceof Se?new Se({...nn._def,type:_e(nn.element)}):nn instanceof je?je.create(_e(nn.unwrap())):nn instanceof gt?gt.create(_e(nn.unwrap())):nn instanceof Ce?Ce.create(nn.items.map(nt=>_e(nt))):nn}class ne 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 nt=this._def.shape(),jt=p.util.objectKeys(nt);return this._cached={shape:nt,keys:jt}}_parse(nt){if(this._getType(nt)!==p.ZodParsedType.object){const yi=this._getOrReturnCtx(nt);return(0,m.addIssueToContext)(yi,{code:s.ZodIssueCode.invalid_type,expected:p.ZodParsedType.object,received:yi.parsedType}),m.INVALID}const{status:qt,ctx:In}=this._processInputParams(nt),{shape:jn,keys:Bi}=this._getCached(),Mi=[];if(!(this._def.catchall instanceof me&&this._def.unknownKeys==="strip"))for(const yi in In.data)Bi.includes(yi)||Mi.push(yi);const Xi=[];for(const yi of Bi){const Zi=jn[yi],to=In.data[yi];Xi.push({key:{status:"valid",value:yi},value:Zi._parse(new g(In,to,In.path,yi)),alwaysSet:yi in In.data})}if(this._def.catchall instanceof me){const yi=this._def.unknownKeys;if(yi==="passthrough")for(const Zi of Mi)Xi.push({key:{status:"valid",value:Zi},value:{status:"valid",value:In.data[Zi]}});else if(yi==="strict")Mi.length>0&&((0,m.addIssueToContext)(In,{code:s.ZodIssueCode.unrecognized_keys,keys:Mi}),qt.dirty());else if(yi!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const yi=this._def.catchall;for(const Zi of Mi){const to=In.data[Zi];Xi.push({key:{status:"valid",value:Zi},value:yi._parse(new g(In,to,In.path,Zi)),alwaysSet:Zi in In.data})}}return In.common.async?Promise.resolve().then(async()=>{const yi=[];for(const Zi of Xi){const to=await Zi.key,uo=await Zi.value;yi.push({key:to,value:uo,alwaysSet:Zi.alwaysSet})}return yi}).then(yi=>m.ParseStatus.mergeObjectSync(qt,yi)):m.ParseStatus.mergeObjectSync(qt,Xi)}get shape(){return this._def.shape()}strict(nt){return v.errorUtil.errToObj,new ne({...this._def,unknownKeys:"strict",...nt!==void 0?{errorMap:(jt,qt)=>{var In,jn,Bi,Mi;const Xi=(Bi=(jn=(In=this._def).errorMap)===null||jn===void 0?void 0:jn.call(In,jt,qt).message)!==null&&Bi!==void 0?Bi:qt.defaultError;return jt.code==="unrecognized_keys"?{message:(Mi=v.errorUtil.errToObj(nt).message)!==null&&Mi!==void 0?Mi:Xi}:{message:Xi}}}:{}})}strip(){return new ne({...this._def,unknownKeys:"strip"})}passthrough(){return new ne({...this._def,unknownKeys:"passthrough"})}extend(nt){return new ne({...this._def,shape:()=>({...this._def.shape(),...nt})})}merge(nt){return new ne({unknownKeys:nt._def.unknownKeys,catchall:nt._def.catchall,shape:()=>({...this._def.shape(),...nt._def.shape()}),typeName:bt.ZodObject})}setKey(nt,jt){return this.augment({[nt]:jt})}catchall(nt){return new ne({...this._def,catchall:nt})}pick(nt){const jt={};return p.util.objectKeys(nt).forEach(qt=>{nt[qt]&&this.shape[qt]&&(jt[qt]=this.shape[qt])}),new ne({...this._def,shape:()=>jt})}omit(nt){const jt={};return p.util.objectKeys(this.shape).forEach(qt=>{nt[qt]||(jt[qt]=this.shape[qt])}),new ne({...this._def,shape:()=>jt})}deepPartial(){return _e(this)}partial(nt){const jt={};return p.util.objectKeys(this.shape).forEach(qt=>{const In=this.shape[qt];nt&&!nt[qt]?jt[qt]=In:jt[qt]=In.optional()}),new ne({...this._def,shape:()=>jt})}required(nt){const jt={};return p.util.objectKeys(this.shape).forEach(qt=>{if(nt&&!nt[qt])jt[qt]=this.shape[qt];else{let jn=this.shape[qt];for(;jn instanceof je;)jn=jn._def.innerType;jt[qt]=jn}}),new ne({...this._def,shape:()=>jt})}keyof(){return he(p.util.objectKeys(this.shape))}}t.ZodObject=ne,ne.create=(nn,nt)=>new ne({shape:()=>nn,unknownKeys:"strip",catchall:me.create(),typeName:bt.ZodObject,...h(nt)}),ne.strictCreate=(nn,nt)=>new ne({shape:()=>nn,unknownKeys:"strict",catchall:me.create(),typeName:bt.ZodObject,...h(nt)}),ne.lazycreate=(nn,nt)=>new ne({shape:nn,unknownKeys:"strip",catchall:me.create(),typeName:bt.ZodObject,...h(nt)});class ue extends u{_parse(nt){const{ctx:jt}=this._processInputParams(nt),qt=this._def.options;function In(jn){for(const Mi of jn)if(Mi.result.status==="valid")return Mi.result;for(const Mi of jn)if(Mi.result.status==="dirty")return jt.common.issues.push(...Mi.ctx.common.issues),Mi.result;const Bi=jn.map(Mi=>new s.ZodError(Mi.ctx.common.issues));return(0,m.addIssueToContext)(jt,{code:s.ZodIssueCode.invalid_union,unionErrors:Bi}),m.INVALID}if(jt.common.async)return Promise.all(qt.map(async jn=>{const Bi={...jt,common:{...jt.common,issues:[]},parent:null};return{result:await jn._parseAsync({data:jt.data,path:jt.path,parent:Bi}),ctx:Bi}})).then(In);{let jn;const Bi=[];for(const Xi of qt){const yi={...jt,common:{...jt.common,issues:[]},parent:null},Zi=Xi._parseSync({data:jt.data,path:jt.path,parent:yi});if(Zi.status==="valid")return Zi;Zi.status==="dirty"&&!jn&&(jn={result:Zi,ctx:yi}),yi.common.issues.length&&Bi.push(yi.common.issues)}if(jn)return jt.common.issues.push(...jn.ctx.common.issues),jn.result;const Mi=Bi.map(Xi=>new s.ZodError(Xi));return(0,m.addIssueToContext)(jt,{code:s.ZodIssueCode.invalid_union,unionErrors:Mi}),m.INVALID}}get options(){return this._def.options}}t.ZodUnion=ue,ue.create=(nn,nt)=>new ue({options:nn,typeName:bt.ZodUnion,...h(nt)});const Ie=nn=>nn instanceof pe?Ie(nn.schema):nn instanceof Ge?Ie(nn.innerType()):nn instanceof re?[nn.value]:nn instanceof Oe?nn.options:nn instanceof De?p.util.objectValues(nn.enum):nn instanceof ot?Ie(nn._def.innerType):nn instanceof X?[void 0]:nn instanceof oe?[null]:nn instanceof je?[void 0,...Ie(nn.unwrap())]:nn instanceof gt?[null,...Ie(nn.unwrap())]:nn instanceof At||nn instanceof st?Ie(nn.unwrap()):nn instanceof Mt?Ie(nn._def.innerType):[];class Pe extends u{_parse(nt){const{ctx:jt}=this._processInputParams(nt);if(jt.parsedType!==p.ZodParsedType.object)return(0,m.addIssueToContext)(jt,{code:s.ZodIssueCode.invalid_type,expected:p.ZodParsedType.object,received:jt.parsedType}),m.INVALID;const qt=this.discriminator,In=jt.data[qt],jn=this.optionsMap.get(In);return jn?jt.common.async?jn._parseAsync({data:jt.data,path:jt.path,parent:jt}):jn._parseSync({data:jt.data,path:jt.path,parent:jt}):((0,m.addIssueToContext)(jt,{code:s.ZodIssueCode.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[qt]}),m.INVALID)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(nt,jt,qt){const In=new Map;for(const jn of jt){const Bi=Ie(jn.shape[nt]);if(!Bi.length)throw new Error(`A discriminator value for key \`${nt}\` could not be extracted from all schema options`);for(const Mi of Bi){if(In.has(Mi))throw new Error(`Discriminator property ${String(nt)} has duplicate value ${String(Mi)}`);In.set(Mi,jn)}}return new Pe({typeName:bt.ZodDiscriminatedUnion,discriminator:nt,options:jt,optionsMap:In,...h(qt)})}}t.ZodDiscriminatedUnion=Pe;function ve(nn,nt){const jt=(0,p.getParsedType)(nn),qt=(0,p.getParsedType)(nt);if(nn===nt)return{valid:!0,data:nn};if(jt===p.ZodParsedType.object&&qt===p.ZodParsedType.object){const In=p.util.objectKeys(nt),jn=p.util.objectKeys(nn).filter(Mi=>In.indexOf(Mi)!==-1),Bi={...nn,...nt};for(const Mi of jn){const Xi=ve(nn[Mi],nt[Mi]);if(!Xi.valid)return{valid:!1};Bi[Mi]=Xi.data}return{valid:!0,data:Bi}}else if(jt===p.ZodParsedType.array&&qt===p.ZodParsedType.array){if(nn.length!==nt.length)return{valid:!1};const In=[];for(let jn=0;jn<nn.length;jn++){const Bi=nn[jn],Mi=nt[jn],Xi=ve(Bi,Mi);if(!Xi.valid)return{valid:!1};In.push(Xi.data)}return{valid:!0,data:In}}else return jt===p.ZodParsedType.date&&qt===p.ZodParsedType.date&&+nn==+nt?{valid:!0,data:nn}:{valid:!1}}class Ae extends u{_parse(nt){const{status:jt,ctx:qt}=this._processInputParams(nt),In=(jn,Bi)=>{if((0,m.isAborted)(jn)||(0,m.isAborted)(Bi))return m.INVALID;const Mi=ve(jn.value,Bi.value);return Mi.valid?(((0,m.isDirty)(jn)||(0,m.isDirty)(Bi))&&jt.dirty(),{status:jt.value,value:Mi.data}):((0,m.addIssueToContext)(qt,{code:s.ZodIssueCode.invalid_intersection_types}),m.INVALID)};return qt.common.async?Promise.all([this._def.left._parseAsync({data:qt.data,path:qt.path,parent:qt}),this._def.right._parseAsync({data:qt.data,path:qt.path,parent:qt})]).then(([jn,Bi])=>In(jn,Bi)):In(this._def.left._parseSync({data:qt.data,path:qt.path,parent:qt}),this._def.right._parseSync({data:qt.data,path:qt.path,parent:qt}))}}t.ZodIntersection=Ae,Ae.create=(nn,nt,jt)=>new Ae({left:nn,right:nt,typeName:bt.ZodIntersection,...h(jt)});class Ce extends u{_parse(nt){const{status:jt,ctx:qt}=this._processInputParams(nt);if(qt.parsedType!==p.ZodParsedType.array)return(0,m.addIssueToContext)(qt,{code:s.ZodIssueCode.invalid_type,expected:p.ZodParsedType.array,received:qt.parsedType}),m.INVALID;if(qt.data.length<this._def.items.length)return(0,m.addIssueToContext)(qt,{code:s.ZodIssueCode.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),m.INVALID;!this._def.rest&&qt.data.length>this._def.items.length&&((0,m.addIssueToContext)(qt,{code:s.ZodIssueCode.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),jt.dirty());const jn=[...qt.data].map((Bi,Mi)=>{const Xi=this._def.items[Mi]||this._def.rest;return Xi?Xi._parse(new g(qt,Bi,qt.path,Mi)):null}).filter(Bi=>!!Bi);return qt.common.async?Promise.all(jn).then(Bi=>m.ParseStatus.mergeArray(jt,Bi)):m.ParseStatus.mergeArray(jt,jn)}get items(){return this._def.items}rest(nt){return new Ce({...this._def,rest:nt})}}t.ZodTuple=Ce,Ce.create=(nn,nt)=>{if(!Array.isArray(nn))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Ce({items:nn,typeName:bt.ZodTuple,rest:null,...h(nt)})};class fe extends u{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(nt){const{status:jt,ctx:qt}=this._processInputParams(nt);if(qt.parsedType!==p.ZodParsedType.object)return(0,m.addIssueToContext)(qt,{code:s.ZodIssueCode.invalid_type,expected:p.ZodParsedType.object,received:qt.parsedType}),m.INVALID;const In=[],jn=this._def.keyType,Bi=this._def.valueType;for(const Mi in qt.data)In.push({key:jn._parse(new g(qt,Mi,qt.path,Mi)),value:Bi._parse(new g(qt,qt.data[Mi],qt.path,Mi)),alwaysSet:Mi in qt.data});return qt.common.async?m.ParseStatus.mergeObjectAsync(jt,In):m.ParseStatus.mergeObjectSync(jt,In)}get element(){return this._def.valueType}static create(nt,jt,qt){return jt instanceof u?new fe({keyType:nt,valueType:jt,typeName:bt.ZodRecord,...h(qt)}):new fe({keyType:V.create(),valueType:nt,typeName:bt.ZodRecord,...h(jt)})}}t.ZodRecord=fe;class xe extends u{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(nt){const{status:jt,ctx:qt}=this._processInputParams(nt);if(qt.parsedType!==p.ZodParsedType.map)return(0,m.addIssueToContext)(qt,{code:s.ZodIssueCode.invalid_type,expected:p.ZodParsedType.map,received:qt.parsedType}),m.INVALID;const In=this._def.keyType,jn=this._def.valueType,Bi=[...qt.data.entries()].map(([Mi,Xi],yi)=>({key:In._parse(new g(qt,Mi,qt.path,[yi,"key"])),value:jn._parse(new g(qt,Xi,qt.path,[yi,"value"]))}));if(qt.common.async){const Mi=new Map;return Promise.resolve().then(async()=>{for(const Xi of Bi){const yi=await Xi.key,Zi=await Xi.value;if(yi.status==="aborted"||Zi.status==="aborted")return m.INVALID;(yi.status==="dirty"||Zi.status==="dirty")&&jt.dirty(),Mi.set(yi.value,Zi.value)}return{status:jt.value,value:Mi}})}else{const Mi=new Map;for(const Xi of Bi){const yi=Xi.key,Zi=Xi.value;if(yi.status==="aborted"||Zi.status==="aborted")return m.INVALID;(yi.status==="dirty"||Zi.status==="dirty")&&jt.dirty(),Mi.set(yi.value,Zi.value)}return{status:jt.value,value:Mi}}}}t.ZodMap=xe,xe.create=(nn,nt,jt)=>new xe({valueType:nt,keyType:nn,typeName:bt.ZodMap,...h(jt)});class Te extends u{_parse(nt){const{status:jt,ctx:qt}=this._processInputParams(nt);if(qt.parsedType!==p.ZodParsedType.set)return(0,m.addIssueToContext)(qt,{code:s.ZodIssueCode.invalid_type,expected:p.ZodParsedType.set,received:qt.parsedType}),m.INVALID;const In=this._def;In.minSize!==null&&qt.data.size<In.minSize.value&&((0,m.addIssueToContext)(qt,{code:s.ZodIssueCode.too_small,minimum:In.minSize.value,type:"set",inclusive:!0,exact:!1,message:In.minSize.message}),jt.dirty()),In.maxSize!==null&&qt.data.size>In.maxSize.value&&((0,m.addIssueToContext)(qt,{code:s.ZodIssueCode.too_big,maximum:In.maxSize.value,type:"set",inclusive:!0,exact:!1,message:In.maxSize.message}),jt.dirty());const jn=this._def.valueType;function Bi(Xi){const yi=new Set;for(const Zi of Xi){if(Zi.status==="aborted")return m.INVALID;Zi.status==="dirty"&&jt.dirty(),yi.add(Zi.value)}return{status:jt.value,value:yi}}const Mi=[...qt.data.values()].map((Xi,yi)=>jn._parse(new g(qt,Xi,qt.path,yi)));return qt.common.async?Promise.all(Mi).then(Xi=>Bi(Xi)):Bi(Mi)}min(nt,jt){return new Te({...this._def,minSize:{value:nt,message:v.errorUtil.toString(jt)}})}max(nt,jt){return new Te({...this._def,maxSize:{value:nt,message:v.errorUtil.toString(jt)}})}size(nt,jt){return this.min(nt,jt).max(nt,jt)}nonempty(nt){return this.min(1,nt)}}t.ZodSet=Te,Te.create=(nn,nt)=>new Te({valueType:nn,minSize:null,maxSize:null,typeName:bt.ZodSet,...h(nt)});class Ne extends u{constructor(){super(...arguments),this.validate=this.implement}_parse(nt){const{ctx:jt}=this._processInputParams(nt);if(jt.parsedType!==p.ZodParsedType.function)return(0,m.addIssueToContext)(jt,{code:s.ZodIssueCode.invalid_type,expected:p.ZodParsedType.function,received:jt.parsedType}),m.INVALID;function qt(Mi,Xi){return(0,m.makeIssue)({data:Mi,path:jt.path,errorMaps:[jt.common.contextualErrorMap,jt.schemaErrorMap,(0,_.getErrorMap)(),_.defaultErrorMap].filter(yi=>!!yi),issueData:{code:s.ZodIssueCode.invalid_arguments,argumentsError:Xi}})}function In(Mi,Xi){return(0,m.makeIssue)({data:Mi,path:jt.path,errorMaps:[jt.common.contextualErrorMap,jt.schemaErrorMap,(0,_.getErrorMap)(),_.defaultErrorMap].filter(yi=>!!yi),issueData:{code:s.ZodIssueCode.invalid_return_type,returnTypeError:Xi}})}const jn={errorMap:jt.common.contextualErrorMap},Bi=jt.data;if(this._def.returns instanceof Fe){const Mi=this;return(0,m.OK)(async function(...Xi){const yi=new s.ZodError([]),Zi=await Mi._def.args.parseAsync(Xi,jn).catch(Ao=>{throw yi.addIssue(qt(Xi,Ao)),yi}),to=await Reflect.apply(Bi,this,Zi);return await Mi._def.returns._def.type.parseAsync(to,jn).catch(Ao=>{throw yi.addIssue(In(to,Ao)),yi})})}else{const Mi=this;return(0,m.OK)(function(...Xi){const yi=Mi._def.args.safeParse(Xi,jn);if(!yi.success)throw new s.ZodError([qt(Xi,yi.error)]);const Zi=Reflect.apply(Bi,this,yi.data),to=Mi._def.returns.safeParse(Zi,jn);if(!to.success)throw new s.ZodError([In(Zi,to.error)]);return to.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...nt){return new Ne({...this._def,args:Ce.create(nt).rest(ge.create())})}returns(nt){return new Ne({...this._def,returns:nt})}implement(nt){return this.parse(nt)}strictImplement(nt){return this.parse(nt)}static create(nt,jt,qt){return new Ne({args:nt||Ce.create([]).rest(ge.create()),returns:jt||ge.create(),typeName:bt.ZodFunction,...h(qt)})}}t.ZodFunction=Ne;class pe extends u{get schema(){return this._def.getter()}_parse(nt){const{ctx:jt}=this._processInputParams(nt);return this._def.getter()._parse({data:jt.data,path:jt.path,parent:jt})}}t.ZodLazy=pe,pe.create=(nn,nt)=>new pe({getter:nn,typeName:bt.ZodLazy,...h(nt)});class re extends u{_parse(nt){if(nt.data!==this._def.value){const jt=this._getOrReturnCtx(nt);return(0,m.addIssueToContext)(jt,{received:jt.data,code:s.ZodIssueCode.invalid_literal,expected:this._def.value}),m.INVALID}return{status:"valid",value:nt.data}}get value(){return this._def.value}}t.ZodLiteral=re,re.create=(nn,nt)=>new re({value:nn,typeName:bt.ZodLiteral,...h(nt)});function he(nn,nt){return new Oe({values:nn,typeName:bt.ZodEnum,...h(nt)})}class Oe extends u{constructor(){super(...arguments),o.set(this,void 0)}_parse(nt){if(typeof nt.data!="string"){const jt=this._getOrReturnCtx(nt),qt=this._def.values;return(0,m.addIssueToContext)(jt,{expected:p.util.joinValues(qt),received:jt.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(nt.data)){const jt=this._getOrReturnCtx(nt),qt=this._def.values;return(0,m.addIssueToContext)(jt,{received:jt.data,code:s.ZodIssueCode.invalid_enum_value,options:qt}),m.INVALID}return(0,m.OK)(nt.data)}get options(){return this._def.values}get enum(){const nt={};for(const jt of this._def.values)nt[jt]=jt;return nt}get Values(){const nt={};for(const jt of this._def.values)nt[jt]=jt;return nt}get Enum(){const nt={};for(const jt of this._def.values)nt[jt]=jt;return nt}extract(nt,jt=this._def){return Oe.create(nt,{...this._def,...jt})}exclude(nt,jt=this._def){return Oe.create(this.options.filter(qt=>!nt.includes(qt)),{...this._def,...jt})}}t.ZodEnum=Oe,o=new WeakMap,Oe.create=he;class De extends u{constructor(){super(...arguments),d.set(this,void 0)}_parse(nt){const jt=p.util.getValidEnumValues(this._def.values),qt=this._getOrReturnCtx(nt);if(qt.parsedType!==p.ZodParsedType.string&&qt.parsedType!==p.ZodParsedType.number){const In=p.util.objectValues(jt);return(0,m.addIssueToContext)(qt,{expected:p.util.joinValues(In),received:qt.parsedType,code:s.ZodIssueCode.invalid_type}),m.INVALID}if(n(this,d,"f")||r(this,d,new Set(p.util.getValidEnumValues(this._def.values)),"f"),!n(this,d,"f").has(nt.data)){const In=p.util.objectValues(jt);return(0,m.addIssueToContext)(qt,{received:qt.data,code:s.ZodIssueCode.invalid_enum_value,options:In}),m.INVALID}return(0,m.OK)(nt.data)}get enum(){return this._def.values}}t.ZodNativeEnum=De,d=new WeakMap,De.create=(nn,nt)=>new De({values:nn,typeName:bt.ZodNativeEnum,...h(nt)});class Fe extends u{unwrap(){return this._def.type}_parse(nt){const{ctx:jt}=this._processInputParams(nt);if(jt.parsedType!==p.ZodParsedType.promise&&jt.common.async===!1)return(0,m.addIssueToContext)(jt,{code:s.ZodIssueCode.invalid_type,expected:p.ZodParsedType.promise,received:jt.parsedType}),m.INVALID;const qt=jt.parsedType===p.ZodParsedType.promise?jt.data:Promise.resolve(jt.data);return(0,m.OK)(qt.then(In=>this._def.type.parseAsync(In,{path:jt.path,errorMap:jt.common.contextualErrorMap})))}}t.ZodPromise=Fe,Fe.create=(nn,nt)=>new Fe({type:nn,typeName:bt.ZodPromise,...h(nt)});class Ge extends u{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===bt.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(nt){const{status:jt,ctx:qt}=this._processInputParams(nt),In=this._def.effect||null,jn={addIssue:Bi=>{(0,m.addIssueToContext)(qt,Bi),Bi.fatal?jt.abort():jt.dirty()},get path(){return qt.path}};if(jn.addIssue=jn.addIssue.bind(jn),In.type==="preprocess"){const Bi=In.transform(qt.data,jn);if(qt.common.async)return Promise.resolve(Bi).then(async Mi=>{if(jt.value==="aborted")return m.INVALID;const Xi=await this._def.schema._parseAsync({data:Mi,path:qt.path,parent:qt});return Xi.status==="aborted"?m.INVALID:Xi.status==="dirty"||jt.value==="dirty"?(0,m.DIRTY)(Xi.value):Xi});{if(jt.value==="aborted")return m.INVALID;const Mi=this._def.schema._parseSync({data:Bi,path:qt.path,parent:qt});return Mi.status==="aborted"?m.INVALID:Mi.status==="dirty"||jt.value==="dirty"?(0,m.DIRTY)(Mi.value):Mi}}if(In.type==="refinement"){const Bi=Mi=>{const Xi=In.refinement(Mi,jn);if(qt.common.async)return Promise.resolve(Xi);if(Xi instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return Mi};if(qt.common.async===!1){const Mi=this._def.schema._parseSync({data:qt.data,path:qt.path,parent:qt});return Mi.status==="aborted"?m.INVALID:(Mi.status==="dirty"&&jt.dirty(),Bi(Mi.value),{status:jt.value,value:Mi.value})}else return this._def.schema._parseAsync({data:qt.data,path:qt.path,parent:qt}).then(Mi=>Mi.status==="aborted"?m.INVALID:(Mi.status==="dirty"&&jt.dirty(),Bi(Mi.value).then(()=>({status:jt.value,value:Mi.value}))))}if(In.type==="transform")if(qt.common.async===!1){const Bi=this._def.schema._parseSync({data:qt.data,path:qt.path,parent:qt});if(!(0,m.isValid)(Bi))return Bi;const Mi=In.transform(Bi.value,jn);if(Mi instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:jt.value,value:Mi}}else return this._def.schema._parseAsync({data:qt.data,path:qt.path,parent:qt}).then(Bi=>(0,m.isValid)(Bi)?Promise.resolve(In.transform(Bi.value,jn)).then(Mi=>({status:jt.value,value:Mi})):Bi);p.util.assertNever(In)}}t.ZodEffects=Ge,t.ZodTransformer=Ge,Ge.create=(nn,nt,jt)=>new Ge({schema:nn,typeName:bt.ZodEffects,effect:nt,...h(jt)}),Ge.createWithPreprocess=(nn,nt,jt)=>new Ge({schema:nt,effect:{type:"preprocess",transform:nn},typeName:bt.ZodEffects,...h(jt)});class je extends u{_parse(nt){return this._getType(nt)===p.ZodParsedType.undefined?(0,m.OK)(void 0):this._def.innerType._parse(nt)}unwrap(){return this._def.innerType}}t.ZodOptional=je,je.create=(nn,nt)=>new je({innerType:nn,typeName:bt.ZodOptional,...h(nt)});class gt extends u{_parse(nt){return this._getType(nt)===p.ZodParsedType.null?(0,m.OK)(null):this._def.innerType._parse(nt)}unwrap(){return this._def.innerType}}t.ZodNullable=gt,gt.create=(nn,nt)=>new gt({innerType:nn,typeName:bt.ZodNullable,...h(nt)});class ot extends u{_parse(nt){const{ctx:jt}=this._processInputParams(nt);let qt=jt.data;return jt.parsedType===p.ZodParsedType.undefined&&(qt=this._def.defaultValue()),this._def.innerType._parse({data:qt,path:jt.path,parent:jt})}removeDefault(){return this._def.innerType}}t.ZodDefault=ot,ot.create=(nn,nt)=>new ot({innerType:nn,typeName:bt.ZodDefault,defaultValue:typeof nt.default=="function"?nt.default:()=>nt.default,...h(nt)});class Mt extends u{_parse(nt){const{ctx:jt}=this._processInputParams(nt),qt={...jt,common:{...jt.common,issues:[]}},In=this._def.innerType._parse({data:qt.data,path:qt.path,parent:{...qt}});return(0,m.isAsync)(In)?In.then(jn=>({status:"valid",value:jn.status==="valid"?jn.value:this._def.catchValue({get error(){return new s.ZodError(qt.common.issues)},input:qt.data})})):{status:"valid",value:In.status==="valid"?In.value:this._def.catchValue({get error(){return new s.ZodError(qt.common.issues)},input:qt.data})}}removeCatch(){return this._def.innerType}}t.ZodCatch=Mt,Mt.create=(nn,nt)=>new Mt({innerType:nn,typeName:bt.ZodCatch,catchValue:typeof nt.catch=="function"?nt.catch:()=>nt.catch,...h(nt)});class lt extends u{_parse(nt){if(this._getType(nt)!==p.ZodParsedType.nan){const qt=this._getOrReturnCtx(nt);return(0,m.addIssueToContext)(qt,{code:s.ZodIssueCode.invalid_type,expected:p.ZodParsedType.nan,received:qt.parsedType}),m.INVALID}return{status:"valid",value:nt.data}}}t.ZodNaN=lt,lt.create=nn=>new lt({typeName:bt.ZodNaN,...h(nn)}),t.BRAND=Symbol("zod_brand");class At extends u{_parse(nt){const{ctx:jt}=this._processInputParams(nt),qt=jt.data;return this._def.type._parse({data:qt,path:jt.path,parent:jt})}unwrap(){return this._def.type}}t.ZodBranded=At;class rt extends u{_parse(nt){const{status:jt,ctx:qt}=this._processInputParams(nt);if(qt.common.async)return(async()=>{const jn=await this._def.in._parseAsync({data:qt.data,path:qt.path,parent:qt});return jn.status==="aborted"?m.INVALID:jn.status==="dirty"?(jt.dirty(),(0,m.DIRTY)(jn.value)):this._def.out._parseAsync({data:jn.value,path:qt.path,parent:qt})})();{const In=this._def.in._parseSync({data:qt.data,path:qt.path,parent:qt});return In.status==="aborted"?m.INVALID:In.status==="dirty"?(jt.dirty(),{status:"dirty",value:In.value}):this._def.out._parseSync({data:In.value,path:qt.path,parent:qt})}}static create(nt,jt){return new rt({in:nt,out:jt,typeName:bt.ZodPipeline})}}t.ZodPipeline=rt;class st extends u{_parse(nt){const jt=this._def.innerType._parse(nt),qt=In=>((0,m.isValid)(In)&&(In.value=Object.freeze(In.value)),In);return(0,m.isAsync)(jt)?jt.then(In=>qt(In)):qt(jt)}unwrap(){return this._def.innerType}}t.ZodReadonly=st,st.create=(nn,nt)=>new st({innerType:nn,typeName:bt.ZodReadonly,...h(nt)});function ct(nn,nt={},jt){return nn?ie.create().superRefine((qt,In)=>{var jn,Bi;if(!nn(qt)){const Mi=typeof nt=="function"?nt(qt):typeof nt=="string"?{message:nt}:nt,Xi=(Bi=(jn=Mi.fatal)!==null&&jn!==void 0?jn:jt)!==null&&Bi!==void 0?Bi:!0,yi=typeof Mi=="string"?{message:Mi}:Mi;In.addIssue({code:"custom",...yi,fatal:Xi})}}):ie.create()}t.custom=ct,t.late={object:ne.lazycreate};var bt;(function(nn){nn.ZodString="ZodString",nn.ZodNumber="ZodNumber",nn.ZodNaN="ZodNaN",nn.ZodBigInt="ZodBigInt",nn.ZodBoolean="ZodBoolean",nn.ZodDate="ZodDate",nn.ZodSymbol="ZodSymbol",nn.ZodUndefined="ZodUndefined",nn.ZodNull="ZodNull",nn.ZodAny="ZodAny",nn.ZodUnknown="ZodUnknown",nn.ZodNever="ZodNever",nn.ZodVoid="ZodVoid",nn.ZodArray="ZodArray",nn.ZodObject="ZodObject",nn.ZodUnion="ZodUnion",nn.ZodDiscriminatedUnion="ZodDiscriminatedUnion",nn.ZodIntersection="ZodIntersection",nn.ZodTuple="ZodTuple",nn.ZodRecord="ZodRecord",nn.ZodMap="ZodMap",nn.ZodSet="ZodSet",nn.ZodFunction="ZodFunction",nn.ZodLazy="ZodLazy",nn.ZodLiteral="ZodLiteral",nn.ZodEnum="ZodEnum",nn.ZodEffects="ZodEffects",nn.ZodNativeEnum="ZodNativeEnum",nn.ZodOptional="ZodOptional",nn.ZodNullable="ZodNullable",nn.ZodDefault="ZodDefault",nn.ZodCatch="ZodCatch",nn.ZodPromise="ZodPromise",nn.ZodBranded="ZodBranded",nn.ZodPipeline="ZodPipeline",nn.ZodReadonly="ZodReadonly"})(bt||(t.ZodFirstPartyTypeKind=bt={}));class Ut{constructor(...nt){}}const hn=(nn,nt={message:`Input not instance of ${nn.name}`})=>ct(jt=>jt instanceof nn,nt);t.instanceof=hn;const kn=V.create;t.string=kn;const fi=Y.create;t.number=fi;const Nn=lt.create;t.nan=Nn;const cn=z.create;t.bigint=cn;const zn=H.create;t.boolean=zn;const pn=K.create;t.date=pn;const Ht=Z.create;t.symbol=Ht;const pt=X.create;t.undefined=pt;const We=oe.create;t.null=We;const Ke=ie.create;t.any=Ke;const Ze=ge.create;t.unknown=Ze;const Qt=me.create;t.never=Qt;const Cn=q.create;t.void=Cn;const ni=Se.create;t.array=ni;const ri=ne.create;t.object=ri;const xi=ne.strictCreate;t.strictObject=xi;const bi=ue.create;t.union=bi;const Ui=Pe.create;t.discriminatedUnion=Ui;const Wn=Ae.create;t.intersection=Wn;const Sn=Ce.create;t.tuple=Sn;const ii=fe.create;t.record=ii;const Oi=xe.create;t.map=Oi;const Vi=Te.create;t.set=Vi;const wi=Ne.create;t.function=wi;const dn=pe.create;t.lazy=dn;const Gn=re.create;t.literal=Gn;const vn=Oe.create;t.enum=vn;const et=De.create;t.nativeEnum=et;const It=Fe.create;t.promise=It;const yt=Ge.create;t.effect=yt,t.transformer=yt;const Ct=je.create;t.optional=Ct;const gn=gt.create;t.nullable=gn;const on=Ge.createWithPreprocess;t.preprocess=on;const Yt=rt.create;t.pipeline=Yt;const On=()=>kn().optional();t.ostring=On;const Zn=()=>fi().optional();t.onumber=Zn;const ci=()=>zn().optional();t.oboolean=ci,t.coerce={string:nn=>V.create({...nn,coerce:!0}),number:nn=>Y.create({...nn,coerce:!0}),boolean:nn=>H.create({...nn,coerce:!0}),bigint:nn=>z.create({...nn,coerce:!0}),date:nn=>K.create({...nn,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),d=e(41869),_=e(65265),v=e(98295),m=e(27654);let p=n=class extends d.Disposable{constructor(){super(...arguments),this.lantencyHandler=g=>{const{command:a}=g.detail;a===_.DevtoolsLantencyCommand.Start?this.interval||this.startRTTInterval():a===_.DevtoolsLantencyCommand.Stop&&this.interval&&(clearInterval(this.interval),this.interval=void 0)}}initialize(){var g;this.appConfig.devtools&&(window.addEventListener(_.EDevtoolsEvent.Latency,this.lantencyHandler),this.addDispose(d.Disposable.create(()=>{window.removeEventListener(_.EDevtoolsEvent.Latency,this.lantencyHandler),this.interval&&(clearInterval(this.interval),this.interval=void 0)})),!((g=window.__OPENSUMI_DEVTOOLS_GLOBAL_HOOK__)===null||g===void 0)&&g.captureRPC&&(this.interval||this.startRTTInterval()))}startRTTInterval(){this.interval=setInterval(async()=>{const g=Date.now();await this.rttService.measure();const a=Date.now()-g;window.__OPENSUMI_DEVTOOLS_GLOBAL_HOOK__.captureRPC&&(window.__OPENSUMI_DEVTOOLS_GLOBAL_HOOK__.latency=a)},n.INTERVAL)}};t.ChromeDevtoolsContribution=p,p.INTERVAL=1e3,r.__decorate([(0,o.Autowired)(d.AppConfig),r.__metadata("design:type",Object)],p.prototype,"appConfig",void 0),r.__decorate([(0,o.Autowired)(m.ConnectionRTTBrowserServiceToken),r.__metadata("design:type",m.ConnectionRTTBrowserService)],p.prototype,"rttService",void 0),t.ChromeDevtoolsContribution=p=n=r.__decorate([(0,v.Domain)(d.ClientAppContribution)],p)},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),d=e(26542),_=e(92323),v=e(98295),m=e(27654),p={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%"},g={alignment:d.StatusBarAlignment.LEFT,priority:1/0-1};let a=n=class{registerCommands(u){u.registerCommand(p,{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,...g});else{const f=this.statusBarService.addElement("connection-rtt",{...E,...g});this.statusBar=f}},n.INTERVAL)}};t.ConnectionRTTContribution=a,a.INTERVAL=1e3,r.__decorate([(0,o.Autowired)(d.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)(_.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 d=class{async measure(){await this.connectionBackService.$measure()}};t.ConnectionRTTBrowserService=d,n.__decorate([(0,r.Autowired)(o.ConnectionBackServicePath),n.__metadata("design:type",Object)],d.prototype,"connectionBackService",void 0),t.ConnectionRTTBrowserService=d=n.__decorate([(0,r.Injectable)()],d)},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),d=e(43718),_=e(69452);let v=class extends d.WithEventBus{onDidDropFile(p){this.dropService.onDidDropFile(p)}};t.FileDropContribution=v,n.__decorate([(0,r.Autowired)(_.IFileDropFrontendServiceToken),n.__metadata("design:type",Object)],v.prototype,"dropService",void 0),n.__decorate([(0,d.OnEvent)(d.FileTreeDropEvent),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[d.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),d=e(26542),_=e(43718),v=e(42933),{Path:m}=_.path,p=e(69452);let s=class extends _.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"),l={text:u,alignment:d.StatusBarAlignment.RIGHT,tooltip:u,iconClass:"kaitian-icon kticon-cloud-server"};this.uploadStatus?this.uploadStatus.update({id:h,...l}):this.uploadStatus=this.statusBarService.addElement(h,l)}onDidDropFile(a){var h;const{payload:{event:u,targetDir:l}}=a;if(!l||!(!((h=u.dataTransfer)===null||h===void 0)&&h.files)||u.dataTransfer.files.length===0)return;const E=u.dataTransfer.items;let f=0;const c=Date.now(),y=b=>{f+=b;const A=Date.now(),w=`${(f/((A-c)/1e3)/1024/1024).toFixed(2)} MB`;this.createOrUpdateStatusBar(w)};for(const b of E){const A=b.webkitGetAsEntry();this.processFilesEntry(l,A,y)}}async processFilesEntry(a,h,u){if(h.isFile)this.processFileEntry(h,a,u);else{const l=_.Uri.file(new m(a).join(h.fullPath).toString()).toString();await this.fs.createFolder(l),this.processDirEntry(h,a,u)}}toBinaryString(a){let h;const u=a.length;let l="";for(h=0;h<u;h+=1)l+=String.fromCharCode(a[h]);return l}async doUploadFile(a,h,u){var l;const E=new m(h).join(a.name).toString();this.onDidUploadFileStart(E.toString()),await this.fs.createFile(_.Uri.file(E.toString()).toString()),await this.dropService.$ensureFileExist(a.name,h);const f=a.stream().getReader();let c=await f.read();for(;!c.done;)await this.dropService.$writeStream(this.toBinaryString(c.value),a.name,h,c.done),u((l=c.value)===null||l===void 0?void 0:l.byteLength),c=await f.read();c.done&&this.onDidUploadFileEnd(E.toString())}processFileEntry(a,h,u){a.file(l=>{const E=new File([l],a.fullPath,{type:a.type});this.doUploadFile(E,h,u)},()=>{})}processDirEntry(a,h,u){a.createReader().readEntries(E=>{E.forEach(async f=>{this.processFilesEntry(h,f,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)(p.FileDropServicePath),n.__metadata("design:type",Object)],s.prototype,"dropService",void 0),n.__decorate([(0,r.Autowired)(d.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=y;const n=e(85608),r=n.__importDefault(e(39050)),o=e(76003),d=e(41869),_=e(26542),v=e(43718),m=e(98295),p=e(54414),s=e(17459),g=e(84660),a=n.__importStar(e(20868)),h=e(97821),u=e(80490),l=e(51500),E=e(30981),f=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 y(T){return T.replace(t.matchLineReg,"$1")}let b=class extends h.QuickOpenBaseAction{constructor(){super({id:"file-search:splitToRight",tooltip:(0,d.localize)("quickOpen.openOnTheRightSide"),class:(0,d.getIcon)("embed")})}async run(D){await this.commandService.executeCommand(d.EDITOR_COMMANDS.OPEN_RESOURCE.id,D.getUri(),{preview:!1,split:p.EditorGroupSplitAction.Right,range:c(this.injector.get(S).currentLookFor),focus:!0})}};n.__decorate([(0,o.Autowired)(d.CommandService),n.__metadata("design:type",Object)],b.prototype,"commandService",void 0),n.__decorate([(0,o.Autowired)(o.INJECTOR_TOKEN),n.__metadata("design:type",o.Injector)],b.prototype,"injector",void 0),b=n.__decorate([(0,o.Injectable)(),n.__metadata("design:paramtypes",[])],b);let A=class{hasActions(){return!0}getActions(){return[this.fileSearchActionLeftRight]}getValidateInput(D){return y(D)}};n.__decorate([(0,o.Autowired)(),n.__metadata("design:type",b)],A.prototype,"fileSearchActionLeftRight",void 0),A=n.__decorate([(0,o.Injectable)()],A);let S=class{constructor(){this.cancelIndicator=new v.CancellationTokenSource,this.default=!0,this.prefix="...",this.description=(0,d.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 O=this.cancelIndicator.token,M=new Set;let R=[];D=D.trim().replace(/\s/g,""),this.currentLookFor=D;const P=y(D),k=this.reporterService.time(v.REPORT_NAME.QUICK_OPEN_MEASURE),F=await this.getRecentlyItems(M,P,O);if(D&&(this.logger.debug("lookFor",D,P),R=await this.getFindOutItems(M,P,O)),O.isCancellationRequested)return;const L=F.concat(R);I(L,L.length?this.fileSearchActionProvider:void 0),k.timeEnd(D.indexOf("@")>-1?"file-symbol":"file",{lookFor:D,stat:{recently:F.length,find:R.length}})}}}getOptions(){return{placeholder:(0,d.localize)("file-search.command.fileOpen.placeholder"),fuzzyMatchLabel:{enableSeparateSubstringMatching:!0},showItemsWithoutHighlight:!0,fuzzyMatchDescription:{enableSeparateSubstringMatching:!0},getPlaceholderItem:D=>new d.QuickOpenItem({label:(0,d.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 O=(D=this.workbenchEditorService.currentEditor)===null||D===void 0?void 0:D.getSelections();if(O){const{selectionStartLineNumber:M,selectionStartColumn:R,positionLineNumber:P,positionColumn:k}=O[0];I=new a.Range(M,R,P,k)}this.prevEditorState={uri:this.workbenchEditorService.currentResource.uri,range:I}}}async getFindOutItems(D,I,O){var M;let R;if(I.indexOf("@")>-1){this.trySaveEditorState(),R=[];const[P,k]=I.split("@");let F;if(this.prevSelected)F=this.prevSelected.withoutFragment();else if(P){const L=await this.getQueryFiles(P,D,O);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),R=B.filter(W=>{const U=(0,E.matchesFuzzy)(k,W.name,!0)||[];return U&&(W.labelHighlights=U),U&&U.length}).map((W,U)=>{var Q;return new d.QuickOpenItem({uri:F,label:W.name,iconClass:(0,d.getSymbolIcon)(W.kind),description:(Q=W.parent)===null||Q===void 0?void 0:Q.name,labelHighlights:W.labelHighlights,groupLabel:U===0?(0,d.formatLocalize)("search.fileSymbolResults",B.length):"",showBorder:!1,run:V=>V===d.Mode.PREVIEW?(this.locateSymbol(F,W),!0):V===d.Mode.OPEN?(this.locateSymbol(F,W),!0):!1})})}else return[]}else if(R=await this.getQueryFiles(I,D,O),R[0]){const P=await this.getItems([R[0].getUri().codeUri.fsPath],{groupLabel:(0,d.localize)("search.fileResults"),showBorder:!0});R[0]=P[0]}return R}async getQueryFiles(D,I,O){const R=(await this.workspaceService.roots).map(F=>new d.URI(F.uri).codeUri.fsPath),P=await this.fileSearchService.find(D,{rootUris:R,fuzzyMatch:!0,limit:f,useGitIgnore:!0,noIgnoreParent:!0,excludePatterns:this.getPreferenceSearchExcludes()},O),k=await this.getItems(P.filter(F=>I.has(F)||O.isCancellationRequested?!1:(I.add(F),!0)),{});return k.sort(this.compareItems.bind(this)),k}async flattenSymbols(D,I){D.children.forEach(O=>{I.push(O),O.children&&this.flattenSymbols(O,I)})}async getRecentlyItems(D,I,O){const M=await this.recentFilesManager.getMostRecentlyOpenedFiles(!0)||[];return await this.getItems(M.filter(R=>{const P=new d.URI(R);return D.has(R)||!r.default.test(I,P.displayName)||O.isCancellationRequested?!1:(D.add(R),!0)}),{groupLabel:(0,d.localize)("search.historyMatches")})}async getItems(D,I){const O=[];for(const[M,R]of D.entries()){const P=d.URI.isUriString(R)?new d.URI(R):d.URI.file(R),k=`file-icon ${this.labelService.getIcon(P.withoutFragment())}`;let F="";const L=await this.workspaceService.asRelativePath(P.parent);L&&(this.workspaceService.isMultiRootWorkspaceOpened?F=`${new d.URI(L.root).displayName}${L.path?` \u30FB ${L.path}`:""}`:F=L.path||"");const B=new d.QuickOpenItem({uri:P,label:P.displayName,tooltip:R,iconClass:k,description:F,groupLabel:M===0?I.groupLabel:"",showBorder:D.length>0&&M===0?I.showBorder:!1,run:j=>(j===d.Mode.PREVIEW&&(this.prevSelected=P),j===d.Mode.OPEN?(this.openFile(P),!0):!1)});O.push(B)}return O}openFile(D){const I=D.codeUri.fsPath;let O=c(this.currentLookFor);(!O||!O.startLineNumber&&!O.startColumn)&&(O=c(D.fragment?"#"+D.fragment:I)),this.currentLookFor="",this.commandService.executeCommand(d.EDITOR_COMMANDS.OPEN_RESOURCE.id,D.withoutFragment(),{preview:!1,range:O,focus:!0})}locateSymbol(D,I){this.workbenchEditorService.open(D,{range:I.range,preview:!0})}compareItems(D,I,O="getLabel"){function M(j){return j.trim().toLowerCase()}const R=M(y(this.currentLookFor));function P(j){const W=r.default.match(R,j);return W===null?0:W.score}let k=D[O](),F=I[O]();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(R),W=F.indexOf(R);return j===W?k.length!==F.length?k.length<F.length?-1:1:F.localeCompare(k)===0?O==="getUri"?0:this.compareItems(D,I,"getUri"):F.localeCompare(k):j-W}return B-L}getPreferenceSearchExcludes(){const D=[],I=this.preferenceService.get("files.exclude"),O=this.preferenceService.get("search.exclude"),M=Object.assign({},I,O);for(const R of Object.keys(M))M[R]&&D.push(R);return D}};t.FileSearchQuickCommandHandler=S,n.__decorate([(0,o.Autowired)(d.CommandService),n.__metadata("design:type",Object)],S.prototype,"commandService",void 0),n.__decorate([(0,o.Autowired)(g.FileSearchServicePath),n.__metadata("design:type",Object)],S.prototype,"fileSearchService",void 0),n.__decorate([(0,o.Autowired)(p.WorkbenchEditorService),n.__metadata("design:type",p.WorkbenchEditorService)],S.prototype,"workbenchEditorService",void 0),n.__decorate([(0,o.Autowired)(s.DocumentSymbolStore),n.__metadata("design:type",s.DocumentSymbolStore)],S.prototype,"documentSymbolStore",void 0),n.__decorate([(0,o.Autowired)(),n.__metadata("design:type",_.LabelService)],S.prototype,"labelService",void 0),n.__decorate([(0,o.Autowired)(l.IWorkspaceService),n.__metadata("design:type",Object)],S.prototype,"workspaceService",void 0),n.__decorate([(0,o.Autowired)(d.RecentFilesManager),n.__metadata("design:type",d.RecentFilesManager)],S.prototype,"recentFilesManager",void 0),n.__decorate([(0,o.Autowired)(d.ILogger),n.__metadata("design:type",Object)],S.prototype,"logger",void 0),n.__decorate([(0,o.Autowired)(),n.__metadata("design:type",A)],S.prototype,"fileSearchActionProvider",void 0),n.__decorate([(0,o.Autowired)(d.PreferenceService),n.__metadata("design:type",Object)],S.prototype,"preferenceService",void 0),n.__decorate([(0,o.Autowired)(v.IReporterService),n.__metadata("design:type",Object)],S.prototype,"reporterService",void 0),t.FileSearchQuickCommandHandler=S=n.__decorate([(0,o.Injectable)()],S);let w=class{registerQuickOpenHandlers(D){D.registerHandler(this.fileSearchQuickCommandHandler,{title:(0,d.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)(S),n.__metadata("design:type",S)],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,d.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),d=e(69452),_=e(79682),v=e(72915),m=e(27654),p=e(17631),s=e(22874),g=e(79240),a=e(18256),h=e(7756),u=e(16426);let l=class extends o.BrowserModule{constructor(){super(...arguments),this.providers=[_.ChromeDevtoolsContribution,a.LanguageChangeHintContribution,g.FileSearchContribution,h.StatusBarContribution,u.ToolbarCustomizeContribution,p.FileDropContribution,v.ConnectionRTTContribution,{token:d.IFileDropFrontendServiceToken,useClass:s.FileDropService},{token:m.ConnectionRTTBrowserServiceToken,useClass:m.ConnectionRTTBrowserService}],this.backServices=[{servicePath:d.FileDropServicePath},{servicePath:d.ConnectionBackServicePath}]}};t.ClientAddonModule=l,t.ClientAddonModule=l=n.__decorate([(0,r.Injectable)()],l)},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),d=e(72665);let _=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=_,n.__decorate([(0,r.Autowired)(o.PreferenceService),n.__metadata("design:type",Object)],_.prototype,"preferenceService",void 0),n.__decorate([(0,r.Autowired)(o.IClientApp),n.__metadata("design:type",Object)],_.prototype,"clientApp",void 0),n.__decorate([(0,r.Autowired)(d.IDialogService),n.__metadata("design:type",Object)],_.prototype,"dialogService",void 0),t.LanguageChangeHintContribution=_=n.__decorate([(0,o.Domain)(o.ClientAppContribution)],_)},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),d=e(43718);let _=class extends d.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=_,n.__decorate([(0,r.Autowired)(d.CommandService),n.__metadata("design:type",Object)],_.prototype,"commandService",void 0),n.__decorate([(0,r.Autowired)(d.ILogger),n.__metadata("design:type",Object)],_.prototype,"logger",void 0),n.__decorate([(0,d.OnEvent)(d.BrowserConnectionOpenEvent),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[]),n.__metadata("design:returntype",void 0)],_.prototype,"handleBrowserConnectionOpen",null),n.__decorate([(0,d.OnEvent)(d.BrowserConnectionCloseEvent),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[]),n.__metadata("design:returntype",void 0)],_.prototype,"handleBrowserConnectionClose",null),t.StatusBarContribution=_=n.__decorate([(0,d.Domain)(o.ClientAppContribution)],_)},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),d=e(93899),_=e(62132);let v=class{registerCommands(p){p.registerCommand({id:"toolbar.showCustomizePanel",label:"Show Toolbar Customization"},{execute:()=>{this.viewService.setVisible(!0)}})}registerComponent(p){p.register("addon/toolbar-customize",{id:"addon/toolbar-customize",component:_.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(p){p.registerMenuItem(d.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)(_.ToolbarCustomizeViewService),n.__metadata("design:type",_.ToolbarCustomizeViewService)],v.prototype,"viewService",void 0),t.ToolbarCustomizeContribution=v=n.__decorate([(0,o.Domain)(o.CommandContribution,o.ComponentContribution,d.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),d=e(97267),_=e(41869),v=n.__importDefault(e(18541));let m=class{bindSetVisibleHandle(g){this._setVisible=g}setVisible(g){this._setVisible(g)}async toggleActionVisibility(g,a,h){const u=this.preferenceService.getValid("toolbar.ignoreActions",{});if(u[g]||(u[g]=[]),!h)u[g].indexOf(a)===-1&&u[g].push(a);else{const E=u[g].indexOf(a);E!==-1&&u[g].splice(E,1)}const l=this.preferenceService.inspect("toolbar.ignoreActions").workspaceValue?_.PreferenceScope.Workspace:_.PreferenceScope.User;await this.preferenceService.set("toolbar.ignoreActions",u,l)}};t.ToolbarCustomizeViewService=m,n.__decorate([(0,o.Autowired)(_.PreferenceService),n.__metadata("design:type",Object)],m.prototype,"preferenceService",void 0),t.ToolbarCustomizeViewService=m=n.__decorate([(0,o.Injectable)()],m);const p=()=>{const[s,g]=r.default.useState(!1),a=(0,_.useInjectable)(m),h=(0,_.useInjectable)(_.IToolbarRegistry),u=(0,_.useInjectable)(_.PreferenceService);if(a.bindSetVisibleHandle(g),!s)return null;const l=h.getAllLocations(),E=u.get("toolbar.ignoreActions")||{};let f=u.get("toolbar.buttonDisplay","iconAndText");function c(y){const b=[{id:"_head"},...h.getActionGroups(y)||[],{id:"_tail"}],A=[],S=E[y]||[];return b.forEach((w,T)=>{const D=h.getToolbarActions({location:y,group:w.id});D&&D.actions.length>0&&(A.length>0&&A.push(r.default.createElement("div",{className:v.default["group-split"],key:"split-"+T})),D.actions.forEach((I,O)=>{var M;let R=S.indexOf(I.id)===-1;const P="action-toggle-"+I.id;A.push(r.default.createElement("div",{className:v.default["action-item"],key:O+"_"+I.id},r.default.createElement(d.CheckBox,{onChange:()=>{a.toggleActionVisibility(y,I.id,!R),R=!R},defaultChecked:R,id:P,label:(M=I.description)!==null&&M!==void 0?M:I.id})))}))}),A.length===0?null:r.default.createElement("div",{key:y,className:v.default["toolbar-customize-location"]},A)}return r.default.createElement("div",{className:v.default["toolbar-customize-overlay"]},r.default.createElement("div",{className:v.default["toolbar-customize"]},l.map(y=>c(y)),r.default.createElement("div",{className:v.default["button-display"]},r.default.createElement("div",null,(0,_.localize)("toolbar-customize.buttonDisplay.description")),r.default.createElement(d.Select,{options:[{label:(0,_.localize)("toolbar-customize.buttonDisplay.icon"),value:"icon"},{label:(0,_.localize)("toolbar-customize.buttonDisplay.iconAndText"),value:"iconAndText"}],value:f,onChange:y=>{const b=u.inspect("toolbar.buttonDisplay").workspaceValue?_.PreferenceScope.Workspace:_.PreferenceScope.User;u.set("toolbar.buttonDisplay",y,b),f=y},className:v.default["button-display-select"]})),r.default.createElement("div",{className:v.default["customize-complete"]},r.default.createElement(d.Button,{type:"primary",onClick:()=>g(!1)},(0,_.localize)("toolbar-customize.complete")))))};t.ToolbarCustomizeComponent=p},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),d=e(50394);let _=class{get contextKeyService(){return this._contextKeyService}constructor(m){this._contextKeyService=this.globalContextKeyService.createScoped(m),this.inlineChatIsVisible=d.InlineChatIsVisible.bind(this._contextKeyService),this.inlineCompletionIsTrigger=d.InlineCompletionIsTrigger.bind(this._contextKeyService),this.inlineHintWidgetIsVisible=d.InlineHintWidgetIsVisible.bind(this._contextKeyService),this.inlineInputWidgetIsVisible=d.InlineInputWidgetIsVisible.bind(this._contextKeyService),this.inlineInputWidgetIsStreaming=d.InlineInputWidgetIsStreaming.bind(this._contextKeyService),this.inlineDiffPartialEditsIsVisible=d.InlineDiffPartialEditsIsVisible.bind(this._contextKeyService),this.codeEditsIsVisible=d.CodeEditsIsVisible.bind(this._contextKeyService)}};t.AINativeContextKey=_,n.__decorate([(0,r.Autowired)(o.IContextKeyService),n.__metadata("design:type",Object)],_.prototype,"globalContextKeyService",void 0),t.AINativeContextKey=_=n.__decorate([(0,r.Injectable)(),n.__param(0,(0,r.Optional)()),n.__metadata("design:paramtypes",[Object])],_)},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),d=e(57925),_=e(50394),v=e(1149),m=e(97222),p=e(43718),s=e(82353),g=e(54414),a=e(57517),h=e(51553),u=e(63067),l=e(46507),E=e(97682),f=e(68415),c=e(96640),y=e(19413),b=e(64811),A=e(69820),S=e(61282),w=e(51081),T=e(59347),D=e(76154),I=e(79559),O=e(57232),M=e(72991),R=e(71863),P=e(7511),k=e(42911),F=e(72801),L=e(87817),B=e(4972),j=e(82983),W=e(73974),U=e(33108),Q=e(77633),V=e(51221),$=e(2281),Y=e(31031),z=e(95608),H=e(38890),K=e(77886),Z=e(89060),X=e(74353),oe=e(22169),ie=e(90058);t.INLINE_DIFF_MANAGER_WIDGET_ID="inline-diff-manager-widget";let ge=class{constructor(){this.registerFeature()}async initialize(){const{supportsChatAssistant:q}=this.aiNativeConfigService.capabilities;q&&(o.ComponentRegistryImpl.addLayoutModule(this.appConfig.layoutConfig,y.AI_CHAT_VIEW_ID,y.AI_CHAT_CONTAINER_ID),o.ComponentRegistryImpl.addLayoutModule(this.appConfig.layoutConfig,s.DESIGN_MENU_BAR_RIGHT,y.AI_CHAT_LOGO_AVATAR_ID),this.chatProxyService.registerDefaultAgent(),this.chatInternalService.init(),await this.chatManagerService.init())}registerEditorExtensionContribution(q){const{supportsInlineChat:Se,supportsInlineCompletion:_e,supportsProblemFix:ne,supportsCodeAction:ue}=this.aiNativeConfigService.capabilities;q(H.InlineDiffController.ID,new c.SyncDescriptor(H.InlineDiffController,[this.injector]),E.EditorContributionInstantiation.Lazy),ue&&q(ie.SumiLightBulbWidget.ID,ie.SumiLightBulbWidget,E.EditorContributionInstantiation.Lazy),Se&&(q(V.InlineChatEditorController.ID,new c.SyncDescriptor(V.InlineChatEditorController,[this.injector]),E.EditorContributionInstantiation.BeforeFirstInteraction),this.inlineInputService.getInteractiveInputHandler()&&(q(K.InlineHintController.ID,new c.SyncDescriptor(K.InlineHintController,[this.injector]),E.EditorContributionInstantiation.AfterFirstRender),q(Z.InlineInputController.ID,new c.SyncDescriptor(Z.InlineInputController,[this.injector]),E.EditorContributionInstantiation.AfterFirstRender))),_e&&(q(P.IntelligentCompletionsController.ID,new c.SyncDescriptor(P.IntelligentCompletionsController,[this.injector]),E.EditorContributionInstantiation.Eager),q(M.InlineCompletionsController.ID,new c.SyncDescriptor(M.InlineCompletionsController,[this.injector]),E.EditorContributionInstantiation.AfterFirstRender)),ne&&q(k.ProblemFixController.ID,new c.SyncDescriptor(k.ProblemFixController,[this.injector]),E.EditorContributionInstantiation.AfterFirstRender)}onReconnect(){const{supportsMCP:q}=this.aiNativeConfigService.capabilities;q&&this.initMCPServers()}onDidStart(){(0,p.runWhenIdle)(()=>{const{supportsRenameSuggestions:q,supportsInlineChat:Se,supportsMCP:_e,supportsCustomLLMSettings:ne}=this.aiNativeConfigService.capabilities,ue=this.preferenceService.getValid(o.AINativeSettingSectionsId.ChatVisibleType);ue==="always"?this.commandService.executeCommand(d.AI_CHAT_VISIBLE.id,!0):ue==="never"&&this.commandService.executeCommand(d.AI_CHAT_VISIBLE.id,!1),q&&this.renameSingleHandler.load(),Se&&this.codeActionSingleHandler.load(),ne&&(this.preferenceService.onSpecificPreferenceChange(o.AINativeSettingSectionsId.LLMModelSelection,Ie=>{const Pe=this.getModelByName(Ie.newValue),ve=Pe?Object.keys(Pe):[],Ae=ve.length?ve[0]:"",Ce=this.preferenceSchemaProvider.getPreferenceProperty(o.AINativeSettingSectionsId.ModelID);this.preferenceSchemaProvider.setSchema({properties:{[o.AINativeSettingSectionsId.ModelID]:{...Ce,default:Ae,defaultValue:Ae,enum:ve.length?ve:void 0}}},!0),this.preferenceService.set(o.AINativeSettingSectionsId.ModelID,Ae,Ie.scope),this.preferenceSettings.setEnumLabels(o.AINativeSettingSectionsId.ModelID,ve.reduce((fe,xe)=>({...fe,[xe]:xe}),{}))}),this.preferenceService.onSpecificPreferenceChange(o.AINativeSettingSectionsId.ModelID,Ie=>{const Pe=this.preferenceService.get(o.AINativeSettingSectionsId.LLMModelSelection);if(!Pe)return;const ve=this.getModelByName(Pe);ve&&ve[Ie.newValue]&&(this.preferenceService.set(o.AINativeSettingSectionsId.MaxTokens,ve[Ie.newValue].maxTokens,Ie.scope),this.preferenceService.set(o.AINativeSettingSectionsId.ContextWindow,ve[Ie.newValue].contextWindow,Ie.scope))})),_e&&this.initMCPServers()})}async initMCPServers(){var q;const Se=await this.storageProvider(p.STORAGE_NAMESPACE.CHAT);let _e=Se.get(b.MCPServersEnabledKey,[y.BUILTIN_MCP_SERVER_NAME]);const ne=this.preferenceService.get(o.AINativeSettingSectionsId.MCPServers,[]);let ue=this.preferenceService.resolve("mcp",{mcpServers:[]},void 0);if(ue.scope===p.PreferenceScope.Default&&ne.length>0){const Pe={mcpServers:[]},ve=new Set([y.BUILTIN_MCP_SERVER_NAME]);ne.forEach(Ae=>{Ae.type===A.MCP_SERVER_TYPE.SSE?Pe.mcpServers.push({[Ae.name]:{url:Ae.serverHost}}):Ae.type===A.MCP_SERVER_TYPE.STDIO&&Pe.mcpServers.push({[Ae.name]:{command:Ae.command,args:Ae.args,env:Ae.env}}),Ae.enabled&&ve.add(Ae.name)}),await this.preferenceService.set("mcp",Pe,p.PreferenceScope.Workspace),ue=this.preferenceService.resolve("mcp",void 0,void 0),_e=Array.from(ve),Se.set(b.MCPServersEnabledKey,_e)}const Ie=(q=ue.value)===null||q===void 0?void 0:q.mcpServers;if(this.sumiMCPServerBackendProxy.$initBuiltinMCPServer(_e.includes(y.BUILTIN_MCP_SERVER_NAME)),Ie&&Ie.length>0){const Pe=(await Promise.all(Ie.map(async ve=>{const Ae=Object.keys(ve)[0];return await this.mcpConfigService.getServerConfigByName(Ae)}))).filter(ve=>ve!==void 0);await this.sumiMCPServerBackendProxy.$initExternalMCPServers(Pe),this.mcpConfigService.fireMCPServersChange(!0)}}getModelByName(q){switch(q){case"deepseek":return y.deepSeekModels;case"anthropic":return y.anthropicModels;case"openai":return y.openAiNativeModels;default:return}}registerFeature(){this.contributions.getContributions().forEach(q=>{var Se,_e,ne,ue,Ie,Pe,ve,Ae,Ce;(Se=q.registerInlineChatFeature)===null||Se===void 0||Se.call(q,this.inlineChatFeatureRegistry),(_e=q.registerChatFeature)===null||_e===void 0||_e.call(q,this.chatFeatureRegistry),(ne=q.registerResolveConflictFeature)===null||ne===void 0||ne.call(q,this.resolveConflictRegistry),(ue=q.registerRenameProvider)===null||ue===void 0||ue.call(q,this.renameCandidatesProviderRegistry),(Ie=q.registerChatRender)===null||Ie===void 0||Ie.call(q,this.chatRenderRegistry),(Pe=q.registerTerminalProvider)===null||Pe===void 0||Pe.call(q,this.terminalProviderRegistry),(ve=q.registerIntelligentCompletionFeature)===null||ve===void 0||ve.call(q,this.intelligentCompletionsRegistry),(Ae=q.registerProblemFixFeature)===null||Ae===void 0||Ae.call(q,this.problemFixProviderRegistry),(Ce=q.registerChatAgentPromptProvider)===null||Ce===void 0||Ce.call(q)}),this.mcpServerContributions.getContributions().forEach(q=>{q.registerMCPServer(this.mcpServerRegistry)})}registerSetting(q){q.registerSettingGroup({id:o.AI_NATIVE_SETTING_GROUP_ID,title:p.AI_NATIVE_SETTING_GROUP_TITLE,iconClass:(0,o.getIcon)("magic-wand")}),q.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"}]}),q.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&&(q.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"}]}),q.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&&q.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"},{id:o.AINativeSettingSectionsId.MaxTokens,localized:"preference.ai.native.maxTokens"},{id:o.AINativeSettingSectionsId.ContextWindow,localized:"preference.ai.native.contextWindow"}]}),this.aiNativeConfigService.capabilities.supportsMCP&&q.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&&q.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(q){q.registerEditorFeatureContribution({contribute:Se=>{const{monacoEditor:_e}=Se;return this.codeActionSingleHandler.mountEditor(Se.monacoEditor),_e.onDidScrollChange(()=>{this.ctxMenuRenderer.visible&&this.ctxMenuRenderer.hide(!0)})}})}registerEditorComponent(q){q.registerEditorSideWidget({id:t.INLINE_DIFF_MANAGER_WIDGET_ID,component:z.InlineDiffManager,displaysOnResource:Se=>{var _e;return!!(this.aiNativeConfigService.capabilities.supportsMCP&&(!((_e=this.applyService.getUriCodeBlocks(Se.uri))===null||_e===void 0)&&_e.filter(ne=>ne.status==="pending").length))}})}registerCommands(q){q.registerCommand(d.AI_INLINE_CHAT_VISIBLE,{execute:Se=>{this.aiInlineChatService._onInlineChatVisible.fire(Se)}}),q.registerCommand(d.AI_INLINE_CHAT_INTERACTIVE_INPUT_VISIBLE,{execute:async Se=>{var _e;if(!Se){this.inlineInputService.hide();return}this.commandService.executeCommand(d.AI_INLINE_CHAT_VISIBLE.id,!1);const ne=this.workbenchEditorService.currentCodeEditor;if(!ne)return;const ue=ne.monacoEditor.getPosition();if(!ue)return;const Ie=ne.monacoEditor.getSelection();if(ue?((_e=ne.monacoEditor.getModel())===null||_e===void 0?void 0:_e.getLineLength(ue.lineNumber))===0:!1){this.inlineInputService.visibleByPosition(ue);return}if(Ie&&!Ie.isEmpty()){this.inlineInputService.visibleBySelection(Ie);return}this.inlineInputService.visibleByNearestCodeBlock(ue,ne.monacoEditor)}}),q.registerCommand(d.AI_INLINE_CHAT_INTERACTIVE_INPUT_CANCEL,{execute:()=>{var Se;const _e=this.workbenchEditorService.currentCodeEditor;_e&&((Se=Z.InlineInputController.get(_e.monacoEditor))===null||Se===void 0||Se.cancelToken())}}),q.registerCommand(d.AI_INLINE_COMPLETION_REPORTER,{execute:(Se,_e,ne,ue)=>{this.aiCompletionsService.report({sessionId:_e,accept:ne,relationId:Se,code:ue})}}),q.registerCommand(d.AI_CHAT_VISIBLE,{execute:Se=>{this.layoutService.toggleSlot(y.AI_CHAT_VIEW_ID,(0,p.isUndefined)(Se)?!0:Se)}}),q.registerCommand(d.AI_INLINE_COMPLETION_VISIBLE,{execute:async Se=>{Se||(this.aiCompletionsService.hideStatusBarItem(),this.aiInlineCompletionsProvider.setVisibleCompletion(!1),this.aiInlineCompletionsProvider.cancelRequest())}}),q.registerCommand(d.AI_INLINE_DIFF_PARTIAL_EDIT,{execute:Se=>{this.inlineStreamDiffService.launchAcceptDiscardPartialEdit(Se)}}),q.afterExecuteCommand(f.HideInlineCompletion.ID,()=>{this.commandService.executeCommand(d.AI_INLINE_COMPLETION_VISIBLE.id,!1)})}registerRenderer(q){this.designLayoutConfig.supportExternalChatPanel?q.registerSlotRenderer(y.AI_CHAT_VIEW_ID,B.AIChatTabRendererWithTab):q.registerSlotRenderer(y.AI_CHAT_VIEW_ID,B.AIChatTabRenderer),this.designLayoutConfig.useMergeRightWithLeftPanel&&(q.registerSlotRenderer(o.SlotLocation.left,B.AILeftTabRenderer),q.registerSlotRenderer(o.SlotLocation.right,B.AIRightTabRenderer))}registerComponent(q){q.register(y.AI_CHAT_CONTAINER_ID,[],{component:D.AIChatView,title:(0,o.localize)("aiNative.chat.ai.assistant.name"),iconClass:(0,o.getIcon)("magic-wand"),containerId:y.AI_CHAT_CONTAINER_ID}),q.register(y.AI_MENU_BAR_DEBUG_TOOLBAR,{id:y.AI_MENU_BAR_DEBUG_TOOLBAR,component:L.AIRunToolbar}),q.register(y.AI_CHAT_LOGO_AVATAR_ID,{id:y.AI_CHAT_LOGO_AVATAR_ID,component:j.AIChatLogoAvatar})}registerKeybindings(q){this.aiNativeConfigService.capabilities.supportsInlineChat&&(q.registerKeybinding({command:d.AI_INLINE_CHAT_VISIBLE.id,keybinding:"ctrlcmd+i",when:"editorTextFocus",args:!0,priority:0},o.KeybindingScope.USER),q.registerKeybinding({command:d.AI_INLINE_CHAT_VISIBLE.id,keybinding:"esc",args:!1,when:`editorFocus && ${_.InlineChatIsVisible.raw}`}),this.inlineInputService.getInteractiveInputHandler()&&(q.registerKeybinding({command:d.AI_INLINE_CHAT_INTERACTIVE_INPUT_VISIBLE.id,keybinding:this.aiNativeConfigService.inlineChat.inputKeybinding,args:!0,priority:0,when:`editorFocus && (${_.InlineChatIsVisible.raw} || inlineSuggestionVisible)`},o.KeybindingScope.USER),q.registerKeybinding({command:d.AI_INLINE_CHAT_INTERACTIVE_INPUT_VISIBLE.id,keybinding:"esc",args:!1,priority:0,when:`editorFocus && ${_.InlineInputWidgetIsVisible.raw}`}),q.registerKeybinding({command:d.AI_INLINE_CHAT_INTERACTIVE_INPUT_CANCEL.id,keybinding:"esc",priority:1,when:`editorFocus && ${_.InlineInputWidgetIsStreaming.raw}`}),q.registerKeybinding({command:d.AI_INLINE_CHAT_INTERACTIVE_INPUT_VISIBLE.id,keybinding:this.aiNativeConfigService.inlineChat.inputKeybinding,args:!0,priority:0,when:`editorFocus && ${_.InlineHintWidgetIsVisible.raw} && ${_.InlineChatIsVisible.not}`},o.KeybindingScope.USER))),q.registerKeybinding({command:d.AI_INLINE_DIFF_PARTIAL_EDIT.id,keybinding:"ctrl+y",args:!0,priority:100,when:`editorTextFocus && ${_.InlineDiffPartialEditsIsVisible.raw}`}),q.registerKeybinding({command:d.AI_INLINE_DIFF_PARTIAL_EDIT.id,keybinding:"ctrl+n",args:!1,priority:100,when:`editorTextFocus && ${_.InlineDiffPartialEditsIsVisible.raw}`})}};t.AINativeBrowserContribution=ge,n.__decorate([(0,r.Autowired)(o.AppConfig),n.__metadata("design:type",Object)],ge.prototype,"appConfig",void 0),n.__decorate([(0,r.Autowired)(r.INJECTOR_TOKEN),n.__metadata("design:type",r.Injector)],ge.prototype,"injector",void 0),n.__decorate([(0,r.Autowired)(m.IBrowserCtxMenu),n.__metadata("design:type",m.IBrowserCtxMenu)],ge.prototype,"ctxMenuRenderer",void 0),n.__decorate([(0,r.Autowired)(Q.AINativeCoreContribution),n.__metadata("design:type",Object)],ge.prototype,"contributions",void 0),n.__decorate([(0,r.Autowired)(Q.MCPServerContribution),n.__metadata("design:type",Object)],ge.prototype,"mcpServerContributions",void 0),n.__decorate([(0,r.Autowired)(Q.TokenMCPServerRegistry),n.__metadata("design:type",Object)],ge.prototype,"mcpServerRegistry",void 0),n.__decorate([(0,r.Autowired)(p.InlineChatFeatureRegistryToken),n.__metadata("design:type",$.InlineChatFeatureRegistry)],ge.prototype,"inlineChatFeatureRegistry",void 0),n.__decorate([(0,r.Autowired)(p.ChatFeatureRegistryToken),n.__metadata("design:type",Object)],ge.prototype,"chatFeatureRegistry",void 0),n.__decorate([(0,r.Autowired)(p.ChatRenderRegistryToken),n.__metadata("design:type",Object)],ge.prototype,"chatRenderRegistry",void 0),n.__decorate([(0,r.Autowired)(p.ResolveConflictRegistryToken),n.__metadata("design:type",Object)],ge.prototype,"resolveConflictRegistry",void 0),n.__decorate([(0,r.Autowired)(p.RenameCandidatesProviderRegistryToken),n.__metadata("design:type",Object)],ge.prototype,"renameCandidatesProviderRegistry",void 0),n.__decorate([(0,r.Autowired)(p.TerminalRegistryToken),n.__metadata("design:type",Object)],ge.prototype,"terminalProviderRegistry",void 0),n.__decorate([(0,r.Autowired)(p.IntelligentCompletionsRegistryToken),n.__metadata("design:type",Object)],ge.prototype,"intelligentCompletionsRegistry",void 0),n.__decorate([(0,r.Autowired)(p.ProblemFixRegistryToken),n.__metadata("design:type",Object)],ge.prototype,"problemFixProviderRegistry",void 0),n.__decorate([(0,r.Autowired)(o.AINativeConfigService),n.__metadata("design:type",o.AINativeConfigService)],ge.prototype,"aiNativeConfigService",void 0),n.__decorate([(0,r.Autowired)(v.DesignLayoutConfig),n.__metadata("design:type",v.DesignLayoutConfig)],ge.prototype,"designLayoutConfig",void 0),n.__decorate([(0,r.Autowired)(R.AICompletionsService),n.__metadata("design:type",R.AICompletionsService)],ge.prototype,"aiCompletionsService",void 0),n.__decorate([(0,r.Autowired)(O.AIInlineCompletionsProvider),n.__metadata("design:type",O.AIInlineCompletionsProvider)],ge.prototype,"aiInlineCompletionsProvider",void 0),n.__decorate([(0,r.Autowired)(p.CommandService),n.__metadata("design:type",Object)],ge.prototype,"commandService",void 0),n.__decorate([(0,r.Autowired)(o.PreferenceSchemaProvider),n.__metadata("design:type",o.PreferenceSchemaProvider)],ge.prototype,"preferenceSchemaProvider",void 0),n.__decorate([(0,r.Autowired)(o.IPreferenceSettingsService),n.__metadata("design:type",Object)],ge.prototype,"preferenceSettings",void 0),n.__decorate([(0,r.Autowired)(o.PreferenceService),n.__metadata("design:type",Object)],ge.prototype,"preferenceService",void 0),n.__decorate([(0,r.Autowired)(u.IMainLayoutService),n.__metadata("design:type",Object)],ge.prototype,"layoutService",void 0),n.__decorate([(0,r.Autowired)(y.ChatProxyServiceToken),n.__metadata("design:type",w.ChatProxyService)],ge.prototype,"chatProxyService",void 0),n.__decorate([(0,r.Autowired)(o.IAIInlineChatService),n.__metadata("design:type",Y.InlineChatService)],ge.prototype,"aiInlineChatService",void 0),n.__decorate([(0,r.Autowired)(X.InlineInputService),n.__metadata("design:type",X.InlineInputService)],ge.prototype,"inlineInputService",void 0),n.__decorate([(0,r.Autowired)(oe.InlineStreamDiffService),n.__metadata("design:type",oe.InlineStreamDiffService)],ge.prototype,"inlineStreamDiffService",void 0),n.__decorate([(0,r.Autowired)(F.RenameSingleHandler),n.__metadata("design:type",F.RenameSingleHandler)],ge.prototype,"renameSingleHandler",void 0),n.__decorate([(0,r.Autowired)(I.CodeActionSingleHandler),n.__metadata("design:type",I.CodeActionSingleHandler)],ge.prototype,"codeActionSingleHandler",void 0),n.__decorate([(0,r.Autowired)(y.SumiMCPServerProxyServicePath),n.__metadata("design:type",Object)],ge.prototype,"sumiMCPServerBackendProxy",void 0),n.__decorate([(0,r.Autowired)(p.MCPConfigServiceToken),n.__metadata("design:type",U.MCPConfigService)],ge.prototype,"mcpConfigService",void 0),n.__decorate([(0,r.Autowired)(g.WorkbenchEditorService),n.__metadata("design:type",h.WorkbenchEditorServiceImpl)],ge.prototype,"workbenchEditorService",void 0),n.__decorate([(0,r.Autowired)(y.IChatManagerService),n.__metadata("design:type",S.ChatManagerService)],ge.prototype,"chatManagerService",void 0),n.__decorate([(0,r.Autowired)(y.IChatInternalService),n.__metadata("design:type",T.ChatInternalService)],ge.prototype,"chatInternalService",void 0),n.__decorate([(0,r.Autowired)(W.BaseApplyService),n.__metadata("design:type",W.BaseApplyService)],ge.prototype,"applyService",void 0),n.__decorate([(0,r.Autowired)(p.StorageProvider),n.__metadata("design:type",Function)],ge.prototype,"storageProvider",void 0),t.AINativeBrowserContribution=ge=n.__decorate([(0,o.Domain)(o.ClientAppContribution,a.BrowserEditorContribution,o.CommandContribution,l.SettingContribution,o.KeybindingContribution,o.ComponentContribution,o.SlotRendererContribution,o.MonacoContribution),n.__metadata("design:paramtypes",[])],ge)},96366:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ApplyService=void 0;const n=e(85608),r=e(76003),o=e(41869),d=e(57517),_=e(19413),v=e(73974),m=e(51081);let p=class extends v.BaseApplyService{async doApply(g){const a=new o.URI(o.path.join(this.appConfig.workspaceDir,g.relativePath)),u=(await this.modelService.createModelReference(a)).instance.getMonacoModel().getValue();return{stream:await this.aiBackService.requestStream(`Merge all changes from the <update> snippet into the <code> below.
31404
+ ${JSON.stringify(r,null,2)}`);const d=n[o]();return new Language(INTERNAL,d)})}}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,d,_,v){assertInternal(t),this[0]=e,this.captureNames=n,this.textPredicates=r,this.predicates=o,this.setProperties=d,this.assertedProperties=_,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:d=4294967295,maxStartDepth:_=4294967295}={}){if(typeof d!="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,d,_);const v=getValue(TRANSFER_BUFFER,"i32"),m=getValue(TRANSFER_BUFFER+SIZE_OF_INT,"i32"),p=getValue(TRANSFER_BUFFER+2*SIZE_OF_INT,"i32"),s=new Array(v);this.exceededMatchLimit=!!p;let g=0,a=m;for(let h=0;h<v;h++){const u=getValue(a,"i32");a+=SIZE_OF_INT;const l=getValue(a,"i32");a+=SIZE_OF_INT;const E=new Array(l);if(a=unmarshalCaptures(this,t.tree,a,E),this.textPredicates[u].every(f=>f(E))){s[g]={pattern:u,captures:E};const f=this.setProperties[u];f&&(s[g].setProperties=f);const c=this.assertedProperties[u];c&&(s[g].assertedProperties=c);const y=this.refutedProperties[u];y&&(s[g].refutedProperties=y),g++}}return s.length=g,C._free(m),s}captures(t,{startPosition:e=ZERO_POINT,endPosition:n=ZERO_POINT,startIndex:r=0,endIndex:o=0,matchLimit:d=4294967295,maxStartDepth:_=4294967295}={}){if(typeof d!="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,d,_);const v=getValue(TRANSFER_BUFFER,"i32"),m=getValue(TRANSFER_BUFFER+SIZE_OF_INT,"i32"),p=getValue(TRANSFER_BUFFER+2*SIZE_OF_INT,"i32"),s=[];this.exceededMatchLimit=!!p;const g=[];let a=m;for(let h=0;h<v;h++){const u=getValue(a,"i32");a+=SIZE_OF_INT;const l=getValue(a,"i32");a+=SIZE_OF_INT;const E=getValue(a,"i32");if(a+=SIZE_OF_INT,g.length=l,a=unmarshalCaptures(this,t.tree,a,g),this.textPredicates[u].every(f=>f(g))){const f=g[E],c=this.setProperties[u];c&&(f.setProperties=c);const y=this.assertedProperties[u];y&&(f.assertedProperties=y);const b=this.refutedProperties[u];b&&(f.refutedProperties=b),s.push(f)}}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 d=getValue(e,"i32"),_=unmarshalNode(t,e+=SIZE_OF_INT);e+=SIZE_OF_NODE,n[r]={name:x.captureNames[d],node:_}}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"),d=getValue(t+=SIZE_OF_INT,"i32"),_=new Node(INTERNAL,x);return _.id=e,_.startIndex=n,_.startPosition={row:r,column:o},_[0]=d,_}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),d=e(79818),_=e(69336),v=d("Object.prototype.toString"),m=e(51913)(),p=typeof globalThis>"u"?e.g:globalThis,s=r(),g=d("String.prototype.slice"),a=Object.getPrototypeOf,h=d("Array.prototype.indexOf",!0)||function(c,y){for(var b=0;b<c.length;b+=1)if(c[b]===y)return b;return-1},u={__proto__:null};m&&_&&a?n(s,function(f){var c=new p[f];if(Symbol.toStringTag in c){var y=a(c),b=_(y,Symbol.toStringTag);if(!b){var A=a(y);b=_(A,Symbol.toStringTag)}u["$"+f]=o(b.get)}}):n(s,function(f){var c=new p[f],y=c.slice||c.set;y&&(u["$"+f]=o(y))});var l=function(c){var y=!1;return n(u,function(b,A){if(!y)try{"$"+b(c)===A&&(y=g(A,1))}catch{}}),y},E=function(c){var y=!1;return n(u,function(b,A){if(!y)try{b(c),y=g(A,1)}catch{}}),y};x.exports=function(c){if(!c||typeof c!="object")return!1;if(!m){var y=g(v(c),8,-1);return h(s,y)>-1?y:y!=="Object"?!1:E(c)}return _?l(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=d=>JSON.stringify(d,null,2).replace(/"([^"]+)":/g,"$1:");t.quotelessJson=r;class o extends Error{get errors(){return this.issues}constructor(_){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=_}format(_){const v=_||function(s){return s.message},m={_errors:[]},p=s=>{for(const g of s.issues)if(g.code==="invalid_union")g.unionErrors.map(p);else if(g.code==="invalid_return_type")p(g.returnTypeError);else if(g.code==="invalid_arguments")p(g.argumentsError);else if(g.path.length===0)m._errors.push(v(g));else{let a=m,h=0;for(;h<g.path.length;){const u=g.path[h];h===g.path.length-1?(a[u]=a[u]||{_errors:[]},a[u]._errors.push(v(g))):a[u]=a[u]||{_errors:[]},a=a[u],h++}}};return p(this),m}static assert(_){if(!(_ instanceof o))throw new Error(`Not a ZodError: ${_}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,n.util.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(_=v=>v.message){const v={},m=[];for(const p of this.issues)p.path.length>0?(v[p.path[0]]=v[p.path[0]]||[],v[p.path[0]].push(_(p))):m.push(_(p));return{formErrors:m,fieldErrors:v}}get formErrors(){return this.flatten()}}t.ZodError=o,o.create=d=>new o(d)},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 d(v){o=v}t.setErrorMap=d;function _(){return o}t.getErrorMap=_},86340:function(x,t,e){"use strict";var n=this&&this.__createBinding||(Object.create?function(o,d,_,v){v===void 0&&(v=_);var m=Object.getOwnPropertyDescriptor(d,_);(!m||("get"in m?!d.__esModule:m.writable||m.configurable))&&(m={enumerable:!0,get:function(){return d[_]}}),Object.defineProperty(o,v,m)}:function(o,d,_,v){v===void 0&&(v=_),o[v]=d[_]}),r=this&&this.__exportStar||function(o,d){for(var _ in o)_!=="default"&&!Object.prototype.hasOwnProperty.call(d,_)&&n(d,o,_)};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)),d=u=>{const{data:l,path:E,errorMaps:f,issueData:c}=u,y=[...E,...c.path||[]],b={...c,path:y};if(c.message!==void 0)return{...c,path:y,message:c.message};let A="";const S=f.filter(w=>!!w).slice().reverse();for(const w of S)A=w(b,{data:l,defaultError:A}).message;return{...c,path:y,message:A}};t.makeIssue=d,t.EMPTY_PATH=[];function _(u,l){const E=(0,r.getErrorMap)(),f=(0,t.makeIssue)({issueData:l,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(f)}t.addIssueToContext=_;class v{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(l,E){const f=[];for(const c of E){if(c.status==="aborted")return t.INVALID;c.status==="dirty"&&l.dirty(),f.push(c.value)}return{status:l.value,value:f}}static async mergeObjectAsync(l,E){const f=[];for(const c of E){const y=await c.key,b=await c.value;f.push({key:y,value:b})}return v.mergeObjectSync(l,f)}static mergeObjectSync(l,E){const f={};for(const c of E){const{key:y,value:b}=c;if(y.status==="aborted"||b.status==="aborted")return t.INVALID;y.status==="dirty"&&l.dirty(),b.status==="dirty"&&l.dirty(),y.value!=="__proto__"&&(typeof b.value<"u"||c.alwaysSet)&&(f[y.value]=b.value)}return{status:l.value,value:f}}}t.ParseStatus=v,t.INVALID=Object.freeze({status:"aborted"});const m=u=>({status:"dirty",value:u});t.DIRTY=m;const p=u=>({status:"valid",value:u});t.OK=p;const s=u=>u.status==="aborted";t.isAborted=s;const g=u=>u.status==="dirty";t.isDirty=g;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 d(m){}o.assertIs=d;function _(m){throw new Error}o.assertNever=_,o.arrayToEnum=m=>{const p={};for(const s of m)p[s]=s;return p},o.getValidEnumValues=m=>{const p=o.objectKeys(m).filter(g=>typeof m[m[g]]!="number"),s={};for(const g of p)s[g]=m[g];return o.objectValues(s)},o.objectValues=m=>o.objectKeys(m).map(function(p){return m[p]}),o.objectKeys=typeof Object.keys=="function"?m=>Object.keys(m):m=>{const p=[];for(const s in m)Object.prototype.hasOwnProperty.call(m,s)&&p.push(s);return p},o.find=(m,p)=>{for(const s of m)if(p(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,p=" | "){return m.map(s=>typeof s=="string"?`'${s}'`:s).join(p)}o.joinValues=v,o.jsonStringifyReplacer=(m,p)=>typeof p=="bigint"?p.toString():p})(e||(t.util=e={}));var n;(function(o){o.mergeShapes=(d,_)=>({...d,..._})})(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,p,s){s===void 0&&(s=p);var g=Object.getOwnPropertyDescriptor(m,p);(!g||("get"in g?!m.__esModule:g.writable||g.configurable))&&(g={enumerable:!0,get:function(){return m[p]}}),Object.defineProperty(v,s,g)}:function(v,m,p,s){s===void 0&&(s=p),v[s]=m[p]}),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 p in v)p!=="default"&&Object.prototype.hasOwnProperty.call(v,p)&&n(m,v,p);return r(m,v),m},d=this&&this.__exportStar||function(v,m){for(var p in v)p!=="default"&&!Object.prototype.hasOwnProperty.call(m,p)&&n(m,v,p)};Object.defineProperty(t,"__esModule",{value:!0}),t.z=void 0;const _=o(e(86340));t.z=_,d(e(86340),t),t.default=_},28412:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(94705),r=e(97442),o=(d,_)=>{let v;switch(d.code){case r.ZodIssueCode.invalid_type:d.received===n.ZodParsedType.undefined?v="Required":v=`Expected ${d.expected}, received ${d.received}`;break;case r.ZodIssueCode.invalid_literal:v=`Invalid literal value, expected ${JSON.stringify(d.expected,n.util.jsonStringifyReplacer)}`;break;case r.ZodIssueCode.unrecognized_keys:v=`Unrecognized key(s) in object: ${n.util.joinValues(d.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(d.options)}`;break;case r.ZodIssueCode.invalid_enum_value:v=`Invalid enum value. Expected ${n.util.joinValues(d.options)}, received '${d.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 d.validation=="object"?"includes"in d.validation?(v=`Invalid input: must include "${d.validation.includes}"`,typeof d.validation.position=="number"&&(v=`${v} at one or more positions greater than or equal to ${d.validation.position}`)):"startsWith"in d.validation?v=`Invalid input: must start with "${d.validation.startsWith}"`:"endsWith"in d.validation?v=`Invalid input: must end with "${d.validation.endsWith}"`:n.util.assertNever(d.validation):d.validation!=="regex"?v=`Invalid ${d.validation}`:v="Invalid";break;case r.ZodIssueCode.too_small:d.type==="array"?v=`Array must contain ${d.exact?"exactly":d.inclusive?"at least":"more than"} ${d.minimum} element(s)`:d.type==="string"?v=`String must contain ${d.exact?"exactly":d.inclusive?"at least":"over"} ${d.minimum} character(s)`:d.type==="number"?v=`Number must be ${d.exact?"exactly equal to ":d.inclusive?"greater than or equal to ":"greater than "}${d.minimum}`:d.type==="date"?v=`Date must be ${d.exact?"exactly equal to ":d.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(d.minimum))}`:v="Invalid input";break;case r.ZodIssueCode.too_big:d.type==="array"?v=`Array must contain ${d.exact?"exactly":d.inclusive?"at most":"less than"} ${d.maximum} element(s)`:d.type==="string"?v=`String must contain ${d.exact?"exactly":d.inclusive?"at most":"under"} ${d.maximum} character(s)`:d.type==="number"?v=`Number must be ${d.exact?"exactly":d.inclusive?"less than or equal to":"less than"} ${d.maximum}`:d.type==="bigint"?v=`BigInt must be ${d.exact?"exactly":d.inclusive?"less than or equal to":"less than"} ${d.maximum}`:d.type==="date"?v=`Date must be ${d.exact?"exactly":d.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(d.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 ${d.multipleOf}`;break;case r.ZodIssueCode.not_finite:v="Number must be finite";break;default:v=_.defaultError,n.util.assertNever(d)}return{message:v}};t.default=o},75226:function(x,t,e){"use strict";var n=this&&this.__classPrivateFieldGet||function(nn,nt,jt,qt){if(jt==="a"&&!qt)throw new TypeError("Private accessor was defined without a getter");if(typeof nt=="function"?nn!==nt||!qt:!nt.has(nn))throw new TypeError("Cannot read private member from an object whose class did not declare it");return jt==="m"?qt:jt==="a"?qt.call(nn):qt?qt.value:nt.get(nn)},r=this&&this.__classPrivateFieldSet||function(nn,nt,jt,qt,In){if(qt==="m")throw new TypeError("Private method is not writable");if(qt==="a"&&!In)throw new TypeError("Private accessor was defined without a setter");if(typeof nt=="function"?nn!==nt||!In:!nt.has(nn))throw new TypeError("Cannot write private member to an object whose class did not declare it");return qt==="a"?In.call(nn,jt):In?In.value=jt:nt.set(nn,jt),jt},o,d;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 _=e(30548),v=e(15759),m=e(66258),p=e(94705),s=e(97442);class g{constructor(nt,jt,qt,In){this._cachedPath=[],this.parent=nt,this.data=jt,this._path=qt,this._key=In}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=(nn,nt)=>{if((0,m.isValid)(nt))return{success:!0,data:nt.value};if(!nn.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const jt=new s.ZodError(nn.common.issues);return this._error=jt,this._error}}};function h(nn){if(!nn)return{};const{errorMap:nt,invalid_type_error:jt,required_error:qt,description:In}=nn;if(nt&&(jt||qt))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return nt?{errorMap:nt,description:In}:{errorMap:(Bi,Mi)=>{var Xi,yi;const{message:Zi}=nn;return Bi.code==="invalid_enum_value"?{message:Zi??Mi.defaultError}:typeof Mi.data>"u"?{message:(Xi=Zi??qt)!==null&&Xi!==void 0?Xi:Mi.defaultError}:Bi.code!=="invalid_type"?{message:Mi.defaultError}:{message:(yi=Zi??jt)!==null&&yi!==void 0?yi:Mi.defaultError}},description:In}}class u{get description(){return this._def.description}_getType(nt){return(0,p.getParsedType)(nt.data)}_getOrReturnCtx(nt,jt){return jt||{common:nt.parent.common,data:nt.data,parsedType:(0,p.getParsedType)(nt.data),schemaErrorMap:this._def.errorMap,path:nt.path,parent:nt.parent}}_processInputParams(nt){return{status:new m.ParseStatus,ctx:{common:nt.parent.common,data:nt.data,parsedType:(0,p.getParsedType)(nt.data),schemaErrorMap:this._def.errorMap,path:nt.path,parent:nt.parent}}}_parseSync(nt){const jt=this._parse(nt);if((0,m.isAsync)(jt))throw new Error("Synchronous parse encountered promise.");return jt}_parseAsync(nt){const jt=this._parse(nt);return Promise.resolve(jt)}parse(nt,jt){const qt=this.safeParse(nt,jt);if(qt.success)return qt.data;throw qt.error}safeParse(nt,jt){var qt;const In={common:{issues:[],async:(qt=jt?.async)!==null&&qt!==void 0?qt:!1,contextualErrorMap:jt?.errorMap},path:jt?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:nt,parsedType:(0,p.getParsedType)(nt)},jn=this._parseSync({data:nt,path:In.path,parent:In});return a(In,jn)}"~validate"(nt){var jt,qt;const In={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:nt,parsedType:(0,p.getParsedType)(nt)};if(!this["~standard"].async)try{const jn=this._parseSync({data:nt,path:[],parent:In});return(0,m.isValid)(jn)?{value:jn.value}:{issues:In.common.issues}}catch(jn){!((qt=(jt=jn?.message)===null||jt===void 0?void 0:jt.toLowerCase())===null||qt===void 0)&&qt.includes("encountered")&&(this["~standard"].async=!0),In.common={issues:[],async:!0}}return this._parseAsync({data:nt,path:[],parent:In}).then(jn=>(0,m.isValid)(jn)?{value:jn.value}:{issues:In.common.issues})}async parseAsync(nt,jt){const qt=await this.safeParseAsync(nt,jt);if(qt.success)return qt.data;throw qt.error}async safeParseAsync(nt,jt){const qt={common:{issues:[],contextualErrorMap:jt?.errorMap,async:!0},path:jt?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:nt,parsedType:(0,p.getParsedType)(nt)},In=this._parse({data:nt,path:qt.path,parent:qt}),jn=await((0,m.isAsync)(In)?In:Promise.resolve(In));return a(qt,jn)}refine(nt,jt){const qt=In=>typeof jt=="string"||typeof jt>"u"?{message:jt}:typeof jt=="function"?jt(In):jt;return this._refinement((In,jn)=>{const Bi=nt(In),Mi=()=>jn.addIssue({code:s.ZodIssueCode.custom,...qt(In)});return typeof Promise<"u"&&Bi instanceof Promise?Bi.then(Xi=>Xi?!0:(Mi(),!1)):Bi?!0:(Mi(),!1)})}refinement(nt,jt){return this._refinement((qt,In)=>nt(qt)?!0:(In.addIssue(typeof jt=="function"?jt(qt,In):jt),!1))}_refinement(nt){return new Ge({schema:this,typeName:bt.ZodEffects,effect:{type:"refinement",refinement:nt}})}superRefine(nt){return this._refinement(nt)}constructor(nt){this.spa=this.safeParseAsync,this._def=nt,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:jt=>this["~validate"](jt)}}optional(){return je.create(this,this._def)}nullable(){return gt.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Se.create(this)}promise(){return Fe.create(this,this._def)}or(nt){return ue.create([this,nt],this._def)}and(nt){return Ae.create(this,nt,this._def)}transform(nt){return new Ge({...h(this._def),schema:this,typeName:bt.ZodEffects,effect:{type:"transform",transform:nt}})}default(nt){const jt=typeof nt=="function"?nt:()=>nt;return new ot({...h(this._def),innerType:this,defaultValue:jt,typeName:bt.ZodDefault})}brand(){return new At({typeName:bt.ZodBranded,type:this,...h(this._def)})}catch(nt){const jt=typeof nt=="function"?nt:()=>nt;return new Mt({...h(this._def),innerType:this,catchValue:jt,typeName:bt.ZodCatch})}describe(nt){const jt=this.constructor;return new jt({...this._def,description:nt})}pipe(nt){return rt.create(this,nt)}readonly(){return st.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 l=/^c[^\s-]{8,}$/i,E=/^[0-9a-z]+$/,f=/^[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,y=/^[a-z0-9_-]{21}$/i,b=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,A=/^[-+]?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)?)??$/,S=/^(?!\.)(?!.*\.\.)([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])$/,O=/^(([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])$/,R=/^([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(nn){let nt="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return nn.precision?nt=`${nt}\\.\\d{${nn.precision}}`:nn.precision==null&&(nt=`${nt}(\\.\\d+)?`),nt}function B(nn){return new RegExp(`^${L(nn)}$`)}function j(nn){let nt=`${k}T${L(nn)}`;const jt=[];return jt.push(nn.local?"Z?":"Z"),nn.offset&&jt.push("([+-]\\d{2}:?\\d{2})"),nt=`${nt}(${jt.join("|")})`,new RegExp(`^${nt}$`)}t.datetimeRegex=j;function W(nn,nt){return!!((nt==="v4"||!nt)&&D.test(nn)||(nt==="v6"||!nt)&&O.test(nn))}function U(nn,nt){if(!b.test(nn))return!1;try{const[jt]=nn.split("."),qt=jt.replace(/-/g,"+").replace(/_/g,"/").padEnd(jt.length+(4-jt.length%4)%4,"="),In=JSON.parse(atob(qt));return!(typeof In!="object"||In===null||!In.typ||!In.alg||nt&&In.alg!==nt)}catch{return!1}}function Q(nn,nt){return!!((nt==="v4"||!nt)&&I.test(nn)||(nt==="v6"||!nt)&&M.test(nn))}class V extends u{_parse(nt){if(this._def.coerce&&(nt.data=String(nt.data)),this._getType(nt)!==p.ZodParsedType.string){const jn=this._getOrReturnCtx(nt);return(0,m.addIssueToContext)(jn,{code:s.ZodIssueCode.invalid_type,expected:p.ZodParsedType.string,received:jn.parsedType}),m.INVALID}const qt=new m.ParseStatus;let In;for(const jn of this._def.checks)if(jn.kind==="min")nt.data.length<jn.value&&(In=this._getOrReturnCtx(nt,In),(0,m.addIssueToContext)(In,{code:s.ZodIssueCode.too_small,minimum:jn.value,type:"string",inclusive:!0,exact:!1,message:jn.message}),qt.dirty());else if(jn.kind==="max")nt.data.length>jn.value&&(In=this._getOrReturnCtx(nt,In),(0,m.addIssueToContext)(In,{code:s.ZodIssueCode.too_big,maximum:jn.value,type:"string",inclusive:!0,exact:!1,message:jn.message}),qt.dirty());else if(jn.kind==="length"){const Bi=nt.data.length>jn.value,Mi=nt.data.length<jn.value;(Bi||Mi)&&(In=this._getOrReturnCtx(nt,In),Bi?(0,m.addIssueToContext)(In,{code:s.ZodIssueCode.too_big,maximum:jn.value,type:"string",inclusive:!0,exact:!0,message:jn.message}):Mi&&(0,m.addIssueToContext)(In,{code:s.ZodIssueCode.too_small,minimum:jn.value,type:"string",inclusive:!0,exact:!0,message:jn.message}),qt.dirty())}else if(jn.kind==="email")S.test(nt.data)||(In=this._getOrReturnCtx(nt,In),(0,m.addIssueToContext)(In,{validation:"email",code:s.ZodIssueCode.invalid_string,message:jn.message}),qt.dirty());else if(jn.kind==="emoji")T||(T=new RegExp(w,"u")),T.test(nt.data)||(In=this._getOrReturnCtx(nt,In),(0,m.addIssueToContext)(In,{validation:"emoji",code:s.ZodIssueCode.invalid_string,message:jn.message}),qt.dirty());else if(jn.kind==="uuid")c.test(nt.data)||(In=this._getOrReturnCtx(nt,In),(0,m.addIssueToContext)(In,{validation:"uuid",code:s.ZodIssueCode.invalid_string,message:jn.message}),qt.dirty());else if(jn.kind==="nanoid")y.test(nt.data)||(In=this._getOrReturnCtx(nt,In),(0,m.addIssueToContext)(In,{validation:"nanoid",code:s.ZodIssueCode.invalid_string,message:jn.message}),qt.dirty());else if(jn.kind==="cuid")l.test(nt.data)||(In=this._getOrReturnCtx(nt,In),(0,m.addIssueToContext)(In,{validation:"cuid",code:s.ZodIssueCode.invalid_string,message:jn.message}),qt.dirty());else if(jn.kind==="cuid2")E.test(nt.data)||(In=this._getOrReturnCtx(nt,In),(0,m.addIssueToContext)(In,{validation:"cuid2",code:s.ZodIssueCode.invalid_string,message:jn.message}),qt.dirty());else if(jn.kind==="ulid")f.test(nt.data)||(In=this._getOrReturnCtx(nt,In),(0,m.addIssueToContext)(In,{validation:"ulid",code:s.ZodIssueCode.invalid_string,message:jn.message}),qt.dirty());else if(jn.kind==="url")try{new URL(nt.data)}catch{In=this._getOrReturnCtx(nt,In),(0,m.addIssueToContext)(In,{validation:"url",code:s.ZodIssueCode.invalid_string,message:jn.message}),qt.dirty()}else jn.kind==="regex"?(jn.regex.lastIndex=0,jn.regex.test(nt.data)||(In=this._getOrReturnCtx(nt,In),(0,m.addIssueToContext)(In,{validation:"regex",code:s.ZodIssueCode.invalid_string,message:jn.message}),qt.dirty())):jn.kind==="trim"?nt.data=nt.data.trim():jn.kind==="includes"?nt.data.includes(jn.value,jn.position)||(In=this._getOrReturnCtx(nt,In),(0,m.addIssueToContext)(In,{code:s.ZodIssueCode.invalid_string,validation:{includes:jn.value,position:jn.position},message:jn.message}),qt.dirty()):jn.kind==="toLowerCase"?nt.data=nt.data.toLowerCase():jn.kind==="toUpperCase"?nt.data=nt.data.toUpperCase():jn.kind==="startsWith"?nt.data.startsWith(jn.value)||(In=this._getOrReturnCtx(nt,In),(0,m.addIssueToContext)(In,{code:s.ZodIssueCode.invalid_string,validation:{startsWith:jn.value},message:jn.message}),qt.dirty()):jn.kind==="endsWith"?nt.data.endsWith(jn.value)||(In=this._getOrReturnCtx(nt,In),(0,m.addIssueToContext)(In,{code:s.ZodIssueCode.invalid_string,validation:{endsWith:jn.value},message:jn.message}),qt.dirty()):jn.kind==="datetime"?j(jn).test(nt.data)||(In=this._getOrReturnCtx(nt,In),(0,m.addIssueToContext)(In,{code:s.ZodIssueCode.invalid_string,validation:"datetime",message:jn.message}),qt.dirty()):jn.kind==="date"?F.test(nt.data)||(In=this._getOrReturnCtx(nt,In),(0,m.addIssueToContext)(In,{code:s.ZodIssueCode.invalid_string,validation:"date",message:jn.message}),qt.dirty()):jn.kind==="time"?B(jn).test(nt.data)||(In=this._getOrReturnCtx(nt,In),(0,m.addIssueToContext)(In,{code:s.ZodIssueCode.invalid_string,validation:"time",message:jn.message}),qt.dirty()):jn.kind==="duration"?A.test(nt.data)||(In=this._getOrReturnCtx(nt,In),(0,m.addIssueToContext)(In,{validation:"duration",code:s.ZodIssueCode.invalid_string,message:jn.message}),qt.dirty()):jn.kind==="ip"?W(nt.data,jn.version)||(In=this._getOrReturnCtx(nt,In),(0,m.addIssueToContext)(In,{validation:"ip",code:s.ZodIssueCode.invalid_string,message:jn.message}),qt.dirty()):jn.kind==="jwt"?U(nt.data,jn.alg)||(In=this._getOrReturnCtx(nt,In),(0,m.addIssueToContext)(In,{validation:"jwt",code:s.ZodIssueCode.invalid_string,message:jn.message}),qt.dirty()):jn.kind==="cidr"?Q(nt.data,jn.version)||(In=this._getOrReturnCtx(nt,In),(0,m.addIssueToContext)(In,{validation:"cidr",code:s.ZodIssueCode.invalid_string,message:jn.message}),qt.dirty()):jn.kind==="base64"?R.test(nt.data)||(In=this._getOrReturnCtx(nt,In),(0,m.addIssueToContext)(In,{validation:"base64",code:s.ZodIssueCode.invalid_string,message:jn.message}),qt.dirty()):jn.kind==="base64url"?P.test(nt.data)||(In=this._getOrReturnCtx(nt,In),(0,m.addIssueToContext)(In,{validation:"base64url",code:s.ZodIssueCode.invalid_string,message:jn.message}),qt.dirty()):p.util.assertNever(jn);return{status:qt.value,value:nt.data}}_regex(nt,jt,qt){return this.refinement(In=>nt.test(In),{validation:jt,code:s.ZodIssueCode.invalid_string,...v.errorUtil.errToObj(qt)})}_addCheck(nt){return new V({...this._def,checks:[...this._def.checks,nt]})}email(nt){return this._addCheck({kind:"email",...v.errorUtil.errToObj(nt)})}url(nt){return this._addCheck({kind:"url",...v.errorUtil.errToObj(nt)})}emoji(nt){return this._addCheck({kind:"emoji",...v.errorUtil.errToObj(nt)})}uuid(nt){return this._addCheck({kind:"uuid",...v.errorUtil.errToObj(nt)})}nanoid(nt){return this._addCheck({kind:"nanoid",...v.errorUtil.errToObj(nt)})}cuid(nt){return this._addCheck({kind:"cuid",...v.errorUtil.errToObj(nt)})}cuid2(nt){return this._addCheck({kind:"cuid2",...v.errorUtil.errToObj(nt)})}ulid(nt){return this._addCheck({kind:"ulid",...v.errorUtil.errToObj(nt)})}base64(nt){return this._addCheck({kind:"base64",...v.errorUtil.errToObj(nt)})}base64url(nt){return this._addCheck({kind:"base64url",...v.errorUtil.errToObj(nt)})}jwt(nt){return this._addCheck({kind:"jwt",...v.errorUtil.errToObj(nt)})}ip(nt){return this._addCheck({kind:"ip",...v.errorUtil.errToObj(nt)})}cidr(nt){return this._addCheck({kind:"cidr",...v.errorUtil.errToObj(nt)})}datetime(nt){var jt,qt;return typeof nt=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:nt}):this._addCheck({kind:"datetime",precision:typeof nt?.precision>"u"?null:nt?.precision,offset:(jt=nt?.offset)!==null&&jt!==void 0?jt:!1,local:(qt=nt?.local)!==null&&qt!==void 0?qt:!1,...v.errorUtil.errToObj(nt?.message)})}date(nt){return this._addCheck({kind:"date",message:nt})}time(nt){return typeof nt=="string"?this._addCheck({kind:"time",precision:null,message:nt}):this._addCheck({kind:"time",precision:typeof nt?.precision>"u"?null:nt?.precision,...v.errorUtil.errToObj(nt?.message)})}duration(nt){return this._addCheck({kind:"duration",...v.errorUtil.errToObj(nt)})}regex(nt,jt){return this._addCheck({kind:"regex",regex:nt,...v.errorUtil.errToObj(jt)})}includes(nt,jt){return this._addCheck({kind:"includes",value:nt,position:jt?.position,...v.errorUtil.errToObj(jt?.message)})}startsWith(nt,jt){return this._addCheck({kind:"startsWith",value:nt,...v.errorUtil.errToObj(jt)})}endsWith(nt,jt){return this._addCheck({kind:"endsWith",value:nt,...v.errorUtil.errToObj(jt)})}min(nt,jt){return this._addCheck({kind:"min",value:nt,...v.errorUtil.errToObj(jt)})}max(nt,jt){return this._addCheck({kind:"max",value:nt,...v.errorUtil.errToObj(jt)})}length(nt,jt){return this._addCheck({kind:"length",value:nt,...v.errorUtil.errToObj(jt)})}nonempty(nt){return this.min(1,v.errorUtil.errToObj(nt))}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(nt=>nt.kind==="datetime")}get isDate(){return!!this._def.checks.find(nt=>nt.kind==="date")}get isTime(){return!!this._def.checks.find(nt=>nt.kind==="time")}get isDuration(){return!!this._def.checks.find(nt=>nt.kind==="duration")}get isEmail(){return!!this._def.checks.find(nt=>nt.kind==="email")}get isURL(){return!!this._def.checks.find(nt=>nt.kind==="url")}get isEmoji(){return!!this._def.checks.find(nt=>nt.kind==="emoji")}get isUUID(){return!!this._def.checks.find(nt=>nt.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(nt=>nt.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(nt=>nt.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(nt=>nt.kind==="cuid2")}get isULID(){return!!this._def.checks.find(nt=>nt.kind==="ulid")}get isIP(){return!!this._def.checks.find(nt=>nt.kind==="ip")}get isCIDR(){return!!this._def.checks.find(nt=>nt.kind==="cidr")}get isBase64(){return!!this._def.checks.find(nt=>nt.kind==="base64")}get isBase64url(){return!!this._def.checks.find(nt=>nt.kind==="base64url")}get minLength(){let nt=null;for(const jt of this._def.checks)jt.kind==="min"&&(nt===null||jt.value>nt)&&(nt=jt.value);return nt}get maxLength(){let nt=null;for(const jt of this._def.checks)jt.kind==="max"&&(nt===null||jt.value<nt)&&(nt=jt.value);return nt}}t.ZodString=V,V.create=nn=>{var nt;return new V({checks:[],typeName:bt.ZodString,coerce:(nt=nn?.coerce)!==null&&nt!==void 0?nt:!1,...h(nn)})};function $(nn,nt){const jt=(nn.toString().split(".")[1]||"").length,qt=(nt.toString().split(".")[1]||"").length,In=jt>qt?jt:qt,jn=parseInt(nn.toFixed(In).replace(".","")),Bi=parseInt(nt.toFixed(In).replace(".",""));return jn%Bi/Math.pow(10,In)}class Y extends u{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(nt){if(this._def.coerce&&(nt.data=Number(nt.data)),this._getType(nt)!==p.ZodParsedType.number){const jn=this._getOrReturnCtx(nt);return(0,m.addIssueToContext)(jn,{code:s.ZodIssueCode.invalid_type,expected:p.ZodParsedType.number,received:jn.parsedType}),m.INVALID}let qt;const In=new m.ParseStatus;for(const jn of this._def.checks)jn.kind==="int"?p.util.isInteger(nt.data)||(qt=this._getOrReturnCtx(nt,qt),(0,m.addIssueToContext)(qt,{code:s.ZodIssueCode.invalid_type,expected:"integer",received:"float",message:jn.message}),In.dirty()):jn.kind==="min"?(jn.inclusive?nt.data<jn.value:nt.data<=jn.value)&&(qt=this._getOrReturnCtx(nt,qt),(0,m.addIssueToContext)(qt,{code:s.ZodIssueCode.too_small,minimum:jn.value,type:"number",inclusive:jn.inclusive,exact:!1,message:jn.message}),In.dirty()):jn.kind==="max"?(jn.inclusive?nt.data>jn.value:nt.data>=jn.value)&&(qt=this._getOrReturnCtx(nt,qt),(0,m.addIssueToContext)(qt,{code:s.ZodIssueCode.too_big,maximum:jn.value,type:"number",inclusive:jn.inclusive,exact:!1,message:jn.message}),In.dirty()):jn.kind==="multipleOf"?$(nt.data,jn.value)!==0&&(qt=this._getOrReturnCtx(nt,qt),(0,m.addIssueToContext)(qt,{code:s.ZodIssueCode.not_multiple_of,multipleOf:jn.value,message:jn.message}),In.dirty()):jn.kind==="finite"?Number.isFinite(nt.data)||(qt=this._getOrReturnCtx(nt,qt),(0,m.addIssueToContext)(qt,{code:s.ZodIssueCode.not_finite,message:jn.message}),In.dirty()):p.util.assertNever(jn);return{status:In.value,value:nt.data}}gte(nt,jt){return this.setLimit("min",nt,!0,v.errorUtil.toString(jt))}gt(nt,jt){return this.setLimit("min",nt,!1,v.errorUtil.toString(jt))}lte(nt,jt){return this.setLimit("max",nt,!0,v.errorUtil.toString(jt))}lt(nt,jt){return this.setLimit("max",nt,!1,v.errorUtil.toString(jt))}setLimit(nt,jt,qt,In){return new Y({...this._def,checks:[...this._def.checks,{kind:nt,value:jt,inclusive:qt,message:v.errorUtil.toString(In)}]})}_addCheck(nt){return new Y({...this._def,checks:[...this._def.checks,nt]})}int(nt){return this._addCheck({kind:"int",message:v.errorUtil.toString(nt)})}positive(nt){return this._addCheck({kind:"min",value:0,inclusive:!1,message:v.errorUtil.toString(nt)})}negative(nt){return this._addCheck({kind:"max",value:0,inclusive:!1,message:v.errorUtil.toString(nt)})}nonpositive(nt){return this._addCheck({kind:"max",value:0,inclusive:!0,message:v.errorUtil.toString(nt)})}nonnegative(nt){return this._addCheck({kind:"min",value:0,inclusive:!0,message:v.errorUtil.toString(nt)})}multipleOf(nt,jt){return this._addCheck({kind:"multipleOf",value:nt,message:v.errorUtil.toString(jt)})}finite(nt){return this._addCheck({kind:"finite",message:v.errorUtil.toString(nt)})}safe(nt){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:v.errorUtil.toString(nt)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:v.errorUtil.toString(nt)})}get minValue(){let nt=null;for(const jt of this._def.checks)jt.kind==="min"&&(nt===null||jt.value>nt)&&(nt=jt.value);return nt}get maxValue(){let nt=null;for(const jt of this._def.checks)jt.kind==="max"&&(nt===null||jt.value<nt)&&(nt=jt.value);return nt}get isInt(){return!!this._def.checks.find(nt=>nt.kind==="int"||nt.kind==="multipleOf"&&p.util.isInteger(nt.value))}get isFinite(){let nt=null,jt=null;for(const qt of this._def.checks){if(qt.kind==="finite"||qt.kind==="int"||qt.kind==="multipleOf")return!0;qt.kind==="min"?(jt===null||qt.value>jt)&&(jt=qt.value):qt.kind==="max"&&(nt===null||qt.value<nt)&&(nt=qt.value)}return Number.isFinite(jt)&&Number.isFinite(nt)}}t.ZodNumber=Y,Y.create=nn=>new Y({checks:[],typeName:bt.ZodNumber,coerce:nn?.coerce||!1,...h(nn)});class z extends u{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(nt){if(this._def.coerce)try{nt.data=BigInt(nt.data)}catch{return this._getInvalidInput(nt)}if(this._getType(nt)!==p.ZodParsedType.bigint)return this._getInvalidInput(nt);let qt;const In=new m.ParseStatus;for(const jn of this._def.checks)jn.kind==="min"?(jn.inclusive?nt.data<jn.value:nt.data<=jn.value)&&(qt=this._getOrReturnCtx(nt,qt),(0,m.addIssueToContext)(qt,{code:s.ZodIssueCode.too_small,type:"bigint",minimum:jn.value,inclusive:jn.inclusive,message:jn.message}),In.dirty()):jn.kind==="max"?(jn.inclusive?nt.data>jn.value:nt.data>=jn.value)&&(qt=this._getOrReturnCtx(nt,qt),(0,m.addIssueToContext)(qt,{code:s.ZodIssueCode.too_big,type:"bigint",maximum:jn.value,inclusive:jn.inclusive,message:jn.message}),In.dirty()):jn.kind==="multipleOf"?nt.data%jn.value!==BigInt(0)&&(qt=this._getOrReturnCtx(nt,qt),(0,m.addIssueToContext)(qt,{code:s.ZodIssueCode.not_multiple_of,multipleOf:jn.value,message:jn.message}),In.dirty()):p.util.assertNever(jn);return{status:In.value,value:nt.data}}_getInvalidInput(nt){const jt=this._getOrReturnCtx(nt);return(0,m.addIssueToContext)(jt,{code:s.ZodIssueCode.invalid_type,expected:p.ZodParsedType.bigint,received:jt.parsedType}),m.INVALID}gte(nt,jt){return this.setLimit("min",nt,!0,v.errorUtil.toString(jt))}gt(nt,jt){return this.setLimit("min",nt,!1,v.errorUtil.toString(jt))}lte(nt,jt){return this.setLimit("max",nt,!0,v.errorUtil.toString(jt))}lt(nt,jt){return this.setLimit("max",nt,!1,v.errorUtil.toString(jt))}setLimit(nt,jt,qt,In){return new z({...this._def,checks:[...this._def.checks,{kind:nt,value:jt,inclusive:qt,message:v.errorUtil.toString(In)}]})}_addCheck(nt){return new z({...this._def,checks:[...this._def.checks,nt]})}positive(nt){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:v.errorUtil.toString(nt)})}negative(nt){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:v.errorUtil.toString(nt)})}nonpositive(nt){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:v.errorUtil.toString(nt)})}nonnegative(nt){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:v.errorUtil.toString(nt)})}multipleOf(nt,jt){return this._addCheck({kind:"multipleOf",value:nt,message:v.errorUtil.toString(jt)})}get minValue(){let nt=null;for(const jt of this._def.checks)jt.kind==="min"&&(nt===null||jt.value>nt)&&(nt=jt.value);return nt}get maxValue(){let nt=null;for(const jt of this._def.checks)jt.kind==="max"&&(nt===null||jt.value<nt)&&(nt=jt.value);return nt}}t.ZodBigInt=z,z.create=nn=>{var nt;return new z({checks:[],typeName:bt.ZodBigInt,coerce:(nt=nn?.coerce)!==null&&nt!==void 0?nt:!1,...h(nn)})};class H extends u{_parse(nt){if(this._def.coerce&&(nt.data=!!nt.data),this._getType(nt)!==p.ZodParsedType.boolean){const qt=this._getOrReturnCtx(nt);return(0,m.addIssueToContext)(qt,{code:s.ZodIssueCode.invalid_type,expected:p.ZodParsedType.boolean,received:qt.parsedType}),m.INVALID}return(0,m.OK)(nt.data)}}t.ZodBoolean=H,H.create=nn=>new H({typeName:bt.ZodBoolean,coerce:nn?.coerce||!1,...h(nn)});class K extends u{_parse(nt){if(this._def.coerce&&(nt.data=new Date(nt.data)),this._getType(nt)!==p.ZodParsedType.date){const jn=this._getOrReturnCtx(nt);return(0,m.addIssueToContext)(jn,{code:s.ZodIssueCode.invalid_type,expected:p.ZodParsedType.date,received:jn.parsedType}),m.INVALID}if(isNaN(nt.data.getTime())){const jn=this._getOrReturnCtx(nt);return(0,m.addIssueToContext)(jn,{code:s.ZodIssueCode.invalid_date}),m.INVALID}const qt=new m.ParseStatus;let In;for(const jn of this._def.checks)jn.kind==="min"?nt.data.getTime()<jn.value&&(In=this._getOrReturnCtx(nt,In),(0,m.addIssueToContext)(In,{code:s.ZodIssueCode.too_small,message:jn.message,inclusive:!0,exact:!1,minimum:jn.value,type:"date"}),qt.dirty()):jn.kind==="max"?nt.data.getTime()>jn.value&&(In=this._getOrReturnCtx(nt,In),(0,m.addIssueToContext)(In,{code:s.ZodIssueCode.too_big,message:jn.message,inclusive:!0,exact:!1,maximum:jn.value,type:"date"}),qt.dirty()):p.util.assertNever(jn);return{status:qt.value,value:new Date(nt.data.getTime())}}_addCheck(nt){return new K({...this._def,checks:[...this._def.checks,nt]})}min(nt,jt){return this._addCheck({kind:"min",value:nt.getTime(),message:v.errorUtil.toString(jt)})}max(nt,jt){return this._addCheck({kind:"max",value:nt.getTime(),message:v.errorUtil.toString(jt)})}get minDate(){let nt=null;for(const jt of this._def.checks)jt.kind==="min"&&(nt===null||jt.value>nt)&&(nt=jt.value);return nt!=null?new Date(nt):null}get maxDate(){let nt=null;for(const jt of this._def.checks)jt.kind==="max"&&(nt===null||jt.value<nt)&&(nt=jt.value);return nt!=null?new Date(nt):null}}t.ZodDate=K,K.create=nn=>new K({checks:[],coerce:nn?.coerce||!1,typeName:bt.ZodDate,...h(nn)});class Z extends u{_parse(nt){if(this._getType(nt)!==p.ZodParsedType.symbol){const qt=this._getOrReturnCtx(nt);return(0,m.addIssueToContext)(qt,{code:s.ZodIssueCode.invalid_type,expected:p.ZodParsedType.symbol,received:qt.parsedType}),m.INVALID}return(0,m.OK)(nt.data)}}t.ZodSymbol=Z,Z.create=nn=>new Z({typeName:bt.ZodSymbol,...h(nn)});class X extends u{_parse(nt){if(this._getType(nt)!==p.ZodParsedType.undefined){const qt=this._getOrReturnCtx(nt);return(0,m.addIssueToContext)(qt,{code:s.ZodIssueCode.invalid_type,expected:p.ZodParsedType.undefined,received:qt.parsedType}),m.INVALID}return(0,m.OK)(nt.data)}}t.ZodUndefined=X,X.create=nn=>new X({typeName:bt.ZodUndefined,...h(nn)});class oe extends u{_parse(nt){if(this._getType(nt)!==p.ZodParsedType.null){const qt=this._getOrReturnCtx(nt);return(0,m.addIssueToContext)(qt,{code:s.ZodIssueCode.invalid_type,expected:p.ZodParsedType.null,received:qt.parsedType}),m.INVALID}return(0,m.OK)(nt.data)}}t.ZodNull=oe,oe.create=nn=>new oe({typeName:bt.ZodNull,...h(nn)});class ie extends u{constructor(){super(...arguments),this._any=!0}_parse(nt){return(0,m.OK)(nt.data)}}t.ZodAny=ie,ie.create=nn=>new ie({typeName:bt.ZodAny,...h(nn)});class ge extends u{constructor(){super(...arguments),this._unknown=!0}_parse(nt){return(0,m.OK)(nt.data)}}t.ZodUnknown=ge,ge.create=nn=>new ge({typeName:bt.ZodUnknown,...h(nn)});class me extends u{_parse(nt){const jt=this._getOrReturnCtx(nt);return(0,m.addIssueToContext)(jt,{code:s.ZodIssueCode.invalid_type,expected:p.ZodParsedType.never,received:jt.parsedType}),m.INVALID}}t.ZodNever=me,me.create=nn=>new me({typeName:bt.ZodNever,...h(nn)});class q extends u{_parse(nt){if(this._getType(nt)!==p.ZodParsedType.undefined){const qt=this._getOrReturnCtx(nt);return(0,m.addIssueToContext)(qt,{code:s.ZodIssueCode.invalid_type,expected:p.ZodParsedType.void,received:qt.parsedType}),m.INVALID}return(0,m.OK)(nt.data)}}t.ZodVoid=q,q.create=nn=>new q({typeName:bt.ZodVoid,...h(nn)});class Se extends u{_parse(nt){const{ctx:jt,status:qt}=this._processInputParams(nt),In=this._def;if(jt.parsedType!==p.ZodParsedType.array)return(0,m.addIssueToContext)(jt,{code:s.ZodIssueCode.invalid_type,expected:p.ZodParsedType.array,received:jt.parsedType}),m.INVALID;if(In.exactLength!==null){const Bi=jt.data.length>In.exactLength.value,Mi=jt.data.length<In.exactLength.value;(Bi||Mi)&&((0,m.addIssueToContext)(jt,{code:Bi?s.ZodIssueCode.too_big:s.ZodIssueCode.too_small,minimum:Mi?In.exactLength.value:void 0,maximum:Bi?In.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:In.exactLength.message}),qt.dirty())}if(In.minLength!==null&&jt.data.length<In.minLength.value&&((0,m.addIssueToContext)(jt,{code:s.ZodIssueCode.too_small,minimum:In.minLength.value,type:"array",inclusive:!0,exact:!1,message:In.minLength.message}),qt.dirty()),In.maxLength!==null&&jt.data.length>In.maxLength.value&&((0,m.addIssueToContext)(jt,{code:s.ZodIssueCode.too_big,maximum:In.maxLength.value,type:"array",inclusive:!0,exact:!1,message:In.maxLength.message}),qt.dirty()),jt.common.async)return Promise.all([...jt.data].map((Bi,Mi)=>In.type._parseAsync(new g(jt,Bi,jt.path,Mi)))).then(Bi=>m.ParseStatus.mergeArray(qt,Bi));const jn=[...jt.data].map((Bi,Mi)=>In.type._parseSync(new g(jt,Bi,jt.path,Mi)));return m.ParseStatus.mergeArray(qt,jn)}get element(){return this._def.type}min(nt,jt){return new Se({...this._def,minLength:{value:nt,message:v.errorUtil.toString(jt)}})}max(nt,jt){return new Se({...this._def,maxLength:{value:nt,message:v.errorUtil.toString(jt)}})}length(nt,jt){return new Se({...this._def,exactLength:{value:nt,message:v.errorUtil.toString(jt)}})}nonempty(nt){return this.min(1,nt)}}t.ZodArray=Se,Se.create=(nn,nt)=>new Se({type:nn,minLength:null,maxLength:null,exactLength:null,typeName:bt.ZodArray,...h(nt)});function _e(nn){if(nn instanceof ne){const nt={};for(const jt in nn.shape){const qt=nn.shape[jt];nt[jt]=je.create(_e(qt))}return new ne({...nn._def,shape:()=>nt})}else return nn instanceof Se?new Se({...nn._def,type:_e(nn.element)}):nn instanceof je?je.create(_e(nn.unwrap())):nn instanceof gt?gt.create(_e(nn.unwrap())):nn instanceof Ce?Ce.create(nn.items.map(nt=>_e(nt))):nn}class ne 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 nt=this._def.shape(),jt=p.util.objectKeys(nt);return this._cached={shape:nt,keys:jt}}_parse(nt){if(this._getType(nt)!==p.ZodParsedType.object){const yi=this._getOrReturnCtx(nt);return(0,m.addIssueToContext)(yi,{code:s.ZodIssueCode.invalid_type,expected:p.ZodParsedType.object,received:yi.parsedType}),m.INVALID}const{status:qt,ctx:In}=this._processInputParams(nt),{shape:jn,keys:Bi}=this._getCached(),Mi=[];if(!(this._def.catchall instanceof me&&this._def.unknownKeys==="strip"))for(const yi in In.data)Bi.includes(yi)||Mi.push(yi);const Xi=[];for(const yi of Bi){const Zi=jn[yi],to=In.data[yi];Xi.push({key:{status:"valid",value:yi},value:Zi._parse(new g(In,to,In.path,yi)),alwaysSet:yi in In.data})}if(this._def.catchall instanceof me){const yi=this._def.unknownKeys;if(yi==="passthrough")for(const Zi of Mi)Xi.push({key:{status:"valid",value:Zi},value:{status:"valid",value:In.data[Zi]}});else if(yi==="strict")Mi.length>0&&((0,m.addIssueToContext)(In,{code:s.ZodIssueCode.unrecognized_keys,keys:Mi}),qt.dirty());else if(yi!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const yi=this._def.catchall;for(const Zi of Mi){const to=In.data[Zi];Xi.push({key:{status:"valid",value:Zi},value:yi._parse(new g(In,to,In.path,Zi)),alwaysSet:Zi in In.data})}}return In.common.async?Promise.resolve().then(async()=>{const yi=[];for(const Zi of Xi){const to=await Zi.key,uo=await Zi.value;yi.push({key:to,value:uo,alwaysSet:Zi.alwaysSet})}return yi}).then(yi=>m.ParseStatus.mergeObjectSync(qt,yi)):m.ParseStatus.mergeObjectSync(qt,Xi)}get shape(){return this._def.shape()}strict(nt){return v.errorUtil.errToObj,new ne({...this._def,unknownKeys:"strict",...nt!==void 0?{errorMap:(jt,qt)=>{var In,jn,Bi,Mi;const Xi=(Bi=(jn=(In=this._def).errorMap)===null||jn===void 0?void 0:jn.call(In,jt,qt).message)!==null&&Bi!==void 0?Bi:qt.defaultError;return jt.code==="unrecognized_keys"?{message:(Mi=v.errorUtil.errToObj(nt).message)!==null&&Mi!==void 0?Mi:Xi}:{message:Xi}}}:{}})}strip(){return new ne({...this._def,unknownKeys:"strip"})}passthrough(){return new ne({...this._def,unknownKeys:"passthrough"})}extend(nt){return new ne({...this._def,shape:()=>({...this._def.shape(),...nt})})}merge(nt){return new ne({unknownKeys:nt._def.unknownKeys,catchall:nt._def.catchall,shape:()=>({...this._def.shape(),...nt._def.shape()}),typeName:bt.ZodObject})}setKey(nt,jt){return this.augment({[nt]:jt})}catchall(nt){return new ne({...this._def,catchall:nt})}pick(nt){const jt={};return p.util.objectKeys(nt).forEach(qt=>{nt[qt]&&this.shape[qt]&&(jt[qt]=this.shape[qt])}),new ne({...this._def,shape:()=>jt})}omit(nt){const jt={};return p.util.objectKeys(this.shape).forEach(qt=>{nt[qt]||(jt[qt]=this.shape[qt])}),new ne({...this._def,shape:()=>jt})}deepPartial(){return _e(this)}partial(nt){const jt={};return p.util.objectKeys(this.shape).forEach(qt=>{const In=this.shape[qt];nt&&!nt[qt]?jt[qt]=In:jt[qt]=In.optional()}),new ne({...this._def,shape:()=>jt})}required(nt){const jt={};return p.util.objectKeys(this.shape).forEach(qt=>{if(nt&&!nt[qt])jt[qt]=this.shape[qt];else{let jn=this.shape[qt];for(;jn instanceof je;)jn=jn._def.innerType;jt[qt]=jn}}),new ne({...this._def,shape:()=>jt})}keyof(){return he(p.util.objectKeys(this.shape))}}t.ZodObject=ne,ne.create=(nn,nt)=>new ne({shape:()=>nn,unknownKeys:"strip",catchall:me.create(),typeName:bt.ZodObject,...h(nt)}),ne.strictCreate=(nn,nt)=>new ne({shape:()=>nn,unknownKeys:"strict",catchall:me.create(),typeName:bt.ZodObject,...h(nt)}),ne.lazycreate=(nn,nt)=>new ne({shape:nn,unknownKeys:"strip",catchall:me.create(),typeName:bt.ZodObject,...h(nt)});class ue extends u{_parse(nt){const{ctx:jt}=this._processInputParams(nt),qt=this._def.options;function In(jn){for(const Mi of jn)if(Mi.result.status==="valid")return Mi.result;for(const Mi of jn)if(Mi.result.status==="dirty")return jt.common.issues.push(...Mi.ctx.common.issues),Mi.result;const Bi=jn.map(Mi=>new s.ZodError(Mi.ctx.common.issues));return(0,m.addIssueToContext)(jt,{code:s.ZodIssueCode.invalid_union,unionErrors:Bi}),m.INVALID}if(jt.common.async)return Promise.all(qt.map(async jn=>{const Bi={...jt,common:{...jt.common,issues:[]},parent:null};return{result:await jn._parseAsync({data:jt.data,path:jt.path,parent:Bi}),ctx:Bi}})).then(In);{let jn;const Bi=[];for(const Xi of qt){const yi={...jt,common:{...jt.common,issues:[]},parent:null},Zi=Xi._parseSync({data:jt.data,path:jt.path,parent:yi});if(Zi.status==="valid")return Zi;Zi.status==="dirty"&&!jn&&(jn={result:Zi,ctx:yi}),yi.common.issues.length&&Bi.push(yi.common.issues)}if(jn)return jt.common.issues.push(...jn.ctx.common.issues),jn.result;const Mi=Bi.map(Xi=>new s.ZodError(Xi));return(0,m.addIssueToContext)(jt,{code:s.ZodIssueCode.invalid_union,unionErrors:Mi}),m.INVALID}}get options(){return this._def.options}}t.ZodUnion=ue,ue.create=(nn,nt)=>new ue({options:nn,typeName:bt.ZodUnion,...h(nt)});const Ie=nn=>nn instanceof pe?Ie(nn.schema):nn instanceof Ge?Ie(nn.innerType()):nn instanceof re?[nn.value]:nn instanceof Oe?nn.options:nn instanceof De?p.util.objectValues(nn.enum):nn instanceof ot?Ie(nn._def.innerType):nn instanceof X?[void 0]:nn instanceof oe?[null]:nn instanceof je?[void 0,...Ie(nn.unwrap())]:nn instanceof gt?[null,...Ie(nn.unwrap())]:nn instanceof At||nn instanceof st?Ie(nn.unwrap()):nn instanceof Mt?Ie(nn._def.innerType):[];class Pe extends u{_parse(nt){const{ctx:jt}=this._processInputParams(nt);if(jt.parsedType!==p.ZodParsedType.object)return(0,m.addIssueToContext)(jt,{code:s.ZodIssueCode.invalid_type,expected:p.ZodParsedType.object,received:jt.parsedType}),m.INVALID;const qt=this.discriminator,In=jt.data[qt],jn=this.optionsMap.get(In);return jn?jt.common.async?jn._parseAsync({data:jt.data,path:jt.path,parent:jt}):jn._parseSync({data:jt.data,path:jt.path,parent:jt}):((0,m.addIssueToContext)(jt,{code:s.ZodIssueCode.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[qt]}),m.INVALID)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(nt,jt,qt){const In=new Map;for(const jn of jt){const Bi=Ie(jn.shape[nt]);if(!Bi.length)throw new Error(`A discriminator value for key \`${nt}\` could not be extracted from all schema options`);for(const Mi of Bi){if(In.has(Mi))throw new Error(`Discriminator property ${String(nt)} has duplicate value ${String(Mi)}`);In.set(Mi,jn)}}return new Pe({typeName:bt.ZodDiscriminatedUnion,discriminator:nt,options:jt,optionsMap:In,...h(qt)})}}t.ZodDiscriminatedUnion=Pe;function ve(nn,nt){const jt=(0,p.getParsedType)(nn),qt=(0,p.getParsedType)(nt);if(nn===nt)return{valid:!0,data:nn};if(jt===p.ZodParsedType.object&&qt===p.ZodParsedType.object){const In=p.util.objectKeys(nt),jn=p.util.objectKeys(nn).filter(Mi=>In.indexOf(Mi)!==-1),Bi={...nn,...nt};for(const Mi of jn){const Xi=ve(nn[Mi],nt[Mi]);if(!Xi.valid)return{valid:!1};Bi[Mi]=Xi.data}return{valid:!0,data:Bi}}else if(jt===p.ZodParsedType.array&&qt===p.ZodParsedType.array){if(nn.length!==nt.length)return{valid:!1};const In=[];for(let jn=0;jn<nn.length;jn++){const Bi=nn[jn],Mi=nt[jn],Xi=ve(Bi,Mi);if(!Xi.valid)return{valid:!1};In.push(Xi.data)}return{valid:!0,data:In}}else return jt===p.ZodParsedType.date&&qt===p.ZodParsedType.date&&+nn==+nt?{valid:!0,data:nn}:{valid:!1}}class Ae extends u{_parse(nt){const{status:jt,ctx:qt}=this._processInputParams(nt),In=(jn,Bi)=>{if((0,m.isAborted)(jn)||(0,m.isAborted)(Bi))return m.INVALID;const Mi=ve(jn.value,Bi.value);return Mi.valid?(((0,m.isDirty)(jn)||(0,m.isDirty)(Bi))&&jt.dirty(),{status:jt.value,value:Mi.data}):((0,m.addIssueToContext)(qt,{code:s.ZodIssueCode.invalid_intersection_types}),m.INVALID)};return qt.common.async?Promise.all([this._def.left._parseAsync({data:qt.data,path:qt.path,parent:qt}),this._def.right._parseAsync({data:qt.data,path:qt.path,parent:qt})]).then(([jn,Bi])=>In(jn,Bi)):In(this._def.left._parseSync({data:qt.data,path:qt.path,parent:qt}),this._def.right._parseSync({data:qt.data,path:qt.path,parent:qt}))}}t.ZodIntersection=Ae,Ae.create=(nn,nt,jt)=>new Ae({left:nn,right:nt,typeName:bt.ZodIntersection,...h(jt)});class Ce extends u{_parse(nt){const{status:jt,ctx:qt}=this._processInputParams(nt);if(qt.parsedType!==p.ZodParsedType.array)return(0,m.addIssueToContext)(qt,{code:s.ZodIssueCode.invalid_type,expected:p.ZodParsedType.array,received:qt.parsedType}),m.INVALID;if(qt.data.length<this._def.items.length)return(0,m.addIssueToContext)(qt,{code:s.ZodIssueCode.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),m.INVALID;!this._def.rest&&qt.data.length>this._def.items.length&&((0,m.addIssueToContext)(qt,{code:s.ZodIssueCode.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),jt.dirty());const jn=[...qt.data].map((Bi,Mi)=>{const Xi=this._def.items[Mi]||this._def.rest;return Xi?Xi._parse(new g(qt,Bi,qt.path,Mi)):null}).filter(Bi=>!!Bi);return qt.common.async?Promise.all(jn).then(Bi=>m.ParseStatus.mergeArray(jt,Bi)):m.ParseStatus.mergeArray(jt,jn)}get items(){return this._def.items}rest(nt){return new Ce({...this._def,rest:nt})}}t.ZodTuple=Ce,Ce.create=(nn,nt)=>{if(!Array.isArray(nn))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Ce({items:nn,typeName:bt.ZodTuple,rest:null,...h(nt)})};class fe extends u{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(nt){const{status:jt,ctx:qt}=this._processInputParams(nt);if(qt.parsedType!==p.ZodParsedType.object)return(0,m.addIssueToContext)(qt,{code:s.ZodIssueCode.invalid_type,expected:p.ZodParsedType.object,received:qt.parsedType}),m.INVALID;const In=[],jn=this._def.keyType,Bi=this._def.valueType;for(const Mi in qt.data)In.push({key:jn._parse(new g(qt,Mi,qt.path,Mi)),value:Bi._parse(new g(qt,qt.data[Mi],qt.path,Mi)),alwaysSet:Mi in qt.data});return qt.common.async?m.ParseStatus.mergeObjectAsync(jt,In):m.ParseStatus.mergeObjectSync(jt,In)}get element(){return this._def.valueType}static create(nt,jt,qt){return jt instanceof u?new fe({keyType:nt,valueType:jt,typeName:bt.ZodRecord,...h(qt)}):new fe({keyType:V.create(),valueType:nt,typeName:bt.ZodRecord,...h(jt)})}}t.ZodRecord=fe;class xe extends u{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(nt){const{status:jt,ctx:qt}=this._processInputParams(nt);if(qt.parsedType!==p.ZodParsedType.map)return(0,m.addIssueToContext)(qt,{code:s.ZodIssueCode.invalid_type,expected:p.ZodParsedType.map,received:qt.parsedType}),m.INVALID;const In=this._def.keyType,jn=this._def.valueType,Bi=[...qt.data.entries()].map(([Mi,Xi],yi)=>({key:In._parse(new g(qt,Mi,qt.path,[yi,"key"])),value:jn._parse(new g(qt,Xi,qt.path,[yi,"value"]))}));if(qt.common.async){const Mi=new Map;return Promise.resolve().then(async()=>{for(const Xi of Bi){const yi=await Xi.key,Zi=await Xi.value;if(yi.status==="aborted"||Zi.status==="aborted")return m.INVALID;(yi.status==="dirty"||Zi.status==="dirty")&&jt.dirty(),Mi.set(yi.value,Zi.value)}return{status:jt.value,value:Mi}})}else{const Mi=new Map;for(const Xi of Bi){const yi=Xi.key,Zi=Xi.value;if(yi.status==="aborted"||Zi.status==="aborted")return m.INVALID;(yi.status==="dirty"||Zi.status==="dirty")&&jt.dirty(),Mi.set(yi.value,Zi.value)}return{status:jt.value,value:Mi}}}}t.ZodMap=xe,xe.create=(nn,nt,jt)=>new xe({valueType:nt,keyType:nn,typeName:bt.ZodMap,...h(jt)});class Te extends u{_parse(nt){const{status:jt,ctx:qt}=this._processInputParams(nt);if(qt.parsedType!==p.ZodParsedType.set)return(0,m.addIssueToContext)(qt,{code:s.ZodIssueCode.invalid_type,expected:p.ZodParsedType.set,received:qt.parsedType}),m.INVALID;const In=this._def;In.minSize!==null&&qt.data.size<In.minSize.value&&((0,m.addIssueToContext)(qt,{code:s.ZodIssueCode.too_small,minimum:In.minSize.value,type:"set",inclusive:!0,exact:!1,message:In.minSize.message}),jt.dirty()),In.maxSize!==null&&qt.data.size>In.maxSize.value&&((0,m.addIssueToContext)(qt,{code:s.ZodIssueCode.too_big,maximum:In.maxSize.value,type:"set",inclusive:!0,exact:!1,message:In.maxSize.message}),jt.dirty());const jn=this._def.valueType;function Bi(Xi){const yi=new Set;for(const Zi of Xi){if(Zi.status==="aborted")return m.INVALID;Zi.status==="dirty"&&jt.dirty(),yi.add(Zi.value)}return{status:jt.value,value:yi}}const Mi=[...qt.data.values()].map((Xi,yi)=>jn._parse(new g(qt,Xi,qt.path,yi)));return qt.common.async?Promise.all(Mi).then(Xi=>Bi(Xi)):Bi(Mi)}min(nt,jt){return new Te({...this._def,minSize:{value:nt,message:v.errorUtil.toString(jt)}})}max(nt,jt){return new Te({...this._def,maxSize:{value:nt,message:v.errorUtil.toString(jt)}})}size(nt,jt){return this.min(nt,jt).max(nt,jt)}nonempty(nt){return this.min(1,nt)}}t.ZodSet=Te,Te.create=(nn,nt)=>new Te({valueType:nn,minSize:null,maxSize:null,typeName:bt.ZodSet,...h(nt)});class Ne extends u{constructor(){super(...arguments),this.validate=this.implement}_parse(nt){const{ctx:jt}=this._processInputParams(nt);if(jt.parsedType!==p.ZodParsedType.function)return(0,m.addIssueToContext)(jt,{code:s.ZodIssueCode.invalid_type,expected:p.ZodParsedType.function,received:jt.parsedType}),m.INVALID;function qt(Mi,Xi){return(0,m.makeIssue)({data:Mi,path:jt.path,errorMaps:[jt.common.contextualErrorMap,jt.schemaErrorMap,(0,_.getErrorMap)(),_.defaultErrorMap].filter(yi=>!!yi),issueData:{code:s.ZodIssueCode.invalid_arguments,argumentsError:Xi}})}function In(Mi,Xi){return(0,m.makeIssue)({data:Mi,path:jt.path,errorMaps:[jt.common.contextualErrorMap,jt.schemaErrorMap,(0,_.getErrorMap)(),_.defaultErrorMap].filter(yi=>!!yi),issueData:{code:s.ZodIssueCode.invalid_return_type,returnTypeError:Xi}})}const jn={errorMap:jt.common.contextualErrorMap},Bi=jt.data;if(this._def.returns instanceof Fe){const Mi=this;return(0,m.OK)(async function(...Xi){const yi=new s.ZodError([]),Zi=await Mi._def.args.parseAsync(Xi,jn).catch(Ao=>{throw yi.addIssue(qt(Xi,Ao)),yi}),to=await Reflect.apply(Bi,this,Zi);return await Mi._def.returns._def.type.parseAsync(to,jn).catch(Ao=>{throw yi.addIssue(In(to,Ao)),yi})})}else{const Mi=this;return(0,m.OK)(function(...Xi){const yi=Mi._def.args.safeParse(Xi,jn);if(!yi.success)throw new s.ZodError([qt(Xi,yi.error)]);const Zi=Reflect.apply(Bi,this,yi.data),to=Mi._def.returns.safeParse(Zi,jn);if(!to.success)throw new s.ZodError([In(Zi,to.error)]);return to.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...nt){return new Ne({...this._def,args:Ce.create(nt).rest(ge.create())})}returns(nt){return new Ne({...this._def,returns:nt})}implement(nt){return this.parse(nt)}strictImplement(nt){return this.parse(nt)}static create(nt,jt,qt){return new Ne({args:nt||Ce.create([]).rest(ge.create()),returns:jt||ge.create(),typeName:bt.ZodFunction,...h(qt)})}}t.ZodFunction=Ne;class pe extends u{get schema(){return this._def.getter()}_parse(nt){const{ctx:jt}=this._processInputParams(nt);return this._def.getter()._parse({data:jt.data,path:jt.path,parent:jt})}}t.ZodLazy=pe,pe.create=(nn,nt)=>new pe({getter:nn,typeName:bt.ZodLazy,...h(nt)});class re extends u{_parse(nt){if(nt.data!==this._def.value){const jt=this._getOrReturnCtx(nt);return(0,m.addIssueToContext)(jt,{received:jt.data,code:s.ZodIssueCode.invalid_literal,expected:this._def.value}),m.INVALID}return{status:"valid",value:nt.data}}get value(){return this._def.value}}t.ZodLiteral=re,re.create=(nn,nt)=>new re({value:nn,typeName:bt.ZodLiteral,...h(nt)});function he(nn,nt){return new Oe({values:nn,typeName:bt.ZodEnum,...h(nt)})}class Oe extends u{constructor(){super(...arguments),o.set(this,void 0)}_parse(nt){if(typeof nt.data!="string"){const jt=this._getOrReturnCtx(nt),qt=this._def.values;return(0,m.addIssueToContext)(jt,{expected:p.util.joinValues(qt),received:jt.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(nt.data)){const jt=this._getOrReturnCtx(nt),qt=this._def.values;return(0,m.addIssueToContext)(jt,{received:jt.data,code:s.ZodIssueCode.invalid_enum_value,options:qt}),m.INVALID}return(0,m.OK)(nt.data)}get options(){return this._def.values}get enum(){const nt={};for(const jt of this._def.values)nt[jt]=jt;return nt}get Values(){const nt={};for(const jt of this._def.values)nt[jt]=jt;return nt}get Enum(){const nt={};for(const jt of this._def.values)nt[jt]=jt;return nt}extract(nt,jt=this._def){return Oe.create(nt,{...this._def,...jt})}exclude(nt,jt=this._def){return Oe.create(this.options.filter(qt=>!nt.includes(qt)),{...this._def,...jt})}}t.ZodEnum=Oe,o=new WeakMap,Oe.create=he;class De extends u{constructor(){super(...arguments),d.set(this,void 0)}_parse(nt){const jt=p.util.getValidEnumValues(this._def.values),qt=this._getOrReturnCtx(nt);if(qt.parsedType!==p.ZodParsedType.string&&qt.parsedType!==p.ZodParsedType.number){const In=p.util.objectValues(jt);return(0,m.addIssueToContext)(qt,{expected:p.util.joinValues(In),received:qt.parsedType,code:s.ZodIssueCode.invalid_type}),m.INVALID}if(n(this,d,"f")||r(this,d,new Set(p.util.getValidEnumValues(this._def.values)),"f"),!n(this,d,"f").has(nt.data)){const In=p.util.objectValues(jt);return(0,m.addIssueToContext)(qt,{received:qt.data,code:s.ZodIssueCode.invalid_enum_value,options:In}),m.INVALID}return(0,m.OK)(nt.data)}get enum(){return this._def.values}}t.ZodNativeEnum=De,d=new WeakMap,De.create=(nn,nt)=>new De({values:nn,typeName:bt.ZodNativeEnum,...h(nt)});class Fe extends u{unwrap(){return this._def.type}_parse(nt){const{ctx:jt}=this._processInputParams(nt);if(jt.parsedType!==p.ZodParsedType.promise&&jt.common.async===!1)return(0,m.addIssueToContext)(jt,{code:s.ZodIssueCode.invalid_type,expected:p.ZodParsedType.promise,received:jt.parsedType}),m.INVALID;const qt=jt.parsedType===p.ZodParsedType.promise?jt.data:Promise.resolve(jt.data);return(0,m.OK)(qt.then(In=>this._def.type.parseAsync(In,{path:jt.path,errorMap:jt.common.contextualErrorMap})))}}t.ZodPromise=Fe,Fe.create=(nn,nt)=>new Fe({type:nn,typeName:bt.ZodPromise,...h(nt)});class Ge extends u{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===bt.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(nt){const{status:jt,ctx:qt}=this._processInputParams(nt),In=this._def.effect||null,jn={addIssue:Bi=>{(0,m.addIssueToContext)(qt,Bi),Bi.fatal?jt.abort():jt.dirty()},get path(){return qt.path}};if(jn.addIssue=jn.addIssue.bind(jn),In.type==="preprocess"){const Bi=In.transform(qt.data,jn);if(qt.common.async)return Promise.resolve(Bi).then(async Mi=>{if(jt.value==="aborted")return m.INVALID;const Xi=await this._def.schema._parseAsync({data:Mi,path:qt.path,parent:qt});return Xi.status==="aborted"?m.INVALID:Xi.status==="dirty"||jt.value==="dirty"?(0,m.DIRTY)(Xi.value):Xi});{if(jt.value==="aborted")return m.INVALID;const Mi=this._def.schema._parseSync({data:Bi,path:qt.path,parent:qt});return Mi.status==="aborted"?m.INVALID:Mi.status==="dirty"||jt.value==="dirty"?(0,m.DIRTY)(Mi.value):Mi}}if(In.type==="refinement"){const Bi=Mi=>{const Xi=In.refinement(Mi,jn);if(qt.common.async)return Promise.resolve(Xi);if(Xi instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return Mi};if(qt.common.async===!1){const Mi=this._def.schema._parseSync({data:qt.data,path:qt.path,parent:qt});return Mi.status==="aborted"?m.INVALID:(Mi.status==="dirty"&&jt.dirty(),Bi(Mi.value),{status:jt.value,value:Mi.value})}else return this._def.schema._parseAsync({data:qt.data,path:qt.path,parent:qt}).then(Mi=>Mi.status==="aborted"?m.INVALID:(Mi.status==="dirty"&&jt.dirty(),Bi(Mi.value).then(()=>({status:jt.value,value:Mi.value}))))}if(In.type==="transform")if(qt.common.async===!1){const Bi=this._def.schema._parseSync({data:qt.data,path:qt.path,parent:qt});if(!(0,m.isValid)(Bi))return Bi;const Mi=In.transform(Bi.value,jn);if(Mi instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:jt.value,value:Mi}}else return this._def.schema._parseAsync({data:qt.data,path:qt.path,parent:qt}).then(Bi=>(0,m.isValid)(Bi)?Promise.resolve(In.transform(Bi.value,jn)).then(Mi=>({status:jt.value,value:Mi})):Bi);p.util.assertNever(In)}}t.ZodEffects=Ge,t.ZodTransformer=Ge,Ge.create=(nn,nt,jt)=>new Ge({schema:nn,typeName:bt.ZodEffects,effect:nt,...h(jt)}),Ge.createWithPreprocess=(nn,nt,jt)=>new Ge({schema:nt,effect:{type:"preprocess",transform:nn},typeName:bt.ZodEffects,...h(jt)});class je extends u{_parse(nt){return this._getType(nt)===p.ZodParsedType.undefined?(0,m.OK)(void 0):this._def.innerType._parse(nt)}unwrap(){return this._def.innerType}}t.ZodOptional=je,je.create=(nn,nt)=>new je({innerType:nn,typeName:bt.ZodOptional,...h(nt)});class gt extends u{_parse(nt){return this._getType(nt)===p.ZodParsedType.null?(0,m.OK)(null):this._def.innerType._parse(nt)}unwrap(){return this._def.innerType}}t.ZodNullable=gt,gt.create=(nn,nt)=>new gt({innerType:nn,typeName:bt.ZodNullable,...h(nt)});class ot extends u{_parse(nt){const{ctx:jt}=this._processInputParams(nt);let qt=jt.data;return jt.parsedType===p.ZodParsedType.undefined&&(qt=this._def.defaultValue()),this._def.innerType._parse({data:qt,path:jt.path,parent:jt})}removeDefault(){return this._def.innerType}}t.ZodDefault=ot,ot.create=(nn,nt)=>new ot({innerType:nn,typeName:bt.ZodDefault,defaultValue:typeof nt.default=="function"?nt.default:()=>nt.default,...h(nt)});class Mt extends u{_parse(nt){const{ctx:jt}=this._processInputParams(nt),qt={...jt,common:{...jt.common,issues:[]}},In=this._def.innerType._parse({data:qt.data,path:qt.path,parent:{...qt}});return(0,m.isAsync)(In)?In.then(jn=>({status:"valid",value:jn.status==="valid"?jn.value:this._def.catchValue({get error(){return new s.ZodError(qt.common.issues)},input:qt.data})})):{status:"valid",value:In.status==="valid"?In.value:this._def.catchValue({get error(){return new s.ZodError(qt.common.issues)},input:qt.data})}}removeCatch(){return this._def.innerType}}t.ZodCatch=Mt,Mt.create=(nn,nt)=>new Mt({innerType:nn,typeName:bt.ZodCatch,catchValue:typeof nt.catch=="function"?nt.catch:()=>nt.catch,...h(nt)});class lt extends u{_parse(nt){if(this._getType(nt)!==p.ZodParsedType.nan){const qt=this._getOrReturnCtx(nt);return(0,m.addIssueToContext)(qt,{code:s.ZodIssueCode.invalid_type,expected:p.ZodParsedType.nan,received:qt.parsedType}),m.INVALID}return{status:"valid",value:nt.data}}}t.ZodNaN=lt,lt.create=nn=>new lt({typeName:bt.ZodNaN,...h(nn)}),t.BRAND=Symbol("zod_brand");class At extends u{_parse(nt){const{ctx:jt}=this._processInputParams(nt),qt=jt.data;return this._def.type._parse({data:qt,path:jt.path,parent:jt})}unwrap(){return this._def.type}}t.ZodBranded=At;class rt extends u{_parse(nt){const{status:jt,ctx:qt}=this._processInputParams(nt);if(qt.common.async)return(async()=>{const jn=await this._def.in._parseAsync({data:qt.data,path:qt.path,parent:qt});return jn.status==="aborted"?m.INVALID:jn.status==="dirty"?(jt.dirty(),(0,m.DIRTY)(jn.value)):this._def.out._parseAsync({data:jn.value,path:qt.path,parent:qt})})();{const In=this._def.in._parseSync({data:qt.data,path:qt.path,parent:qt});return In.status==="aborted"?m.INVALID:In.status==="dirty"?(jt.dirty(),{status:"dirty",value:In.value}):this._def.out._parseSync({data:In.value,path:qt.path,parent:qt})}}static create(nt,jt){return new rt({in:nt,out:jt,typeName:bt.ZodPipeline})}}t.ZodPipeline=rt;class st extends u{_parse(nt){const jt=this._def.innerType._parse(nt),qt=In=>((0,m.isValid)(In)&&(In.value=Object.freeze(In.value)),In);return(0,m.isAsync)(jt)?jt.then(In=>qt(In)):qt(jt)}unwrap(){return this._def.innerType}}t.ZodReadonly=st,st.create=(nn,nt)=>new st({innerType:nn,typeName:bt.ZodReadonly,...h(nt)});function ct(nn,nt={},jt){return nn?ie.create().superRefine((qt,In)=>{var jn,Bi;if(!nn(qt)){const Mi=typeof nt=="function"?nt(qt):typeof nt=="string"?{message:nt}:nt,Xi=(Bi=(jn=Mi.fatal)!==null&&jn!==void 0?jn:jt)!==null&&Bi!==void 0?Bi:!0,yi=typeof Mi=="string"?{message:Mi}:Mi;In.addIssue({code:"custom",...yi,fatal:Xi})}}):ie.create()}t.custom=ct,t.late={object:ne.lazycreate};var bt;(function(nn){nn.ZodString="ZodString",nn.ZodNumber="ZodNumber",nn.ZodNaN="ZodNaN",nn.ZodBigInt="ZodBigInt",nn.ZodBoolean="ZodBoolean",nn.ZodDate="ZodDate",nn.ZodSymbol="ZodSymbol",nn.ZodUndefined="ZodUndefined",nn.ZodNull="ZodNull",nn.ZodAny="ZodAny",nn.ZodUnknown="ZodUnknown",nn.ZodNever="ZodNever",nn.ZodVoid="ZodVoid",nn.ZodArray="ZodArray",nn.ZodObject="ZodObject",nn.ZodUnion="ZodUnion",nn.ZodDiscriminatedUnion="ZodDiscriminatedUnion",nn.ZodIntersection="ZodIntersection",nn.ZodTuple="ZodTuple",nn.ZodRecord="ZodRecord",nn.ZodMap="ZodMap",nn.ZodSet="ZodSet",nn.ZodFunction="ZodFunction",nn.ZodLazy="ZodLazy",nn.ZodLiteral="ZodLiteral",nn.ZodEnum="ZodEnum",nn.ZodEffects="ZodEffects",nn.ZodNativeEnum="ZodNativeEnum",nn.ZodOptional="ZodOptional",nn.ZodNullable="ZodNullable",nn.ZodDefault="ZodDefault",nn.ZodCatch="ZodCatch",nn.ZodPromise="ZodPromise",nn.ZodBranded="ZodBranded",nn.ZodPipeline="ZodPipeline",nn.ZodReadonly="ZodReadonly"})(bt||(t.ZodFirstPartyTypeKind=bt={}));class Ut{constructor(...nt){}}const hn=(nn,nt={message:`Input not instance of ${nn.name}`})=>ct(jt=>jt instanceof nn,nt);t.instanceof=hn;const kn=V.create;t.string=kn;const fi=Y.create;t.number=fi;const Nn=lt.create;t.nan=Nn;const cn=z.create;t.bigint=cn;const zn=H.create;t.boolean=zn;const pn=K.create;t.date=pn;const Ht=Z.create;t.symbol=Ht;const pt=X.create;t.undefined=pt;const We=oe.create;t.null=We;const Ke=ie.create;t.any=Ke;const Ze=ge.create;t.unknown=Ze;const Qt=me.create;t.never=Qt;const Cn=q.create;t.void=Cn;const ni=Se.create;t.array=ni;const ri=ne.create;t.object=ri;const xi=ne.strictCreate;t.strictObject=xi;const bi=ue.create;t.union=bi;const Ui=Pe.create;t.discriminatedUnion=Ui;const Wn=Ae.create;t.intersection=Wn;const Sn=Ce.create;t.tuple=Sn;const ii=fe.create;t.record=ii;const Oi=xe.create;t.map=Oi;const Vi=Te.create;t.set=Vi;const wi=Ne.create;t.function=wi;const dn=pe.create;t.lazy=dn;const Gn=re.create;t.literal=Gn;const vn=Oe.create;t.enum=vn;const et=De.create;t.nativeEnum=et;const It=Fe.create;t.promise=It;const yt=Ge.create;t.effect=yt,t.transformer=yt;const Ct=je.create;t.optional=Ct;const gn=gt.create;t.nullable=gn;const on=Ge.createWithPreprocess;t.preprocess=on;const Yt=rt.create;t.pipeline=Yt;const On=()=>kn().optional();t.ostring=On;const Zn=()=>fi().optional();t.onumber=Zn;const ci=()=>zn().optional();t.oboolean=ci,t.coerce={string:nn=>V.create({...nn,coerce:!0}),number:nn=>Y.create({...nn,coerce:!0}),boolean:nn=>H.create({...nn,coerce:!0}),bigint:nn=>z.create({...nn,coerce:!0}),date:nn=>K.create({...nn,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),d=e(41869),_=e(65265),v=e(98295),m=e(27654);let p=n=class extends d.Disposable{constructor(){super(...arguments),this.lantencyHandler=g=>{const{command:a}=g.detail;a===_.DevtoolsLantencyCommand.Start?this.interval||this.startRTTInterval():a===_.DevtoolsLantencyCommand.Stop&&this.interval&&(clearInterval(this.interval),this.interval=void 0)}}initialize(){var g;this.appConfig.devtools&&(window.addEventListener(_.EDevtoolsEvent.Latency,this.lantencyHandler),this.addDispose(d.Disposable.create(()=>{window.removeEventListener(_.EDevtoolsEvent.Latency,this.lantencyHandler),this.interval&&(clearInterval(this.interval),this.interval=void 0)})),!((g=window.__OPENSUMI_DEVTOOLS_GLOBAL_HOOK__)===null||g===void 0)&&g.captureRPC&&(this.interval||this.startRTTInterval()))}startRTTInterval(){this.interval=setInterval(async()=>{const g=Date.now();await this.rttService.measure();const a=Date.now()-g;window.__OPENSUMI_DEVTOOLS_GLOBAL_HOOK__.captureRPC&&(window.__OPENSUMI_DEVTOOLS_GLOBAL_HOOK__.latency=a)},n.INTERVAL)}};t.ChromeDevtoolsContribution=p,p.INTERVAL=1e3,r.__decorate([(0,o.Autowired)(d.AppConfig),r.__metadata("design:type",Object)],p.prototype,"appConfig",void 0),r.__decorate([(0,o.Autowired)(m.ConnectionRTTBrowserServiceToken),r.__metadata("design:type",m.ConnectionRTTBrowserService)],p.prototype,"rttService",void 0),t.ChromeDevtoolsContribution=p=n=r.__decorate([(0,v.Domain)(d.ClientAppContribution)],p)},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),d=e(26542),_=e(92323),v=e(98295),m=e(27654),p={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%"},g={alignment:d.StatusBarAlignment.LEFT,priority:1/0-1};let a=n=class{registerCommands(u){u.registerCommand(p,{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,...g});else{const f=this.statusBarService.addElement("connection-rtt",{...E,...g});this.statusBar=f}},n.INTERVAL)}};t.ConnectionRTTContribution=a,a.INTERVAL=1e3,r.__decorate([(0,o.Autowired)(d.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)(_.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 d=class{async measure(){await this.connectionBackService.$measure()}};t.ConnectionRTTBrowserService=d,n.__decorate([(0,r.Autowired)(o.ConnectionBackServicePath),n.__metadata("design:type",Object)],d.prototype,"connectionBackService",void 0),t.ConnectionRTTBrowserService=d=n.__decorate([(0,r.Injectable)()],d)},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),d=e(43718),_=e(69452);let v=class extends d.WithEventBus{onDidDropFile(p){this.dropService.onDidDropFile(p)}};t.FileDropContribution=v,n.__decorate([(0,r.Autowired)(_.IFileDropFrontendServiceToken),n.__metadata("design:type",Object)],v.prototype,"dropService",void 0),n.__decorate([(0,d.OnEvent)(d.FileTreeDropEvent),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[d.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),d=e(26542),_=e(43718),v=e(42933),{Path:m}=_.path,p=e(69452);let s=class extends _.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"),l={text:u,alignment:d.StatusBarAlignment.RIGHT,tooltip:u,iconClass:"kaitian-icon kticon-cloud-server"};this.uploadStatus?this.uploadStatus.update({id:h,...l}):this.uploadStatus=this.statusBarService.addElement(h,l)}onDidDropFile(a){var h;const{payload:{event:u,targetDir:l}}=a;if(!l||!(!((h=u.dataTransfer)===null||h===void 0)&&h.files)||u.dataTransfer.files.length===0)return;const E=u.dataTransfer.items;let f=0;const c=Date.now(),y=b=>{f+=b;const A=Date.now(),w=`${(f/((A-c)/1e3)/1024/1024).toFixed(2)} MB`;this.createOrUpdateStatusBar(w)};for(const b of E){const A=b.webkitGetAsEntry();this.processFilesEntry(l,A,y)}}async processFilesEntry(a,h,u){if(h.isFile)this.processFileEntry(h,a,u);else{const l=_.Uri.file(new m(a).join(h.fullPath).toString()).toString();await this.fs.createFolder(l),this.processDirEntry(h,a,u)}}toBinaryString(a){let h;const u=a.length;let l="";for(h=0;h<u;h+=1)l+=String.fromCharCode(a[h]);return l}async doUploadFile(a,h,u){var l;const E=new m(h).join(a.name).toString();this.onDidUploadFileStart(E.toString()),await this.fs.createFile(_.Uri.file(E.toString()).toString()),await this.dropService.$ensureFileExist(a.name,h);const f=a.stream().getReader();let c=await f.read();for(;!c.done;)await this.dropService.$writeStream(this.toBinaryString(c.value),a.name,h,c.done),u((l=c.value)===null||l===void 0?void 0:l.byteLength),c=await f.read();c.done&&this.onDidUploadFileEnd(E.toString())}processFileEntry(a,h,u){a.file(l=>{const E=new File([l],a.fullPath,{type:a.type});this.doUploadFile(E,h,u)},()=>{})}processDirEntry(a,h,u){a.createReader().readEntries(E=>{E.forEach(async f=>{this.processFilesEntry(h,f,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)(p.FileDropServicePath),n.__metadata("design:type",Object)],s.prototype,"dropService",void 0),n.__decorate([(0,r.Autowired)(d.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=y;const n=e(85608),r=n.__importDefault(e(39050)),o=e(76003),d=e(41869),_=e(26542),v=e(43718),m=e(98295),p=e(54414),s=e(17459),g=e(84660),a=n.__importStar(e(20868)),h=e(97821),u=e(80490),l=e(51500),E=e(30981),f=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 y(T){return T.replace(t.matchLineReg,"$1")}let b=class extends h.QuickOpenBaseAction{constructor(){super({id:"file-search:splitToRight",tooltip:(0,d.localize)("quickOpen.openOnTheRightSide"),class:(0,d.getIcon)("embed")})}async run(D){await this.commandService.executeCommand(d.EDITOR_COMMANDS.OPEN_RESOURCE.id,D.getUri(),{preview:!1,split:p.EditorGroupSplitAction.Right,range:c(this.injector.get(S).currentLookFor),focus:!0})}};n.__decorate([(0,o.Autowired)(d.CommandService),n.__metadata("design:type",Object)],b.prototype,"commandService",void 0),n.__decorate([(0,o.Autowired)(o.INJECTOR_TOKEN),n.__metadata("design:type",o.Injector)],b.prototype,"injector",void 0),b=n.__decorate([(0,o.Injectable)(),n.__metadata("design:paramtypes",[])],b);let A=class{hasActions(){return!0}getActions(){return[this.fileSearchActionLeftRight]}getValidateInput(D){return y(D)}};n.__decorate([(0,o.Autowired)(),n.__metadata("design:type",b)],A.prototype,"fileSearchActionLeftRight",void 0),A=n.__decorate([(0,o.Injectable)()],A);let S=class{constructor(){this.cancelIndicator=new v.CancellationTokenSource,this.default=!0,this.prefix="...",this.description=(0,d.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 O=this.cancelIndicator.token,M=new Set;let R=[];D=D.trim().replace(/\s/g,""),this.currentLookFor=D;const P=y(D),k=this.reporterService.time(v.REPORT_NAME.QUICK_OPEN_MEASURE),F=await this.getRecentlyItems(M,P,O);if(D&&(this.logger.debug("lookFor",D,P),R=await this.getFindOutItems(M,P,O)),O.isCancellationRequested)return;const L=F.concat(R);I(L,L.length?this.fileSearchActionProvider:void 0),k.timeEnd(D.indexOf("@")>-1?"file-symbol":"file",{lookFor:D,stat:{recently:F.length,find:R.length}})}}}getOptions(){return{placeholder:(0,d.localize)("file-search.command.fileOpen.placeholder"),fuzzyMatchLabel:{enableSeparateSubstringMatching:!0},showItemsWithoutHighlight:!0,fuzzyMatchDescription:{enableSeparateSubstringMatching:!0},getPlaceholderItem:D=>new d.QuickOpenItem({label:(0,d.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 O=(D=this.workbenchEditorService.currentEditor)===null||D===void 0?void 0:D.getSelections();if(O){const{selectionStartLineNumber:M,selectionStartColumn:R,positionLineNumber:P,positionColumn:k}=O[0];I=new a.Range(M,R,P,k)}this.prevEditorState={uri:this.workbenchEditorService.currentResource.uri,range:I}}}async getFindOutItems(D,I,O){var M;let R;if(I.indexOf("@")>-1){this.trySaveEditorState(),R=[];const[P,k]=I.split("@");let F;if(this.prevSelected)F=this.prevSelected.withoutFragment();else if(P){const L=await this.getQueryFiles(P,D,O);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),R=B.filter(W=>{const U=(0,E.matchesFuzzy)(k,W.name,!0)||[];return U&&(W.labelHighlights=U),U&&U.length}).map((W,U)=>{var Q;return new d.QuickOpenItem({uri:F,label:W.name,iconClass:(0,d.getSymbolIcon)(W.kind),description:(Q=W.parent)===null||Q===void 0?void 0:Q.name,labelHighlights:W.labelHighlights,groupLabel:U===0?(0,d.formatLocalize)("search.fileSymbolResults",B.length):"",showBorder:!1,run:V=>V===d.Mode.PREVIEW?(this.locateSymbol(F,W),!0):V===d.Mode.OPEN?(this.locateSymbol(F,W),!0):!1})})}else return[]}else if(R=await this.getQueryFiles(I,D,O),R[0]){const P=await this.getItems([R[0].getUri().codeUri.fsPath],{groupLabel:(0,d.localize)("search.fileResults"),showBorder:!0});R[0]=P[0]}return R}async getQueryFiles(D,I,O){const R=(await this.workspaceService.roots).map(F=>new d.URI(F.uri).codeUri.fsPath),P=await this.fileSearchService.find(D,{rootUris:R,fuzzyMatch:!0,limit:f,useGitIgnore:!0,noIgnoreParent:!0,excludePatterns:this.getPreferenceSearchExcludes()},O),k=await this.getItems(P.filter(F=>I.has(F)||O.isCancellationRequested?!1:(I.add(F),!0)),{});return k.sort(this.compareItems.bind(this)),k}async flattenSymbols(D,I){D.children.forEach(O=>{I.push(O),O.children&&this.flattenSymbols(O,I)})}async getRecentlyItems(D,I,O){const M=await this.recentFilesManager.getMostRecentlyOpenedFiles(!0)||[];return await this.getItems(M.filter(R=>{const P=new d.URI(R);return D.has(R)||!r.default.test(I,P.displayName)||O.isCancellationRequested?!1:(D.add(R),!0)}),{groupLabel:(0,d.localize)("search.historyMatches")})}async getItems(D,I){const O=[];for(const[M,R]of D.entries()){const P=d.URI.isUriString(R)?new d.URI(R):d.URI.file(R),k=`file-icon ${this.labelService.getIcon(P.withoutFragment())}`;let F="";const L=await this.workspaceService.asRelativePath(P.parent);L&&(this.workspaceService.isMultiRootWorkspaceOpened?F=`${new d.URI(L.root).displayName}${L.path?` \u30FB ${L.path}`:""}`:F=L.path||"");const B=new d.QuickOpenItem({uri:P,label:P.displayName,tooltip:R,iconClass:k,description:F,groupLabel:M===0?I.groupLabel:"",showBorder:D.length>0&&M===0?I.showBorder:!1,run:j=>(j===d.Mode.PREVIEW&&(this.prevSelected=P),j===d.Mode.OPEN?(this.openFile(P),!0):!1)});O.push(B)}return O}openFile(D){const I=D.codeUri.fsPath;let O=c(this.currentLookFor);(!O||!O.startLineNumber&&!O.startColumn)&&(O=c(D.fragment?"#"+D.fragment:I)),this.currentLookFor="",this.commandService.executeCommand(d.EDITOR_COMMANDS.OPEN_RESOURCE.id,D.withoutFragment(),{preview:!1,range:O,focus:!0})}locateSymbol(D,I){this.workbenchEditorService.open(D,{range:I.range,preview:!0})}compareItems(D,I,O="getLabel"){function M(j){return j.trim().toLowerCase()}const R=M(y(this.currentLookFor));function P(j){const W=r.default.match(R,j);return W===null?0:W.score}let k=D[O](),F=I[O]();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(R),W=F.indexOf(R);return j===W?k.length!==F.length?k.length<F.length?-1:1:F.localeCompare(k)===0?O==="getUri"?0:this.compareItems(D,I,"getUri"):F.localeCompare(k):j-W}return B-L}getPreferenceSearchExcludes(){const D=[],I=this.preferenceService.get("files.exclude"),O=this.preferenceService.get("search.exclude"),M=Object.assign({},I,O);for(const R of Object.keys(M))M[R]&&D.push(R);return D}};t.FileSearchQuickCommandHandler=S,n.__decorate([(0,o.Autowired)(d.CommandService),n.__metadata("design:type",Object)],S.prototype,"commandService",void 0),n.__decorate([(0,o.Autowired)(g.FileSearchServicePath),n.__metadata("design:type",Object)],S.prototype,"fileSearchService",void 0),n.__decorate([(0,o.Autowired)(p.WorkbenchEditorService),n.__metadata("design:type",p.WorkbenchEditorService)],S.prototype,"workbenchEditorService",void 0),n.__decorate([(0,o.Autowired)(s.DocumentSymbolStore),n.__metadata("design:type",s.DocumentSymbolStore)],S.prototype,"documentSymbolStore",void 0),n.__decorate([(0,o.Autowired)(),n.__metadata("design:type",_.LabelService)],S.prototype,"labelService",void 0),n.__decorate([(0,o.Autowired)(l.IWorkspaceService),n.__metadata("design:type",Object)],S.prototype,"workspaceService",void 0),n.__decorate([(0,o.Autowired)(d.RecentFilesManager),n.__metadata("design:type",d.RecentFilesManager)],S.prototype,"recentFilesManager",void 0),n.__decorate([(0,o.Autowired)(d.ILogger),n.__metadata("design:type",Object)],S.prototype,"logger",void 0),n.__decorate([(0,o.Autowired)(),n.__metadata("design:type",A)],S.prototype,"fileSearchActionProvider",void 0),n.__decorate([(0,o.Autowired)(d.PreferenceService),n.__metadata("design:type",Object)],S.prototype,"preferenceService",void 0),n.__decorate([(0,o.Autowired)(v.IReporterService),n.__metadata("design:type",Object)],S.prototype,"reporterService",void 0),t.FileSearchQuickCommandHandler=S=n.__decorate([(0,o.Injectable)()],S);let w=class{registerQuickOpenHandlers(D){D.registerHandler(this.fileSearchQuickCommandHandler,{title:(0,d.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)(S),n.__metadata("design:type",S)],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,d.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),d=e(69452),_=e(79682),v=e(72915),m=e(27654),p=e(17631),s=e(22874),g=e(79240),a=e(18256),h=e(7756),u=e(16426);let l=class extends o.BrowserModule{constructor(){super(...arguments),this.providers=[_.ChromeDevtoolsContribution,a.LanguageChangeHintContribution,g.FileSearchContribution,h.StatusBarContribution,u.ToolbarCustomizeContribution,p.FileDropContribution,v.ConnectionRTTContribution,{token:d.IFileDropFrontendServiceToken,useClass:s.FileDropService},{token:m.ConnectionRTTBrowserServiceToken,useClass:m.ConnectionRTTBrowserService}],this.backServices=[{servicePath:d.FileDropServicePath},{servicePath:d.ConnectionBackServicePath}]}};t.ClientAddonModule=l,t.ClientAddonModule=l=n.__decorate([(0,r.Injectable)()],l)},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),d=e(72665);let _=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=_,n.__decorate([(0,r.Autowired)(o.PreferenceService),n.__metadata("design:type",Object)],_.prototype,"preferenceService",void 0),n.__decorate([(0,r.Autowired)(o.IClientApp),n.__metadata("design:type",Object)],_.prototype,"clientApp",void 0),n.__decorate([(0,r.Autowired)(d.IDialogService),n.__metadata("design:type",Object)],_.prototype,"dialogService",void 0),t.LanguageChangeHintContribution=_=n.__decorate([(0,o.Domain)(o.ClientAppContribution)],_)},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),d=e(43718);let _=class extends d.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=_,n.__decorate([(0,r.Autowired)(d.CommandService),n.__metadata("design:type",Object)],_.prototype,"commandService",void 0),n.__decorate([(0,r.Autowired)(d.ILogger),n.__metadata("design:type",Object)],_.prototype,"logger",void 0),n.__decorate([(0,d.OnEvent)(d.BrowserConnectionOpenEvent),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[]),n.__metadata("design:returntype",void 0)],_.prototype,"handleBrowserConnectionOpen",null),n.__decorate([(0,d.OnEvent)(d.BrowserConnectionCloseEvent),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[]),n.__metadata("design:returntype",void 0)],_.prototype,"handleBrowserConnectionClose",null),t.StatusBarContribution=_=n.__decorate([(0,d.Domain)(o.ClientAppContribution)],_)},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),d=e(93899),_=e(62132);let v=class{registerCommands(p){p.registerCommand({id:"toolbar.showCustomizePanel",label:"Show Toolbar Customization"},{execute:()=>{this.viewService.setVisible(!0)}})}registerComponent(p){p.register("addon/toolbar-customize",{id:"addon/toolbar-customize",component:_.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(p){p.registerMenuItem(d.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)(_.ToolbarCustomizeViewService),n.__metadata("design:type",_.ToolbarCustomizeViewService)],v.prototype,"viewService",void 0),t.ToolbarCustomizeContribution=v=n.__decorate([(0,o.Domain)(o.CommandContribution,o.ComponentContribution,d.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),d=e(97267),_=e(41869),v=n.__importDefault(e(18541));let m=class{bindSetVisibleHandle(g){this._setVisible=g}setVisible(g){this._setVisible(g)}async toggleActionVisibility(g,a,h){const u=this.preferenceService.getValid("toolbar.ignoreActions",{});if(u[g]||(u[g]=[]),!h)u[g].indexOf(a)===-1&&u[g].push(a);else{const E=u[g].indexOf(a);E!==-1&&u[g].splice(E,1)}const l=this.preferenceService.inspect("toolbar.ignoreActions").workspaceValue?_.PreferenceScope.Workspace:_.PreferenceScope.User;await this.preferenceService.set("toolbar.ignoreActions",u,l)}};t.ToolbarCustomizeViewService=m,n.__decorate([(0,o.Autowired)(_.PreferenceService),n.__metadata("design:type",Object)],m.prototype,"preferenceService",void 0),t.ToolbarCustomizeViewService=m=n.__decorate([(0,o.Injectable)()],m);const p=()=>{const[s,g]=r.default.useState(!1),a=(0,_.useInjectable)(m),h=(0,_.useInjectable)(_.IToolbarRegistry),u=(0,_.useInjectable)(_.PreferenceService);if(a.bindSetVisibleHandle(g),!s)return null;const l=h.getAllLocations(),E=u.get("toolbar.ignoreActions")||{};let f=u.get("toolbar.buttonDisplay","iconAndText");function c(y){const b=[{id:"_head"},...h.getActionGroups(y)||[],{id:"_tail"}],A=[],S=E[y]||[];return b.forEach((w,T)=>{const D=h.getToolbarActions({location:y,group:w.id});D&&D.actions.length>0&&(A.length>0&&A.push(r.default.createElement("div",{className:v.default["group-split"],key:"split-"+T})),D.actions.forEach((I,O)=>{var M;let R=S.indexOf(I.id)===-1;const P="action-toggle-"+I.id;A.push(r.default.createElement("div",{className:v.default["action-item"],key:O+"_"+I.id},r.default.createElement(d.CheckBox,{onChange:()=>{a.toggleActionVisibility(y,I.id,!R),R=!R},defaultChecked:R,id:P,label:(M=I.description)!==null&&M!==void 0?M:I.id})))}))}),A.length===0?null:r.default.createElement("div",{key:y,className:v.default["toolbar-customize-location"]},A)}return r.default.createElement("div",{className:v.default["toolbar-customize-overlay"]},r.default.createElement("div",{className:v.default["toolbar-customize"]},l.map(y=>c(y)),r.default.createElement("div",{className:v.default["button-display"]},r.default.createElement("div",null,(0,_.localize)("toolbar-customize.buttonDisplay.description")),r.default.createElement(d.Select,{options:[{label:(0,_.localize)("toolbar-customize.buttonDisplay.icon"),value:"icon"},{label:(0,_.localize)("toolbar-customize.buttonDisplay.iconAndText"),value:"iconAndText"}],value:f,onChange:y=>{const b=u.inspect("toolbar.buttonDisplay").workspaceValue?_.PreferenceScope.Workspace:_.PreferenceScope.User;u.set("toolbar.buttonDisplay",y,b),f=y},className:v.default["button-display-select"]})),r.default.createElement("div",{className:v.default["customize-complete"]},r.default.createElement(d.Button,{type:"primary",onClick:()=>g(!1)},(0,_.localize)("toolbar-customize.complete")))))};t.ToolbarCustomizeComponent=p},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),d=e(50394);let _=class{get contextKeyService(){return this._contextKeyService}constructor(m){this._contextKeyService=this.globalContextKeyService.createScoped(m),this.inlineChatIsVisible=d.InlineChatIsVisible.bind(this._contextKeyService),this.inlineCompletionIsTrigger=d.InlineCompletionIsTrigger.bind(this._contextKeyService),this.inlineHintWidgetIsVisible=d.InlineHintWidgetIsVisible.bind(this._contextKeyService),this.inlineInputWidgetIsVisible=d.InlineInputWidgetIsVisible.bind(this._contextKeyService),this.inlineInputWidgetIsStreaming=d.InlineInputWidgetIsStreaming.bind(this._contextKeyService),this.inlineDiffPartialEditsIsVisible=d.InlineDiffPartialEditsIsVisible.bind(this._contextKeyService),this.codeEditsIsVisible=d.CodeEditsIsVisible.bind(this._contextKeyService)}};t.AINativeContextKey=_,n.__decorate([(0,r.Autowired)(o.IContextKeyService),n.__metadata("design:type",Object)],_.prototype,"globalContextKeyService",void 0),t.AINativeContextKey=_=n.__decorate([(0,r.Injectable)(),n.__param(0,(0,r.Optional)()),n.__metadata("design:paramtypes",[Object])],_)},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),d=e(57925),_=e(50394),v=e(1149),m=e(97222),p=e(43718),s=e(82353),g=e(54414),a=e(57517),h=e(51553),u=e(63067),l=e(46507),E=e(97682),f=e(68415),c=e(96640),y=e(19413),b=e(64811),A=e(69820),S=e(61282),w=e(51081),T=e(59347),D=e(76154),I=e(79559),O=e(57232),M=e(72991),R=e(71863),P=e(7511),k=e(42911),F=e(72801),L=e(87817),B=e(4972),j=e(82983),W=e(73974),U=e(33108),Q=e(77633),V=e(51221),$=e(2281),Y=e(31031),z=e(95608),H=e(38890),K=e(77886),Z=e(89060),X=e(74353),oe=e(22169),ie=e(90058);t.INLINE_DIFF_MANAGER_WIDGET_ID="inline-diff-manager-widget";let ge=class{constructor(){this.registerFeature()}async initialize(){const{supportsChatAssistant:q}=this.aiNativeConfigService.capabilities;q&&(o.ComponentRegistryImpl.addLayoutModule(this.appConfig.layoutConfig,y.AI_CHAT_VIEW_ID,y.AI_CHAT_CONTAINER_ID),o.ComponentRegistryImpl.addLayoutModule(this.appConfig.layoutConfig,s.DESIGN_MENU_BAR_RIGHT,y.AI_CHAT_LOGO_AVATAR_ID),this.chatProxyService.registerDefaultAgent(),this.chatInternalService.init(),await this.chatManagerService.init())}registerEditorExtensionContribution(q){const{supportsInlineChat:Se,supportsInlineCompletion:_e,supportsProblemFix:ne,supportsCodeAction:ue}=this.aiNativeConfigService.capabilities;q(H.InlineDiffController.ID,new c.SyncDescriptor(H.InlineDiffController,[this.injector]),E.EditorContributionInstantiation.Lazy),ue&&q(ie.SumiLightBulbWidget.ID,ie.SumiLightBulbWidget,E.EditorContributionInstantiation.Lazy),Se&&(q(V.InlineChatEditorController.ID,new c.SyncDescriptor(V.InlineChatEditorController,[this.injector]),E.EditorContributionInstantiation.BeforeFirstInteraction),this.inlineInputService.getInteractiveInputHandler()&&(q(K.InlineHintController.ID,new c.SyncDescriptor(K.InlineHintController,[this.injector]),E.EditorContributionInstantiation.AfterFirstRender),q(Z.InlineInputController.ID,new c.SyncDescriptor(Z.InlineInputController,[this.injector]),E.EditorContributionInstantiation.AfterFirstRender))),_e&&(q(P.IntelligentCompletionsController.ID,new c.SyncDescriptor(P.IntelligentCompletionsController,[this.injector]),E.EditorContributionInstantiation.Eager),q(M.InlineCompletionsController.ID,new c.SyncDescriptor(M.InlineCompletionsController,[this.injector]),E.EditorContributionInstantiation.AfterFirstRender)),ne&&q(k.ProblemFixController.ID,new c.SyncDescriptor(k.ProblemFixController,[this.injector]),E.EditorContributionInstantiation.AfterFirstRender)}onReconnect(){const{supportsMCP:q}=this.aiNativeConfigService.capabilities;q&&this.initMCPServers()}onDidStart(){(0,p.runWhenIdle)(()=>{const{supportsRenameSuggestions:q,supportsInlineChat:Se,supportsMCP:_e,supportsCustomLLMSettings:ne}=this.aiNativeConfigService.capabilities,ue=this.preferenceService.getValid(o.AINativeSettingSectionsId.ChatVisibleType);ue==="always"?this.commandService.executeCommand(d.AI_CHAT_VISIBLE.id,!0):ue==="never"&&this.commandService.executeCommand(d.AI_CHAT_VISIBLE.id,!1),q&&this.renameSingleHandler.load(),Se&&this.codeActionSingleHandler.load(),ne&&(this.preferenceService.onSpecificPreferenceChange(o.AINativeSettingSectionsId.LLMModelSelection,Ie=>{const Pe=this.getModelByName(Ie.newValue),ve=Pe?Object.keys(Pe):[],Ae=ve.length?ve[0]:"",Ce=this.preferenceSchemaProvider.getPreferenceProperty(o.AINativeSettingSectionsId.ModelID);this.preferenceSchemaProvider.setSchema({properties:{[o.AINativeSettingSectionsId.ModelID]:{...Ce,default:Ae,defaultValue:Ae,enum:ve.length?ve:void 0}}},!0),this.preferenceService.set(o.AINativeSettingSectionsId.ModelID,Ae,Ie.scope),this.preferenceSettings.setEnumLabels(o.AINativeSettingSectionsId.ModelID,ve.reduce((fe,xe)=>({...fe,[xe]:xe}),{}))}),this.preferenceService.onSpecificPreferenceChange(o.AINativeSettingSectionsId.ModelID,Ie=>{const Pe=this.preferenceService.get(o.AINativeSettingSectionsId.LLMModelSelection);if(!Pe)return;const ve=this.getModelByName(Pe);ve&&ve[Ie.newValue]&&(this.preferenceService.set(o.AINativeSettingSectionsId.MaxTokens,ve[Ie.newValue].maxTokens,Ie.scope),this.preferenceService.set(o.AINativeSettingSectionsId.ContextWindow,ve[Ie.newValue].contextWindow,Ie.scope))})),_e&&this.initMCPServers()})}async initMCPServers(){var q;const Se=await this.storageProvider(p.STORAGE_NAMESPACE.CHAT);let _e=Se.get(b.MCPServersEnabledKey,[y.BUILTIN_MCP_SERVER_NAME]);const ne=this.preferenceService.get(o.AINativeSettingSectionsId.MCPServers,[]);let ue=this.preferenceService.resolve("mcp",{mcpServers:[]},void 0);if(ue.scope===p.PreferenceScope.Default&&ne.length>0){const Pe={mcpServers:[]},ve=new Set([y.BUILTIN_MCP_SERVER_NAME]);ne.forEach(Ae=>{Ae.type===A.MCP_SERVER_TYPE.SSE?Pe.mcpServers.push({[Ae.name]:{url:Ae.serverHost}}):Ae.type===A.MCP_SERVER_TYPE.STDIO&&Pe.mcpServers.push({[Ae.name]:{command:Ae.command,args:Ae.args,env:Ae.env}}),Ae.enabled&&ve.add(Ae.name)}),await this.preferenceService.set("mcp",Pe,p.PreferenceScope.Workspace),ue=this.preferenceService.resolve("mcp",void 0,void 0),_e=Array.from(ve),Se.set(b.MCPServersEnabledKey,_e)}const Ie=(q=ue.value)===null||q===void 0?void 0:q.mcpServers;if(this.sumiMCPServerBackendProxy.$initBuiltinMCPServer(_e.includes(y.BUILTIN_MCP_SERVER_NAME)),Ie&&Ie.length>0){const Pe=(await Promise.all(Ie.map(async ve=>{const Ae=Object.keys(ve)[0];return await this.mcpConfigService.getServerConfigByName(Ae)}))).filter(ve=>ve!==void 0);await this.sumiMCPServerBackendProxy.$initExternalMCPServers(Pe)}this.mcpConfigService.fireMCPServersChange(!0)}getModelByName(q){switch(q){case"deepseek":return y.deepSeekModels;case"anthropic":return y.anthropicModels;case"openai":return y.openAiNativeModels;default:return}}registerFeature(){this.contributions.getContributions().forEach(q=>{var Se,_e,ne,ue,Ie,Pe,ve,Ae,Ce;(Se=q.registerInlineChatFeature)===null||Se===void 0||Se.call(q,this.inlineChatFeatureRegistry),(_e=q.registerChatFeature)===null||_e===void 0||_e.call(q,this.chatFeatureRegistry),(ne=q.registerResolveConflictFeature)===null||ne===void 0||ne.call(q,this.resolveConflictRegistry),(ue=q.registerRenameProvider)===null||ue===void 0||ue.call(q,this.renameCandidatesProviderRegistry),(Ie=q.registerChatRender)===null||Ie===void 0||Ie.call(q,this.chatRenderRegistry),(Pe=q.registerTerminalProvider)===null||Pe===void 0||Pe.call(q,this.terminalProviderRegistry),(ve=q.registerIntelligentCompletionFeature)===null||ve===void 0||ve.call(q,this.intelligentCompletionsRegistry),(Ae=q.registerProblemFixFeature)===null||Ae===void 0||Ae.call(q,this.problemFixProviderRegistry),(Ce=q.registerChatAgentPromptProvider)===null||Ce===void 0||Ce.call(q)}),this.mcpServerContributions.getContributions().forEach(q=>{q.registerMCPServer(this.mcpServerRegistry)})}registerSetting(q){q.registerSettingGroup({id:o.AI_NATIVE_SETTING_GROUP_ID,title:p.AI_NATIVE_SETTING_GROUP_TITLE,iconClass:(0,o.getIcon)("magic-wand")}),q.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"}]}),q.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&&(q.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"}]}),q.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&&q.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"},{id:o.AINativeSettingSectionsId.MaxTokens,localized:"preference.ai.native.maxTokens"},{id:o.AINativeSettingSectionsId.ContextWindow,localized:"preference.ai.native.contextWindow"}]}),this.aiNativeConfigService.capabilities.supportsMCP&&q.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&&q.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(q){q.registerEditorFeatureContribution({contribute:Se=>{const{monacoEditor:_e}=Se;return this.codeActionSingleHandler.mountEditor(Se.monacoEditor),_e.onDidScrollChange(()=>{this.ctxMenuRenderer.visible&&this.ctxMenuRenderer.hide(!0)})}})}registerEditorComponent(q){q.registerEditorSideWidget({id:t.INLINE_DIFF_MANAGER_WIDGET_ID,component:z.InlineDiffManager,displaysOnResource:Se=>{var _e;return!!(this.aiNativeConfigService.capabilities.supportsMCP&&(!((_e=this.applyService.getUriCodeBlocks(Se.uri))===null||_e===void 0)&&_e.filter(ne=>ne.status==="pending").length))}})}registerCommands(q){q.registerCommand(d.AI_INLINE_CHAT_VISIBLE,{execute:Se=>{this.aiInlineChatService._onInlineChatVisible.fire(Se)}}),q.registerCommand(d.AI_INLINE_CHAT_INTERACTIVE_INPUT_VISIBLE,{execute:async Se=>{var _e;if(!Se){this.inlineInputService.hide();return}this.commandService.executeCommand(d.AI_INLINE_CHAT_VISIBLE.id,!1);const ne=this.workbenchEditorService.currentCodeEditor;if(!ne)return;const ue=ne.monacoEditor.getPosition();if(!ue)return;const Ie=ne.monacoEditor.getSelection();if(ue?((_e=ne.monacoEditor.getModel())===null||_e===void 0?void 0:_e.getLineLength(ue.lineNumber))===0:!1){this.inlineInputService.visibleByPosition(ue);return}if(Ie&&!Ie.isEmpty()){this.inlineInputService.visibleBySelection(Ie);return}this.inlineInputService.visibleByNearestCodeBlock(ue,ne.monacoEditor)}}),q.registerCommand(d.AI_INLINE_CHAT_INTERACTIVE_INPUT_CANCEL,{execute:()=>{var Se;const _e=this.workbenchEditorService.currentCodeEditor;_e&&((Se=Z.InlineInputController.get(_e.monacoEditor))===null||Se===void 0||Se.cancelToken())}}),q.registerCommand(d.AI_INLINE_COMPLETION_REPORTER,{execute:(Se,_e,ne,ue)=>{this.aiCompletionsService.report({sessionId:_e,accept:ne,relationId:Se,code:ue})}}),q.registerCommand(d.AI_CHAT_VISIBLE,{execute:Se=>{this.layoutService.toggleSlot(y.AI_CHAT_VIEW_ID,(0,p.isUndefined)(Se)?!0:Se)}}),q.registerCommand(d.AI_INLINE_COMPLETION_VISIBLE,{execute:async Se=>{Se||(this.aiCompletionsService.hideStatusBarItem(),this.aiInlineCompletionsProvider.setVisibleCompletion(!1),this.aiInlineCompletionsProvider.cancelRequest())}}),q.registerCommand(d.AI_INLINE_DIFF_PARTIAL_EDIT,{execute:Se=>{this.inlineStreamDiffService.launchAcceptDiscardPartialEdit(Se)}}),q.afterExecuteCommand(f.HideInlineCompletion.ID,()=>{this.commandService.executeCommand(d.AI_INLINE_COMPLETION_VISIBLE.id,!1)})}registerRenderer(q){this.designLayoutConfig.supportExternalChatPanel?q.registerSlotRenderer(y.AI_CHAT_VIEW_ID,B.AIChatTabRendererWithTab):q.registerSlotRenderer(y.AI_CHAT_VIEW_ID,B.AIChatTabRenderer),this.designLayoutConfig.useMergeRightWithLeftPanel&&(q.registerSlotRenderer(o.SlotLocation.left,B.AILeftTabRenderer),q.registerSlotRenderer(o.SlotLocation.right,B.AIRightTabRenderer))}registerComponent(q){q.register(y.AI_CHAT_CONTAINER_ID,[],{component:D.AIChatView,title:(0,o.localize)("aiNative.chat.ai.assistant.name"),iconClass:(0,o.getIcon)("magic-wand"),containerId:y.AI_CHAT_CONTAINER_ID}),q.register(y.AI_MENU_BAR_DEBUG_TOOLBAR,{id:y.AI_MENU_BAR_DEBUG_TOOLBAR,component:L.AIRunToolbar}),q.register(y.AI_CHAT_LOGO_AVATAR_ID,{id:y.AI_CHAT_LOGO_AVATAR_ID,component:j.AIChatLogoAvatar})}registerKeybindings(q){this.aiNativeConfigService.capabilities.supportsInlineChat&&(q.registerKeybinding({command:d.AI_INLINE_CHAT_VISIBLE.id,keybinding:"ctrlcmd+i",when:"editorTextFocus",args:!0,priority:0},o.KeybindingScope.USER),q.registerKeybinding({command:d.AI_INLINE_CHAT_VISIBLE.id,keybinding:"esc",args:!1,when:`editorFocus && ${_.InlineChatIsVisible.raw}`}),this.inlineInputService.getInteractiveInputHandler()&&(q.registerKeybinding({command:d.AI_INLINE_CHAT_INTERACTIVE_INPUT_VISIBLE.id,keybinding:this.aiNativeConfigService.inlineChat.inputKeybinding,args:!0,priority:0,when:`editorFocus && (${_.InlineChatIsVisible.raw} || inlineSuggestionVisible)`},o.KeybindingScope.USER),q.registerKeybinding({command:d.AI_INLINE_CHAT_INTERACTIVE_INPUT_VISIBLE.id,keybinding:"esc",args:!1,priority:0,when:`editorFocus && ${_.InlineInputWidgetIsVisible.raw}`}),q.registerKeybinding({command:d.AI_INLINE_CHAT_INTERACTIVE_INPUT_CANCEL.id,keybinding:"esc",priority:1,when:`editorFocus && ${_.InlineInputWidgetIsStreaming.raw}`}),q.registerKeybinding({command:d.AI_INLINE_CHAT_INTERACTIVE_INPUT_VISIBLE.id,keybinding:this.aiNativeConfigService.inlineChat.inputKeybinding,args:!0,priority:0,when:`editorFocus && ${_.InlineHintWidgetIsVisible.raw} && ${_.InlineChatIsVisible.not}`},o.KeybindingScope.USER))),q.registerKeybinding({command:d.AI_INLINE_DIFF_PARTIAL_EDIT.id,keybinding:"ctrl+y",args:!0,priority:100,when:`editorTextFocus && ${_.InlineDiffPartialEditsIsVisible.raw}`}),q.registerKeybinding({command:d.AI_INLINE_DIFF_PARTIAL_EDIT.id,keybinding:"ctrl+n",args:!1,priority:100,when:`editorTextFocus && ${_.InlineDiffPartialEditsIsVisible.raw}`})}};t.AINativeBrowserContribution=ge,n.__decorate([(0,r.Autowired)(o.AppConfig),n.__metadata("design:type",Object)],ge.prototype,"appConfig",void 0),n.__decorate([(0,r.Autowired)(r.INJECTOR_TOKEN),n.__metadata("design:type",r.Injector)],ge.prototype,"injector",void 0),n.__decorate([(0,r.Autowired)(m.IBrowserCtxMenu),n.__metadata("design:type",m.IBrowserCtxMenu)],ge.prototype,"ctxMenuRenderer",void 0),n.__decorate([(0,r.Autowired)(Q.AINativeCoreContribution),n.__metadata("design:type",Object)],ge.prototype,"contributions",void 0),n.__decorate([(0,r.Autowired)(Q.MCPServerContribution),n.__metadata("design:type",Object)],ge.prototype,"mcpServerContributions",void 0),n.__decorate([(0,r.Autowired)(Q.TokenMCPServerRegistry),n.__metadata("design:type",Object)],ge.prototype,"mcpServerRegistry",void 0),n.__decorate([(0,r.Autowired)(p.InlineChatFeatureRegistryToken),n.__metadata("design:type",$.InlineChatFeatureRegistry)],ge.prototype,"inlineChatFeatureRegistry",void 0),n.__decorate([(0,r.Autowired)(p.ChatFeatureRegistryToken),n.__metadata("design:type",Object)],ge.prototype,"chatFeatureRegistry",void 0),n.__decorate([(0,r.Autowired)(p.ChatRenderRegistryToken),n.__metadata("design:type",Object)],ge.prototype,"chatRenderRegistry",void 0),n.__decorate([(0,r.Autowired)(p.ResolveConflictRegistryToken),n.__metadata("design:type",Object)],ge.prototype,"resolveConflictRegistry",void 0),n.__decorate([(0,r.Autowired)(p.RenameCandidatesProviderRegistryToken),n.__metadata("design:type",Object)],ge.prototype,"renameCandidatesProviderRegistry",void 0),n.__decorate([(0,r.Autowired)(p.TerminalRegistryToken),n.__metadata("design:type",Object)],ge.prototype,"terminalProviderRegistry",void 0),n.__decorate([(0,r.Autowired)(p.IntelligentCompletionsRegistryToken),n.__metadata("design:type",Object)],ge.prototype,"intelligentCompletionsRegistry",void 0),n.__decorate([(0,r.Autowired)(p.ProblemFixRegistryToken),n.__metadata("design:type",Object)],ge.prototype,"problemFixProviderRegistry",void 0),n.__decorate([(0,r.Autowired)(o.AINativeConfigService),n.__metadata("design:type",o.AINativeConfigService)],ge.prototype,"aiNativeConfigService",void 0),n.__decorate([(0,r.Autowired)(v.DesignLayoutConfig),n.__metadata("design:type",v.DesignLayoutConfig)],ge.prototype,"designLayoutConfig",void 0),n.__decorate([(0,r.Autowired)(R.AICompletionsService),n.__metadata("design:type",R.AICompletionsService)],ge.prototype,"aiCompletionsService",void 0),n.__decorate([(0,r.Autowired)(O.AIInlineCompletionsProvider),n.__metadata("design:type",O.AIInlineCompletionsProvider)],ge.prototype,"aiInlineCompletionsProvider",void 0),n.__decorate([(0,r.Autowired)(p.CommandService),n.__metadata("design:type",Object)],ge.prototype,"commandService",void 0),n.__decorate([(0,r.Autowired)(o.PreferenceSchemaProvider),n.__metadata("design:type",o.PreferenceSchemaProvider)],ge.prototype,"preferenceSchemaProvider",void 0),n.__decorate([(0,r.Autowired)(o.IPreferenceSettingsService),n.__metadata("design:type",Object)],ge.prototype,"preferenceSettings",void 0),n.__decorate([(0,r.Autowired)(o.PreferenceService),n.__metadata("design:type",Object)],ge.prototype,"preferenceService",void 0),n.__decorate([(0,r.Autowired)(u.IMainLayoutService),n.__metadata("design:type",Object)],ge.prototype,"layoutService",void 0),n.__decorate([(0,r.Autowired)(y.ChatProxyServiceToken),n.__metadata("design:type",w.ChatProxyService)],ge.prototype,"chatProxyService",void 0),n.__decorate([(0,r.Autowired)(o.IAIInlineChatService),n.__metadata("design:type",Y.InlineChatService)],ge.prototype,"aiInlineChatService",void 0),n.__decorate([(0,r.Autowired)(X.InlineInputService),n.__metadata("design:type",X.InlineInputService)],ge.prototype,"inlineInputService",void 0),n.__decorate([(0,r.Autowired)(oe.InlineStreamDiffService),n.__metadata("design:type",oe.InlineStreamDiffService)],ge.prototype,"inlineStreamDiffService",void 0),n.__decorate([(0,r.Autowired)(F.RenameSingleHandler),n.__metadata("design:type",F.RenameSingleHandler)],ge.prototype,"renameSingleHandler",void 0),n.__decorate([(0,r.Autowired)(I.CodeActionSingleHandler),n.__metadata("design:type",I.CodeActionSingleHandler)],ge.prototype,"codeActionSingleHandler",void 0),n.__decorate([(0,r.Autowired)(y.SumiMCPServerProxyServicePath),n.__metadata("design:type",Object)],ge.prototype,"sumiMCPServerBackendProxy",void 0),n.__decorate([(0,r.Autowired)(p.MCPConfigServiceToken),n.__metadata("design:type",U.MCPConfigService)],ge.prototype,"mcpConfigService",void 0),n.__decorate([(0,r.Autowired)(g.WorkbenchEditorService),n.__metadata("design:type",h.WorkbenchEditorServiceImpl)],ge.prototype,"workbenchEditorService",void 0),n.__decorate([(0,r.Autowired)(y.IChatManagerService),n.__metadata("design:type",S.ChatManagerService)],ge.prototype,"chatManagerService",void 0),n.__decorate([(0,r.Autowired)(y.IChatInternalService),n.__metadata("design:type",T.ChatInternalService)],ge.prototype,"chatInternalService",void 0),n.__decorate([(0,r.Autowired)(W.BaseApplyService),n.__metadata("design:type",W.BaseApplyService)],ge.prototype,"applyService",void 0),n.__decorate([(0,r.Autowired)(p.StorageProvider),n.__metadata("design:type",Function)],ge.prototype,"storageProvider",void 0),t.AINativeBrowserContribution=ge=n.__decorate([(0,o.Domain)(o.ClientAppContribution,a.BrowserEditorContribution,o.CommandContribution,l.SettingContribution,o.KeybindingContribution,o.ComponentContribution,o.SlotRendererContribution,o.MonacoContribution),n.__metadata("design:paramtypes",[])],ge)},96366:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ApplyService=void 0;const n=e(85608),r=e(76003),o=e(41869),d=e(57517),_=e(19413),v=e(73974),m=e(51081);let p=class extends v.BaseApplyService{async doApply(g){const a=new o.URI(o.path.join(this.appConfig.workspaceDir,g.relativePath)),u=(await this.modelService.createModelReference(a)).instance.getMonacoModel().getValue();return{stream:await this.aiBackService.requestStream(`Merge all changes from the <update> snippet into the <code> below.
31405
31405
  - Preserve the code's structure, order, comments, and indentation exactly.
31406
31406
  - Output only the updated code, enclosed within <updated-code> and </updated-code> tags.
31407
31407
  - Do not include any additional text, explanations, placeholders, ellipses, or code fences.
@@ -31541,10 +31541,10 @@ ${f.slice(1).join(`
31541
31541
  `).find(T=>T.startsWith("@@"));let A=0,S=0;if(b){const[,,,T,D]=b.match(/@@ -(\d+),(\d+) \+(\d+),(\d+) @@/);A=parseInt(T,10)-1,S=parseInt(D,10)-1}this.editorService.open(s.URI.file(s.path.join(this.appConfig.workspaceDir,c.relativePath)));const w=this.editorService.currentEditor;w&&w.setSelection(new p.Selection(A,0,S,0))}async processAll(c,y){var b;const A=y?(b=this.getUriCodeBlocks(y))===null||b===void 0?void 0:b.filter(D=>D.status==="pending"):this.getSessionCodeBlocks().filter(D=>D.status==="pending");if(!A?.length)throw new Error("No pending code block found");const S=y?[A[0].relativePath]:A.map(D=>D.relativePath).reduce((D,I)=>(D.includes(I)||D.push(I),D),[]),w=this.editorService.getAllOpenedUris(),T=S.filter(D=>!w.some(I=>I.codeUri.fsPath.endsWith(D))).map(D=>s.URI.file(s.path.join(this.appConfig.workspaceDir,D)));T.length&&await this.editorService.openUris(T),S.forEach(D=>{this.doProcess(c,D)}),A.forEach(D=>{D.status=c==="accept"?"success":"cancelled",this.updateCodeBlock(D)})}doProcess(c,y){var b,A;const S=(A=(b=this.activePreviewerMap.get(y))===null||b===void 0?void 0:b.getNode())===null||A===void 0?void 0:A.livePreviewDiffDecorationModel;if(!S)throw new Error("No active previewer found");c==="accept"?S.acceptUnProcessed():S.discardUnProcessed(),this.editorService.save(s.URI.file(s.path.join(this.appConfig.workspaceDir,y)))}listenPartialEdit(c,y){const b=new s.Deferred,A=c.uri.toString(),S=this.inlineDiffService.onPartialEdit(w=>{if(w.totalPartialEditCount===w.resolvedPartialEditCount&&w.uri.path===c.uri.path.toString()){if(w.acceptPartialEditCount>0){y.status="success";const T=c.getValue(),{diff:D,rangesFromDiffHunk:I}=this.getDiffResult(y.originalCode,T,y.relativePath),O=this.getDiagnosticInfos(c.uri.toString(),I);this.aiReporter.send({msgType:d.AIServiceType.Chat,actionType:d.ActionTypeEnum.Accept,actionSource:d.ActionSourceEnum.Chat,sessionId:this.chatInternalService.sessionModel.sessionId,isReceive:!0,isDrop:w.acceptPartialEditCount!==w.totalPartialEditCount,code:T,originCode:y.originalCode,message:JSON.stringify({diff:D,diagnosticInfos:O,instructions:y.instructions,codeEdit:y.codeEdit,partialEditCount:w.totalPartialEditCount,acceptPartialEditCount:w.acceptPartialEditCount,addedLinesCount:w.totalAddedLinesCount,deletedLinesCount:w.totalDeletedLinesCount})}),b.resolve({diff:D,diagnosticInfos:O})}else y.status="cancelled",b.resolve(),this.aiReporter.send({msgType:d.AIServiceType.Chat,actionType:d.ActionTypeEnum.Discard,actionSource:d.ActionSourceEnum.Chat,sessionId:this.chatInternalService.sessionModel.sessionId,isReceive:!1,isDrop:!0,originCode:y.originalCode,message:JSON.stringify({instructions:y.instructions,codeEdit:y.codeEdit})});this.editorListenerMap.disposeKey(A)}});return this.editorListenerMap.set(A,S),b.promise}getDiffResult(c,y,b){const A=(0,r.createPatch)(b,c,y).split(`
31542
31542
  `).slice(4).join(`
31543
31543
  `),S=A.split(`
31544
- `).map(w=>{if(w.startsWith("@@")){const[,,,T,D]=w.match(/@@ -(\d+),(\d+) \+(\d+),(\d+) @@/);return new p.Range(parseInt(T,10),0,parseInt(T,10)+parseInt(D,10)-1,0)}return null}).filter(w=>w!==null);return{diff:A,rangesFromDiffHunk:S}}getDiagnosticInfos(c,y){return this.markerService.getManager().getMarkers({resource:c}).filter(A=>A.severity>=d.MarkerSeverity.Warning&&y.some(S=>S.containsPosition(new p.Position(A.startLineNumber,A.startColumn))))}}t.BaseApplyService=E,n.__decorate([(0,o.Autowired)(a.IChatInternalService),n.__metadata("design:type",h.ChatInternalService)],E.prototype,"chatInternalService",void 0),n.__decorate([(0,o.Autowired)(d.AppConfig),n.__metadata("design:type",Object)],E.prototype,"appConfig",void 0),n.__decorate([(0,o.Autowired)(_.WorkbenchEditorService),n.__metadata("design:type",_.WorkbenchEditorService)],E.prototype,"editorService",void 0),n.__decorate([(0,o.Autowired)(a.InlineDiffServiceToken),n.__metadata("design:type",Object)],E.prototype,"inlineDiffService",void 0),n.__decorate([(0,o.Autowired)(m.IMarkerService),n.__metadata("design:type",Object)],E.prototype,"markerService",void 0),n.__decorate([(0,o.Autowired)(v.IEditorDocumentModelService),n.__metadata("design:type",Object)],E.prototype,"editorDocumentModelService",void 0),n.__decorate([(0,o.Autowired)(d.IAIReporter),n.__metadata("design:type",Object)],E.prototype,"aiReporter",void 0),n.__decorate([(0,d.OnEvent)(v.EditorGroupCloseEvent),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[v.EditorGroupCloseEvent]),n.__metadata("design:returntype",void 0)],E.prototype,"onEditorGroupClose",null),n.__decorate([(0,d.OnEvent)(v.EditorGroupOpenEvent),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[v.EditorGroupOpenEvent]),n.__metadata("design:returntype",Promise)],E.prototype,"onEditorGroupOpen",null)},75279:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MCPConfigView=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importStar(e(14041)),d=e(97267),_=e(41869),v=e(43718),m=e(19413),p=n.__importDefault(e(76599)),s=e(51750),g=()=>{const a=(0,_.useInjectable)(v.MCPConfigServiceToken),[h,u]=o.default.useState([]),[l,E]=o.default.useState(!1),[f,c]=o.default.useState(),[y,b]=o.default.useState(),[A,S]=o.default.useState(!1),w=(0,o.useCallback)(async()=>{const P=await a.getServers();u(P)},[a]);o.default.useEffect(()=>{w();const P=a.onMCPServersChange(k=>{k&&S(!0),w()});return()=>{P.dispose()}},[w]);const T=(0,o.useCallback)(async(P,k)=>{try{b(P),await a.controlServer(P,k),await w(),b(void 0)}catch{b(void 0)}},[a,w]),D=(0,o.useCallback)(()=>{c(void 0),E(!0)},[]),I=(0,o.useCallback)(async P=>{const k=await a.getServerConfigByName(P.name);k&&(c(k),E(!0))},[a]),O=(0,o.useCallback)(async P=>{await a.deleteServer(P),await w()},[a,w]),M=(0,o.useCallback)(async P=>{await a.saveServer(P),E(!1),await w()},[a,w]),R=(0,o.useCallback)(async P=>{b(P.name),await a.syncServer(P.name),await w(),b(void 0)},[a,w]);return o.default.createElement("div",{className:p.default.container},o.default.createElement("div",{className:p.default.header},o.default.createElement("div",null,o.default.createElement("h2",{className:p.default.title},"MCP Servers"),o.default.createElement("p",{className:p.default.description},(0,v.localize)("ai.native.mcp.manage.connections"))),o.default.createElement("button",{className:p.default.actionButton,onClick:D},o.default.createElement(d.Icon,{icon:"plus",className:p.default.actionButtonIcon}),(0,v.localize)("ai.native.mcp.addMCPServer.title"))),o.default.createElement("div",{className:p.default.serversList},h.map(P=>o.default.createElement("div",{key:P.name,className:p.default.serverItem},o.default.createElement("div",{className:p.default.serverHeader},o.default.createElement("div",{className:p.default.serverTitleRow},o.default.createElement("h3",{className:p.default.serverName},P.name,o.default.createElement("span",{className:(0,r.default)(p.default.serverStatusIcon,P.isStarted?p.default.active:p.default.inactive)}))),o.default.createElement("div",{className:p.default.serverActions},o.default.createElement(d.Popover,{id:"mcp-server-action-popover",trigger:d.PopoverTriggerType.hover,content:P.isStarted?(0,v.localize)("ai.native.mcp.disable.title"):(0,v.localize)("ai.native.mcp.enable.title")},o.default.createElement(d.Button,{type:"default",className:(0,r.default)(p.default.serverActionButton,P.isStarted&&p.default.active),onClick:()=>T(P.name,!P.isStarted)},o.default.createElement("i",{className:`codicon ${y===P.name||!A&&P.name!==m.BUILTIN_MCP_SERVER_NAME?"codicon-loading kt-icon-loading":P.isStarted?"codicon-check":"codicon-circle"}`}),o.default.createElement("span",null,(0,v.localize)(P.isStarted?"ai.native.mcp.enabled":"ai.native.mcp.disabled")))),P.name!==m.BUILTIN_MCP_SERVER_NAME&&o.default.createElement(d.Button,{type:"icon",iconClass:"codicon codicon-edit",className:p.default.iconButton,title:(0,v.localize)("ai.native.mcp.tool.action.edit"),onClick:()=>I(P)}),P.name!==m.BUILTIN_MCP_SERVER_NAME&&o.default.createElement(d.Button,{type:"icon",iconClass:"codicon codicon-sync",className:p.default.iconButton,title:(0,v.localize)("ai.native.mcp.tool.action.sync"),onClick:()=>R(P)}),P.name!==m.BUILTIN_MCP_SERVER_NAME&&o.default.createElement(d.Button,{type:"icon",iconClass:"codicon codicon-trash",className:p.default.iconButton,title:(0,v.localize)("ai.native.mcp.tool.action.delete"),onClick:()=>O(P.name)}))),o.default.createElement("div",{className:p.default.serverDetail},P.type&&o.default.createElement("div",{className:p.default.detailRow},o.default.createElement("span",{className:p.default.detailLabel},"Type:"),o.default.createElement(d.Badge,{className:(0,r.default)(p.default.serverType,p.default.typeTag)},a.getReadableServerType(P.type)))),P.tools&&P.tools.length>0&&o.default.createElement("div",{className:p.default.serverDetail},o.default.createElement("div",{className:p.default.detailRow},o.default.createElement("span",{className:p.default.detailLabel},"Tools:"),o.default.createElement("span",{className:p.default.detailContent},P.tools.map((k,F)=>o.default.createElement(d.Badge,{key:F,className:p.default.toolTag,title:k.description},k.name))))),P.command&&o.default.createElement("div",{className:p.default.serverDetail},o.default.createElement("div",{className:p.default.detailRow},o.default.createElement("span",{className:p.default.detailLabel},"Command:"),o.default.createElement("span",{className:p.default.detailContent},P.command))),P.url&&o.default.createElement("div",{className:p.default.serverDetail},o.default.createElement("div",{className:p.default.detailRow},o.default.createElement("span",{className:p.default.detailLabel},"Server Link:"),o.default.createElement("span",{className:(0,r.default)(p.default.detailContent,p.default.link)},P.url)))))),o.default.createElement(s.MCPServerForm,{visible:l,initialData:f,servers:h,onSave:M,onCancel:()=>E(!1)}))};t.MCPConfigView=g},51750:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MCPServerForm=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importStar(e(14041)),d=e(97267),_=e(48412),v=e(53017),m=e(41869),p=e(43718),s=e(72665),g=e(69820),a=n.__importDefault(e(83761)),h=({visible:u,initialData:l,onSave:E,onCancel:f,servers:c})=>{const[y,b]=(0,o.useState)(()=>({name:"",command:"",args:[],env:{},type:g.MCP_SERVER_TYPE.STDIO,...l})),A=(0,m.useInjectable)(s.IMessageService),[S,w]=(0,o.useState)(()=>{var B;return((B=l?.args)===null||B===void 0?void 0:B.join(" "))||""}),[T,D]=(0,o.useState)(()=>l?.env?Object.entries(l.env).map(([B,j])=>`${B}=${j}`).join(`
31544
+ `).map(w=>{if(w.startsWith("@@")){const[,,,T,D]=w.match(/@@ -(\d+),(\d+) \+(\d+),(\d+) @@/);return new p.Range(parseInt(T,10),0,parseInt(T,10)+parseInt(D,10)-1,0)}return null}).filter(w=>w!==null);return{diff:A,rangesFromDiffHunk:S}}getDiagnosticInfos(c,y){return this.markerService.getManager().getMarkers({resource:c}).filter(A=>A.severity>=d.MarkerSeverity.Warning&&y.some(S=>S.containsPosition(new p.Position(A.startLineNumber,A.startColumn))))}}t.BaseApplyService=E,n.__decorate([(0,o.Autowired)(a.IChatInternalService),n.__metadata("design:type",h.ChatInternalService)],E.prototype,"chatInternalService",void 0),n.__decorate([(0,o.Autowired)(d.AppConfig),n.__metadata("design:type",Object)],E.prototype,"appConfig",void 0),n.__decorate([(0,o.Autowired)(_.WorkbenchEditorService),n.__metadata("design:type",_.WorkbenchEditorService)],E.prototype,"editorService",void 0),n.__decorate([(0,o.Autowired)(a.InlineDiffServiceToken),n.__metadata("design:type",Object)],E.prototype,"inlineDiffService",void 0),n.__decorate([(0,o.Autowired)(m.IMarkerService),n.__metadata("design:type",Object)],E.prototype,"markerService",void 0),n.__decorate([(0,o.Autowired)(v.IEditorDocumentModelService),n.__metadata("design:type",Object)],E.prototype,"editorDocumentModelService",void 0),n.__decorate([(0,o.Autowired)(d.IAIReporter),n.__metadata("design:type",Object)],E.prototype,"aiReporter",void 0),n.__decorate([(0,d.OnEvent)(v.EditorGroupCloseEvent),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[v.EditorGroupCloseEvent]),n.__metadata("design:returntype",void 0)],E.prototype,"onEditorGroupClose",null),n.__decorate([(0,d.OnEvent)(v.EditorGroupOpenEvent),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[v.EditorGroupOpenEvent]),n.__metadata("design:returntype",Promise)],E.prototype,"onEditorGroupOpen",null)},75279:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MCPConfigView=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importStar(e(14041)),d=e(97267),_=e(41869),v=e(43718),m=e(19413),p=n.__importDefault(e(76599)),s=e(51750),g=()=>{const a=(0,_.useInjectable)(v.MCPConfigServiceToken),[h,u]=o.default.useState([]),[l,E]=o.default.useState(!1),[f,c]=o.default.useState(),[y,b]=o.default.useState(),[A,S]=o.default.useState(a.isInitialized),w=(0,o.useCallback)(async()=>{const P=await a.getServers();u(P)},[a]);o.default.useEffect(()=>{w();const P=a.onMCPServersChange(k=>{k&&S(!0),w()});return()=>{P.dispose()}},[w]);const T=(0,o.useCallback)(async(P,k)=>{try{b(P),await a.controlServer(P,k),await w(),b(void 0)}catch{b(void 0)}},[a,w]),D=(0,o.useCallback)(()=>{c(void 0),E(!0)},[]),I=(0,o.useCallback)(async P=>{const k=await a.getServerConfigByName(P.name);k&&(c(k),E(!0))},[a]),O=(0,o.useCallback)(async P=>{await a.deleteServer(P),await w()},[a,w]),M=(0,o.useCallback)(async(P,k)=>{E(!1),await a.saveServer(P,k),P?.enabled&&(b(k.name),await a.controlServer(k.name,!0),b(void 0)),await w()},[a,w]),R=(0,o.useCallback)(async P=>{b(P.name),await a.syncServer(P.name),await w(),b(void 0)},[a,w]);return o.default.createElement("div",{className:p.default.container},o.default.createElement("div",{className:p.default.header},o.default.createElement("div",null,o.default.createElement("h2",{className:p.default.title},"MCP Servers"),o.default.createElement("p",{className:p.default.description},(0,v.localize)("ai.native.mcp.manage.connections"))),o.default.createElement("button",{className:p.default.actionButton,onClick:D},o.default.createElement(d.Icon,{icon:"plus",className:p.default.actionButtonIcon}),(0,v.localize)("ai.native.mcp.addMCPServer.title"))),o.default.createElement("div",{className:p.default.serversList},h.map(P=>o.default.createElement("div",{key:P.name,className:p.default.serverItem},o.default.createElement("div",{className:p.default.serverHeader},o.default.createElement("div",{className:p.default.serverTitleRow},o.default.createElement("h3",{className:p.default.serverName},P.name,o.default.createElement("span",{className:(0,r.default)(p.default.serverStatusIcon,P.isStarted?p.default.active:p.default.inactive)}))),o.default.createElement("div",{className:p.default.serverActions},o.default.createElement(d.Popover,{id:"mcp-server-action-popover",trigger:d.PopoverTriggerType.hover,content:P.isStarted?(0,v.localize)("ai.native.mcp.disable.title"):(0,v.localize)("ai.native.mcp.enable.title")},o.default.createElement(d.Button,{type:"default",className:(0,r.default)(p.default.serverActionButton,P.isStarted&&p.default.active),onClick:()=>T(P.name,!P.isStarted)},o.default.createElement("i",{className:`codicon ${y===P.name||!A&&P.name!==m.BUILTIN_MCP_SERVER_NAME&&!P.isStarted?"codicon-loading kt-icon-loading":P.isStarted?"codicon-check":"codicon-circle"}`}),o.default.createElement("span",null,(0,v.localize)(P.isStarted?"ai.native.mcp.enabled":"ai.native.mcp.disabled")))),P.name!==m.BUILTIN_MCP_SERVER_NAME&&o.default.createElement(d.Button,{type:"icon",iconClass:"codicon codicon-edit",className:p.default.iconButton,title:(0,v.localize)("ai.native.mcp.tool.action.edit"),onClick:()=>I(P)}),P.name!==m.BUILTIN_MCP_SERVER_NAME&&o.default.createElement(d.Button,{type:"icon",iconClass:"codicon codicon-sync",className:p.default.iconButton,title:(0,v.localize)("ai.native.mcp.tool.action.sync"),onClick:()=>R(P)}),P.name!==m.BUILTIN_MCP_SERVER_NAME&&o.default.createElement(d.Button,{type:"icon",iconClass:"codicon codicon-trash",className:p.default.iconButton,title:(0,v.localize)("ai.native.mcp.tool.action.delete"),onClick:()=>O(P.name)}))),o.default.createElement("div",{className:p.default.serverDetail},P.type&&o.default.createElement("div",{className:p.default.detailRow},o.default.createElement("span",{className:p.default.detailLabel},"Type:"),o.default.createElement(d.Badge,{className:(0,r.default)(p.default.serverType,p.default.typeTag)},a.getReadableServerType(P.type)))),P.tools&&P.tools.length>0&&o.default.createElement("div",{className:p.default.serverDetail},o.default.createElement("div",{className:p.default.detailRow},o.default.createElement("span",{className:p.default.detailLabel},"Tools:"),o.default.createElement("span",{className:p.default.detailContent},P.tools.map((k,F)=>o.default.createElement(d.Badge,{key:F,className:p.default.toolTag,title:k.description},k.name))))),P.command&&o.default.createElement("div",{className:p.default.serverDetail},o.default.createElement("div",{className:p.default.detailRow},o.default.createElement("span",{className:p.default.detailLabel},"Command:"),o.default.createElement("span",{className:p.default.detailContent},P.command))),P.url&&o.default.createElement("div",{className:p.default.serverDetail},o.default.createElement("div",{className:p.default.detailRow},o.default.createElement("span",{className:p.default.detailLabel},"Server Link:"),o.default.createElement("span",{className:(0,r.default)(p.default.detailContent,p.default.link)},P.url)))))),o.default.createElement(s.MCPServerForm,{visible:l,initialData:f,servers:h,onSave:P=>M(f,P),onCancel:()=>E(!1)}))};t.MCPConfigView=g},51750:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MCPServerForm=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importStar(e(14041)),d=e(97267),_=e(48412),v=e(53017),m=e(41869),p=e(43718),s=e(72665),g=e(69820),a=n.__importDefault(e(83761)),h=({visible:u,initialData:l,onSave:E,onCancel:f,servers:c})=>{const[y,b]=(0,o.useState)(()=>({name:"",command:"",args:[],env:{},type:g.MCP_SERVER_TYPE.STDIO,...l})),A=(0,m.useInjectable)(s.IMessageService),[S,w]=(0,o.useState)(()=>{var B;return((B=l?.args)===null||B===void 0?void 0:B.join(" "))||""}),[T,D]=(0,o.useState)(()=>l?.env?Object.entries(l.env).map(([B,j])=>`${B}=${j}`).join(`
31545
31545
  `):"");(0,o.useEffect)(()=>{var B;b({name:"",command:"",args:[],env:{},type:g.MCP_SERVER_TYPE.STDIO,...l}),w(((B=l?.args)===null||B===void 0?void 0:B.join(" "))||""),D(l?.env?Object.entries(l.env).map(([j,W])=>`${j}=${W}`).join(`
31546
31546
  `):"")},[l]);const I=(0,o.useCallback)(B=>{var j,W;if(B.name.trim()==="")return A.error((0,p.localize)("ai.native.mcp.name.isRequired")),!1;if(!l&&c.some(Q=>Q.name.toLocaleLowerCase()===B.name.toLocaleLowerCase()))return A.error((0,p.formatLocalize)("ai.native.mcp.serverNameExists",B.name)),!1;if(B.type===g.MCP_SERVER_TYPE.SSE){const Q=((j=B.url)===null||j===void 0?void 0:j.trim())!=="";return Q||A.error((0,p.localize)("ai.native.mcp.url.isRequired")),Q}const U=((W=B.command)===null||W===void 0?void 0:W.trim())!=="";return U||A.error((0,p.localize)("ai.native.mcp.command.isRequired")),U},[c,l]),O=(0,o.useCallback)(B=>{var j;if(B.preventDefault(),!I(y))return;const U={...y};if(y.type===g.MCP_SERVER_TYPE.SSE)U.url=(j=U.url)===null||j===void 0?void 0:j.trim();else{const Q=S.split(" ").filter(Boolean),V=T.split(`
31547
- `).filter(Boolean).reduce(($,Y)=>{const[z,H]=Y.split("=");return z&&H&&($[z.trim()]=H.trim()),$},{});U.args=Q,U.env=V}b({...y,command:"",url:"",args:[],env:{}}),E(U)},[y,S,T,E,I]),M=(0,o.useCallback)(B=>{b({...y,command:B.target.value})},[y,S]),R=(0,o.useCallback)(B=>{w(B.target.value)},[S]),P=(0,o.useCallback)(B=>{D(B.target.value)},[T]),k=(0,o.useCallback)(B=>{b({...y,url:B.target.value})},[y]),F=(0,o.useCallback)(B=>{b({...y,type:B,command:"",args:[],env:{},url:""})},[y]),L=(0,o.useCallback)(()=>y?.type===g.MCP_SERVER_TYPE.STDIO?o.default.createElement(o.default.Fragment,null,o.default.createElement("div",{className:a.default.formItem},o.default.createElement("label",null,(0,p.localize)("ai.native.mcp.command")),o.default.createElement("input",{type:"text",value:y.command,onChange:M,placeholder:(0,p.localize)("ai.native.mcp.command.placeHolder"),required:!0})),o.default.createElement("div",{className:a.default.formItem},o.default.createElement("label",null,(0,p.localize)("ai.native.mcp.args")),o.default.createElement("textarea",{value:S,onChange:R,placeholder:(0,p.localize)("ai.native.mcp.args.placeHolder"),rows:3})),o.default.createElement("div",{className:a.default.formItem},o.default.createElement("label",null,(0,p.localize)("ai.native.mcp.env")),o.default.createElement("textarea",{value:T,onChange:P,placeholder:(0,p.localize)("ai.native.mcp.env.placeHolder"),rows:3}))):o.default.createElement(o.default.Fragment,null,o.default.createElement("div",{className:a.default.formItem},o.default.createElement("label",null,(0,p.localize)("ai.native.mcp.url")),o.default.createElement("textarea",{value:y.url,onChange:k,placeholder:(0,p.localize)("ai.native.mcp.url.placeHolder"),rows:3}))),[y,S,T]);return o.default.createElement(v.Modal,{title:l?(0,p.localize)("ai.native.mcp.editMCPServer.title"):(0,p.localize)("ai.native.mcp.addMCPServer.title"),visible:u,onCancel:f,centered:!0,width:600,footer:null,style:{background:"var(--editor-background)"}},o.default.createElement("form",{className:a.default.form,onSubmit:B=>B.preventDefault()},o.default.createElement("div",{className:a.default.formRow},o.default.createElement("div",{className:(0,r.default)(a.default.formItem,a.default.formItemName)},o.default.createElement("label",null,(0,p.localize)("ai.native.mcp.name")),o.default.createElement("input",{type:"text",value:y.name,onChange:B=>b({...y,name:B.target.value}),placeholder:(0,p.localize)("ai.native.mcp.name.placeHolder"),required:!0})),o.default.createElement("div",{className:(0,r.default)(a.default.formItem,a.default.formItemType)},o.default.createElement("label",null,(0,p.localize)("ai.native.mcp.type")),o.default.createElement(d.Select,{size:"large",value:y.type,options:[{label:(0,p.localize)("ai.native.mcp.stdio"),value:g.MCP_SERVER_TYPE.STDIO},{label:(0,p.localize)("ai.native.mcp.sse"),value:g.MCP_SERVER_TYPE.SSE}],className:a.default.formItemSelect,onChange:F}))),L(),o.default.createElement("div",{className:a.default.formActions},o.default.createElement(_.Button,{onClick:f,type:"primary",className:a.default.secondaryButton},(0,p.localize)("ai.native.mcp.buttonCancel")),o.default.createElement(_.Button,{onClick:O,type:"primary"},l?(0,p.localize)("ai.native.mcp.buttonUpdate"):(0,p.localize)("ai.native.mcp.buttonSave")))))};t.MCPServerForm=h},27397:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MCPConfigCommandContribution=t.MCPConfigCommands=void 0;const n=e(85608),r=e(76003),o=e(41869),d=e(43718),_=e(54414),v=e(5297),m=e(33108);var p;(function(g){g.OPEN_MCP_CONFIG={id:"mcp.openConfig",label:"Open MCP Configuration"},g.OPEN_MCP_CONFIG_FILE={id:"mcp.openConfigFile",label:"Open MCP Configuration (JSON)"}})(p||(t.MCPConfigCommands=p={}));let s=class{registerCommands(a){a.registerCommand(p.OPEN_MCP_CONFIG,{execute:()=>{const h=new o.URI().withScheme(v.MCP_CONFIG_COMPONENTS_SCHEME_ID);this.editorService.open(h,{preview:!1,focus:!0})}}),a.registerCommand(p.OPEN_MCP_CONFIG_FILE,{execute:()=>{this.mcpConfigService.openConfigFile()}})}};t.MCPConfigCommandContribution=s,n.__decorate([(0,r.Autowired)(_.WorkbenchEditorService),n.__metadata("design:type",_.WorkbenchEditorService)],s.prototype,"editorService",void 0),n.__decorate([(0,r.Autowired)(d.MCPConfigServiceToken),n.__metadata("design:type",m.MCPConfigService)],s.prototype,"mcpConfigService",void 0),t.MCPConfigCommandContribution=s=n.__decorate([(0,d.Domain)(o.CommandContribution)],s)},5297:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MCPConfigContribution=t.MCP_CONFIG_COMPONENTS_SCHEME_ID=void 0;const n=e(85608),r=e(76003),o=e(97267),d=e(93899),_=e(39496),v=e(26542),m=e(43718),p=e(82196),s=e(7443),g=e(10560),a=e(75279),h=e(27397),u="opensumi-mcp-config-viewer";t.MCP_CONFIG_COMPONENTS_SCHEME_ID="mcp-config";let l=class{registerEditorComponent(f){f.registerEditorComponent({uid:u,scheme:t.MCP_CONFIG_COMPONENTS_SCHEME_ID,component:a.MCPConfigView,renderMode:p.EditorComponentRenderMode.ONE_PER_WORKBENCH}),f.registerEditorComponentResolver(t.MCP_CONFIG_COMPONENTS_SCHEME_ID,(c,y)=>{y.push({type:"component",componentId:u})})}registerResource(f){f.registerResourceProvider({scheme:t.MCP_CONFIG_COMPONENTS_SCHEME_ID,provideResource:async c=>{const{configType:y}=c.getParsedQuery();return{uri:c,name:(0,m.localize)("ai.native.mcp.config.title"),icon:(0,o.getIcon)("mcp"),metadata:{configType:y}}}})}registerMenus(f){f.registerMenuItem(_.MenuId.EditorTitle,{command:h.MCPConfigCommands.OPEN_MCP_CONFIG_FILE.id,iconClass:(0,o.getIcon)("open"),group:"navigation",order:4,when:`resourceScheme == ${t.MCP_CONFIG_COMPONENTS_SCHEME_ID}`}),f.registerMenuItem(_.MenuId.EditorTitle,{command:h.MCPConfigCommands.OPEN_MCP_CONFIG.id,iconClass:(0,o.getIcon)("open"),group:"navigation",order:4,when:"resourceFilename =~ /mcp.json/"})}};t.MCPConfigContribution=l,n.__decorate([(0,r.Autowired)(g.IWorkspaceService),n.__metadata("design:type",Object)],l.prototype,"workspaceService",void 0),n.__decorate([(0,r.Autowired)(s.IconService),n.__metadata("design:type",s.IconService)],l.prototype,"iconService",void 0),n.__decorate([(0,r.Autowired)(),n.__metadata("design:type",v.LabelService)],l.prototype,"labelService",void 0),t.MCPConfigContribution=l=n.__decorate([(0,m.Domain)(p.BrowserEditorContribution,d.MenuContribution)],l)},33108:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MCPConfigService=void 0;const n=e(85608),r=e(76003),o=e(41869),d=e(78132),_=e(43718),v=e(54414),m=e(72665),p=e(19413),s=e(64811),g=e(69820),a=e(45331);let h=class extends _.Disposable{constructor(){super(),this.whenReadyDeferred=new _.Deferred,this.mcpServersChangeEventEmitter=new _.Emitter,this.init(),this.disposables.push(this.mcpServerProxyService.onChangeMCPServers(()=>{this.fireMCPServersChange()})),this.disposables.push(this.preferenceService.onSpecificPreferenceChange("mcp",()=>{this.fireMCPServersChange()}))}async init(){this.chatStorage=await this.storageProvider(_.STORAGE_NAMESPACE.CHAT),this.whenReadyDeferred.resolve()}get whenReady(){return this.whenReadyDeferred.promise}get onMCPServersChange(){return this.mcpServersChangeEventEmitter.event}fireMCPServersChange(l=!1){this.mcpServersChangeEventEmitter.fire(l)}async getServers(){const{value:l,scope:E}=this.preferenceService.resolve("mcp",{mcpServers:[]},void 0);if(E===_.PreferenceScope.Default){const S=(await this.mcpServerProxyService.$getServers()).find(w=>w.name===p.BUILTIN_MCP_SERVER_NAME);return S?[S]:[]}const f=l?.mcpServers.map(A=>{const S=Object.keys(A)[0],w=A[S];return w.url?{name:S,type:g.MCP_SERVER_TYPE.SSE,url:w.url}:{name:S,type:g.MCP_SERVER_TYPE.STDIO,command:w.command,args:w.args,env:w.env}}),c=await this.mcpServerProxyService.$getServers(),y=c.find(A=>A.name===p.BUILTIN_MCP_SERVER_NAME),b=f?.map(A=>{const S=c.find(w=>w.name===A.name);return{...A,isStarted:S?.isStarted||!1,tools:S?.tools||[]}});return y&&b.unshift(y),b}async controlServer(l,E){try{E?await this.mcpServerProxyService.$startServer(l):await this.mcpServerProxyService.$stopServer(l);const f=this.chatStorage.get(s.MCPServersEnabledKey,[p.BUILTIN_MCP_SERVER_NAME]),c=new Set(f);E?c.add(l):c.delete(l),this.chatStorage.set(s.MCPServersEnabledKey,Array.from(c))}catch(f){const c=f.message||f;throw this.logger.error(`Failed to ${E?"start":"stop"} server ${l}:`,c),this.messageService.error(c),f}}async saveServer(l){await this.whenReady;const{value:E}=this.preferenceService.resolve("mcp",{mcpServers:[]},void 0),f=E.mcpServers,c=f?.findIndex(b=>Object.keys(b)[0]===l.name);let y;l.type===g.MCP_SERVER_TYPE.SSE?y={[l.name]:{url:l.url}}:y={[l.name]:{command:l.command,args:l.args,env:l.env}},c!==void 0&&c>=0?f[c]=y:f.push(y),await this.sumiMCPServerBackendProxy.$addOrUpdateServer(l),await this.preferenceService.set("mcp",{mcpServers:f})}async deleteServer(l){const{value:E}=this.preferenceService.resolve("mcp",{mcpServers:[]},void 0),f=E?.mcpServers,c=f?.findIndex(y=>Object.keys(y)[0]===l);c!==void 0&&c>=0&&f?.splice(c,1),await this.sumiMCPServerBackendProxy.$removeServer(l),await this.preferenceService.set("mcp",{mcpServers:f})}async syncServer(l){await this.sumiMCPServerBackendProxy.$syncServer(l)}async getServerConfigByName(l){const{value:E}=this.preferenceService.resolve("mcp",{mcpServers:[]},void 0);await this.whenReady;const f=this.chatStorage.get(s.MCPServersEnabledKey,[p.BUILTIN_MCP_SERVER_NAME]),c=E?.mcpServers,y=c?.find(b=>Object.keys(b)[0]===l);if(y)return y[l].url?{name:l,type:g.MCP_SERVER_TYPE.SSE,url:y[l].url,enabled:f.includes(l)}:{name:l,type:g.MCP_SERVER_TYPE.STDIO,command:y[l].command,args:y[l].args,env:y[l].env,enabled:f.includes(l)}}getReadableServerType(l){switch(l){case g.MCP_SERVER_TYPE.STDIO:return(0,_.localize)("ai.native.mcp.type.stdio");case g.MCP_SERVER_TYPE.SSE:return(0,_.localize)("ai.native.mcp.type.sse");case g.MCP_SERVER_TYPE.BUILTIN:return(0,_.localize)("ai.native.mcp.type.builtin");default:return l}}async openConfigFile(){let l=this.preferenceService.resolve("mcp",{mcpServers:[]},void 0);l.scope===_.PreferenceScope.Default&&(await this.preferenceService.set("mcp",{mcpServers:[]},_.PreferenceScope.Workspace),l=this.preferenceService.resolve("mcp",{mcpServers:[]},void 0));const E=l.configUri;E&&this.workbenchEditorService.open(E,{preview:!1})}};t.MCPConfigService=h,n.__decorate([(0,r.Autowired)(p.SumiMCPServerProxyServicePath),n.__metadata("design:type",Object)],h.prototype,"sumiMCPServerBackendProxy",void 0),n.__decorate([(0,r.Autowired)(a.MCPServerProxyService),n.__metadata("design:type",a.MCPServerProxyService)],h.prototype,"mcpServerProxyService",void 0),n.__decorate([(0,r.Autowired)(d.PreferenceService),n.__metadata("design:type",Object)],h.prototype,"preferenceService",void 0),n.__decorate([(0,r.Autowired)(m.IMessageService),n.__metadata("design:type",Object)],h.prototype,"messageService",void 0),n.__decorate([(0,r.Autowired)(_.StorageProvider),n.__metadata("design:type",Function)],h.prototype,"storageProvider",void 0),n.__decorate([(0,r.Autowired)(v.WorkbenchEditorService),n.__metadata("design:type",v.WorkbenchEditorService)],h.prototype,"workbenchEditorService",void 0),n.__decorate([(0,r.Autowired)(o.ILogger),n.__metadata("design:type",Object)],h.prototype,"logger",void 0),t.MCPConfigService=h=n.__decorate([(0,r.Injectable)(),n.__metadata("design:paramtypes",[])],h)},33368:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MCPFolderPreferenceProvider=void 0;const n=e(85608),r=e(76003),o=e(91825);let d=class extends o.FolderFilePreferenceProvider{parse(v){const m=super.parse(v);if(m!==void 0)return{mcp:{...m}}}getPath(v){if(v==="mcp")return[];if(v.startsWith("mcp."))return[v.substr(4)]}};t.MCPFolderPreferenceProvider=d,t.MCPFolderPreferenceProvider=d=n.__decorate([(0,r.Injectable)()],d)},55003:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MCPPreferencesContribution=t.MCPResourceProvider=void 0;const n=e(85608),r=e(76003),o=e(41869),d=e(57517),_=e(924);let v=class{provideResource(s){return{supportsRevive:!0,name:(0,o.localize)("menu-bar.title.debug"),icon:(0,o.getIcon)("debug"),uri:s}}provideResourceSubname(){return null}async shouldCloseResource(){return!0}};t.MCPResourceProvider=v,t.MCPResourceProvider=v=n.__decorate([(0,r.Injectable)()],v);let m=class{constructor(){this.schema=_.MCPPreferencesSchema,this.name="mcp"}registerResource(s){s.registerResourceProvider(this.prefResourceProvider)}registerSchema(s){s.registerSchema(_.MCPSchemaUri,_.MCPSchema,["mcp.json"])}};t.MCPPreferencesContribution=m,n.__decorate([(0,r.Autowired)(v),n.__metadata("design:type",v)],m.prototype,"prefResourceProvider",void 0),t.MCPPreferencesContribution=m=n.__decorate([(0,o.Domain)(o.PreferenceContribution,o.PreferenceConfiguration,d.BrowserEditorContribution,o.JsonSchemaContribution)],m)},924:(x,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MCPSchema=t.MCPPreferencesSchema=t.MCPSchemaUri=void 0,t.MCPSchemaUri="vscode://schemas/mcp/user",t.MCPPreferencesSchema={type:"object",scope:"resource",properties:{mcp:{$ref:t.MCPSchemaUri,description:"MCP configuration for Workspace.",defaultValue:{mcpServers:[]}}}},t.MCPSchema={$id:t.MCPSchemaUri,type:"object",title:"MCP",required:[],default:{mcpServers:[]},properties:{mcpServers:{type:"array",description:"List of MCP Servers. Add new servers or edit existing ones by using IntelliSense.",items:{type:"object",properties:{command:{type:"string",description:"The command to start the MCP server."},args:{type:"array",description:"The arguments for the command to start the MCP server."},env:{type:"object",description:"The environment variables for the command to start the MCP server."},url:{type:"string",description:"The SSE URL for the MCP server."}}}}}}},45331:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MCPServerProxyService=void 0;const n=e(85608),r=e(48085),o=e(76003),d=e(41869),_=e(43718),v=e(19413),m=e(77633);let p=class{constructor(){this._onChangeMCPServers=new _.Emitter,this.onChangeMCPServers=this._onChangeMCPServers.event}$callMCPTool(g,a){return this.mcpServerRegistry.callMCPTool(g,a)}async $getBuiltinMCPTools(){const g=await this.mcpServerRegistry.getMCPTools().map(a=>({name:a.name,description:a.description,inputSchema:(0,r.zodToJsonSchema)(a.inputSchema),providerName:v.BUILTIN_MCP_SERVER_NAME}));return this.logger.log("SUMI MCP tools",g),g}async $updateMCPServers(){this._onChangeMCPServers.fire("update")}async getAllMCPTools(){return this.sumiMCPServerProxyService.$getAllMCPTools()}async $getServers(){return this.sumiMCPServerProxyService.$getServers()}async $startServer(g){await this.sumiMCPServerProxyService.$startServer(g)}async $stopServer(g){await this.sumiMCPServerProxyService.$stopServer(g)}};t.MCPServerProxyService=p,n.__decorate([(0,o.Autowired)(m.TokenMCPServerRegistry),n.__metadata("design:type",Object)],p.prototype,"mcpServerRegistry",void 0),n.__decorate([(0,o.Autowired)(d.ILogger),n.__metadata("design:type",Object)],p.prototype,"logger",void 0),n.__decorate([(0,o.Autowired)(v.SumiMCPServerProxyServicePath),n.__metadata("design:type",Object)],p.prototype,"sumiMCPServerProxyService",void 0),t.MCPServerProxyService=p=n.__decorate([(0,o.Injectable)()],p)},79502:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MCPServerRegistry=void 0;const n=e(85608),r=e(76003),o=e(43718),d=e(19413),_=e(98864);class v{constructor(s){this.logger=s}appendLine(s){this.logger.log(s)}}let m=class{constructor(){this.tools=[],this.toolComponents={}}get logger(){return new v(this.baseLogger)}set activeMessageInfo(s){this._activeMessageInfo=s}getMCPTool(s,g=d.BUILTIN_MCP_SERVER_NAME){return this.tools.find(a=>(0,_.getToolName)(a.name,g)===s)}registerMCPTool(s){this.tools.push(s)}registerToolComponent(s,g,a=d.BUILTIN_MCP_SERVER_NAME){this.toolComponents[(0,_.getToolName)(s,a)]=g}getToolComponent(s){return this.toolComponents[s]}getMCPTools(){return this.tools.sort((s,g)=>{var a,h;return((a=s.order)!==null&&a!==void 0?a:1/0)-((h=g.order)!==null&&h!==void 0?h:1/0)})}async callMCPTool(s,g){try{const a=this.tools.find(l=>l.name===s);if(!a)throw new Error(`MCP tool ${s} not found`);const h=g.toolCallId;g=a.inputSchema.parse(g);const u=await a.handler({...g,toolCallId:h},this.logger);return this.reportToolCall(s,g,u,h),u}catch(a){return console.error("callMCPTool error:",a),this.reportToolCall(s,g,a,g.toolCallId),{content:[{type:"text",text:`The tool ${s} failed to execute. Error: ${a}`}],isError:!0}}}reportToolCall(s,g,a,h){if(!this.tools.find(l=>l.name===s))throw new Error(`MCP tool ${s} not found`);this.aiReporter.send({msgType:o.AIServiceType.ToolCall,message:JSON.stringify({args:g,name:s,result:a}),messageId:this._activeMessageInfo.messageId,sessionId:this._activeMessageInfo.sessionId,relationId:h})}};t.MCPServerRegistry=m,n.__decorate([(0,r.Autowired)(o.ILogger),n.__metadata("design:type",Object)],m.prototype,"baseLogger",void 0),n.__decorate([(0,r.Autowired)(o.IAIReporter),n.__metadata("design:type",Object)],m.prototype,"aiReporter",void 0),t.MCPServerRegistry=m=n.__decorate([(0,r.Injectable)()],m)},30703:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MCPToolsDialog=void 0;const n=e(85608),r=n.__importStar(e(14041)),o=n.__importDefault(e(49783)),d=({tools:_})=>r.createElement("div",{className:o.default.mcp_tools_dialog},r.createElement("div",{className:o.default.dialog_title},"MCP Tools"),r.createElement("div",{className:o.default.tools_list},_.map(v=>r.createElement("div",{key:v.name,className:o.default.tool_item},r.createElement("div",{className:o.default.tool_name},v.name),r.createElement("div",{className:o.default.tool_description},v.description),v.providerName&&r.createElement("div",{className:o.default.tool_provider},"Provider: ",v.providerName)))));t.MCPToolsDialog=d},58260:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EditFileToolComponent=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importStar(e(14041)),d=e(97267),_=e(41869),v=e(54414),m=e(14162),p=e(87822),s=e(16781),g=e(21967),a=e(56474),h=e(73974),u=n.__importDefault(e(51601)),l=E=>{var f,c,y;const{args:b,messageId:A,toolCallId:S}=E,[w,T]=(0,o.useState)("code"),D=(0,_.useInjectable)(_.LabelService),I=(0,_.useInjectable)(_.AppConfig),O=(0,_.useInjectable)(h.BaseApplyService),M=(0,_.useInjectable)(v.WorkbenchEditorService),{target_file:R="",code_edit:P,instructions:k}=b||{},F=_.path.join(I.workspaceDir,R),[L,B]=(0,o.useState)(O.getCodeBlock(S,A)),j=(0,o.useMemo)(()=>R?`file-icon ${D.getIcon(_.URI.file(F))}`:void 0,[R,F]),W=(0,o.useMemo)(()=>{if(!R)return;const Q=s.StandaloneServices.get(p.IModelService),V=s.StandaloneServices.get(m.ILanguageService);return(0,_.detectModeId)(Q,V,_.Uri.file(F))},[R,F]);(0,o.useEffect)(()=>{const Q=O.onCodeBlockUpdate(V=>{V.toolCallId===S&&B({...V})});return()=>{Q.dispose()}},[]);const U=Q=>{Q.stopPropagation(),T(w==="code"?"diff":"code")};return!b||!L?null:[k&&o.default.createElement("p",{key:"edit-file-tool-instructions"},k),o.default.createElement("div",{className:u.default["edit-file-tool"],key:"edit-file-tool"},o.default.createElement("div",{className:(0,r.default)(u.default["edit-file-tool-header"],{clickable:L.status==="pending"||L.status==="success"}),onClick:()=>{L.status==="pending"?M.open(_.URI.file(F)):L.status==="success"&&O.revealApplyPosition(L)}},o.default.createElement("div",{className:u.default.left},j&&o.default.createElement("span",{className:j}),o.default.createElement("span",{className:u.default["edit-file-tool-file-name"]},R),L.iterationCount>1&&o.default.createElement("span",{className:u.default["edit-file-tool-iteration-count"]},L.iterationCount,"/3"),o.default.createElement(g.ApplyStatus,{status:L.status,error:E.result})),o.default.createElement("div",{className:u.default.right},o.default.createElement(d.Popover,{title:"Show Code",id:"edit-file-tool-show-code"},o.default.createElement(d.Icon,{iconClass:"codicon codicon-file-code",onClick:U})),((f=L.applyResult)===null||f===void 0?void 0:f.diff)&&o.default.createElement(d.Popover,{title:"Show Diff",id:"edit-file-tool-show-diff"},o.default.createElement(d.Icon,{iconClass:"codicon codicon-diff-multiple",onClick:U})))),o.default.createElement(a.ChatMarkdown,{markdown:w==="code"?`\`\`\`${W||""}
31547
+ `).filter(Boolean).reduce(($,Y)=>{const[z,H]=Y.split("=");return z&&H&&($[z.trim()]=H.trim()),$},{});U.args=Q,U.env=V}b({...y,name:"",command:"",url:"",args:[],env:{}}),E(U)},[y,S,T,E,I]),M=(0,o.useCallback)(B=>{b({...y,command:B.target.value})},[y,S]),R=(0,o.useCallback)(B=>{w(B.target.value)},[S]),P=(0,o.useCallback)(B=>{D(B.target.value)},[T]),k=(0,o.useCallback)(B=>{b({...y,url:B.target.value})},[y]),F=(0,o.useCallback)(B=>{b({...y,type:B,command:"",args:[],env:{},url:""})},[y]),L=(0,o.useCallback)(()=>y?.type===g.MCP_SERVER_TYPE.STDIO?o.default.createElement(o.default.Fragment,null,o.default.createElement("div",{className:a.default.formItem},o.default.createElement("label",null,(0,p.localize)("ai.native.mcp.command")),o.default.createElement("input",{type:"text",value:y.command,onChange:M,placeholder:(0,p.localize)("ai.native.mcp.command.placeHolder"),required:!0})),o.default.createElement("div",{className:a.default.formItem},o.default.createElement("label",null,(0,p.localize)("ai.native.mcp.args")),o.default.createElement("textarea",{value:S,onChange:R,placeholder:(0,p.localize)("ai.native.mcp.args.placeHolder"),rows:3})),o.default.createElement("div",{className:a.default.formItem},o.default.createElement("label",null,(0,p.localize)("ai.native.mcp.env")),o.default.createElement("textarea",{value:T,onChange:P,placeholder:(0,p.localize)("ai.native.mcp.env.placeHolder"),rows:3}))):o.default.createElement(o.default.Fragment,null,o.default.createElement("div",{className:a.default.formItem},o.default.createElement("label",null,(0,p.localize)("ai.native.mcp.url")),o.default.createElement("textarea",{value:y.url,onChange:k,placeholder:(0,p.localize)("ai.native.mcp.url.placeHolder"),rows:3}))),[y,S,T]);return o.default.createElement(v.Modal,{title:l?(0,p.localize)("ai.native.mcp.editMCPServer.title"):(0,p.localize)("ai.native.mcp.addMCPServer.title"),visible:u,onCancel:f,centered:!0,width:600,footer:null,style:{background:"var(--editor-background)"}},o.default.createElement("form",{className:a.default.form,onSubmit:B=>B.preventDefault()},o.default.createElement("div",{className:a.default.formRow},o.default.createElement("div",{className:(0,r.default)(a.default.formItem,a.default.formItemName)},o.default.createElement("label",null,(0,p.localize)("ai.native.mcp.name")),o.default.createElement("input",{type:"text",value:y.name,onChange:B=>b({...y,name:B.target.value}),placeholder:(0,p.localize)("ai.native.mcp.name.placeHolder"),required:!0})),o.default.createElement("div",{className:(0,r.default)(a.default.formItem,a.default.formItemType)},o.default.createElement("label",null,(0,p.localize)("ai.native.mcp.type")),o.default.createElement(d.Select,{size:"large",value:y.type,options:[{label:(0,p.localize)("ai.native.mcp.stdio"),value:g.MCP_SERVER_TYPE.STDIO},{label:(0,p.localize)("ai.native.mcp.sse"),value:g.MCP_SERVER_TYPE.SSE}],className:a.default.formItemSelect,onChange:F}))),L(),o.default.createElement("div",{className:a.default.formActions},o.default.createElement(_.Button,{onClick:f,type:"primary",className:a.default.secondaryButton},(0,p.localize)("ai.native.mcp.buttonCancel")),o.default.createElement(_.Button,{onClick:O,type:"primary"},l?(0,p.localize)("ai.native.mcp.buttonUpdate"):(0,p.localize)("ai.native.mcp.buttonSave")))))};t.MCPServerForm=h},27397:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MCPConfigCommandContribution=t.MCPConfigCommands=void 0;const n=e(85608),r=e(76003),o=e(41869),d=e(43718),_=e(54414),v=e(5297),m=e(33108);var p;(function(g){g.OPEN_MCP_CONFIG={id:"mcp.openConfig",label:"Open MCP Configuration"},g.OPEN_MCP_CONFIG_FILE={id:"mcp.openConfigFile",label:"Open MCP Configuration (JSON)"}})(p||(t.MCPConfigCommands=p={}));let s=class{registerCommands(a){a.registerCommand(p.OPEN_MCP_CONFIG,{execute:()=>{const h=new o.URI().withScheme(v.MCP_CONFIG_COMPONENTS_SCHEME_ID);this.editorService.open(h,{preview:!1,focus:!0})}}),a.registerCommand(p.OPEN_MCP_CONFIG_FILE,{execute:()=>{this.mcpConfigService.openConfigFile()}})}};t.MCPConfigCommandContribution=s,n.__decorate([(0,r.Autowired)(_.WorkbenchEditorService),n.__metadata("design:type",_.WorkbenchEditorService)],s.prototype,"editorService",void 0),n.__decorate([(0,r.Autowired)(d.MCPConfigServiceToken),n.__metadata("design:type",m.MCPConfigService)],s.prototype,"mcpConfigService",void 0),t.MCPConfigCommandContribution=s=n.__decorate([(0,d.Domain)(o.CommandContribution)],s)},5297:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MCPConfigContribution=t.MCP_CONFIG_COMPONENTS_SCHEME_ID=void 0;const n=e(85608),r=e(76003),o=e(97267),d=e(93899),_=e(39496),v=e(26542),m=e(43718),p=e(82196),s=e(7443),g=e(10560),a=e(75279),h=e(27397),u="opensumi-mcp-config-viewer";t.MCP_CONFIG_COMPONENTS_SCHEME_ID="mcp-config";let l=class{registerEditorComponent(f){f.registerEditorComponent({uid:u,scheme:t.MCP_CONFIG_COMPONENTS_SCHEME_ID,component:a.MCPConfigView,renderMode:p.EditorComponentRenderMode.ONE_PER_WORKBENCH}),f.registerEditorComponentResolver(t.MCP_CONFIG_COMPONENTS_SCHEME_ID,(c,y)=>{y.push({type:"component",componentId:u})})}registerResource(f){f.registerResourceProvider({scheme:t.MCP_CONFIG_COMPONENTS_SCHEME_ID,provideResource:async c=>{const{configType:y}=c.getParsedQuery();return{uri:c,name:(0,m.localize)("ai.native.mcp.config.title"),icon:(0,o.getIcon)("mcp"),metadata:{configType:y}}}})}registerMenus(f){f.registerMenuItem(_.MenuId.EditorTitle,{command:h.MCPConfigCommands.OPEN_MCP_CONFIG_FILE.id,iconClass:(0,o.getIcon)("open"),group:"navigation",order:4,when:`resourceScheme == ${t.MCP_CONFIG_COMPONENTS_SCHEME_ID}`}),f.registerMenuItem(_.MenuId.EditorTitle,{command:h.MCPConfigCommands.OPEN_MCP_CONFIG.id,iconClass:(0,o.getIcon)("open"),group:"navigation",order:4,when:"resourceFilename =~ /mcp.json/"})}};t.MCPConfigContribution=l,n.__decorate([(0,r.Autowired)(g.IWorkspaceService),n.__metadata("design:type",Object)],l.prototype,"workspaceService",void 0),n.__decorate([(0,r.Autowired)(s.IconService),n.__metadata("design:type",s.IconService)],l.prototype,"iconService",void 0),n.__decorate([(0,r.Autowired)(),n.__metadata("design:type",v.LabelService)],l.prototype,"labelService",void 0),t.MCPConfigContribution=l=n.__decorate([(0,m.Domain)(p.BrowserEditorContribution,d.MenuContribution)],l)},33108:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MCPConfigService=void 0;const n=e(85608),r=e(76003),o=e(41869),d=e(78132),_=e(43718),v=e(54414),m=e(72665),p=e(19413),s=e(64811),g=e(69820),a=e(45331);let h=class extends _.Disposable{constructor(){super(),this.whenReadyDeferred=new _.Deferred,this._isInitialized=!1,this.mcpServersChangeEventEmitter=new _.Emitter,this.init(),this.disposables.push(this.mcpServerProxyService.onChangeMCPServers(()=>{this.fireMCPServersChange()})),this.disposables.push(this.preferenceService.onSpecificPreferenceChange("mcp",()=>{this.fireMCPServersChange()}))}async init(){this.chatStorage=await this.storageProvider(_.STORAGE_NAMESPACE.CHAT),this.whenReadyDeferred.resolve()}get whenReady(){return this.whenReadyDeferred.promise}get isInitialized(){return this._isInitialized}get onMCPServersChange(){return this.mcpServersChangeEventEmitter.event}fireMCPServersChange(l=!1){l&&(this._isInitialized=!0),this.mcpServersChangeEventEmitter.fire(l)}async getServers(){const{value:l,scope:E}=this.preferenceService.resolve("mcp",{mcpServers:[]},void 0);if(E===_.PreferenceScope.Default){const S=(await this.mcpServerProxyService.$getServers()).find(w=>w.name===p.BUILTIN_MCP_SERVER_NAME);return S?[S]:[]}const f=l?.mcpServers.map(A=>{const S=Object.keys(A)[0],w=A[S];return w.url?{name:S,type:g.MCP_SERVER_TYPE.SSE,url:w.url}:{name:S,type:g.MCP_SERVER_TYPE.STDIO,command:w.command,args:w.args,env:w.env}}),c=await this.mcpServerProxyService.$getServers(),y=c.find(A=>A.name===p.BUILTIN_MCP_SERVER_NAME),b=f?.map(A=>{const S=c.find(w=>w.name===A.name);return S||this.sumiMCPServerBackendProxy.$addOrUpdateServer(A),{...A,isStarted:S?.isStarted||!1,tools:S?.tools||[]}});return y&&b.unshift(y),b}async controlServer(l,E){try{E?await this.mcpServerProxyService.$startServer(l):await this.mcpServerProxyService.$stopServer(l);const f=this.chatStorage.get(s.MCPServersEnabledKey,[p.BUILTIN_MCP_SERVER_NAME]),c=new Set(f);E?c.add(l):c.delete(l),this.chatStorage.set(s.MCPServersEnabledKey,Array.from(c))}catch(f){const c=f.message||f;throw this.logger.error(`Failed to ${E?"start":"stop"} server ${l}:`,c),this.messageService.error(c),f}}async saveServer(l,E){await this.whenReady;const{value:f}=this.preferenceService.resolve("mcp",{mcpServers:[]},void 0),c=f.mcpServers,y=c?.findIndex(A=>Object.keys(A)[0]===l?.name);let b;E.type===g.MCP_SERVER_TYPE.SSE?b={[E.name]:{url:E.url}}:b={[E.name]:{command:E.command,args:E.args,env:E.env}},y!==void 0&&y>=0?c[y]=b:c.push(b),await this.sumiMCPServerBackendProxy.$addOrUpdateServer(E),l?.enabled&&await this.sumiMCPServerBackendProxy.$removeServer(l.name),await this.preferenceService.set("mcp",{mcpServers:c})}async deleteServer(l){const{value:E}=this.preferenceService.resolve("mcp",{mcpServers:[]},void 0),f=E?.mcpServers,c=f?.findIndex(y=>Object.keys(y)[0]===l);c!==void 0&&c>=0&&f?.splice(c,1),await this.sumiMCPServerBackendProxy.$removeServer(l),await this.preferenceService.set("mcp",{mcpServers:f})}async syncServer(l){await this.sumiMCPServerBackendProxy.$syncServer(l)}async getServerConfigByName(l){const{value:E}=this.preferenceService.resolve("mcp",{mcpServers:[]},void 0);await this.whenReady;const f=this.chatStorage.get(s.MCPServersEnabledKey,[p.BUILTIN_MCP_SERVER_NAME]),c=E?.mcpServers,y=c?.find(b=>Object.keys(b)[0]===l);if(y)return y[l].url?{name:l,type:g.MCP_SERVER_TYPE.SSE,url:y[l].url,enabled:f.includes(l)}:{name:l,type:g.MCP_SERVER_TYPE.STDIO,command:y[l].command,args:y[l].args,env:y[l].env,enabled:f.includes(l)}}getReadableServerType(l){switch(l){case g.MCP_SERVER_TYPE.STDIO:return(0,_.localize)("ai.native.mcp.type.stdio");case g.MCP_SERVER_TYPE.SSE:return(0,_.localize)("ai.native.mcp.type.sse");case g.MCP_SERVER_TYPE.BUILTIN:return(0,_.localize)("ai.native.mcp.type.builtin");default:return l}}async openConfigFile(){let l=this.preferenceService.resolve("mcp",{mcpServers:[]},void 0);l.scope===_.PreferenceScope.Default&&(await this.preferenceService.set("mcp",{mcpServers:[]},_.PreferenceScope.Workspace),l=this.preferenceService.resolve("mcp",{mcpServers:[]},void 0));const E=l.configUri;E&&this.workbenchEditorService.open(E,{preview:!1})}};t.MCPConfigService=h,n.__decorate([(0,r.Autowired)(p.SumiMCPServerProxyServicePath),n.__metadata("design:type",Object)],h.prototype,"sumiMCPServerBackendProxy",void 0),n.__decorate([(0,r.Autowired)(a.MCPServerProxyService),n.__metadata("design:type",a.MCPServerProxyService)],h.prototype,"mcpServerProxyService",void 0),n.__decorate([(0,r.Autowired)(d.PreferenceService),n.__metadata("design:type",Object)],h.prototype,"preferenceService",void 0),n.__decorate([(0,r.Autowired)(m.IMessageService),n.__metadata("design:type",Object)],h.prototype,"messageService",void 0),n.__decorate([(0,r.Autowired)(_.StorageProvider),n.__metadata("design:type",Function)],h.prototype,"storageProvider",void 0),n.__decorate([(0,r.Autowired)(v.WorkbenchEditorService),n.__metadata("design:type",v.WorkbenchEditorService)],h.prototype,"workbenchEditorService",void 0),n.__decorate([(0,r.Autowired)(o.ILogger),n.__metadata("design:type",Object)],h.prototype,"logger",void 0),t.MCPConfigService=h=n.__decorate([(0,r.Injectable)(),n.__metadata("design:paramtypes",[])],h)},33368:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MCPFolderPreferenceProvider=void 0;const n=e(85608),r=e(76003),o=e(91825);let d=class extends o.FolderFilePreferenceProvider{parse(v){const m=super.parse(v);if(m!==void 0)return{mcp:{...m}}}getPath(v){if(v==="mcp")return[];if(v.startsWith("mcp."))return[v.substr(4)]}};t.MCPFolderPreferenceProvider=d,t.MCPFolderPreferenceProvider=d=n.__decorate([(0,r.Injectable)()],d)},55003:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MCPPreferencesContribution=t.MCPResourceProvider=void 0;const n=e(85608),r=e(76003),o=e(41869),d=e(57517),_=e(924);let v=class{provideResource(s){return{supportsRevive:!0,name:(0,o.localize)("menu-bar.title.debug"),icon:(0,o.getIcon)("debug"),uri:s}}provideResourceSubname(){return null}async shouldCloseResource(){return!0}};t.MCPResourceProvider=v,t.MCPResourceProvider=v=n.__decorate([(0,r.Injectable)()],v);let m=class{constructor(){this.schema=_.MCPPreferencesSchema,this.name="mcp"}registerResource(s){s.registerResourceProvider(this.prefResourceProvider)}registerSchema(s){s.registerSchema(_.MCPSchemaUri,_.MCPSchema,["mcp.json"])}};t.MCPPreferencesContribution=m,n.__decorate([(0,r.Autowired)(v),n.__metadata("design:type",v)],m.prototype,"prefResourceProvider",void 0),t.MCPPreferencesContribution=m=n.__decorate([(0,o.Domain)(o.PreferenceContribution,o.PreferenceConfiguration,d.BrowserEditorContribution,o.JsonSchemaContribution)],m)},924:(x,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MCPSchema=t.MCPPreferencesSchema=t.MCPSchemaUri=void 0,t.MCPSchemaUri="vscode://schemas/mcp/user",t.MCPPreferencesSchema={type:"object",scope:"resource",properties:{mcp:{$ref:t.MCPSchemaUri,description:"MCP configuration for Workspace.",defaultValue:{mcpServers:[]}}}},t.MCPSchema={$id:t.MCPSchemaUri,type:"object",title:"MCP",required:[],default:{mcpServers:[]},properties:{mcpServers:{type:"array",description:"List of MCP Servers. Add new servers or edit existing ones by using IntelliSense.",items:{type:"object",properties:{command:{type:"string",description:"The command to start the MCP server."},args:{type:"array",description:"The arguments for the command to start the MCP server."},env:{type:"object",description:"The environment variables for the command to start the MCP server."},url:{type:"string",description:"The SSE URL for the MCP server."}}}}}}},45331:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MCPServerProxyService=void 0;const n=e(85608),r=e(48085),o=e(76003),d=e(41869),_=e(43718),v=e(19413),m=e(77633);let p=class{constructor(){this._onChangeMCPServers=new _.Emitter,this.onChangeMCPServers=this._onChangeMCPServers.event}$callMCPTool(g,a){return this.mcpServerRegistry.callMCPTool(g,a)}async $getBuiltinMCPTools(){const g=await this.mcpServerRegistry.getMCPTools().map(a=>({name:a.name,description:a.description,inputSchema:(0,r.zodToJsonSchema)(a.inputSchema),providerName:v.BUILTIN_MCP_SERVER_NAME}));return this.logger.log("SUMI MCP tools",g),g}async $updateMCPServers(){this._onChangeMCPServers.fire("update")}async getAllMCPTools(){return this.sumiMCPServerProxyService.$getAllMCPTools()}async $getServers(){return this.sumiMCPServerProxyService.$getServers()}async $startServer(g){await this.sumiMCPServerProxyService.$startServer(g)}async $stopServer(g){await this.sumiMCPServerProxyService.$stopServer(g)}};t.MCPServerProxyService=p,n.__decorate([(0,o.Autowired)(m.TokenMCPServerRegistry),n.__metadata("design:type",Object)],p.prototype,"mcpServerRegistry",void 0),n.__decorate([(0,o.Autowired)(d.ILogger),n.__metadata("design:type",Object)],p.prototype,"logger",void 0),n.__decorate([(0,o.Autowired)(v.SumiMCPServerProxyServicePath),n.__metadata("design:type",Object)],p.prototype,"sumiMCPServerProxyService",void 0),t.MCPServerProxyService=p=n.__decorate([(0,o.Injectable)()],p)},79502:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MCPServerRegistry=void 0;const n=e(85608),r=e(76003),o=e(43718),d=e(19413),_=e(98864);class v{constructor(s){this.logger=s}appendLine(s){this.logger.log(s)}}let m=class{constructor(){this.tools=[],this.toolComponents={}}get logger(){return new v(this.baseLogger)}set activeMessageInfo(s){this._activeMessageInfo=s}getMCPTool(s,g=d.BUILTIN_MCP_SERVER_NAME){return this.tools.find(a=>(0,_.getToolName)(a.name,g)===s)}registerMCPTool(s){this.tools.push(s)}registerToolComponent(s,g,a=d.BUILTIN_MCP_SERVER_NAME){this.toolComponents[(0,_.getToolName)(s,a)]=g}getToolComponent(s){return this.toolComponents[s]}getMCPTools(){return this.tools.sort((s,g)=>{var a,h;return((a=s.order)!==null&&a!==void 0?a:1/0)-((h=g.order)!==null&&h!==void 0?h:1/0)})}async callMCPTool(s,g){try{const a=this.tools.find(l=>l.name===s);if(!a)throw new Error(`MCP tool ${s} not found`);const h=g.toolCallId;g=a.inputSchema.parse(g);const u=await a.handler({...g,toolCallId:h},this.logger);return this.reportToolCall(s,g,u,h),u}catch(a){return console.error("callMCPTool error:",a),this.reportToolCall(s,g,a,g.toolCallId),{content:[{type:"text",text:`The tool ${s} failed to execute. Error: ${a}`}],isError:!0}}}reportToolCall(s,g,a,h){if(!this.tools.find(l=>l.name===s))throw new Error(`MCP tool ${s} not found`);this.aiReporter.send({msgType:o.AIServiceType.ToolCall,message:JSON.stringify({args:g,name:s,result:a}),messageId:this._activeMessageInfo.messageId,sessionId:this._activeMessageInfo.sessionId,relationId:h})}};t.MCPServerRegistry=m,n.__decorate([(0,r.Autowired)(o.ILogger),n.__metadata("design:type",Object)],m.prototype,"baseLogger",void 0),n.__decorate([(0,r.Autowired)(o.IAIReporter),n.__metadata("design:type",Object)],m.prototype,"aiReporter",void 0),t.MCPServerRegistry=m=n.__decorate([(0,r.Injectable)()],m)},30703:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MCPToolsDialog=void 0;const n=e(85608),r=n.__importStar(e(14041)),o=n.__importDefault(e(49783)),d=({tools:_})=>r.createElement("div",{className:o.default.mcp_tools_dialog},r.createElement("div",{className:o.default.dialog_title},"MCP Tools"),r.createElement("div",{className:o.default.tools_list},_.map(v=>r.createElement("div",{key:v.name,className:o.default.tool_item},r.createElement("div",{className:o.default.tool_name},v.name),r.createElement("div",{className:o.default.tool_description},v.description),v.providerName&&r.createElement("div",{className:o.default.tool_provider},"Provider: ",v.providerName)))));t.MCPToolsDialog=d},58260:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EditFileToolComponent=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importStar(e(14041)),d=e(97267),_=e(41869),v=e(54414),m=e(14162),p=e(87822),s=e(16781),g=e(21967),a=e(56474),h=e(73974),u=n.__importDefault(e(51601)),l=E=>{var f,c,y;const{args:b,messageId:A,toolCallId:S}=E,[w,T]=(0,o.useState)("code"),D=(0,_.useInjectable)(_.LabelService),I=(0,_.useInjectable)(_.AppConfig),O=(0,_.useInjectable)(h.BaseApplyService),M=(0,_.useInjectable)(v.WorkbenchEditorService),{target_file:R="",code_edit:P,instructions:k}=b||{},F=_.path.join(I.workspaceDir,R),[L,B]=(0,o.useState)(O.getCodeBlock(S,A)),j=(0,o.useMemo)(()=>R?`file-icon ${D.getIcon(_.URI.file(F))}`:void 0,[R,F]),W=(0,o.useMemo)(()=>{if(!R)return;const Q=s.StandaloneServices.get(p.IModelService),V=s.StandaloneServices.get(m.ILanguageService);return(0,_.detectModeId)(Q,V,_.Uri.file(F))},[R,F]);(0,o.useEffect)(()=>{const Q=O.onCodeBlockUpdate(V=>{V.toolCallId===S&&B({...V})});return()=>{Q.dispose()}},[]);const U=Q=>{Q.stopPropagation(),T(w==="code"?"diff":"code")};return!b||!L?null:[k&&o.default.createElement("p",{key:"edit-file-tool-instructions"},k),o.default.createElement("div",{className:u.default["edit-file-tool"],key:"edit-file-tool"},o.default.createElement("div",{className:(0,r.default)(u.default["edit-file-tool-header"],{clickable:L.status==="pending"||L.status==="success"}),onClick:()=>{L.status==="pending"?M.open(_.URI.file(F)):L.status==="success"&&O.revealApplyPosition(L)}},o.default.createElement("div",{className:u.default.left},j&&o.default.createElement("span",{className:j}),o.default.createElement("span",{className:u.default["edit-file-tool-file-name"]},R),L.iterationCount>1&&o.default.createElement("span",{className:u.default["edit-file-tool-iteration-count"]},L.iterationCount,"/3"),o.default.createElement(g.ApplyStatus,{status:L.status,error:E.result})),o.default.createElement("div",{className:u.default.right},o.default.createElement(d.Popover,{title:"Show Code",id:"edit-file-tool-show-code"},o.default.createElement(d.Icon,{iconClass:"codicon codicon-file-code",onClick:U})),((f=L.applyResult)===null||f===void 0?void 0:f.diff)&&o.default.createElement(d.Popover,{title:"Show Diff",id:"edit-file-tool-show-diff"},o.default.createElement(d.Icon,{iconClass:"codicon codicon-diff-multiple",onClick:U})))),o.default.createElement(a.ChatMarkdown,{markdown:w==="code"?`\`\`\`${W||""}
31548
31548
  ${P}
31549
31549
  \`\`\``:`\`\`\`diff
31550
31550
  ${(c=L.applyResult)===null||c===void 0?void 0:c.diff}
@@ -31902,7 +31902,7 @@ Run with Automatic Debug Configurations
31902
31902
  {1}
31903
31903
 
31904
31904
  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 anything, @ to mention","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.chat.defaultContextFile":"Current File","aiNative.chat.defaultContextFolder":"Current Folder","aiNative.chat.thinking":"Deep Think","aiNative.chat.imageUpload":"Upload Image","aiNative.chat.clearContext":"Clear Context","aiNative.chat.context.description":"Total {0} References","aiNative.chat.context.clear":"Clear References","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
31905
- 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","aiNative.inlineDiff.reveal":"Reveal In Chat","aiNative.inlineDiff.up":"Previous Change","aiNative.inlineDiff.down":"Next Change","aiNative.inlineDiff.right":"Next File","aiNative.inlineDiff.left":"Previous File","aiNative.inlineDiff.noMoreChangesUp":"No more changes above","aiNative.inlineDiff.noMoreChangesDown":"No more changes below","aiNative.chat.session.max":"You can only create {0} chats at a time","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,...d.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.contextWindow":"Context Window","preference.ai.native.contextWindow.description":"The maximum number of tokens in the context window","preference.ai.native.maxTokens":"Maximum Output Tokens","preference.ai.native.maxTokens.description":"The maximum number of tokens in the output","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","ai.native.mcp.name":"Name:","ai.native.mcp.command":"Command:","ai.native.mcp.args":"Arguments:","ai.native.mcp.env":"Environment Variables:","ai.native.mcp.type":"Type:","ai.native.mcp.stdio":"Command","ai.native.mcp.sse":"SSE","ai.native.mcp.buttonSave":"Add","ai.native.mcp.buttonUpdate":"Update","ai.native.mcp.buttonCancel":"Cancel","ai.native.mcp.addMCPServer.title":"Add MCP Server","ai.native.mcp.editMCPServer.title":"Edit MCP Server","ai.native.mcp.serverHost.placeHolder":"URL to SSE endpoint","ai.native.mcp.command.placeHolder":"Command to execute","ai.native.mcp.args.placeHolder":"Arguments","ai.native.mcp.env.placeHolder":"KEY=value (one per line)","ai.native.mcp.name.placeHolder":"Server Name","ai.native.mcp.type.builtin":"Built-in","ai.native.mcp.type.sse":"SSE","ai.native.mcp.type.stdio":"Command","ai.native.mcp.serverNameExists":'Server name "{0}" already exists',"ai.native.mcp.name.isRequired":"Server name is required","ai.native.mcp.command.isRequired":"Command is required","ai.native.mcp.serverHost.isRequired":"SSE URL is required","ai.native.mcp.manage.connections":"Manage your MCP server connections","ai.native.mcp.enabled":"Enabled","ai.native.mcp.disabled":"Disabled","ai.native.mcp.enable.title":"Start this service","ai.native.mcp.disable.title":"Stop this service","ai.native.mcp.config.title":"MCP Configuration","ai.native.mcp.tool.arguments":"Arguments","ai.native.mcp.tool.results":"Result","ai.native.mcp.tool.action.edit":"Edit","ai.native.mcp.tool.action.delete":"Delete","ai.native.mcp.tool.action.sync":"Sync"}}},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),d=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?
31905
+ 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","aiNative.inlineDiff.reveal":"Reveal In Chat","aiNative.inlineDiff.up":"Previous Change","aiNative.inlineDiff.down":"Next Change","aiNative.inlineDiff.right":"Next File","aiNative.inlineDiff.left":"Previous File","aiNative.inlineDiff.noMoreChangesUp":"No more changes above","aiNative.inlineDiff.noMoreChangesDown":"No more changes below","aiNative.chat.session.max":"You can only create {0} chats at a time","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,...d.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.contextWindow":"Context Window","preference.ai.native.contextWindow.description":"The maximum number of tokens in the context window","preference.ai.native.maxTokens":"Maximum Output Tokens","preference.ai.native.maxTokens.description":"The maximum number of tokens in the output","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","ai.native.mcp.name":"Name:","ai.native.mcp.command":"Command:","ai.native.mcp.args":"Arguments:","ai.native.mcp.env":"Environment Variables:","ai.native.mcp.type":"Type:","ai.native.mcp.stdio":"Command","ai.native.mcp.sse":"SSE","ai.native.mcp.buttonSave":"Add","ai.native.mcp.buttonUpdate":"Update","ai.native.mcp.buttonCancel":"Cancel","ai.native.mcp.addMCPServer.title":"Add MCP Server","ai.native.mcp.editMCPServer.title":"Edit MCP Server","ai.native.mcp.url.placeHolder":"URL to SSE endpoint","ai.native.mcp.command.placeHolder":"Command to execute","ai.native.mcp.args.placeHolder":"Arguments","ai.native.mcp.env.placeHolder":"KEY=value (one per line)","ai.native.mcp.name.placeHolder":"Server Name","ai.native.mcp.type.builtin":"Built-in","ai.native.mcp.type.sse":"SSE","ai.native.mcp.type.stdio":"Command","ai.native.mcp.serverNameExists":'Server name "{0}" already exists',"ai.native.mcp.name.isRequired":"Server name is required","ai.native.mcp.command.isRequired":"Command is required","ai.native.mcp.url.isRequired":"SSE URL is required","ai.native.mcp.manage.connections":"Manage your MCP server connections","ai.native.mcp.enabled":"Enabled","ai.native.mcp.disabled":"Disabled","ai.native.mcp.enable.title":"Start this service","ai.native.mcp.disable.title":"Stop this service","ai.native.mcp.config.title":"MCP Configuration","ai.native.mcp.tool.arguments":"Arguments","ai.native.mcp.tool.results":"Result","ai.native.mcp.tool.action.edit":"Edit","ai.native.mcp.tool.action.delete":"Delete","ai.native.mcp.tool.action.sync":"Sync"}}},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),d=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?
31906
31906
  {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
31907
31907
 
31908
31908
  - \u4F7F\u7528 0 \u6839\u636E\u5B57\u53F7\u81EA\u52A8\u8BA1\u7B97\u884C\u9AD8\u3002
@@ -31923,7 +31923,7 @@ your modifications. Are you sure to regenerate?`,"aiNative.resolve.conflict.mess
31923
31923
  {1}
31924
31924
 
31925
31925
  \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\u8F93\u5165 @ \u53EF\u5F15\u7528\u5185\u5BB9","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.chat.defaultContextFile":"\u5F53\u524D\u6587\u4EF6","aiNative.chat.defaultContextFolder":"\u5F53\u524D\u6587\u4EF6\u5939","aiNative.chat.thinking":"\u6DF1\u5EA6\u601D\u8003","aiNative.chat.imageUpload":"\u4E0A\u4F20\u56FE\u7247","aiNative.chat.clearContext":"\u6E05\u7A7A\u4E0A\u4E0B\u6587","aiNative.chat.context.description":"\u5171 {0} \u4E2A\u5F15\u7528","aiNative.chat.context.clear":"\u70B9\u51FB\u6E05\u7A7A\u5F15\u7528","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
31926
- \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","aiNative.inlineDiff.reveal":"\u5728\u804A\u5929\u4E2D\u5C55\u793A","aiNative.inlineDiff.up":"\u4E0A\u4E00\u5904\u53D8\u66F4","aiNative.inlineDiff.down":"\u4E0B\u4E00\u5904\u53D8\u66F4","aiNative.inlineDiff.right":"\u4E0B\u4E00\u5904\u6587\u4EF6","aiNative.inlineDiff.left":"\u4E0A\u4E00\u5904\u6587\u4EF6","aiNative.inlineDiff.noMoreChangesUp":"\u9876\u90E8\u6CA1\u6709\u66F4\u591A\u53D8\u66F4\u4E86","aiNative.inlineDiff.noMoreChangesDown":"\u5E95\u90E8\u6CA1\u6709\u66F4\u591A\u53D8\u66F4\u4E86","aiNative.chat.session.max":"\u6700\u591A\u53EA\u80FD\u521B\u5EFA {0} \u4E2A\u804A\u5929","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,...d.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.contextWindow":"\u4E0A\u4E0B\u6587\u7A97\u53E3","preference.ai.native.contextWindow.description":"\u4E0A\u4E0B\u6587\u7A97\u53E3\u7684\u6700\u5927Token\u6570","preference.ai.native.maxTokens":"\u6700\u5927\u8F93\u51FA","preference.ai.native.maxTokens.description":"\u6700\u5927\u8F93\u51FAToken\u6570","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","ai.native.mcp.name":"\u540D\u79F0:","ai.native.mcp.command":"\u547D\u4EE4:","ai.native.mcp.args":"\u53C2\u6570:","ai.native.mcp.env":"\u73AF\u5883\u53D8\u91CF:","ai.native.mcp.type":"\u7C7B\u578B:","ai.native.mcp.stdio":"Command","ai.native.mcp.sse":"SSE","ai.native.mcp.buttonSave":"\u6DFB\u52A0","ai.native.mcp.buttonUpdate":"\u66F4\u65B0","ai.native.mcp.buttonCancel":"\u53D6\u6D88","ai.native.mcp.addMCPServer.title":"\u6DFB\u52A0 MCP \u670D\u52A1\u5668","ai.native.mcp.editMCPServer.title":"\u7F16\u8F91 MCP \u670D\u52A1\u5668","ai.native.mcp.serverHost.placeHolder":"\u8F93\u5165 SSE URL","ai.native.mcp.command.placeHolder":"\u8F93\u5165\u547D\u4EE4","ai.native.mcp.args.placeHolder":"\u8FD0\u884C\u53C2\u6570","ai.native.mcp.env.placeHolder":"KEY=value\uFF08\u6BCF\u884C\u4E00\u4E2A\uFF09","ai.native.mcp.name.placeHolder":"\u670D\u52A1\u5668\u540D\u79F0","ai.native.mcp.type.builtin":"\u5185\u7F6E","ai.native.mcp.type.sse":"SSE","ai.native.mcp.type.stdio":"\u547D\u4EE4","ai.native.mcp.serverNameExists":'\u670D\u52A1\u540D\u79F0 "{0}" \u5DF2\u5B58\u5728',"ai.native.mcp.name.isRequired":"\u670D\u52A1\u540D\u79F0\u4E0D\u80FD\u4E3A\u7A7A","ai.native.mcp.command.isRequired":"\u547D\u4EE4\u4E0D\u80FD\u4E3A\u7A7A","ai.native.mcp.serverHost.isRequired":"SSE URL \u4E0D\u80FD\u4E3A\u7A7A","ai.native.mcp.manage.connections":"\u7BA1\u7406\u4F60\u7684 MCP \u670D\u52A1\u5668\u8FDE\u63A5","ai.native.mcp.enabled":"\u5DF2\u542F\u7528","ai.native.mcp.disabled":"\u5DF2\u7981\u7528","ai.native.mcp.enable.title":"\u542F\u52A8\u8BE5\u670D\u52A1","ai.native.mcp.disable.title":"\u505C\u6B62\u8BE5\u670D\u52A1","ai.native.mcp.config.title":"MCP \u914D\u7F6E","ai.native.mcp.tool.arguments":"\u53C2\u6570","ai.native.mcp.tool.results":"\u8FD4\u56DE","ai.native.mcp.tool.action.edit":"\u4FEE\u6539","ai.native.mcp.tool.action.delete":"\u5220\u9664","ai.native.mcp.tool.action.sync":"\u540C\u6B65"}}},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),d=e(25067),_=e(48644),v=e(85448);let m=class extends o.BrowserModule{constructor(){super(...arguments),this.providers=[{token:d.IKeymapService,useClass:v.KeymapService},_.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)),d=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 _=class{constructor(){this.validate=new r.default({jsonPointers:!0}).compile(t.keymapsSchema)}parse(m,p){const s=o.stripComments(m),g=p?[]:void 0,a=o.parse(s,g);if(g&&p)for(const h of g)p.push(`${this.printParseErrorCode(h.error)} at ${h.offset} offset of ${h.length} length`);if(this.validate(a))return a;if(p&&this.validate.errors)for(const h of this.validate.errors)p.push(`${h.message} at ${h.dataPath}`);return[]}printParseErrorCode(m){return o.printParseErrorCode(m)}};t.KeymapsParser=_,t.KeymapsParser=_=n.__decorate([(0,d.Injectable)(),n.__metadata("design:paramtypes",[])],_)},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),d=e(93899),_=e(57517),v=e(42933),m=e(97821),p=e(25067),s=e(34879),g="keymaps-preview";let a=class extends o.WithEventBus{constructor(){super(),this.scheme=p.KEYMAPS_SCHEME}provideResource(f){return{supportsRevive:!0,name:(0,o.localize)("keymaps.tab.name"),icon:(0,o.getIcon)("setting"),uri:f}}provideResourceSubname(f,c){return null}async shouldCloseResource(f,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 f="keymaps";E.OPEN_SOURCE_FILE={id:"keymaps.open.source",label:"%keymaps.editorTitle.openSource%",category:f}})(u||(t.KEYMAP_COMMANDS=u={}));let l=class{registerCommands(f){f.registerCommand(o.COMMON_COMMANDS.OPEN_KEYMAPS,{isEnabled:()=>!0,execute:async()=>{await this.keymapService.open()}}),f.registerCommand(u.OPEN_SOURCE_FILE,{execute:async()=>{this.keymapService.openResource()}}),f.registerCommand(o.KEYBOARD_COMMANDS.CHOOSE_KEYBOARD_LAYOUT,{execute:()=>{this.chooseLayout()}})}registerMenus(f){f.registerMenuItem(d.MenuId.SettingsIconMenu,{command:o.COMMON_COMMANDS.OPEN_KEYMAPS.id,group:h.KEYMAPS}),f.registerMenuItem(d.MenuId.EditorTitle,{command:u.OPEN_SOURCE_FILE.id,iconClass:(0,o.getIcon)("open"),group:"navigation",order:4,when:`resourceScheme == ${p.KEYMAPS_SCHEME}`}),f.registerMenuItem(d.MenuId.EditorTitle,{command:o.COMMON_COMMANDS.OPEN_KEYMAPS.id,iconClass:(0,o.getIcon)("open"),group:"navigation",order:4,when:"resourceFilename =~ /keymaps.json/"})}registerKeybindings(f){f.registerKeybinding({command:o.COMMON_COMMANDS.OPEN_KEYMAPS.id,keybinding:"ctrlcmd+K ctrlcmd+S"})}onStart(){this.keymapService.init()}registerResource(f){f.registerResourceProvider(this.keymapsResourceProvider)}registerEditorComponent(f){f.registerEditorComponent({component:s.KeymapsView,uid:g,scheme:p.KEYMAPS_SCHEME}),f.registerEditorComponentResolver(p.KEYMAPS_SCHEME,(c,y,b)=>{b([{type:_.EditorOpenType.component,componentId:g}])})}async chooseLayout(){const f=this.layoutProvider.currentLayoutData,c={label:(0,o.localize)("keyboard.autoDetect.label"),description:f&&this.layoutProvider.currentLayoutSource!=="user-choice"?(0,o.formatLocalize)("keyboard.autoDetect.description",(0,o.getKeyboardLayoutId)(f.layout)):void 0,detail:(0,o.localize)("keyboard.autoDetect.detail"),value:"autodetect"},y=this.layoutProvider.allLayoutData.map(S=>this.toQuickPickValue(S,f===S));let b;b=[c,...y];const A=await this.quickPickService.show(b,{placeholder:"Choose a keyboard layout"});if(A)return this.layoutProvider.setLayoutData(A)}toQuickPickValue(f,c){return{label:(0,o.getKeyboardLayoutId)(f.layout),value:f}}};t.KeymapsContribution=l,n.__decorate([(0,r.Autowired)(m.QuickPickService),n.__metadata("design:type",Object)],l.prototype,"quickPickService",void 0),n.__decorate([(0,r.Autowired)(o.KeyboardNativeLayoutService),n.__metadata("design:type",Object)],l.prototype,"layoutProvider",void 0),n.__decorate([(0,r.Autowired)(v.IFileServiceClient),n.__metadata("design:type",Object)],l.prototype,"filesystem",void 0),n.__decorate([(0,r.Autowired)(a),n.__metadata("design:type",a)],l.prototype,"keymapsResourceProvider",void 0),n.__decorate([(0,r.Autowired)(p.IKeymapService),n.__metadata("design:type",Object)],l.prototype,"keymapService",void 0),t.KeymapsContribution=l=n.__decorate([(0,o.Domain)(o.CommandContribution,o.KeybindingContribution,o.ClientAppContribution,_.BrowserEditorContribution,d.MenuContribution)],l)},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)),d=e(76003),_=e(41869),v=e(68969),m=e(14951),p=e(25067),s=e(2312);let g=n=class{constructor(){this.keymapChangeEmitter=new _.Emitter,this.convertKeySequence=[],this.toUnregisterUserKeybindingMap=new Map,this.toRestoreDefaultKeybindingMap=new Map,this.searchDelayer=new _.ThrottledDelayer(n.DEFAULT_SEARCH_DELAY),this.disposableCollection=new _.DisposableCollection,this._whenReadyDeferred=new _.Deferred,this.fuzzyOptions={pre:"<match>",post:"</match>"},this.reconcileQueue=new _.Throttler,this.keybindings=[],this.updateKeybindings=()=>{this.currentSearchValue?this.doSearchKeybindings(this.currentSearchValue):(0,_.runWhenIdle)(()=>{this.keybindings=this.getKeybindingItems(),this.keymapChangeEmitter.fire(this.keybindings)})},this.setKeybinding=(h,u)=>this.progressService.withProgress({location:_.ProgressLocation.Notification},l=>new Promise((E,f)=>{l.report({message:(0,_.localize)("keymaps.keybinding.loading"),increment:0,total:100});const c=this.storeKeybindings||[];let y=!1;for(const b of c){const A={when:b.when,command:b.command,keybinding:b.key};if(b.command===u.command){y=!0,this.unregisterUserKeybinding(A);const S=this.toUniqueKey(h),w=this.toRestoreDefaultKeybindingMap.get(S);if(w){const T=this.toUniqueKey(u);this.toRestoreDefaultKeybindingMap.delete(S),this.toRestoreDefaultKeybindingMap.set(T,w)}b.key=u.keybinding,this.registerUserKeybinding({...A,priority:_.KeybindingWeight.WorkbenchContrib*100})}}if(!y){const b=this.keybindings.find(S=>S.id===u.command&&this.getRaw(S.when)===u.when);if(b&&b.keybinding){this.unregisterDefaultKeybinding({when:this.getRaw(b.when),command:b.id,keybinding:this.getRaw(b.keybinding)});const S=this.toUniqueKey(h),w=this.toRestoreDefaultKeybindingMap.get(S);if(w){const T=this.toUniqueKey(u);this.toRestoreDefaultKeybindingMap.delete(S),this.toRestoreDefaultKeybindingMap.set(T,w)}}const A={when:this.getWhen(u),command:u.command,key:u.keybinding};c.push(A),this.registerUserKeybinding(u)}return this.saveKeybinding(c).then(()=>{E(void 0),l.report({message:(0,_.localize)("keymaps.keybinding.success"),increment:99})}).catch(b=>{f(b),l.report({message:(0,_.localize)("keymaps.keybinding.fail"),increment:99})}).finally(()=>{setTimeout(()=>{l.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 l=this.storeKeybindings.filter(E=>E.command!==h.command);return this.unregisterUserKeybinding(h),this.restoreDefaultKeybinding(h),this.saveKeybinding(l)},this.fixed=async()=>{this.commandService.executeCommand(_.EDITOR_COMMANDS.OPEN_RESOURCE.id,new _.URI().withScheme(p.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(),l=[];u.forEach(E=>{const f=["id","command","keybinding","when","context","source"];let c=!1;for(const y of f){const b=E[y];if(b){const A=o.match(h,b,this.fuzzyOptions);if(A)E[y]=A.rendered,c=!0;else if(y==="keybinding"){const S=h.split("+"),w=b.split(" "),T=[0];let D=[];w.length>1?w.forEach(M=>{const R=M.split("+");T.push(R.length+T[-1]),D.push(...R)}):D=b.split("+"),T.shift();const I=[...D];let O=0;if(S.forEach(M=>{let R={rendered:"",score:0},P=-1;if(b){D.forEach(F=>{const L=o.match(M,F,this.fuzzyOptions);L&&L.score>R.score&&(R=L,P=I.indexOf(F))});const k=R.rendered;k&&(P>-1&&(I[P]=k),D.splice(P,1,""),O+=1)}}),O===S.length){if(T.length>0){const M="";I.forEach((R,P)=>{P===0?M.concat(R):T.indexOf(P)!==-1?M.concat(" "+R):M.concat("+"+R)}),E[y]=M}E[y]=I.join("+"),c=!0}}}}c&&l.push(E)}),this.keybindings=l,this.keymapChangeEmitter.fire(this.keybindings)},this.validateKeybinding=(h,u)=>{if(!u)return(0,_.localize)("keymaps.keybinding.require");try{const l={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(l)}catch(l){return l}},this.detectKeybindings=(h,u)=>{if(!u)return[];try{if(h.keybinding===u)return[];const l=this.keybindings.filter(E=>this.getRaw(E.keybinding)===u);if(l.length>0)return l.map(E=>{const f=this.commandRegistry.getCommand(this.getRaw(E.command)),c=this.storeKeybindings.find(y=>f&&y.command===f.id);return E.when=this.getRaw(E.when),E.keybinding=this.getRaw(E.keybinding),{id:f?f.id:this.getRaw(E.command),command:(f?f.label||f.id:E.command)||"",when:this.keybindingService.convertMonacoWhen(E.when),keybinding:this.getRaw(E.keybinding),source:c?this.getScope(_.KeybindingScope.USER):this.getScope(_.KeybindingScope.DEFAULT)}})}catch(l){this.logger.error(l)}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 l=await this.filesystem.createFile(h),E=await this.filesystem.setContent(l,`{
31926
+ \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","aiNative.inlineDiff.reveal":"\u5728\u804A\u5929\u4E2D\u5C55\u793A","aiNative.inlineDiff.up":"\u4E0A\u4E00\u5904\u53D8\u66F4","aiNative.inlineDiff.down":"\u4E0B\u4E00\u5904\u53D8\u66F4","aiNative.inlineDiff.right":"\u4E0B\u4E00\u5904\u6587\u4EF6","aiNative.inlineDiff.left":"\u4E0A\u4E00\u5904\u6587\u4EF6","aiNative.inlineDiff.noMoreChangesUp":"\u9876\u90E8\u6CA1\u6709\u66F4\u591A\u53D8\u66F4\u4E86","aiNative.inlineDiff.noMoreChangesDown":"\u5E95\u90E8\u6CA1\u6709\u66F4\u591A\u53D8\u66F4\u4E86","aiNative.chat.session.max":"\u6700\u591A\u53EA\u80FD\u521B\u5EFA {0} \u4E2A\u804A\u5929","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,...d.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.contextWindow":"\u4E0A\u4E0B\u6587\u7A97\u53E3","preference.ai.native.contextWindow.description":"\u4E0A\u4E0B\u6587\u7A97\u53E3\u7684\u6700\u5927Token\u6570","preference.ai.native.maxTokens":"\u6700\u5927\u8F93\u51FA","preference.ai.native.maxTokens.description":"\u6700\u5927\u8F93\u51FAToken\u6570","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","ai.native.mcp.name":"\u540D\u79F0:","ai.native.mcp.command":"\u547D\u4EE4:","ai.native.mcp.args":"\u53C2\u6570:","ai.native.mcp.env":"\u73AF\u5883\u53D8\u91CF:","ai.native.mcp.type":"\u7C7B\u578B:","ai.native.mcp.stdio":"Command","ai.native.mcp.sse":"SSE","ai.native.mcp.buttonSave":"\u6DFB\u52A0","ai.native.mcp.buttonUpdate":"\u66F4\u65B0","ai.native.mcp.buttonCancel":"\u53D6\u6D88","ai.native.mcp.addMCPServer.title":"\u6DFB\u52A0 MCP \u670D\u52A1\u5668","ai.native.mcp.editMCPServer.title":"\u7F16\u8F91 MCP \u670D\u52A1\u5668","ai.native.mcp.url.placeHolder":"\u8F93\u5165 SSE URL","ai.native.mcp.command.placeHolder":"\u8F93\u5165\u547D\u4EE4","ai.native.mcp.args.placeHolder":"\u8FD0\u884C\u53C2\u6570","ai.native.mcp.env.placeHolder":"KEY=value\uFF08\u6BCF\u884C\u4E00\u4E2A\uFF09","ai.native.mcp.name.placeHolder":"\u670D\u52A1\u5668\u540D\u79F0","ai.native.mcp.type.builtin":"\u5185\u7F6E","ai.native.mcp.type.sse":"SSE","ai.native.mcp.type.stdio":"\u547D\u4EE4","ai.native.mcp.serverNameExists":'\u670D\u52A1\u540D\u79F0 "{0}" \u5DF2\u5B58\u5728',"ai.native.mcp.name.isRequired":"\u670D\u52A1\u540D\u79F0\u4E0D\u80FD\u4E3A\u7A7A","ai.native.mcp.command.isRequired":"\u547D\u4EE4\u4E0D\u80FD\u4E3A\u7A7A","ai.native.mcp.url.isRequired":"SSE URL \u4E0D\u80FD\u4E3A\u7A7A","ai.native.mcp.manage.connections":"\u7BA1\u7406\u4F60\u7684 MCP \u670D\u52A1\u5668\u8FDE\u63A5","ai.native.mcp.enabled":"\u5DF2\u542F\u7528","ai.native.mcp.disabled":"\u5DF2\u7981\u7528","ai.native.mcp.enable.title":"\u542F\u52A8\u8BE5\u670D\u52A1","ai.native.mcp.disable.title":"\u505C\u6B62\u8BE5\u670D\u52A1","ai.native.mcp.config.title":"MCP \u914D\u7F6E","ai.native.mcp.tool.arguments":"\u53C2\u6570","ai.native.mcp.tool.results":"\u8FD4\u56DE","ai.native.mcp.tool.action.edit":"\u4FEE\u6539","ai.native.mcp.tool.action.delete":"\u5220\u9664","ai.native.mcp.tool.action.sync":"\u540C\u6B65"}}},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),d=e(25067),_=e(48644),v=e(85448);let m=class extends o.BrowserModule{constructor(){super(...arguments),this.providers=[{token:d.IKeymapService,useClass:v.KeymapService},_.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)),d=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 _=class{constructor(){this.validate=new r.default({jsonPointers:!0}).compile(t.keymapsSchema)}parse(m,p){const s=o.stripComments(m),g=p?[]:void 0,a=o.parse(s,g);if(g&&p)for(const h of g)p.push(`${this.printParseErrorCode(h.error)} at ${h.offset} offset of ${h.length} length`);if(this.validate(a))return a;if(p&&this.validate.errors)for(const h of this.validate.errors)p.push(`${h.message} at ${h.dataPath}`);return[]}printParseErrorCode(m){return o.printParseErrorCode(m)}};t.KeymapsParser=_,t.KeymapsParser=_=n.__decorate([(0,d.Injectable)(),n.__metadata("design:paramtypes",[])],_)},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),d=e(93899),_=e(57517),v=e(42933),m=e(97821),p=e(25067),s=e(34879),g="keymaps-preview";let a=class extends o.WithEventBus{constructor(){super(),this.scheme=p.KEYMAPS_SCHEME}provideResource(f){return{supportsRevive:!0,name:(0,o.localize)("keymaps.tab.name"),icon:(0,o.getIcon)("setting"),uri:f}}provideResourceSubname(f,c){return null}async shouldCloseResource(f,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 f="keymaps";E.OPEN_SOURCE_FILE={id:"keymaps.open.source",label:"%keymaps.editorTitle.openSource%",category:f}})(u||(t.KEYMAP_COMMANDS=u={}));let l=class{registerCommands(f){f.registerCommand(o.COMMON_COMMANDS.OPEN_KEYMAPS,{isEnabled:()=>!0,execute:async()=>{await this.keymapService.open()}}),f.registerCommand(u.OPEN_SOURCE_FILE,{execute:async()=>{this.keymapService.openResource()}}),f.registerCommand(o.KEYBOARD_COMMANDS.CHOOSE_KEYBOARD_LAYOUT,{execute:()=>{this.chooseLayout()}})}registerMenus(f){f.registerMenuItem(d.MenuId.SettingsIconMenu,{command:o.COMMON_COMMANDS.OPEN_KEYMAPS.id,group:h.KEYMAPS}),f.registerMenuItem(d.MenuId.EditorTitle,{command:u.OPEN_SOURCE_FILE.id,iconClass:(0,o.getIcon)("open"),group:"navigation",order:4,when:`resourceScheme == ${p.KEYMAPS_SCHEME}`}),f.registerMenuItem(d.MenuId.EditorTitle,{command:o.COMMON_COMMANDS.OPEN_KEYMAPS.id,iconClass:(0,o.getIcon)("open"),group:"navigation",order:4,when:"resourceFilename =~ /keymaps.json/"})}registerKeybindings(f){f.registerKeybinding({command:o.COMMON_COMMANDS.OPEN_KEYMAPS.id,keybinding:"ctrlcmd+K ctrlcmd+S"})}onStart(){this.keymapService.init()}registerResource(f){f.registerResourceProvider(this.keymapsResourceProvider)}registerEditorComponent(f){f.registerEditorComponent({component:s.KeymapsView,uid:g,scheme:p.KEYMAPS_SCHEME}),f.registerEditorComponentResolver(p.KEYMAPS_SCHEME,(c,y,b)=>{b([{type:_.EditorOpenType.component,componentId:g}])})}async chooseLayout(){const f=this.layoutProvider.currentLayoutData,c={label:(0,o.localize)("keyboard.autoDetect.label"),description:f&&this.layoutProvider.currentLayoutSource!=="user-choice"?(0,o.formatLocalize)("keyboard.autoDetect.description",(0,o.getKeyboardLayoutId)(f.layout)):void 0,detail:(0,o.localize)("keyboard.autoDetect.detail"),value:"autodetect"},y=this.layoutProvider.allLayoutData.map(S=>this.toQuickPickValue(S,f===S));let b;b=[c,...y];const A=await this.quickPickService.show(b,{placeholder:"Choose a keyboard layout"});if(A)return this.layoutProvider.setLayoutData(A)}toQuickPickValue(f,c){return{label:(0,o.getKeyboardLayoutId)(f.layout),value:f}}};t.KeymapsContribution=l,n.__decorate([(0,r.Autowired)(m.QuickPickService),n.__metadata("design:type",Object)],l.prototype,"quickPickService",void 0),n.__decorate([(0,r.Autowired)(o.KeyboardNativeLayoutService),n.__metadata("design:type",Object)],l.prototype,"layoutProvider",void 0),n.__decorate([(0,r.Autowired)(v.IFileServiceClient),n.__metadata("design:type",Object)],l.prototype,"filesystem",void 0),n.__decorate([(0,r.Autowired)(a),n.__metadata("design:type",a)],l.prototype,"keymapsResourceProvider",void 0),n.__decorate([(0,r.Autowired)(p.IKeymapService),n.__metadata("design:type",Object)],l.prototype,"keymapService",void 0),t.KeymapsContribution=l=n.__decorate([(0,o.Domain)(o.CommandContribution,o.KeybindingContribution,o.ClientAppContribution,_.BrowserEditorContribution,d.MenuContribution)],l)},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)),d=e(76003),_=e(41869),v=e(68969),m=e(14951),p=e(25067),s=e(2312);let g=n=class{constructor(){this.keymapChangeEmitter=new _.Emitter,this.convertKeySequence=[],this.toUnregisterUserKeybindingMap=new Map,this.toRestoreDefaultKeybindingMap=new Map,this.searchDelayer=new _.ThrottledDelayer(n.DEFAULT_SEARCH_DELAY),this.disposableCollection=new _.DisposableCollection,this._whenReadyDeferred=new _.Deferred,this.fuzzyOptions={pre:"<match>",post:"</match>"},this.reconcileQueue=new _.Throttler,this.keybindings=[],this.updateKeybindings=()=>{this.currentSearchValue?this.doSearchKeybindings(this.currentSearchValue):(0,_.runWhenIdle)(()=>{this.keybindings=this.getKeybindingItems(),this.keymapChangeEmitter.fire(this.keybindings)})},this.setKeybinding=(h,u)=>this.progressService.withProgress({location:_.ProgressLocation.Notification},l=>new Promise((E,f)=>{l.report({message:(0,_.localize)("keymaps.keybinding.loading"),increment:0,total:100});const c=this.storeKeybindings||[];let y=!1;for(const b of c){const A={when:b.when,command:b.command,keybinding:b.key};if(b.command===u.command){y=!0,this.unregisterUserKeybinding(A);const S=this.toUniqueKey(h),w=this.toRestoreDefaultKeybindingMap.get(S);if(w){const T=this.toUniqueKey(u);this.toRestoreDefaultKeybindingMap.delete(S),this.toRestoreDefaultKeybindingMap.set(T,w)}b.key=u.keybinding,this.registerUserKeybinding({...A,priority:_.KeybindingWeight.WorkbenchContrib*100})}}if(!y){const b=this.keybindings.find(S=>S.id===u.command&&this.getRaw(S.when)===u.when);if(b&&b.keybinding){this.unregisterDefaultKeybinding({when:this.getRaw(b.when),command:b.id,keybinding:this.getRaw(b.keybinding)});const S=this.toUniqueKey(h),w=this.toRestoreDefaultKeybindingMap.get(S);if(w){const T=this.toUniqueKey(u);this.toRestoreDefaultKeybindingMap.delete(S),this.toRestoreDefaultKeybindingMap.set(T,w)}}const A={when:this.getWhen(u),command:u.command,key:u.keybinding};c.push(A),this.registerUserKeybinding(u)}return this.saveKeybinding(c).then(()=>{E(void 0),l.report({message:(0,_.localize)("keymaps.keybinding.success"),increment:99})}).catch(b=>{f(b),l.report({message:(0,_.localize)("keymaps.keybinding.fail"),increment:99})}).finally(()=>{setTimeout(()=>{l.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 l=this.storeKeybindings.filter(E=>E.command!==h.command);return this.unregisterUserKeybinding(h),this.restoreDefaultKeybinding(h),this.saveKeybinding(l)},this.fixed=async()=>{this.commandService.executeCommand(_.EDITOR_COMMANDS.OPEN_RESOURCE.id,new _.URI().withScheme(p.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(),l=[];u.forEach(E=>{const f=["id","command","keybinding","when","context","source"];let c=!1;for(const y of f){const b=E[y];if(b){const A=o.match(h,b,this.fuzzyOptions);if(A)E[y]=A.rendered,c=!0;else if(y==="keybinding"){const S=h.split("+"),w=b.split(" "),T=[0];let D=[];w.length>1?w.forEach(M=>{const R=M.split("+");T.push(R.length+T[-1]),D.push(...R)}):D=b.split("+"),T.shift();const I=[...D];let O=0;if(S.forEach(M=>{let R={rendered:"",score:0},P=-1;if(b){D.forEach(F=>{const L=o.match(M,F,this.fuzzyOptions);L&&L.score>R.score&&(R=L,P=I.indexOf(F))});const k=R.rendered;k&&(P>-1&&(I[P]=k),D.splice(P,1,""),O+=1)}}),O===S.length){if(T.length>0){const M="";I.forEach((R,P)=>{P===0?M.concat(R):T.indexOf(P)!==-1?M.concat(" "+R):M.concat("+"+R)}),E[y]=M}E[y]=I.join("+"),c=!0}}}}c&&l.push(E)}),this.keybindings=l,this.keymapChangeEmitter.fire(this.keybindings)},this.validateKeybinding=(h,u)=>{if(!u)return(0,_.localize)("keymaps.keybinding.require");try{const l={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(l)}catch(l){return l}},this.detectKeybindings=(h,u)=>{if(!u)return[];try{if(h.keybinding===u)return[];const l=this.keybindings.filter(E=>this.getRaw(E.keybinding)===u);if(l.length>0)return l.map(E=>{const f=this.commandRegistry.getCommand(this.getRaw(E.command)),c=this.storeKeybindings.find(y=>f&&y.command===f.id);return E.when=this.getRaw(E.when),E.keybinding=this.getRaw(E.keybinding),{id:f?f.id:this.getRaw(E.command),command:(f?f.label||f.id:E.command)||"",when:this.keybindingService.convertMonacoWhen(E.when),keybinding:this.getRaw(E.keybinding),source:c?this.getScope(_.KeybindingScope.USER):this.getScope(_.KeybindingScope.DEFAULT)}})}catch(l){this.logger.error(l)}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 l=await this.filesystem.createFile(h),E=await this.filesystem.setContent(l,`{
31927
31927
  }`);this.resource=E||void 0}h&&this.commandService.executeCommand(_.EDITOR_COMMANDS.OPEN_RESOURCE.id,new _.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(y=>({when:y.when,command:this.getValidateCommand(y.command),keybinding:y.key||y.keybinding})),f=[],c=[];this.disposeRegistedKeybinding(),E.forEach(y=>{y.command.startsWith("-")?c.push(y):f.push(y)}),f.map(y=>{this.unregisterDefaultKeybinding(y,!0),this.registerUserKeybinding(y)}),c.map(y=>{y.command=y.command.slice(1),this.unregisterDefaultKeybinding(y,!0)})}unregisterUserKeybinding(h){const u=this.toUniqueKey(h);if(this.toUnregisterUserKeybindingMap.has(u)){const l=this.toUnregisterUserKeybindingMap.get(u);l?.dispose(),this.toUnregisterUserKeybindingMap.delete(u)}}registerUserKeybinding(h){const u=this.toUniqueKey(h);this.toUnregisterUserKeybindingMap.set(u,this.keybindingRegistry.registerKeybinding(h,_.KeybindingScope.USER))}unregisterDefaultKeybinding(h,u=!1){if(u)this.keybindingRegistry.getKeybindingsForCommand(h.command).map(E=>{const f={...h,keybinding:E.keybinding};this.keybindingRegistry.unregisterKeybinding(f);const c=this.toUniqueKey(h);this.toRestoreDefaultKeybindingMap.set(c,_.Disposable.create(()=>{this.keybindingRegistry.registerKeybinding(f)}))});else{this.keybindingRegistry.unregisterKeybinding(h);const l=this.toUniqueKey(h);this.toRestoreDefaultKeybindingMap.set(l,_.Disposable.create(()=>{this.keybindingRegistry.registerKeybinding(h)}))}}restoreDefaultKeybinding(h){const u=this.toUniqueKey(h),l=this.toRestoreDefaultKeybindingMap.get(u);l&&(l?.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(_.EDITOR_COMMANDS.OPEN_RESOURCE.id,new _.URI().withScheme(p.KEYMAPS_SCHEME),{preview:!0})}getWhen(h){return h?this.keybindingService.convertMonacoWhen(h.when):""}getScope(h){return h===_.KeybindingScope.DEFAULT?(0,_.localize)("keymaps.source.default"):h===_.KeybindingScope.USER?(0,_.localize)("keymaps.source.user"):h===_.KeybindingScope.WORKSPACE?(0,_.localize)("keymaps.source.workspace"):""}getKeybindingItems(){const h=this.commandRegistry.getCommands(),u=[];for(const b of h){const A=this.keybindingRegistry.getKeybindingsForCommand(b.id);!A||!A.length?b.label&&u.push({id:b.id,command:b.label,hasCommandLabel:!0}):A.forEach(S=>{let w;if(this.storeKeybindings){const T=this.storeKeybindings.find(D=>b&&D.command===b.id);w={id:b.id,command:b.label||b.id,keybinding:T?T.key:S?this.keybindingRegistry.acceleratorFor(S,"+").join(" "):"",when:T?this.getWhen(T):this.getWhen(A&&S),source:T?this.getScope(_.KeybindingScope.USER):this.getScope(_.KeybindingScope.DEFAULT),hasCommandLabel:!!b.label}}else w={id:b.id,command:b.label||b.id,keybinding:A&&S?this.keybindingRegistry.acceleratorFor(S,"+").join(" "):"",when:this.getWhen(A&&S),source:A&&S&&typeof S.scope<"u"?this.getScope(S.scope):"",hasCommandLabel:!!b.label};u.push(w)})}const l=u.sort((b,A)=>this.compareItem(b,A)),E=l.filter(b=>!!b.keybinding),f=l.filter(b=>!b.keybinding&&b.hasCommandLabel),c=E.filter(b=>b.hasCommandLabel),y=E.filter(b=>!b.hasCommandLabel);return[...c,...y,...f]}compareItem(h,u){return h&&u?h.source===u.source?h.command.toLowerCase().localeCompare(u.command.toLowerCase()):h.source===this.getScope(_.KeybindingScope.USER)?-1:1:0}getRaw(h){return h?h.replace(new RegExp(/<(\/)?match>/gi),""):""}};t.KeymapService=g,g.DEFAULT_SEARCH_DELAY=100,g.KEYMAP_FILE_URI=new _.URI().withScheme(_.Schemes.userStorage).withPath(p.KEYMAPS_FILE_NAME),r.__decorate([(0,d.Autowired)(_.KeybindingRegistry),r.__metadata("design:type",Object)],g.prototype,"keyBindingRegistry",void 0),r.__decorate([(0,d.Autowired)(s.KeymapsParser),r.__metadata("design:type",s.KeymapsParser)],g.prototype,"parser",void 0),r.__decorate([(0,d.Autowired)(_.CommandService),r.__metadata("design:type",Object)],g.prototype,"commandService",void 0),r.__decorate([(0,d.Autowired)(_.CommandRegistry),r.__metadata("design:type",Object)],g.prototype,"commandRegistry",void 0),r.__decorate([(0,d.Autowired)(_.KeybindingRegistry),r.__metadata("design:type",Object)],g.prototype,"keybindingRegistry",void 0),r.__decorate([(0,d.Autowired)(_.KeybindingService),r.__metadata("design:type",Object)],g.prototype,"keybindingService",void 0),r.__decorate([(0,d.Autowired)(m.IFileServiceClient),r.__metadata("design:type",Object)],g.prototype,"filesystem",void 0),r.__decorate([(0,d.Autowired)(_.ILogger),r.__metadata("design:type",Object)],g.prototype,"logger",void 0),r.__decorate([(0,d.Autowired)(v.IProgressService),r.__metadata("design:type",Object)],g.prototype,"progressService",void 0),t.KeymapService=g=n=r.__decorate([(0,d.Injectable)()],g)},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)),d=e(97267),_=e(41869),v=e(25067),m=n.__importDefault(e(78541)),p=()=>{const{keybindings:s,searchKeybindings:g,validateKeybinding:a,detectKeybindings:h,setKeybinding:u,resetKeybinding:l,getRaw:E,getScope:f,covert:c,clearCovert:y,fixed:b,onDidKeymapChanges:A,updateKeybindings:S}=(0,_.useInjectable)(v.IKeymapService),[w,T]=o.default.useState(!1),[D,I]=o.default.useState(""),[O,M]=o.default.useState(s),R=({data:Q,index:V})=>{const{id:$,command:Y,when:z,source:H,keybinding:K}=Q,[Z,X]=o.default.useState(!1),[oe,ie]=o.default.useState(K||""),[ge,me]=o.default.useState(!1),[q,Se]=o.default.useState(),[_e,ne]=o.default.useState([]),ue=()=>{ge||(b(),me(!0)),y(),ie(E(K)),X(!0)},Ie=Ne=>{const pe=a(Q,Ne);pe?pe!==" "?Se({message:pe,type:d.VALIDATE_TYPE.ERROR}):X(!1):(u({command:E($),when:E(z)||"",keybinding:E(K)},{command:E($),when:E(z)||"",keybinding:Ne}),X(!1),y())},Pe=()=>{X(!1)},ve=Ne=>{Ne.stopPropagation(),Ne.preventDefault();const{key:pe}=_.KeyCode.createKeyCode(Ne.nativeEvent),re=Ne.nativeEvent.shiftKey||Ne.nativeEvent.metaKey||Ne.nativeEvent.altKey||Ne.nativeEvent.ctrlKey;pe&&_.Key.ENTER.keyCode===pe.keyCode&&!re?oe&&Ie(oe):ie(c(Ne.nativeEvent))},Ae=()=>{const Ne=()=>{Se(void 0),oe&&ie(""),y()},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,_.getIcon)("close-circle-fill"),m.default.keybinding_optional_action),onClick:Ne,title:(0,_.localize)("keymaps.action.clear")}))},Ce=()=>o.default.createElement("div",{className:m.default.keybinding_key_input_placeholder},"\u23CE"),fe=Ne=>{const pe=re=>{re.preventDefault(),ge||(b(),me(!0)),l({command:E($),when:E(z)||"",keybinding:oe})};if(Ne&&E(Ne)===f(_.KeybindingScope.USER))return o.default.createElement("span",{className:(0,r.default)((0,_.getIcon)("rollback"),m.default.keybinding_inline_action),onClick:pe,title:(0,_.localize)("keymaps.action.reset")})},xe=()=>{if(!q&&_e.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,_.formatLocalize)("keymaps.keybinding.duplicate",_e.length)),o.default.createElement("ul",{className:m.default.keybinding_detective_messages_container},_e.map((Ne,pe)=>o.default.createElement("li",{className:m.default.keybinding_detective_messages_item,key:`${Ne.id}_${pe}`,title:`${Ne.command}-${Ne.when}`},o.default.createElement("div",{className:m.default.title},(0,_.localize)("keymaps.header.command.title"),": ",E(Ne.command)||"-"),o.default.createElement("div",{className:m.default.description},o.default.createElement("div",{style:{marginRight:4}},(0,_.localize)("keymaps.header.source.title"),": ",E(Ne.source)||"-"),o.default.createElement("div",null,(0,_.localize)("keymaps.header.when.title"),": ",E(Ne.when)||"\u2014"))))))},Te=()=>{if(Z)return o.default.createElement("div",{className:m.default.keybinding_key_input_container},Ae(),o.default.createElement(d.ValidateInput,{placeholder:(0,_.localize)("keymaps.edit.placeholder"),validateMessage:q,className:m.default.keybinding_key_input,size:"small",autoFocus:!0,name:_.NO_KEYBINDING_NAME,value:oe,onKeyDown:ve,onBlur:Pe}),Ce(),xe());{const Ne=K?.split(" ");return o.default.createElement("div",{className:m.default.keybinding_key,title:E(K),onDoubleClick:ue},o.default.createElement("div",{className:m.default.keybinding_action,onClick:ue},o.default.createElement("span",{className:(0,r.default)(K?(0,_.getIcon)("edit"):(0,_.getIcon)("plus"),m.default.keybinding_inline_action),title:K?(0,_.localize)("keymaps.action.edit"):(0,_.localize)("keymaps.action.add")}),fe(H)),Ne&&Ne[0]?Ne.map((pe,re)=>{const he=pe.split("+");return o.default.createElement("div",{className:m.default.keybinding_key_block,key:`${pe}_${re}`},he.map((Oe,De)=>o.default.createElement("div",{className:m.default.keybinding_key_item,key:`${Oe}_${De}`,dangerouslySetInnerHTML:{__html:Oe||""}})))}):"\u2014")}};return(0,o.useEffect)(()=>{q&&Se(void 0),ne(oe&&Z?h(Q,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,_.formatLocalize)("keymaps.commandId.title",$)}})),o.default.createElement("div",{className:(0,r.default)(m.default.keybinding_list_item_box)},Te()),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 Q=()=>{T(!w)};return o.default.createElement("div",{className:m.default.search_inline_action},o.default.createElement("span",{className:(0,r.default)((0,_.getIcon)("keyboard"),m.default.search_inline_action_icon,w&&m.default.active),onClick:Q}))},k=(0,o.useCallback)(Q=>{I(Q),g(Q)},[D]),F=Q=>{if(!w){const V=Q.target&&Q.target.value?Q.target.value.toLocaleLowerCase():"";k(V)}},L=Q=>{if(w){Q.stopPropagation(),Q.preventDefault();const{key:V}=_.KeyCode.createKeyCode(Q.nativeEvent);if(V&&_.Key.ENTER.keyCode===V.keyCode)return;k(c(Q.nativeEvent))}},B=()=>{D&&(I(""),g("")),y()},j=()=>o.default.createElement("div",{className:m.default.keybinding_optional_actions},o.default.createElement("span",{className:(0,r.default)((0,_.getIcon)("close-circle-fill"),m.default.keybinding_optional_action),onClick:B,title:(0,_.localize)("keymaps.action.reset")})),W=()=>o.default.createElement("div",{className:m.default.search_container},o.default.createElement(d.Input,{className:m.default.search_input,placeholder:(0,_.localize)(w?"keymaps.search.keyboard.placeholder":"keymaps.search.placeholder"),type:"text",value:D,name:_.NO_KEYBINDING_NAME,onChange:F,onKeyDown:L,addonBefore:P()}),j()),U=(0,o.useMemo)(()=>{const Q=[{title:(0,_.localize)("keymaps.header.command.title"),classname:m.default.keybinding_header_item},{title:(0,_.localize)("keymaps.header.keybinding.title"),classname:m.default.keybinding_header_item},{title:(0,_.localize)("keymaps.header.when.title"),classname:m.default.keybinding_header_item},{title:(0,_.localize)("keymaps.header.source.title"),classname:m.default.keybinding_header_item}];return o.default.createElement("div",{className:m.default.keybinding_header},Q.map((V,$)=>o.default.createElement("div",{className:V.classname,key:`${V.title}_${$}`},V.title)))},[]);return(0,o.useEffect)(()=>{const Q=A(V=>{M(V)});return S(),()=>{Q.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(d.RecycleList,{itemHeight:40,data:O,template:R,className:m.default.keybinding_list_container}))))};t.KeymapsView=p},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),d=e(47548),_=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:d.ILoggerManagerClient,useClass:_.LoggerManagerClient}],this.backServices=[{servicePath:d.LogServiceForClientPath,clientToken:d.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),d=e(47548),_=e(1700);let v=class{constructor(){this.logLevelChangeEmitter=new o.Emitter}getLogger(p,s){const g=new _.LogServiceClient(p);return g.setup(this.logServiceForClient,s),g}getBrowserLogger(p){return new _.LogServiceClient(p)}async getLogFolder(){return await this.logServiceForClient.getLogFolder()}async setGlobalLogLevel(p){return await this.logServiceForClient.setGlobalLogLevel(p)}async getGlobalLogLevel(){return await this.logServiceForClient.getGlobalLogLevel()}async dispose(){return this.logLevelChangeEmitter.dispose(),await this.logServiceForClient.disposeAll()}get onDidChangeLogLevel(){return this.logLevelChangeEmitter.event}onDidLogLevelChanged(p){this.logLevelChangeEmitter.fire(p)}};t.LoggerManagerClient=v,n.__decorate([(0,r.Autowired)(d.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(_){this.level=r.LogLevel.Verbose,this.ready=new n.Deferred,this.namespace=_,this.debugLog=new r.DebugLog(_)}async setup(_,v){this.logServiceForClient=_,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(_){this.level=_,this.logServiceForClient&&await this.logServiceForClient.setLevel(this.namespace,_)}async verbose(..._){this.debugLog.verbose(..._),this.logServiceForClient&&await this.logServiceForClient.verbose(this.namespace,(0,r.format)(_),this.pid)}async debug(..._){this.debugLog.debug(..._),this.logServiceForClient&&(await this.ready.promise,!(this.level>r.LogLevel.Debug)&&await this.logServiceForClient.debug(this.namespace,(0,r.format)(_),this.pid))}async log(..._){this.debugLog.log(..._),this.logServiceForClient&&(await this.ready.promise,!(this.level>r.LogLevel.Info)&&await this.logServiceForClient.log(this.namespace,(0,r.format)(_),this.pid))}async warn(..._){this.debugLog.warn(..._),this.logServiceForClient&&(await this.ready.promise,!(this.level>r.LogLevel.Warning)&&await this.logServiceForClient.warn(this.namespace,(0,r.format)(_),this.pid))}async error(..._){this.debugLog.error(..._),this.logServiceForClient&&(await this.ready.promise,!(this.level>r.LogLevel.Error)&&await this.logServiceForClient.error(this.namespace,(0,r.format)(_),this.pid))}async critical(..._){this.debugLog.error(..._),this.logServiceForClient&&(await this.ready.promise,!(this.level>r.LogLevel.Critical)&&await this.logServiceForClient.critical(this.namespace,(0,r.format)(_),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 d=n[o];if(d instanceof Error){const _=Array.prototype.slice.call(arguments);_[0]=d.stack,d=e(_)}else if(typeof d=="object")try{d=JSON.stringify(d)}catch{}else if(typeof d=="symbol")try{d=d.toString()}catch{}r+=(o>0?" ":"")+d}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)),d=e(76003),_=e(41869),v=e(81878),m=e(71707),p=e(95416),s=e(93899),g=e(68969),a=e(28423),h=e(17793);let u=class extends _.WithEventBus{get views(){return this.viewsObservable.get()}get state(){return this.stateObservable.get()}constructor(E,f){super(),this.containerId=E,this.noRestore=f,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 y=this.viewsObservable.read(c);return this.stateObservable.read(c),y.filter(b=>!this.getViewState(b.id).hidden)}),this.rendered=!1,this.menuId=`${s.MenuId.AccordionContext}/${this.containerId}`,this.toDispose=new Map,this.didChangeViewTitleEmitter=this.registerDispose(new _.Emitter),this.onDidChangeViewTitle=this.didChangeViewTitleEmitter.event,this.beforeAppendViewEmitter=this.registerDispose(new _.Emitter),this.onBeforeAppendViewEvent=this.beforeAppendViewEmitter.event,this.afterAppendViewEmitter=this.registerDispose(new _.Emitter),this.onAfterAppendViewEvent=this.afterAppendViewEmitter.event,this.afterDisposeViewEmitter=this.registerDispose(new _.Emitter),this.onAfterDisposeViewEvent=this.afterDisposeViewEmitter.event,this.doUpdateResize=(0,r.default)(()=>{var c,y;let b;if(Object.keys(this.state).forEach(A=>{this.state[A].hidden||this.state[A].collapsed||(b?(this.state[A].size||0)>(this.state[b].size||0)&&(b=A):b=A)}),b&&this.splitPanelService.isVisible&&this.expandedViews.length>1&&!((c=this.splitPanelService.rootNode)===null||c===void 0)&&c.clientHeight){const A=((y=this.splitPanelService.rootNode)===null||y===void 0?void 0:y.clientHeight)-this.getPanelFullHeight();if(A){const S=this.state;S[b].size+=A,(0,a.transaction)(w=>{this.stateObservable.set({...S},w)}),this.toggleOpen(b,!1)}}},16),this.storeState=()=>{this.noRestore||!this.rendered||this.layoutState.setState(p.LAYOUT_STATE.getContainerSpace(this.containerId),this.state)},this.handleSectionClick=(c,y,b)=>{this.doToggleOpen(c,y,b)},this.handleContextMenu=(c,y)=>{c.preventDefault();const b=this.ctxMenuService.createMenu({id:this.menuId,config:{args:[{viewId:y}]},contextKeyService:y?this.viewContextKeyRegistry.getContextKeyService(y):void 0}),A=b.getGroupedMenuNodes();b.dispose(),this.contextMenuRenderer.show({menuNodes:A[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,_.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(_.Event.debounce(this.contextKeyService.onDidChangeContext,(c,y)=>c||y.payload.affectsSome(this.viewWhenContextkeys),50)(c=>c&&this.handleContextKeyChange(),this)),this.splitPanelService.whenReady.then(()=>{this.listenWindowResize()})}updateViewTitle(E,f){const c=this.views.find(y=>y.id===E);c?(c.name=f,this.didChangeViewTitleEmitter.fire({id:E,title:f})):this.logger.error(`No target view \`${E}\` found, unable to update accordion title`)}updateViewDesciption(E,f){const c=this.views.find(y=>y.id===E);c?(c.description=f,this.didChangeViewTitleEmitter.fire({id:E,description:f})):this.logger.error(`No target view \`${E}\` found, unable to update accordion description`)}updateViewMessage(E,f){const c=this.views.find(y=>y.id===E);c?(c.message=f,this.didChangeViewTitleEmitter.fire({id:E,message:f})):this.logger.error(`No target view \`${E}\` found, unable to update accordion message`)}updateViewBadge(E,f){const c=this.views.find(y=>y.id===E);c?(c.badge=f,this.didChangeViewTitleEmitter.fire({id:E,badge:f})):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 f=this.layoutState.getState(p.LAYOUT_STATE.getContainerSpace(this.containerId),E);(0,o.default)(f,E)||(0,a.transaction)(c=>{this.stateObservable.set({...f},c)}),this.popViewKeyIfOnlyOneViewVisible(),this.splitPanelService.whenReady.then(()=>{this.restoreSize(),this.rendered=!0})}restoreSize(){var E;let f=((E=this.splitPanelService.rootNode)===null||E===void 0?void 0:E.clientHeight)||0,c;if(this.visibleViews.get().forEach((y,b)=>{const A=this.state[y.id];A.collapsed?(this.setSize(b,0,!1,!0),f-=this.headerSize):!A.collapsed&&A.size&&(this.setSize(b,A.size,!1,!0),f-=A.size,c=b)}),c){const y=this.visibleViews.get()[c];this.setSize(c,this.state[y.id].size+f)}}initConfig(E){const{headerSize:f,minSize:c}=E;this.headerSize=f,this.minSize=c}registerContextService(E){let f=this.viewContextKeyRegistry.getContextKeyService(E);return f||(f=this.contextKeyService.createScoped(),f.createKey("view",E),this.viewContextKeyRegistry.registerContextKeyService(E,f)),f}getSectionToolbarMenu(E){const f=this.registerContextService(E),c=this.menuService.createMenu(s.MenuId.ViewTitle,f),y=this.views.find(b=>b.id===E);return y&&(y.titleMenu=c),c}updateView(E){(0,a.transaction)(f=>{const c=this.views;if(E.priority){const y=c.findIndex(b=>(b.priority||0)<(E.priority||0));c.splice(y===-1?c.length:y,0,E),this.viewsObservable.set([...c],f)}else this.viewsObservable.set([...c,E],f)})}appendView(E,f){if(this.appendedViewSet.has(E.id)&&!f)return;const c=new _.DisposableCollection;c.push(this.progressService.registerProgressIndicator(E.id));const y=this.views.findIndex(b=>b.id===E.id);if(y!==-1){(0,a.transaction)(b=>{const A=this.views;A[y]=Object.assign({},A[y],E),this.viewsObservable.set([...A],b)});return}if(E.when){this.viewsWithContextKey.add(E);const b=this.createRevealContextKey(E.id);if(this.fillKeysInWhenExpr(this.viewWhenContextkeys,E.when),!this.contextKeyService.match(E.when)&&!this.contextKeyService.match(b))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 f=this.views.findIndex(y=>y.id===E);f>-1&&(0,a.transaction)(y=>{const b=this.views;b.splice(f,1),this.viewsObservable.set([...b],y)});const c=this.toDispose.get(E);c&&c.dispose(),this.appendedViewSet.delete(E),this.popViewKeyIfOnlyOneViewVisible(),this.afterDisposeViewEmitter.fire(E)}revealView(E){const f=this.forceRevealContextKeys.get(E);f&&f.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 f=E.payload.slotLocation;_.fastdom.measureAtNextFrame(()=>{const c=document.getElementById(f);if(c){const y=this.state;y[f].size=c.clientHeight,(0,a.transaction)(b=>{this.stateObservable.set({...y},b)}),this.storeState()}})}}getPanelFullHeight(E){return Object.keys(this.state).filter(f=>this.views.find(c=>c.id===f)&&f!==E).reduce((f,c)=>f+(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 f=`forceShow.${E}`;return this.forceRevealContextKeys.set(E,{when:`${f} == true`,key:this.contextKeyService.createKey(f,!1)}),this.viewWhenContextkeys.add(f),`${f} == true`}registerGlobalToggleCommand(){const E=`view-container.hide.${this.containerId}`;return this.commandRegistry.registerCommand({id:E},{execute:({viewId:f})=>{this.doToggleView(f)},isEnabled:()=>this.visibleViews.get().length>1}),E}registerVisibleToggleCommand(E,f){const c=`view-container.hide.${E}`;return f.push(this.commandRegistry.registerCommand({id:c},{execute:({forceShow:y}={})=>{this.doToggleView(E,y)},isToggled:()=>!this.getViewState(E).hidden,isEnabled:()=>this.getViewState(E).hidden||this.visibleViews.get().length>1})),c}doToggleView(E,f){const c=this.getViewState(E);let y;f===void 0?y=!c.hidden:y=!f,c.hidden=y,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,f){this.doToggleView(E,f)}get expandedViews(){return this.views.filter(E=>{const f=this.state[E.id];return!f||f&&!f.hidden&&!f.collapsed})}toggleOpen(E,f){const c=this.visibleViews.get().findIndex(y=>y.id===E);c>-1&&this.doToggleOpen(E,f,c,!0)}getViewState(E){let f=this.state[E];const c=this.views.find(y=>y.id===E);return f||(this.updateViewState(E,{collapsed:c?.collapsed||!1,hidden:c?.hidden||!1}),f=this.state[E]),f}updateViewState(E,f){const c=this.state;c[E]=f,(0,a.transaction)(y=>{this.stateObservable.set({...c},y)})}doToggleOpen(E,f,c,y){var b;const A=this.getViewState(E);this.updateViewState(E,{...A,collapsed:f});const S=this.mainLayoutService.getContainer(this.containerId);if(((b=S?.options)===null||b===void 0?void 0:b.alignment)!=="horizontal"){let w;f?w=this.setSize(c,0,!1,y):w=this.setSize(c,this.expandedViews.length===1?this.getAvailableSize():A.size||this.minSize,!1,y);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,y):this.setSize(T,0,!1,y);for(let T=c-1;T>=0;T--)(this.state[this.visibleViews.get()[T].id]||{}).collapsed!==!0?w=this.setSize(T,w,!0,y):this.setSize(T,0,!1,y)}this.eventBus.fire(new h.ViewCollapseChangedEvent({viewId:E,collapsed:f}))}setSize(E,f,c,y){var b;const A=this.visibleViews.get()[E],S=(b=this.splitPanelService.rootNode)===null||b===void 0?void 0:b.clientHeight,w=this.splitPanelService.panels[E];if(!w)return 0;y||w.classList.add("resize-ease"),!f&&!c?(f=this.headerSize,w.classList.add(v.RESIZE_LOCK)):w.classList.remove(v.RESIZE_LOCK);const T=w.clientHeight,D=this.getViewState(A.id);let I=f;if(c&&(I=Math.max(T-f,this.minSize)),E===this.expandedViews.length-1&&(0,_.isDefined)(S))if(I+E*this.minSize>S)I-=I+E*this.minSize-S;else{const O=this.getPanelFullHeight(A.id);I+O<S&&(I+=S-(I+O))}if(this.rendered){let O;f===this.headerSize?O=T:O=I,O!==this.headerSize&&(D.size=O)}return this.storeState(),D.nextSize=I,y||setTimeout(()=>{w.classList.remove("resize-ease")},200),c?I-(T-f):f-T}getAvailableSize(){var E;const f=(E=this.splitPanelService.rootNode)===null||E===void 0?void 0:E.clientHeight;return f?f-(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,f){this.contextKeyService.getKeysInWhen(f).forEach(y=>{E.add(y)})}};t.AccordionService=u,n.__decorate([(0,d.Autowired)(),n.__metadata("design:type",m.SplitPanelManager)],u.prototype,"splitPanelManager",void 0),n.__decorate([(0,d.Autowired)(s.AbstractMenuService),n.__metadata("design:type",s.AbstractMenuService)],u.prototype,"menuService",void 0),n.__decorate([(0,d.Autowired)(s.AbstractContextMenuService),n.__metadata("design:type",s.AbstractContextMenuService)],u.prototype,"ctxMenuService",void 0),n.__decorate([(0,d.Autowired)(s.IMenuRegistry),n.__metadata("design:type",s.IMenuRegistry)],u.prototype,"menuRegistry",void 0),n.__decorate([(0,d.Autowired)(_.CommandRegistry),n.__metadata("design:type",Object)],u.prototype,"commandRegistry",void 0),n.__decorate([(0,d.Autowired)(s.ICtxMenuRenderer),n.__metadata("design:type",s.ICtxMenuRenderer)],u.prototype,"contextMenuRenderer",void 0),n.__decorate([(0,d.Autowired)(),n.__metadata("design:type",_.ViewContextKeyRegistry)],u.prototype,"viewContextKeyRegistry",void 0),n.__decorate([(0,d.Autowired)(h.IMainLayoutService),n.__metadata("design:type",Object)],u.prototype,"mainLayoutService",void 0),n.__decorate([(0,d.Autowired)(_.IContextKeyService),n.__metadata("design:type",Object)],u.prototype,"contextKeyService",void 0),n.__decorate([(0,d.Autowired)(p.LayoutState),n.__metadata("design:type",p.LayoutState)],u.prototype,"layoutState",void 0),n.__decorate([(0,d.Autowired)(g.IProgressService),n.__metadata("design:type",Object)],u.prototype,"progressService",void 0),n.__decorate([(0,d.Autowired)(_.ILogger),n.__metadata("design:type",Object)],u.prototype,"logger",void 0),n.__decorate([(0,_.OnEvent)(_.ResizeEvent),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[_.ResizeEvent]),n.__metadata("design:returntype",void 0)],u.prototype,"onResize",null),t.AccordionService=u=n.__decorate([(0,d.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),d=e(81878),_=e(1149),v=e(43718),m=e(9522),p=e(95867),s=({alignment:a="vertical",views:h,containerId:u,headerSize:l=24,minSize:E=120,className:f,noRestore:c,style:y})=>{const b=(0,o.useInjectable)(_.LayoutViewSizeConfig),A=(0,o.useInjectable)(m.AccordionServiceFactory)(u,c),S=(0,o.useAutorun)(A.visibleViews);(0,o.useAutorun)(A.stateObservable);const w=(0,r.useMemo)(()=>l||b.accordionHeaderSizeHeight,[l]);return r.default.useEffect(()=>{if(h.length)for(const T of h)A.appendView(T)},[h]),r.default.useEffect(()=>{A.initConfig({headerSize:w,minSize:E})},[]),r.default.createElement(d.SplitPanel,{className:f,style:y,headerSize:l,dynamicTarget:!0,id:u,resizeKeep:!1,direction:a==="horizontal"?"left-to-right":"top-to-bottom"},S.map((T,D)=>{const I=A.getViewState(T.id),O=T.titleMenu||A.getSectionToolbarMenu(T.id),{collapsed:M,nextSize:R}=I;return r.default.createElement(p.AccordionSection,{noHeader:S.length===1,onItemClick:()=>{A.handleSectionClick(T.id,!M,D)},onContextMenuHandler:A.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:A,index:D,headerSize:l,minSize:l,initialProps:T.initialProps,titleMenu:O,titleMenuContext:T.titleMenuContext,savedSize:M?l:R,flex:T.weight||1},T.component)}))};t.AccordionContainer=s,t.AccordionContainer.displayName="AccordionContainer";const g=({children:a})=>r.default.createElement("div",null,a);t.Panel=g,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)),d=e(41869),_=e(25918),v=e(93899),m=e(68969),p=e(68974),s=e(69589),g=e(52416),a=n.__importDefault(e(81388)),h={tabIndex:0},u=({header:l,description:E,message:f,headerClass:c,onItemClick:y,noHeader:b,children:A,badge:S,headerSize:w,viewId:T,initialProps:D,titleMenu:I,titleMenuContext:O,expanded:M,accordionService:R,onContextMenuHandler:P,alignment:k})=>{const F=(0,d.useInjectable)(g.IIconService),L=(0,d.useDesignStyles)(a.default.actions_wrap,"actions_wrap"),B=(0,d.useDesignStyles)(a.default.kt_split_panel,"kt_split_panel"),j=(0,d.useDesignStyles)(a.default.kt_split_panel_header,"kt_split_panel_header"),W=(0,d.useDesignStyles)(a.default.kt_split_panel_body,"kt_split_panel_body"),U=(0,d.useDesignStyles)(a.default.section_badge,"section_badge"),Q=o.default.useRef(null),[V,$]=o.default.useState({header:l,description:E,message:f,badge:S});o.default.useEffect(()=>{const ie=R.onDidChangeViewTitle(({id:ge,title:me,description:q,message:Se,badge:_e})=>{let ne=!1;const ue={...V};T===ge&&me&&me!==V.header&&(ue.header=me,ne=!0),T===ge&&_e!==V.badge&&(ue.badge=_e,ne=!0),T===ge&&q&&q!==V.description&&(ue.description=q,ne=!0),T===ge&&Se&&Se!==V.message&&(ue.message=Se,ne=!0),ne&&$(ue)});return()=>{ie.dispose()}},[]);const Y=o.default.useCallback(()=>{y()},[y]),z=o.default.useMemo(()=>({overflow:M?"auto":"hidden"}),[M]),H=(0,d.useViewState)(T,Q,!0),Z=(0,d.useInjectable)(m.IProgressService).getIndicator(T),X=A,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},!b&&o.default.createElement("div",{...h,className:(0,r.default)(j,c),onClick:Y,onContextMenu:ie=>P(ie,T),style:{height:oe,lineHeight:oe}},o.default.createElement("div",{className:a.default.label_wrap},o.default.createElement("i",{className:(0,r.default)((0,d.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(_.InlineActionBar,{menus:I,context:O}):o.default.createElement(_.InlineMenuBar,{menus:I,context:O}))),o.default.createElement("div",{className:(0,r.default)([W,{[a.default.hide]:!M}]),style:z,ref:Q},o.default.createElement(p.ProgressBar,{className:a.default.progressBar,progressModel:Z.progressModel}),o.default.createElement(d.ErrorBoundary,null,V.message&&o.default.createElement("div",{className:a.default.kt_split_panel_message},V.message),o.default.createElement(X,{...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),d=e(752),_=n.__importDefault(e(81388));t.TitleBar=r.default.memo(v=>{const m=(0,o.useDesignStyles)(_.default.titlebar,"titlebar"),p=(0,o.useInjectable)(d.TabbarServiceFactory)(v.side),s=r.default.useCallback(a=>{v.containerId&&v.side&&p.handleDragStart(a,v.containerId)},[v.containerId,v.side,p]),g=r.default.useCallback(a=>{p.handleDragEnd(a)},[p]);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:g},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),d=e(17793),_=n.__importDefault(e(36623)),v=s=>{const{location:g}=s,a=(0,o.useInjectable)(d.IMainLayoutService),h=r.default.useCallback(u=>{var l;const E=(l=u.dataTransfer)===null||l===void 0?void 0:l.getData("containerId");a.moveContainerTo(E,g)},[a,g]);return r.default.createElement("div",{className:_.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 p=()=>r.default.createElement(v,{location:"bottom"});t.BottomDropArea=p},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),d=e(17793),_=e(9522),v=e(22537),m=e(53576),p=e(752),s=e(58296);let g=class extends o.BrowserModule{constructor(){super(...arguments),this.providers=[m.MainLayoutModuleContribution,{token:d.IMainLayoutService,useClass:v.LayoutService},{token:d.IViewsRegistry,useClass:s.ViewsRegistry},{token:p.TabbarServiceFactory,useFactory:p.TabbarServiceFactoryFn},{token:_.AccordionServiceFactory,useFactory:h=>(u,l)=>h.get(d.IMainLayoutService).getAccordionService(u,l)}],this.contributionProvider=d.MainLayoutContribution}};t.MainLayoutModule=g,t.MainLayoutModule=g=n.__decorate([(0,r.Injectable)()],g)},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),d=e(48560),_=e(17793),v=({containerId:m,...p})=>{const s=(0,d.useInjectable)(_.IMainLayoutService),g=(0,r.useRef)(null),a=r.default.useCallback(()=>{g&&g.current&&queueMicrotask(()=>{var h;return(h=g.current)===null||h===void 0?void 0:h.focus()})},[g.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:g,...p})};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),d=e(41869),_=e(81878),v=e(95416),m=e(93899),p=e(43718),s=e(52416),g=e(17793),a=e(9522),h=e(752),u=e(58999),l={[d.SlotLocation.left]:{currentId:void 0,size:void 0},[d.SlotLocation.right]:{currentId:"",size:void 0},[d.SlotLocation.bottom]:{currentId:void 0,size:void 0}};let E=class extends d.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,p.getDebugLogger)(),this.viewReady=new p.Deferred,this.restoreTabbarService=async c=>{var y;this.state=(0,_.fixLayout)(this.layoutState.getState(v.LAYOUT_STATE.MAIN,l));const{currentId:b,size:A}=this.state[c.location]||{};c.prevSize=A;let S=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))S=T;else{const D=this.componentRegistry.getComponentRegistryInfo(T);D&&(!((y=this.appConfig.layoutConfig[c.location])===null||y===void 0)&&y.modules)&&~this.appConfig.layoutConfig[c.location].modules.indexOf(T)?S=D.options.containerId:this.logger.warn(`[defaultPanels] No \`${T}\` view found!`)}else S="";(0,p.isUndefined)(b)?(0,p.isUndefined)(S)?c.updateNextContainerId():c.updateCurrentContainerId(S):b&&!this.isDropContainer(b)?c.containersMap.has(b)?c.updateCurrentContainerId(b):this.findTabbarServiceByContainerId(b)?(this.moveContainerTo(b,c.location),c.updateCurrentContainerId(b)):(c.updateCurrentContainerId(S),c.updateNextContainerId(b)):(b===""||this.isDropContainer(b))&&c.updateCurrentContainerId("")},this.holdTabbarComponent=new Map,this.tabbarUpdateSet=new Set}didMount(){for(const[y,b]of this.pendingViewsMap.entries())b.forEach(({view:A,props:S})=>{this.collectViewComponent(A,y,S)});for(const y of this.contributions.getContributions())y.onDidRender&&y.onDidRender();const c=[];this.tabbarServices.forEach(y=>{d.slotRendererRegistry.isTabbar(y.location)&&y.containersMap.size>0&&c.push(y.viewReady.promise)}),Promise.all(c).then(()=>{this.viewReady.resolve()})}storeState(c,y){this.state[c.location]={currentId:y,size:c.prevSize},this.layoutState.setState(v.LAYOUT_STATE.MAIN,this.state)}onThemeChange(c){var y,b,A,S,w;const T=c.payload.theme;localStorage.setItem("theme",JSON.stringify({menuBarBackground:(y=T.getColor("kt.menubar.background"))===null||y===void 0?void 0:y.toString(),sideBarBackground:(b=T.getColor("sideBar.background"))===null||b===void 0?void 0:b.toString(),editorBackground:(A=T.getColor("editor.background"))===null||A===void 0?void 0:A.toString(),panelBackground:(S=T.getColor("panel.background"))===null||S===void 0?void 0:S.toString(),statusBarBackground:(w=T.getColor("statusBar.background"))===null||w===void 0?void 0:w.toString()}))}findTabbarServiceByContainerId(c){let y;for(const b of this.tabbarServices.values())if(b.containersMap.has(c)){y=b;break}return y}moveContainerTo(c,y){var b;const A=this.findTabbarServiceByContainerId(c);if(!A){this.logger.error(`cannot find container: ${c}`);return}const S=A.getContainer(c);if(!S){this.logger.error(`cannot find container: ${c}`);return}if(!(!((b=S.options)===null||b===void 0)&&b.draggable)){this.logger.warn(`container: ${c} is not draggable`);return}const w=this.getTabbarService(y);A.removeContainer(c),(!A.visibleContainers.length||A.currentContainerId.get()===c)&&this.toggleSlot(A.location,!1),w.dynamicAddContainer(c,S);const T=this.injector.get(u.TabBarHandler,[c,this.getTabbarService(w.location)]);this.handleMap.set(c,T)}showDropAreaForContainer(c){const y=this.findTabbarServiceByContainerId(c),b=this.tabbarServices.get("bottom"),A=this.tabbarServices.get("right");if(!y){this.logger.error(`cannot find container: ${c}`);return}y?.location==="right"&&b?.updateCurrentContainerId(g.DROP_BOTTOM_CONTAINER),y?.location==="bottom"&&A?.updateCurrentContainerId(g.DROP_RIGHT_CONTAINER)}hideDropArea(){const c=this.tabbarServices.get("bottom"),y=this.tabbarServices.get("right");c?.currentContainerId.get()===g.DROP_BOTTOM_CONTAINER&&c.updateCurrentContainerId(c.previousContainerId||""),y?.currentContainerId.get()===g.DROP_RIGHT_CONTAINER&&y.updateCurrentContainerId(y.previousContainerId||"")}isVisible(c){return!!this.getTabbarService(c).currentContainerId.get()}isViewVisible(c){const y=this.getTabbarHandler(c);if(!y||!y.isActivated())return!1;const b=y.accordionService.getViewState(c);return!b.collapsed&&!b.hidden}toggleSlot(c,y,b){var A;const S=this.getTabbarService(c);if(!S){this.debug.error(`Unable to switch panels because no TabbarService corresponding to \`${c}\` was found.`);return}y===!0?S.updateCurrentContainerId(this.findNonDropContainerId(S)):y===!1?S.updateCurrentContainerId(""):S.updateCurrentContainerId(S.currentContainerId.get()?"":this.findNonDropContainerId(S)),S.currentContainerId.get()&&b&&((A=S.resizeHandle)===null||A===void 0||A.setSize(b))}isDropContainer(c){return[g.DROP_BOTTOM_CONTAINER,g.DROP_RIGHT_CONTAINER].includes(c)}findNonDropContainerId(c){const y=c.currentContainerId.get();if(y&&!this.isDropContainer(y))return y;if(c.previousContainerId&&!this.isDropContainer(c.previousContainerId))return c.previousContainerId;for(const b of c.containersMap.keys())if(!this.isDropContainer(b))return b;return""}getTabbarService(c){const y=this.tabbarServices.get(c)||this.injector.get(h.TabbarService,[c]);if(!this.tabbarServices.get(c)){y.addDispose(y.onCurrentChange(({currentId:A})=>{if(this.storeState(y,A),this.eventBus.fire(new d.ExtensionActivateEvent({topic:"onView",data:A})),A&&g.SUPPORT_ACCORDION_LOCATION.has(y.location)){const S=this.getAccordionService(A);S?.tryUpdateResize(),S?.expandedViews.forEach(w=>{this.eventBus.fire(new d.ExtensionActivateEvent({topic:"onView",data:w.id}))})}})),y.viewReady.promise.then(()=>y.restoreState()).then(()=>this.restoreTabbarService(y)).catch(A=>{this.logger.error(`[TabbarService:${c}] restore state error`,A)});const b=(0,r.default)(()=>this.storeState(y,y.currentContainerId.get()),100);if(y.addDispose(y.onSizeChange(b)),c===d.SlotLocation.bottom){const A=(0,r.default)(()=>void this.bottomExpanded,100);y.addDispose(y.onSizeChange(()=>A))}this.tabbarServices.set(c,y)}return y}getAllAccordionService(){return this.accordionServices}getAccordionService(c,y){let b=this.accordionServices.get(c);return b||(b=this.injector.get(a.AccordionService,[c,y]),this.accordionServices.set(c,b)),b}getTabbarHandler(c){let y=this.doGetTabbarHandler(c);if(!y){const b=this.viewToContainerMap.get(c);b?y=this.doGetTabbarHandler(b||""):this.debug.warn(`${c} view tabbar not found.`)}return y}getContainer(c){for(const y of this.tabbarServices.values()){const b=y.getContainer(c);if(b)return b}}getExtraTopMenu(){return this.contextmenuService.createMenu({id:m.MenuId.ActivityBarTopExtra})}getExtraMenu(){return this.contextmenuService.createMenu({id:m.MenuId.ActivityBarExtra})}doGetTabbarHandler(c){let y=this.handleMap.get(c);if(!y){let b;for(const A of this.tabbarServices.values())if(A.getContainer(c)){b=A.location;break}b&&(y=this.injector.get(u.TabBarHandler,[c,this.getTabbarService(b)]),this.handleMap.set(c,y))}return y}collectTabbarComponent(c,y,b,A){if(A&&this.debug.warn("collectTabbarComponent api warning: Please move react component into options.component!"),y.hideIfEmpty&&!c.length&&!y.component){this.holdTabbarComponent.set(y.containerId,{views:c,options:y,side:b}),this.tabbarUpdateSet.has(y.containerId)&&this.tryUpdateTabbar(y.containerId);const w=this.getAccordionService(y.containerId);return w.addDispose(w.onBeforeAppendViewEvent(()=>{this.tryUpdateTabbar(y.containerId)})),w.addDispose(w.onAfterDisposeViewEvent(()=>{w.views.length===0&&(this.disposeContainer(y.containerId),this.holdTabbarComponent.set(y.containerId,{views:c,options:y,side:b}))})),y.containerId}return this.getTabbarService(b).registerContainer(y.containerId,{views:c,options:y}),c.forEach(w=>{this.viewToContainerMap.set(w.id,y.containerId)}),y.containerId}getViewAccordionService(c){const y=this.viewToContainerMap.get(c);if(y)return this.getAccordionService(y)}collectViewComponent(c,y,b={},A){this.customViews.set(c.id,c),this.viewToContainerMap.set(c.id,y);const S=this.getAccordionService(y);return b&&(c.initialProps=b),S.appendView(c,A?.isReplace),S.views.length===1&&(this.tabbarUpdateSet.add(y),this.tryUpdateTabbar(y)),A?.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.${y}`,{forceShow:!0}))})),y}ensureViewReady(c){const y=this.viewToContainerMap.get(c),b=new p.Deferred,A=this.getAccordionService(y);return A.visibleViews.get().find(S=>S.id===c)?b.resolve():A.addDispose(A.onAfterAppendViewEvent(S=>{S===c&&b.resolve()})),b.promise}tryUpdateTabbar(c){const y=this.holdTabbarComponent.get(c);y&&(this.getTabbarService(y.side).registerContainer(c,{views:y.views,options:y.options}),this.tabbarUpdateSet.delete(c),this.holdTabbarComponent.delete(c))}replaceViewComponent(c,y){const b=this.viewToContainerMap.get(c.id);if(!b){this.debug.warn(`The container corresponding to \`${c.id}\` was not found, please check the incoming parameters!`);return}const A=this.customViews.get(c.id);A&&(c=Object.assign(A,c)),this.collectViewComponent(c,b,y,{isReplace:!0})}disposeViewComponent(c){const y=this.disposableMap.get(c);y&&y.dispose();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).disposeView(c)}revealView(c){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).revealView(c)}disposeContainer(c){let y;for(const b of this.tabbarServices.values())if(b.getContainer(c)){y=b.location;break}y?this.getTabbarService(y).disposeContainer(c):this.debug.warn(`The Tabbar to the \`${c}\` was not found.`)}expandBottom(c){const y=this.getTabbarService(d.SlotLocation.bottom);y.currentContainerId.get()||y.updateCurrentContainerId(y.currentContainerId.get()||y.previousContainerId||y.containersMap.keys().next().value),y.doExpand(c),this.contextKeyService.createKey("bottomFullExpanded",y.isExpanded)}get bottomExpanded(){const c=this.getTabbarService(d.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)(g.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)(d.CommandRegistry),n.__metadata("design:type",Object)],E.prototype,"commandRegistry",void 0),n.__decorate([(0,o.Autowired)(d.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)(d.AppConfig),n.__metadata("design:type",Object)],E.prototype,"appConfig",void 0),n.__decorate([(0,o.Autowired)(d.IContextKeyService),n.__metadata("design:type",Object)],E.prototype,"contextKeyService",void 0),n.__decorate([(0,o.Autowired)(d.ComponentRegistry),n.__metadata("design:type",Object)],E.prototype,"componentRegistry",void 0),n.__decorate([(0,o.Autowired)(d.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,d.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),d=e(30144),_=e(68456),v=e(95416),m=e(93899),p=e(43718),s=e(92323),g=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 l=class extends p.WithEventBus{async initialize(){await this.layoutState.initStorage();const f=this.contributionProvider.getContributions();for(const b of f)b.registerComponent&&b.registerComponent(this.componentRegistry);const c=this.rendererContributionProvider.getContributions();for(const b of c)b.registerRenderer&&b.registerRenderer(o.slotRendererRegistry);const y=this.toolBarContributionProvider.getContributions();for(const b of y)b.registerToolbarItems&&b.registerToolbarItems(this.toolBarRegistry)}registerComponent(f){f.register(g.DROP_RIGHT_CONTAINER,[],{component:a.RightDropArea,hideTab:!0,containerId:g.DROP_RIGHT_CONTAINER}),f.register(g.DROP_BOTTOM_CONTAINER,[],{component:a.BottomDropArea,hideTab:!0,containerId:g.DROP_BOTTOM_CONTAINER})}async onStart(){this.registerSideToggleKey()}async onDidStart(){this.mainLayoutService.didMount()}registerRenderer(f){f.registerSlotRenderer(o.SlotLocation.right,u.RightTabRenderer),f.registerSlotRenderer(o.SlotLocation.left,u.LeftTabRenderer),f.registerSlotRenderer(o.SlotLocation.bottom,u.BottomTabRenderer)}registerCommands(f){f.registerCommand(t.HIDE_LEFT_PANEL_COMMAND,{execute:()=>{this.mainLayoutService.toggleSlot(o.SlotLocation.left,!1)}}),f.registerCommand(t.SHOW_LEFT_PANEL_COMMAND,{execute:c=>{this.mainLayoutService.toggleSlot(o.SlotLocation.left,!0,c)}}),f.registerCommand(t.TOGGLE_LEFT_PANEL_COMMAND,{execute:(c,y)=>{this.mainLayoutService.toggleSlot(o.SlotLocation.left,c,y)}}),f.registerCommand(t.HIDE_RIGHT_PANEL_COMMAND,{execute:()=>{this.mainLayoutService.toggleSlot(o.SlotLocation.right,!1)}}),f.registerCommand(t.SHOW_RIGHT_PANEL_COMMAND,{execute:c=>{this.mainLayoutService.toggleSlot(o.SlotLocation.right,!0,c)}}),f.registerCommand(t.TOGGLE_RIGHT_PANEL_COMMAND,{execute:(c,y)=>{this.mainLayoutService.toggleSlot(o.SlotLocation.right,c,y)}}),f.registerCommand(t.WORKBENCH_ACTION_CLOSESIDECAR,{execute:()=>Promise.all([this.mainLayoutService.toggleSlot(o.SlotLocation.left,!1),this.mainLayoutService.toggleSlot(o.SlotLocation.right,!1)])}),f.registerCommand(t.SHOW_BOTTOM_PANEL_COMMAND,{execute:()=>{this.mainLayoutService.toggleSlot(o.SlotLocation.bottom,!0)}}),f.registerCommand(t.HIDE_BOTTOM_PANEL_COMMAND,{execute:()=>{this.mainLayoutService.toggleSlot(o.SlotLocation.bottom,!1)}}),f.registerCommand(t.WORKBENCH_ACTION_CLOSEPANEL),f.registerCommand(t.IS_VISIBLE_BOTTOM_PANEL_COMMAND,{execute:()=>this.mainLayoutService.getTabbarService("bottom").currentContainerId.get()!==""}),f.registerCommand(t.IS_VISIBLE_LEFT_PANEL_COMMAND,{execute:()=>this.mainLayoutService.isVisible(o.SlotLocation.left)}),f.registerCommand(t.IS_VISIBLE_RIGHT_PANEL_COMMAND,{execute:()=>this.mainLayoutService.isVisible(o.SlotLocation.left)}),f.registerCommand({id:"view.outward.right-panel.hide"},{execute:()=>{this.commandService.executeCommand("main-layout.right-panel.toggle",!1)}}),f.registerCommand({id:"view.outward.right-panel.show"},{execute:c=>{this.commandService.executeCommand("main-layout.right-panel.toggle",!0,c)}}),f.registerCommand({id:"view.outward.left-panel.hide"},{execute:()=>{this.commandService.executeCommand("main-layout.left-panel.toggle",!1)}}),f.registerCommand({id:"view.outward.left-panel.show"},{execute:c=>{this.commandService.executeCommand("main-layout.left-panel.toggle",!0,c)}}),f.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)}}),f.registerCommand(o.LAYOUT_COMMANDS.OPEN_VIEW,{execute:()=>{this.commandService.executeCommand(o.QUICK_OPEN_COMMANDS.OPEN_VIEW.id)}})}registerMenus(f){f.registerMenuItem(m.MenuId.ActivityBarExtra,{submenu:m.MenuId.SettingsIconMenu,iconClass:(0,o.getIcon)("setting"),label:(0,p.localize)("layout.tabbar.setting"),order:1,group:"navigation"}),Object.entries({[o.SlotLocation.left]:[d.EXPLORER_CONTAINER_ID,d.SEARCH_CONTAINER_ID,d.SCM_CONTAINER_ID,d.DEBUG_CONTAINER_ID,d.EXTENSION_CONTAINER_ID],[o.SlotLocation.bottom]:[d.MARKER_CONTAINER_ID,d.OUTPUT_CONTAINER_ID,d.DEBUG_CONSOLE_CONTAINER_ID,d.TERMINAL_CONTAINER_ID]}).forEach(([c,y],b)=>{const A=this.mainLayoutService.getTabbarService(c);A.viewReady.promise.then(()=>{y.forEach(S=>{var w,T;const D=A.getContainer(S);D&&f.registerMenuItem(m.MenuId.MenubarViewMenu,{command:{id:`container.toggle.${S}`,label:(T=(w=D.options)===null||w===void 0?void 0:w.title)!==null&&T!==void 0?T:S},group:`${3+b}_${c}`})})})}),f.registerMenuItem(m.MenuId.MenubarViewMenu,{command:t.TOGGLE_LEFT_PANEL_COMMAND,group:"5_panel"}),f.registerMenuItem(m.MenuId.MenubarViewMenu,{command:t.TOGGLE_RIGHT_PANEL_COMMAND,group:"5_panel"}),f.registerMenuItem(m.MenuId.MenubarViewMenu,{command:t.TOGGLE_BOTTOM_PANEL_COMMAND,group:"5_panel"}),f.registerMenuItem(m.MenuId.MenubarViewMenu,{command:t.EXPAND_BOTTOM_PANEL,group:"5_panel",when:"!bottomFullExpanded"}),f.registerMenuItem(m.MenuId.MenubarViewMenu,{command:t.RETRACT_BOTTOM_PANEL,group:"5_panel",when:"bottomFullExpanded"}),f.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(f){f.registerHandler(this.quickOpenViewHandler,{title:(0,p.localize)("layout.action.openView"),commandId:o.LAYOUT_COMMANDS.QUICK_OPEN_VIEW.id,order:5,hideTab:!0})}};t.MainLayoutModuleContribution=l,n.__decorate([(0,r.Autowired)(g.IMainLayoutService),n.__metadata("design:type",Object)],l.prototype,"mainLayoutService",void 0),n.__decorate([(0,r.Autowired)(o.IContextKeyService),n.__metadata("design:type",Object)],l.prototype,"contextKeyService",void 0),n.__decorate([(0,r.Autowired)(p.IEventBus),n.__metadata("design:type",Object)],l.prototype,"eventBus",void 0),n.__decorate([(0,r.Autowired)(_.ComponentContribution),n.__metadata("design:type",Object)],l.prototype,"contributionProvider",void 0),n.__decorate([(0,r.Autowired)(o.SlotRendererContribution),n.__metadata("design:type",Object)],l.prototype,"rendererContributionProvider",void 0),n.__decorate([(0,r.Autowired)(_.ComponentRegistry),n.__metadata("design:type",Object)],l.prototype,"componentRegistry",void 0),n.__decorate([(0,r.Autowired)(s.CommandService),n.__metadata("design:type",Object)],l.prototype,"commandService",void 0),n.__decorate([(0,r.Autowired)(),n.__metadata("design:type",v.LayoutState)],l.prototype,"layoutState",void 0),n.__decorate([(0,r.Autowired)(_.TabBarToolbarContribution),n.__metadata("design:type",Object)],l.prototype,"toolBarContributionProvider",void 0),n.__decorate([(0,r.Autowired)(),n.__metadata("design:type",_.ToolbarRegistry)],l.prototype,"toolBarRegistry",void 0),n.__decorate([(0,r.Autowired)(o.KeybindingRegistry),n.__metadata("design:type",Object)],l.prototype,"keybindingRegistry",void 0),n.__decorate([(0,r.Autowired)(h.ViewQuickOpenHandler),n.__metadata("design:type",h.ViewQuickOpenHandler)],l.prototype,"quickOpenViewHandler",void 0),t.MainLayoutModuleContribution=l=n.__decorate([(0,p.Domain)(s.CommandContribution,o.ClientAppContribution,o.SlotRendererContribution,m.MenuContribution,o.QuickOpenContribution,_.ComponentContribution)],l)},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),d=e(74404),_=e(17793);let v=class{constructor(){this.prefix="view ",this.description=(0,o.localize)("layout.action.openView")}getModel(){return{onType:(g,a)=>a(this.getViewQuickOpenItems())}}getViewQuickOpenItems(){var g;const a=this.layoutService.getAllAccordionService(),h=Array.from(a.keys());let u=[];u=u.concat(h.map((l,E)=>this.injector.get(m,[l,{groupLabel:E===0?(0,o.localize)("layout.openView.containerTitle"):"",showBorder:!1}])));for(const l of h){const E=(g=a.get(l))===null||g===void 0?void 0:g.views;if(E)for(let f=0,c=E.length;f<c;f++)u.push(this.injector.get(p,[l,E[f],{groupLabel:f===0?(0,o.formatLocalize)("layout.openView.viewTitle",String(l).toUpperCase()):"",showBorder:!1}]))}return u}getOptions(){return{}}onClose(){}};t.ViewQuickOpenHandler=v,n.__decorate([(0,r.Autowired)(d.PrefixQuickOpenService),n.__metadata("design:type",Object)],v.prototype,"quickOpenService",void 0),n.__decorate([(0,r.Autowired)(_.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 d.QuickOpenItem{constructor(g,a){super(a),this.containerId=g,this.options=a}getLabel(){return String(this.containerId).toLocaleUpperCase()}isHidden(){return super.isHidden()}run(g){if(g!==d.Mode.OPEN)return!1;const a=this.layoutService.getTabbarHandler(this.containerId);return a?.activate(),!0}};t.ContainerQuickOpenItem=m,n.__decorate([(0,r.Autowired)(_.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 p=class extends d.QuickOpenItem{constructor(g,a,h){super(h),this.containerId=g,this.view=a,this.options=h}getLabel(){var g;return(g=this.view.name)===null||g===void 0?void 0:g.toUpperCase()}isHidden(){return super.isHidden()}run(g){if(g!==d.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=p,n.__decorate([(0,r.Autowired)(_.IMainLayoutService),n.__metadata("design:type",Object)],p.prototype,"layoutService",void 0),t.ViewQuickOpenItem=p=n.__decorate([(0,r.Injectable)({multiple:!0}),n.__metadata("design:paramtypes",[String,Object,Object])],p)},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),d=e(17793),_=e(752);let v=class{constructor(p,s){this.containerId=p,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(g=>{g.currentId===this.containerId?(this.onActivateEmitter.fire(),this.isVisible=!0):g.previousId===this.containerId&&(this.onInActivateEmitter.fire(),this.isVisible=!1)})}dispose(){this.tabbarService.containersMap.delete(this.containerId),this.tabbarService.disposeContainer(this.containerId)}disposeView(p){this.layoutService.disposeViewComponent(p)}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(p,s){const g=this.tabbarService.getContainer(this.containerId);g&&g.options&&(g.options.titleProps=s,g.options.titleComponent=p,g.fireChange(g))}setSize(p){this.layoutService.toggleSlot(this.tabbarService.location,!0,p+this.tabbarService.getBarSize())}setBadge(p){this.tabbarService.updateBadge(this.containerId,p)}getBadge(){return this.tabbarService.getContainer(this.containerId).options.badge}setIconClass(p){this.tabbarService.getContainer(this.containerId).options.iconClass=p}isCollapsed(p){return this.accordionService.getViewState(p).collapsed}setCollapsed(p,s){this.accordionService.toggleOpen(p,s)}toggleViews(p,s){for(const g of p){const a=this.accordionService.getViewState(g);this.accordionService.updateViewState(g,{...a,hidden:!s})}}updateViewTitle(p,s){this.accordionService.updateViewTitle(p,s)}updateViewDescription(p,s){this.accordionService.updateViewDesciption(p,s)}updateViewMessage(p,s){this.accordionService.updateViewMessage(p,s)}updateTitle(p){this.tabbarService.updateTitle(this.containerId,p)}setResizeLock(p){this.tabbarService.resizeHandle.lockSize(p)}};t.TabBarHandler=v,n.__decorate([(0,r.Autowired)(d.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,_.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)),d=e(97267),_=e(41869),v=e(25918),m=e(25719),p=e(63373),s=e(68969),g=e(17793),a=e(19951),h=n.__importDefault(e(5330)),u=e(752);function l(I,O){return O>=I.length?[I,[]]:O<=1?[[],I]:[I.slice(0,O-1),I.slice(O-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 f=I=>{var O;const{TabView:M,MoreTabView:R,forbidCollapse:P,barSize:k=48,panelBorderSize:F=0,tabClassName:L,className:B,margin:j,tabSize:W,canHideTabbar:U,renderOtherVisibleContainers:Q=()=>null,disableAutoAdjust:V}=I,{side:$,direction:Y,fullSize:z}=(0,o.useContext)(a.TabbarConfig),H=(0,_.useInjectable)(u.TabbarServiceFactory)($),K=(0,_.useDesignStyles)(h.default.tab_bar,"tab_bar"),Z=(0,_.useDesignStyles)(h.default.bar_content,"bar_content"),X=(0,o.useMemo)(()=>V?Number.MAX_SAFE_INTEGER:Math.floor(z-(j||0)/W),[V,z,j,W]),[oe,ie]=(0,o.useState)(l(H.visibleContainers.filter(ue=>{var Ie;return!(!((Ie=ue.options)===null||Ie===void 0)&&Ie.hideTab)}),X));(0,o.useEffect)(()=>{H.updateBarSize(k+F)},[]),(0,o.useEffect)(()=>{ie(l(H.visibleContainers.filter(Ie=>{var Pe;return!(!((Pe=Ie.options)===null||Pe===void 0)&&Pe.hideTab)}),X));const ue=H.onStateChange(()=>{ie(l(H.visibleContainers.filter(Ie=>{var Pe;return!(!((Pe=Ie.options)===null||Pe===void 0)&&Pe.hideTab)}),X))});return()=>{ue.dispose()}},[X]);const ge=(0,_.useAutorun)(H.currentContainerId),me=(0,_.usePreference)("workbench.hideSlotTabBarWhenHidePanel",!1),q=U&&me;q&&!ge&&((O=H.resizeHandle)===null||O===void 0||O.setSize(0));const[Se,_e]=oe;_e.forEach(ue=>{H.updateTabInMoreKey(ue.options.containerId,!0)});const ne=(0,o.useCallback)((ue,Ie,Pe,ve)=>{var Ae,Ce,fe;const xe=(Ae=ue.options)===null||Ae===void 0?void 0:Ae.containerId;if(!xe||ve&&(!((fe=(Ce=ue.options)===null||Ce===void 0?void 0:Ce.hideLocationTab)===null||fe===void 0)&&fe.includes(ve)))return null;Ie.updateTabInMoreKey(xe,!1);let Te;return o.default.createElement("li",{draggable:!0,onDragStart:Ne=>{if(Te){const pe=Te.cloneNode(!0);pe.classList.add(h.default.dragging),L&&(0,_.addClassName)(pe,L),document.body.appendChild(pe),Ne.persist(),requestAnimationFrame(()=>{Ne.dataTransfer.setDragImage(pe,0,0),document.body.removeChild(pe)})}Ie.handleDragStart(Ne,xe)},onDragOver:Ne=>{Ne.preventDefault(),Te&&Te.classList.add("on-drag-over")},onDragLeave:()=>{Te&&Te.classList.remove("on-drag-over")},onDrop:Ne=>{Te&&Te.classList.remove("on-drag-over"),Ie.handleDrop(Ne,xe)},onDragEnd:Ne=>{Ie.handleDragEnd(Ne)},key:xe,id:xe,onContextMenu:Ne=>Ie.handleContextMenu(Ne,xe),onClick:Ne=>Ie.handleTabClick(Ne,q||P),ref:Ne=>Te=Ne,className:(0,r.default)({active:Pe===xe},L)},o.default.createElement(M,{component:ue}))},[]);return o.default.createElement("div",{className:(0,r.default)([K,B])},o.default.createElement("div",{className:Z,style:{flexDirection:m.Layout.getTabbarDirection(Y)}},Se.map(ue=>ne(ue,H,ge,$)),Q({props:I,renderContainers:ne}),_e.length?o.default.createElement("li",{key:"tab-more",onClick:ue=>{var Ie;return H.showMoreMenu(ue,Se[Se.length-1]&&((Ie=Se[Se.length-1].options)===null||Ie===void 0?void 0:Ie.containerId))},className:L},o.default.createElement(R,null)):null))};t.TabbarViewBase=f;const c=({component:I})=>{var O,M,R;const P=(0,_.useInjectable)(s.IProgressService),k=(0,_.useInjectable)(_.KeybindingRegistry),F=(0,_.useDesignStyles)(h.default.icon_tab,"icon_tab"),[L,B]=(0,o.useState)(I),j=P.getIndicator(((O=L.options)===null||O===void 0?void 0:O.containerId)||""),W=(0,_.useAutorun)(j.progressModel.show),U=(0,o.useMemo)(()=>{const Q=L.options;return Q?.activateKeyBinding?`${Q?.title} (${k.acceleratorForKeyString(Q.activateKeyBinding,"+")})`:Q?.title},[L]);return(0,o.useEffect)(()=>{const Q=L.onChange(V=>{B({...V})});return()=>{Q.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(d.Badge,{className:h.default.tab_badge},o.default.createElement("span",{className:h.default.icon_wrapper},o.default.createElement(d.Icon,{icon:"time-circle"}))):((R=L.options)===null||R===void 0?void 0:R.badge)&&o.default.createElement(d.Badge,{className:h.default.tab_badge},E(L.options.badge)))};t.IconTabView=c;const y=({component:I})=>{var O,M,R;const[P,k]=(0,o.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=(O=P.options)===null||O===void 0?void 0:O.title)===null||M===void 0?void 0:M.toUpperCase()),((R=P.options)===null||R===void 0?void 0:R.badge)&&o.default.createElement(d.Badge,{className:h.default.tab_badge},E(P.options.badge)))};t.TextTabView=y;const b=()=>{const I=(0,_.useDesignStyles)(h.default.icon_tab,"icon_tab");return o.default.createElement("div",{className:I},o.default.createElement("div",{className:(0,r.default)((0,_.getIcon)("ellipsis"),"activity-icon"),title:"extra tabs"}))};t.IconElipses=b;const A=()=>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,_.getIcon)("doubleright")})));t.TextElipses=A;const S=I=>{const{barSize:O=48,style:M}=I,{side:R}=(0,o.useContext)(a.TabbarConfig),P=(0,_.useInjectable)(u.TabbarServiceFactory)(R),k=(0,_.useDesignStyles)(h.default.right_tab_bar,"right_tab_bar"),F=(0,_.useDesignStyles)(h.default.right_tab,"right_tab");return o.default.createElement("div",{id:p.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:O,panelBorderSize:1}))};t.RightTabbarRenderer=S;const w=({renderOtherVisibleContainers:I,isRenderExtraTopMenus:O=!0,renderExtraMenus:M,tabbarViewProps:R})=>{const{side:P}=(0,o.useContext)(a.TabbarConfig),k=(0,_.useInjectable)(g.IMainLayoutService),F=(0,_.useInjectable)(u.TabbarServiceFactory)(P),L=(0,o.useMemo)(()=>k.getExtraTopMenu(),[k]),B=(0,o.useMemo)(()=>k.getExtraMenu(),[k]),j=(0,_.useDesignStyles)(h.default.left_tab_bar,"left_tab_bar"),W=(0,_.useDesignStyles)(h.default.left_tab,"left_tab");return o.default.createElement("div",{id:p.VIEW_CONTAINERS.LEFT_TABBAR,className:j,onContextMenu:F.handleContextMenu},O&&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,...R}),M||o.default.createElement(v.InlineMenuBar,{className:h.default.vertical_icons,menus:B}))};t.LeftTabbarRenderer=w;const T=()=>{const{side:I}=(0,o.useContext)(a.TabbarConfig),O=(0,_.useInjectable)(u.TabbarServiceFactory)(I),M=(0,_.useDesignStyles)(h.default.bottom_bar_container,"bottom_bar_container"),R=(0,_.useDesignStyles)(h.default.bottom_tab,"bottom_tab");return o.default.createElement("div",{id:p.VIEW_CONTAINERS.BOTTOM_TABBAR,onContextMenu:O.handleContextMenu,className:(0,r.default)(M,"next_bottom_bar")},o.default.createElement(t.TabbarViewBase,{tabSize:80,MoreTabView:t.TextElipses,tabClassName:R,TabView:t.TextTabView,barSize:24,panelBorderSize:1,canHideTabbar:!0}))};t.BottomTabbarRenderer=T;const D=I=>{const{barSize:O=32,style:M}=I,{side:R}=(0,o.useContext)(a.TabbarConfig),P=(0,_.useInjectable)(u.TabbarServiceFactory)(R);(0,o.useEffect)(()=>{P.setIsLatter(!0)},[P]);const k=(0,_.useDesignStyles)(h.default.ai_right_tab_bar,"ai_right_tab_bar"),F=(0,_.useDesignStyles)(h.default.ai_right_tab,"ai_right_tab");return o.default.createElement("div",{id:R,className:k,style:M,onContextMenu:P.handleContextMenu},o.default.createElement(t.TabbarViewBase,{tabSize:32,MoreTabView:t.IconElipses,tabClassName:F,TabView:t.IconTabView,barSize:O,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)),d=e(76003),_=e(41869),v=e(25918),m=e(1149),p=e(68969),s=e(68974),g=e(9522),a=e(70936),h=e(91527),u=e(19951),l=n.__importDefault(e(5330)),E=e(752),f=o.default.memo(({children:I})=>I,(I,O)=>!(I.visible||O.visible)),c={display:"block"},y={display:"none"},b=I=>{const{PanelView:O,panelSize:M,id:R,PanelViewProps:P}=I,{side:k}=o.default.useContext(u.TabbarConfig),F=(0,_.useInjectable)(_.AppConfig),L=F.panelSizes&&F.panelSizes[k],B=(0,_.useInjectable)(E.TabbarServiceFactory)(k),j=(0,_.useAutorun)(B.currentContainerId),W=(0,_.useDesignStyles)(l.default.tab_panel,"tab_panel"),U=(0,_.useDesignStyles)(l.default.tab_panel_hidden,"tab_panel_hidden");return o.default.useEffect(()=>{B.updatePanelSize(L||M||335)},[]),o.default.createElement("div",{id:R,className:(0,r.default)("kt-tab-panel",W,{[U]:!j})},B.visibleContainers.map(Q=>{var V;const $=(V=Q.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)(l.default.panel_wrap,$),"data-viewlet-id":$,style:j===$?c:y,id:R},o.default.createElement(_.ErrorBoundary,null,o.default.createElement(f,{visible:j===$},o.default.createElement(O,{titleMenu:Y,side:k,component:Q,...P}))))}))};t.BaseTabPanelView=b;const A=({component:I,titleMenu:O,side:M,renderContainerWrap:R,className:P,customTitleBar:k})=>{var F,L;const B=o.default.useRef(),j=o.default.useRef(null),W=(0,_.useInjectable)(_.AppConfig),{title:U,titleComponent:Q,component:V,containerId:$,draggable:Y}=I.options||{},z=(0,_.useInjectable)(d.INJECTOR_TOKEN),H=(0,_.useInjectable)(m.LayoutViewSizeConfig),K=(0,o.useCallback)(ge=>{z.get(g.AccordionServiceFactory)($).handleContextMenu(ge)},[$]);if(!$)return null;const X=(0,_.useInjectable)(p.IProgressService).getIndicator($);if(!X)return null;const oe=(0,_.useViewState)(M,j),ie=o.default.useCallback(ge=>R?R({children:ge}):ge,[R]);return o.default.createElement("div",{ref:j,className:(0,r.default)(l.default.view_container,P)},!!k&&k,!V&&o.default.createElement("div",{onContextMenu:K,className:l.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:O})}):null,Q&&o.default.createElement("div",{className:l.default.panel_component},o.default.createElement(_.ConfigProvider,{value:W},o.default.createElement(_.ComponentRenderer,{Component:Q,initialProps:(F=I.options)===null||F===void 0?void 0:F.titleProps})))),o.default.createElement("div",{className:l.default.container_wrap,ref:ge=>B.current=ge},o.default.createElement(s.ProgressBar,{progressModel:X.progressModel}),ie(V?o.default.createElement(_.ConfigProvider,{value:W},o.default.createElement(_.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=A;const S=({component:I,titleMenu:O,side:M})=>{var R,P,k,F;const L=o.default.useRef(),B=o.default.useRef(null),j=(0,_.useInjectable)(_.AppConfig),W=(0,_.useInjectable)(E.TabbarServiceFactory)(M),U=(0,_.useDesignStyles)(l.default.panel_title_bar,"panel_title_bar"),Q=(0,_.useDesignStyles)(l.default.panel_toolbar_container,"panel_toolbar_container"),V=(0,_.useViewState)(M,B),$=(0,_.useInjectable)(m.LayoutViewSizeConfig),Y=(0,_.useInjectable)(p.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:l.default.panel_container},o.default.createElement("div",{className:U,style:{height:$.panelTitleBarHeight}},o.default.createElement("h1",null,(P=(R=I.options)===null||R===void 0?void 0:R.title)===null||P===void 0?void 0:P.toUpperCase()),o.default.createElement("div",{className:l.default.title_component_container},K&&o.default.createElement(_.ComponentRenderer,{Component:K,initialProps:(k=I.options)===null||k===void 0?void 0:k.titleProps})),o.default.createElement("div",{className:Q},O&&o.default.createElement(v.InlineActionBar,{menus:O}),o.default.createElement(v.InlineMenuBar,{menus:W.commonTitleMenu,moreAtFirst:!0}))),o.default.createElement("div",{className:l.default.container_wrap,ref:X=>L.current=X},o.default.createElement(s.ProgressBar,{progressModel:Z.progressModel}),z?o.default.createElement(_.ConfigProvider,{value:j},o.default.createElement(_.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:S,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)),d=e(41869),_=e(81878),v=e(25719),m=e(63373),p=e(46245),s=e(66368),g=n.__importDefault(e(5330)),a=e(752);t.TabbarConfig=(0,o.createContext)({side:d.SlotLocation.left,direction:"left-to-right",fullSize:0}),t.TabRendererBase=(0,o.memo)(({id:E,className:f,components:c,direction:y="left-to-right",TabbarView:b,side:A,TabpanelView:S})=>{const w=(0,d.useInjectable)(a.TabbarServiceFactory)(A),T=(0,d.useInjectable)(d.IEventBus),D=(0,o.useContext)(_.PanelContext),I=(0,o.useRef)(null),[O,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 R=(0,o.useCallback)(()=>{I.current&&M(I.current[v.Layout.getDomSizeProperty(y)])},[]);return(0,o.useEffect)(()=>{d.fastdom.measure(()=>{R()});let P;T.onDirective(d.ResizeEvent.createDirective(A),()=>{P&&P.dispose(),P=d.fastdom.measureAtNextFrame(()=>{R()})})},[]),o.default.createElement("div",{ref:I,id:E,className:(0,r.default)(g.default.tab_container,f),style:{flexDirection:v.Layout.getFlexDirection(y)}},o.default.createElement(t.TabbarConfig.Provider,{value:{side:A,direction:y,fullSize:O}},o.default.createElement(b,null),o.default.createElement(S,null)))});const h=({className:E,components:f,tabbarView:c,tabpanelView:y})=>o.default.createElement(t.TabRendererBase,{side:d.SlotLocation.right,direction:"right-to-left",id:m.VIEW_CONTAINERS.RIGHT_TABBAR_PANEL,className:(0,r.default)(E,"right-slot"),components:f,TabbarView:c??p.RightTabbarRenderer,TabpanelView:y??s.RightTabPanelRenderer});t.RightTabRenderer=h;const u=({className:E,components:f,tabbarView:c})=>o.default.createElement(t.TabRendererBase,{side:d.SlotLocation.left,direction:"left-to-right",id:m.VIEW_CONTAINERS.LEFT_TABBAR_PANEL,className:(0,r.default)(E,"left-slot"),components:f,TabbarView:c??p.LeftTabbarRenderer,TabpanelView:s.LeftTabPanelRenderer});t.LeftTabRenderer=u;const l=({className:E,components:f,tabbarView:c})=>o.default.createElement(t.TabRendererBase,{side:d.SlotLocation.bottom,id:m.VIEW_CONTAINERS.BOTTOM_TABBAR_PANEL,direction:"bottom-to-top",className:(0,r.default)(E,"bottom-slot"),components:f,TabbarView:c??p.BottomTabbarRenderer,TabpanelView:s.BottomTabPanelRenderer});t.BottomTabRenderer=l},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),d=e(41869),_=e(30144),v=e(95416),m=e(93899),p=e(68969),s=e(28423),g=e(17793),a=e(53576);t.TabbarServiceFactory=Symbol("TabbarServiceFactory");const h=f=>c=>f.get(g.IMainLayoutService).getTabbarService(c);t.TabbarServiceFactoryFn=h;const u={left:"view",right:"extendView",bottom:"panel"},l=void 0;let E=class extends d.WithEventBus{constructor(c){super(),this.location=c,this.doChangeViewEmitter=new d.Emitter,this.onStateChangeEmitter=new d.Emitter,this.onStateChange=this.onStateChangeEmitter.event,this.shouldChangeView=(0,s.observableFromEventOpts)({owner:this,equalsFn:()=>!1},this.doChangeViewEmitter.event,()=>{}),this.containerIdObs=(0,s.observableValue)(this,l),this.currentContainerId=(0,s.derivedOpts)({owner:this,equalsFn:()=>!1},y=>(this.shouldChangeView.read(y),this.containerIdObs.read(y))),this.nextContainerId="",this.useFirstContainerId=!1,this.previousContainerId=void 0,this.containersMap=new Map,this.viewReady=new d.Deferred,this.state=new Map,this.storedState={},this.accordionRestored=new Set,this.onCurrentChangeEmitter=new d.Emitter,this.onCurrentChange=this.onCurrentChangeEmitter.event,this.onSizeChangeEmitter=new d.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 d.Emitter,this.isEmptyTabbar=!0,this.updatePanel=(0,r.default)(y=>{this.resizeHandle&&this.resizeHandle.hidePanel(y)},60),this._menuMap=new Map,this.handleContextMenu=(y,b)=>{y.preventDefault(),y.stopPropagation();const A=this.menuService.createMenu(this.menuId,b?this.scopedCtxKeyService:this.contextKeyService),S=(0,m.generateCtxMenu)({menus:A,args:[{containerId:b}]});this.contextMenuRenderer.show({menuNodes:S[1],anchor:{x:y.clientX,y:y.clientY}})},this.setIsLatter(c===d.SlotLocation.right||c===d.SlotLocation.bottom),this.scopedCtxKeyService=this.contextKeyService.createScoped(),this.scopedCtxKeyService.createKey("triggerWithTab",!0),this.menuRegistry.registerMenuItem(this.menuId,{command:{id:this.registerGlobalToggleCommand(),label:(0,d.localize)("layout.tabbar.toggle")},group:"0_global",when:"triggerWithTab == true"}),this.activatedKey=this.contextKeyService.createKey((0,d.getTabbarCtxKey)(this.location),""),this.location==="bottom"&&(this.registerPanelCommands(),this.registerPanelMenus()),this.eventBus.onDirective(d.ResizeEvent.createDirective(this.location),()=>{this.onResize()})}get onDidRegisterContainer(){return this.onDidRegisterContainerEmitter.event}setIsLatter(c){this.isLatter=c}updateNextContainerId(c){(0,d.isUndefined)(c)?this.useFirstContainerId=!0:this.nextContainerId=c}updateCurrentContainerId(c){(0,s.transaction)(y=>{this.containerIdObs.set(c,y)})}updateBadge(c,y){const b=this.getContainer(c);b&&b.options&&(b.options.badge=y),b?.fireChange(b)}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,y)=>{this.layoutService.toggleSlot(d.SlotLocation.bottom,c,y)}})}getContainerState(c){return this.state.get(c)}hideContainer(c){const y=this.state.get(c);y&&(y.hidden=!0,this.onStateChangeEmitter.fire())}showContainer(c){const y=this.state.get(c);y&&(y.hidden=!1,this.onStateChangeEmitter.fire())}updatePanelVisibility(c){c===void 0&&(c=this.containersMap.size>0),this.updatePanel(c)}ensureViewReady(){(0,d.isDefined)(this.barSize)&&(0,d.isDefined)(this.panelSize)?this.resolveViewReady():this.shouldWaitForViewRender=!0}updatePanelSize(c){this.panelSize=c,(0,d.isDefined)(this.barSize)&&this.shouldWaitForViewRender&&this.resolveViewReady()}updateBarSize(c){this.barSize=c,(0,d.isDefined)(this.panelSize)&&this.shouldWaitForViewRender&&this.resolveViewReady()}resolveViewReady(){this.isEmptyTabbar?d.Event.once(this.onDidRegisterContainer)(()=>{this.viewReady.resolve()}):this.viewReady.resolve()}getBarSize(){return this.barSize}updateTabInMoreKey(c,y){const b=this.tabInMoreKeyMap.get(c);b&&b.set(y)}get visibleContainers(){const c=[];return this.containersMap.forEach(y=>{const b=y.options&&this.state.get(y.options.containerId);(!b||!b.hidden)&&c.push(y)}),c.sort((y,b)=>this.getContainerState(y.options.containerId).priority-this.getContainerState(b.options.containerId).priority)}registerResizeHandle(c){const{setSize:y,setRelativeSize:b,getSize:A,getRelativeSize:S,lockSize:w,setMaxSize:T,hidePanel:D}=c;return this.resizeHandle={setSize:I=>y(I,this.isLatter),setRelativeSize:(I,O)=>b(I,O,this.isLatter),getSize:()=>A(this.isLatter),getRelativeSize:()=>S(this.isLatter),setMaxSize:I=>T(I,this.isLatter),lockSize:I=>w(I,this.isLatter),hidePanel:I=>D(I)},this.listenCurrentChange()}registerContainer(c,y){var b;if(this.containersMap.has(c))return;this.useFirstContainerId&&(this.useFirstContainerId=!1,this.updateCurrentContainerId(c)),this.nextContainerId===c&&this.updateCurrentContainerId(c);const A=new d.DisposableCollection,S=y.options||{containerId:c};y.options=S;const w=new d.Emitter;this.containersMap.set(c,{fireChange:D=>w.fire(D),onChange:w.event,views:y.views,options:S}),A.push({dispose:()=>{this.containersMap.delete(c),this.state.delete(c)}}),this.updatePanelVisibility(this.containersMap.size>0);let T=this.sortedContainers.findIndex(D=>{var I,O;return(((I=D.options)===null||I===void 0?void 0:I.priority)||1)<=(((O=y.options)===null||O===void 0?void 0:O.priority)||1)});T===-1&&(T=this.sortedContainers.length),this.sortedContainers.splice(T,0,y);for(let D=T;D<this.sortedContainers.length;D++){const O=(b=this.sortedContainers[D].options)===null||b===void 0?void 0:b.containerId;if(O){const M=this.storedState[O]||this.getContainerState(O)||{};this.state.set(O,{hidden:M.hidden,priority:D})}}A.push(this.registerSideEffects(y)),this.eventBus.fire(new g.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,A),this.onDidRegisterContainerEmitter.fire(c)}registerSideEffects(c){var y;const b=new d.DisposableCollection;!((y=c.options)===null||y===void 0)&&y.hideTab||(b.push(this.registerHideMenu(c)),b.push(this.registerMoreMenu(c))),b.push(this.registerActivateKeyBinding(c,c.options.fromExtension));const A=this.contextKeyService.createKey(`workbench.${u[this.location]||"view"}.${c.options.containerId}`,!0);return b.push({dispose:()=>{A.set(!1)}}),b.push(this.progressService.registerProgressIndicator(c.options.containerId)),b.push(this.registerContainerPanelRelatedCommand(c)),b}registerContainerPanelRelatedCommand(c){var y,b,A,S,w;const T=new d.DisposableCollection,D=(y=c.options)===null||y===void 0?void 0:y.containerId;return T.push(this.commandRegistry.registerCommand({id:"container.show."+D,label:(0,d.formatLocalize)("view.command.show",(A=(b=c.options)===null||b===void 0?void 0:b.title)!==null&&A!==void 0?A:D),labelLocalized:(0,d.createFormatLocalizedStr)("view.command.show",(w=(S=c.options)===null||S===void 0?void 0:S.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 y=new d.DisposableCollection,b=c.options.containerId;return y.push(this.menuRegistry.registerMenuItem(this.menuId,{command:{id:this.registerVisibleToggleCommand(b,y),label:c.options.title||b},group:"1_widgets"})),y}registerMoreMenu(c){const y=new d.DisposableCollection,b=c.options.containerId,A=this.scopedCtxKeyService.createKey(this.getTabInMoreCtxKey(b),!1);return this.tabInMoreKeyMap.set(b,A),y.push({dispose:()=>this.tabInMoreKeyMap.delete(b)}),y.push(this.menuRegistry.registerMenuItem(this.moreMenuId,{command:{id:this.registerMoreToggleCommand(c,y),label:c.options.title||b},group:"inline",when:`${this.getTabInMoreCtxKey(b)} == true`,toggledWhen:`${(0,d.getTabbarCtxKey)(this.location)} == ${b}`,iconClass:c.options.iconClass})),y}disposeContainer(c){var y;const b=this.disposableMap.get(c);b&&b.dispose(),this.currentContainerId.get()===c&&this.updateCurrentContainerId(((y=this.visibleContainers[0].options)===null||y===void 0?void 0:y.containerId)||"")}updateTitle(c,y){const b=this.getContainer(c);b&&(b.options.title=y)}getContainer(c){return c?this.containersMap.get(c):void 0}getTitleToolbarMenu(c){const y=this._menuMap.get(c);if(y)return y;const b=this.menuService.createMenu(m.MenuId.ViewTitle,this.viewContextKeyRegistry.getContextKeyService(c));this._menuMap.set(c,b);const A=this.disposableMap.get(c),S=[b,(0,d.toDisposable)(()=>{this._menuMap.delete(c)})];return A?A.pushAll(S):this.addDispose(S),b}doExpand(c){if(this.resizeHandle){const{setRelativeSize:y}=this.resizeHandle;c?this.isLatter?y(0,1):y(1,0):y(2,1)}}get isExpanded(){if(this.resizeHandle){const{getRelativeSize:c}=this.resizeHandle,y=c().join(",");return this.isLatter?y==="0,1":y==="1,0"}return!1}handleTabClick(c,y){const b=c.currentTarget.id;b===this.currentContainerId.get()&&!y?this.updateCurrentContainerId(""):this.updateCurrentContainerId(b)}showMoreMenu(c,y){const b=this.menuService.createMenu(this.moreMenuId,this.scopedCtxKeyService),A=(0,m.generateCtxMenu)({menus:b,args:[{lastContainerId:y}]});this.contextMenuRenderer.show({menuNodes:A[1],anchor:{x:c.clientX,y:c.clientY}})}handleDragStart(c,y){c.dataTransfer.setData("containerId",y),this.layoutService.showDropAreaForContainer(y)}handleDrop(c,y){if(c.dataTransfer.getData("containerId")){const b=c.dataTransfer.getData("containerId"),A=this.visibleContainers,S=A.findIndex(T=>b===T.options.containerId),w=A.findIndex(T=>y===T.options.containerId);this.doInsertTab(A,S,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=>{g.SUPPORT_ACCORDION_LOCATION.has(this.location)&&this.tryRestoreAccordionSize(c.options.containerId)})}removeContainer(c){const y=this.disposableMap.get(c);y?.dispose(),this.updateCurrentContainerId(""),this.doChangeViewEmitter.fire()}dynamicAddContainer(c,y){this.registerContainer(c,y),this.updateCurrentContainerId(c),this.doChangeViewEmitter.fire()}doInsertTab(c,y,b){const A=this.getContainerState(c[b].options.containerId).priority,S=(T,D)=>{const I=this.getContainerState(c[T].options.containerId),O=this.getContainerState(c[D].options.containerId);I.priority=O.priority};let w;if(y>b)for(w=b;w<y;w++)S(w,w+1);else for(w=b;w>y;w--)S(w,w-1);this.getContainerState(c[w].options.containerId).priority=A,this.doChangeViewEmitter.fire()}storeState(){const c={};this.state.forEach((y,b)=>{c[b]=y}),this.layoutState.setState(v.LAYOUT_STATE.getTabbarSpace(this.location),c),this.onStateChangeEmitter.fire()}registerActivateKeyBinding(c,y){const b=c.options,A=b.containerId,S=y?`workbench.view.extension.${A}`:`workbench.view.${A}`,w=new d.DisposableCollection;return w.push(this.commandRegistry.registerCommand({id:S},{execute:({forceShow:T}={})=>{this.location==="bottom"&&!T?this.updateCurrentContainerId(this.currentContainerId.get()===A?"":A):this.updateCurrentContainerId(A)}})),b.activateKeyBinding&&w.push(this.keybindingRegistry.registerKeybinding({command:S,keybinding:b.activateKeyBinding})),w}registerGlobalToggleCommand(){const c=`activity.bar.toggle.${this.location}`;return this.commandRegistry.registerCommand({id:c},{execute:({containerId:y})=>{this.doToggleTab(y)},isEnabled:()=>this.visibleContainers.length>1}),c}registerVisibleToggleCommand(c,y){const b=`activity.bar.toggle.${c}`;return y.push(this.commandRegistry.registerCommand({id:b},{execute:({forceShow:A}={})=>{this.doToggleTab(c,A)},isToggled:()=>!this.getContainerState(c).hidden,isEnabled:()=>this.getContainerState(c).hidden||this.visibleContainers.length!==1})),b}registerMoreToggleCommand(c,y){const{options:b}=c,{containerId:A}=b,S=`activity.bar.activate.more.${A}`;return y.push(this.commandRegistry.registerCommand({id:S},{execute:({lastContainerId:w})=>{if(this.updateCurrentContainerId(A),w){const T=this.getContainerState(A),D=this.getContainerState(w),I=T.priority;T.priority=D.priority,D.priority=I,this.storeState()}}})),S}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,y){const b=this.getContainerState(c);y===void 0?b.hidden=!b.hidden:b.hidden=!y,b.hidden&&this.currentContainerId.get()===c&&this.updateCurrentContainerId(this.visibleContainers[0].options.containerId),this.storeState()}shouldExpand(c){const y=this.getContainer(c);return y&&y.options&&y.options.expanded}onResize(){d.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:y})=>{this.previousContainerId=c===l?"":c,this.handleChange(y,c)})}handleChange(c,y){var b;if(!this.resizeHandle)return;const{getSize:A,setSize:S,lockSize:w}=this.resizeHandle;this.onCurrentChangeEmitter.fire({previousId:y,currentId:c});const T=this.shouldExpand(c);if(this.shouldExpand(this.previousContainerId)||T)this.handleFullExpanded(c,T);else if(c){y&&c!==y&&(this.prevSize=A());const D=this.getContainer(c);S(this.prevSize||this.panelSize+this.barSize),w(!!(!((b=D?.options)===null||b===void 0)&&b.noResize)),this.activatedKey.set(c)}else S(this.barSize),w(!0)}tryRestoreAccordionSize(c){var y,b;if(this.accordionRestored.has(c))return;const A=this.containersMap.get(c);if((!A||!((y=A.options)===null||y===void 0)&&y.component)&&((b=A?.options)===null||b===void 0?void 0:b.containerId)!==_.SCM_CONTAINER_ID)return;this.layoutService.getAccordionService(c).restoreState(),this.accordionRestored.add(c)}handleFullExpanded(c,y){if(!this.resizeHandle)return;const{setRelativeSize:b,setSize:A}=this.resizeHandle;c?y?this.isLatter?b(0,1):b(1,0):A(this.prevSize||this.panelSize+this.barSize):A(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)(d.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)(d.KeybindingRegistry),n.__metadata("design:type",Object)],E.prototype,"keybindingRegistry",void 0),n.__decorate([(0,o.Autowired)(),n.__metadata("design:type",d.ViewContextKeyRegistry)],E.prototype,"viewContextKeyRegistry",void 0),n.__decorate([(0,o.Autowired)(d.IContextKeyService),n.__metadata("design:type",Object)],E.prototype,"contextKeyService",void 0),n.__decorate([(0,o.Autowired)(g.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)(p.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),d=e(43718),_=e(17793);var v;(function(g){g.Open="2_open",g.Debug="4_debug",g.SCM="5_scm",g.More="9_more"})(v||(t.ViewContentGroups=v={}));function m(g,a){var h,u,l,E;const f=(h=g.group)!==null&&h!==void 0?h:v.More,c=(u=a.group)!==null&&u!==void 0?u:v.More;return f!==c?f.localeCompare(c):((l=g.order)!==null&&l!==void 0?l:5)-((E=a.order)!==null&&E!==void 0?E:5)}let p=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=p,n.__decorate([(0,r.Autowired)(o.IContextKeyService),n.__metadata("design:type",Object)],p.prototype,"contextKeyService",void 0),n.__decorate([(0,r.Autowired)(_.IViewsRegistry),n.__metadata("design:type",Object)],p.prototype,"viewsRegistry",void 0),t.ViewsController=p=n.__decorate([(0,r.Injectable)({multiple:!0}),n.__metadata("design:paramtypes",[String])],p);let s=class{constructor(){this.viewWelcomeContent=new d.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[l,E]of h)this.viewWelcomeContent.add(a,E),u.set(l,(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)),d=e(48412),_=e(41869),v=e(43718),m=n.__importDefault(e(81388)),p=e(58296);var s;(function(l){l.iconNameSegment="[A-Za-z0-9]+",l.iconNameExpression="[A-Za-z0-9\\-]+",l.iconModifierExpression="~[A-Za-z]+"})(s||(t.CSSIcon=s={}));const g=new RegExp(`(\\\\)?\\$\\((${s.iconNameExpression}(?:${s.iconModifierExpression})?)\\)`,"g");function a(l){const E=new Array;let f,c=0,y=0;for(;(f=g.exec(l))!==null;){y=f.index||0,E.push(l.substring(c,y)),c=(f.index||0)+f[0].length;const[,b,A]=f;E.push(b?`$(${A})`:o.default.createElement("span",{className:(0,_.getExternalIcon)(A)}))}return c<l.length&&E.push(l.substring(c)),E}const h=l=>{const{contents:E}=l,[f,c]=o.default.useState(E.map(A=>A.precondition?!1:null)),y=(0,_.useInjectable)(_.IContextKeyService),b=(0,_.useInjectable)(_.IOpenerService);return o.default.useEffect(()=>{const A=E.map(w=>{if(w.precondition){const T=new Set;return w.precondition.keys().forEach(D=>T.add(D)),T}return null}),S=y.onDidChangeContext(w=>{A.forEach((T,D)=>{T&&w.payload.affectsSome(T)&&c(f.map((I,O)=>O===D?y.match(E[D].precondition):I))})});return()=>S.dispose()},[E]),E.length===0?null:o.default.createElement(o.default.Fragment,null,E.map(({content:A,precondition:S},w)=>{const T=A.split(`
31928
31928
  `),D=[];for(let I of T){if(I=I.trim(),!I)continue;const O=(0,v.parseLinkedText)(I);if(O.nodes.length===1&&typeof O.nodes[0]!="string"){const M=O.nodes[0];D.push(o.default.createElement("div",{key:D.length,title:M.title,className:"button-container"},o.default.createElement(d.Button,{disabled:f[w]===!1,onClick:()=>b.open(M.href)},a(M.label))))}else{const M=O.nodes.map((R,P)=>typeof R=="string"?R:o.default.createElement("a",{key:P,className:(0,r.default)({disabled:R.href.startsWith("command:")&&f[w]===!1}),title:R.title,onClick:()=>b.open(R.href)},R.label));D.push(o.default.createElement("p",{key:D.length},M))}}return o.default.createElement(o.default.Fragment,{key:w},D)}))};function u(l,E){return l.viewId===E.viewId}t.WelcomeView=o.default.memo(l=>{const E=(0,_.useInjectable)(p.ViewsController,[l.viewId]),[f,c]=o.default.useState(E.contents);return o.default.useEffect(()=>{E.onDidChange(()=>{const y=E.contents;c(y)})},[]),f.length?o.default.createElement("div",{className:m.default.welcome},o.default.createElement(h,{contents:f})):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),d=e(43718),_=e(57517),v=e(21066),m=e(81001);t.MARKDOWN_EDITOR_COMPONENT_ID="MARKDOWN_EDITOR_COMPONENT_ID";let p=class{registerEditorComponent(g){g.registerEditorComponent({uid:t.MARKDOWN_EDITOR_COMPONENT_ID,component:m.MarkdownEditorComponent,scheme:d.Schemes.file}),g.registerEditorComponentResolver(d.Schemes.file,(a,h)=>{a.uri.path.ext===".md"&&h.push({type:_.EditorOpenType.component,componentId:t.MARKDOWN_EDITOR_COMPONENT_ID,title:(0,d.localize)("editorOpenType.preview"),weight:this.preferenceService.get("application.preferMarkdownPreview")?10:-1})})}};t.EmbeddedMarkdownEditorContribution=p,n.__decorate([(0,r.Autowired)(v.IMarkdownService),n.__metadata("design:type",Object)],p.prototype,"markdownService",void 0),n.__decorate([(0,r.Autowired)(o.PreferenceService),n.__metadata("design:type",Object)],p.prototype,"preferenceService",void 0),t.EmbeddedMarkdownEditorContribution=p=n.__decorate([(0,d.Domain)(_.BrowserEditorContribution)],p)},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),d=e(57517),_=e(21066),v=({resource:m})=>{let p=null;const s=(0,o.useInjectable)(_.IMarkdownService),g=(0,o.useInjectable)(d.IEditorDocumentModelService);return r.default.useEffect(()=>{if(p){const a=new o.Disposable,h=new o.CancellationTokenSource;return a.addDispose({dispose:()=>{h.cancel()}}),g.createModelReference(m.uri,"markdown-preview").then(u=>{if(h.token.isCancellationRequested){u&&u.dispose();return}const l=new o.Emitter;a.addDispose(l),a.addDispose(u.instance.getMonacoModel().onDidChangeContent(E=>{l.fire(u.instance.getText())})),p&&s.previewMarkdownInContainer(u.instance.getText(),p,h.token,void 0,l.event).then(E=>{a.addDispose(E)}),a.addDispose(u)}),()=>{a.dispose()}}}),r.default.createElement("div",{ref:a=>{p=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),d=e(21066),_=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:d.IMarkdownService,useClass:_.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=`
31929
31929
  /*---------------------------------------------------------------------------------------------